Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neither SpotCrime nor CrimeReports sensors work #13189

Closed
onlize opened this issue Mar 13, 2018 · 14 comments · Fixed by #23679
Closed

Neither SpotCrime nor CrimeReports sensors work #13189

onlize opened this issue Mar 13, 2018 · 14 comments · Fixed by #23679

Comments

@onlize
Copy link

onlize commented Mar 13, 2018

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.65.4

Python release (python3 --version):
3.5.3

Component/platform:
RaspberryPi 3 - Stretch

Description of problem:
Neither SpotCrime nor CrimeReports sensors work. Always show 0. I tried to increase the radius from 0.01 to 50000 and nothing changes. When I added sensors, I saw results for a few hours, but it switched to 0 and would not change.

Expected:

Problem-relevant configuration.yaml entries and steps to reproduce:

#CrimeReports
  - platform: crimereports
    name: 'Crime Reports'
    radius: 50000

#SpotCrime
  - platform: spotcrime
    name: 'Crime in the Area'
    radius: 50000
    days: 30

Traceback (if applicable):

Additional info:
I do not see any errors in the log.

@dshokouhi
Copy link
Member

I see the same thing here and when I search on the websites I see lots of results, maybe we are not understanding this component properly?

@onlize onlize changed the title Neither SpotCrime nor CrimeReports sernsors work Neither SpotCrime nor CrimeReports sensors work Mar 14, 2018
@jcconnell
Copy link
Contributor

It's possible that Crime Reports does not collect data in your area. Check their website to see if you can find more information: https://www.crimereports.com/

Spot Crime was recently updated to require an API key. I created a PR to update the docs, but it doesn't seem to have gone live yet. Not sure why. Here is some more information about the Spot Crime sensor: #12926

For more information on obtaining a Spot Crime API key, you can check the readme here: https://github.com/jcconnell/python-spotcrime

@dshokouhi
Copy link
Member

@jcconnell I get 0 crimereports in the sensor and taking a look online I see almost 500 incidents in my area, so something is not right here.

I will provide an update on spot crime after the merged code is released

@jcconnell
Copy link
Contributor

Regarding Crime Reports, I'm not sure what the issue may be then but it's author @happyleavesaoc may be more help.

The Spot Crime code should have already been merged. You can check if you're using the latest by referencing the spotcrime.py file in /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/. Note: your python version may be different.

If it says REQUIREMENTS = ['spotcrime==1.0.3'] near the top, it's already being used in your installation.

@onlize
Copy link
Author

onlize commented Mar 28, 2018

My installation says REQUIREMENTS = ['spotcrime==1.0.2']. I use latest 0.65.6 version of Home Assistant. How can I upgrade it?

Also, is the only way to get that API key by calling or emailing them? I do not like the idea of giving them my information. Should I say it is for development?

@jcconnell
Copy link
Contributor

I'll ask about why it's not in the latest release yet. The PR has been accepted but maybe because it's a breaking change it has not been included.

You'll have to contact them for more info on access to the API. They had an API key that was publicly available and it was used in the initial python-spotcrime package but I was asked not to include it any longer and it's no longer valid.

@onlize
Copy link
Author

onlize commented Mar 31, 2018

A few days ago I emailed them and asked about API key. I did not receive any reply from them. Is there anything I can do about this? Should I email them again and again until they reply? Please explain how will it work with requesting API key.

@dshokouhi
Copy link
Member

I have also emailed them when 0.66 went live last week and have not heard back either. How long do you think the expected wait time is @jcconnell ?

@onlize
Copy link
Author

onlize commented Apr 20, 2018

I did not receive reply from them, but I found that someone commented on this page: https://www.home-assistant.io/blog/2018/03/30/release-66/

This is what they said: "So I requested an API key from Spotcrime, and was told they only give out API keys to commercial contracts. Is that the only option now - pay for a license?"

What to do? Is there any way around it? Will we be able to use this component?

@dshokouhi
Copy link
Member

Still no response on my end too.

@ttaidapos
Copy link

ttaidapos commented May 24, 2018

Anybody know why crime reports stopped working?

hass: 0.69.1
Python: 3.6

sensor.yaml

# Crime Reports
- platform: crimereports
  name: Crime Alerts
  radius: 3219

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@ttaidapos
Copy link

This is not resolved. Crime reports was updated some time ago but Hass is not compatible with it. During and update, there's an error about this and if course crime reports does not work because of it.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants