8000 AirVisual unable to retrieve data at this location · Issue #9923 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

AirVisual unable to retrieve data at this location #9923

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

Closed
scottsweb opened this issue Oct 17, 2017 · 5 comments · Fixed by #10054
Closed

AirVisual unable to retrieve data at this location #9923

scottsweb opened this issue Oct 17, 2017 · 5 comments · Fixed by #10054

Comments

@scottsweb
Copy link

Home Assistant release (hass --version):

0.55.1

Python release (python3 --version):

3.4.2

Component/platform:

AirVisual

Description of problem:

After starting Home Assistant for a short while the AirVisual sensors starts to error (all is OK on boot). All sensors begin returning unknown states. I noticed the issue began with 0.55.0.

At first I thought it might be an issue with their API, but it seems odd that it works for a short time.

Error log:

2017-10-17 15:51:18 ERROR (MainThread) [homeassistant.components.sensor.airvisual] Unable to retrieve data on this location: {'pollution_info': {'maincn': 'o3', 'aqicn': 13, 'ts': '2017-10-17T11:00:00.000Z', 'mainus': 'o3', 'aqius': 17}, 'state': 'West Sussex', 'latitude': [blanked], 'longitude': [blanked], 'city': 'Lodsworth', '_client': <pyairvisual.client.Client object at 0x6c812030>, 'country': 'United Kingdom', '_throttle': {1842766864: [<_thread.lock object at 0x6c84a968>, datetime.datetime(2017, 10, 17, 14, 40, 58, 195423, tzinfo=<UTC>)]}, '_radius': 500}

Expected:

AirQuality should report the correct values for my location.

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

platform: airvisual
api_key: !secret airvisual_key
monitored_conditions:
  - us
radius: 500
@bachya
Copy link
Contributor
bachya commented Oct 17, 2017

Your configuration doesn't mention whether you're using latitude/longitude or city/state/country. I assume that since you've blanked them, you're using latitude/longitude?

Without knowing anything further, I'm guessing that you're inputting a latitude/longitude that AirVisual can't consistently resolve for some reason (I've experienced this at times with their API).

If you're willing to input the location information directly, I just tried this config and it worked as expected – give it a shot:

sensor:
  - platform: airvisual
    api_key: !secret airvisual_key
    monitored_conditions:
      - us
    radius: 500
    city: lodsworth
    state: west-sussex
    country: uk

@scottsweb
Copy link
Author

@bachya
Copy link
Contributor
bachya commented Oct 17, 2017

Thanks for the quick suggestion. My long and lat are currently set elsewhere as mentioned in the docs:

if excluded, the longitude/latitude defined under the homeassistant key in configuration.yaml will be used

I will add a location as you have suggested and will report back if it does the trick.

Thanks, @scottsweb. Even if it does work, it would still be interesting to debug why your coordinates aren't working. I'm available in the forums, so feel free to shoot me a DM!

@scottsweb
Copy link
Author

Looks like switching the location style has not helped:

screenshot-17-10-2017-19 27 42

It works for maybe 5-10 minutes. Will DM my lat/long.

@bachya
Copy link
Contributor
bachya commented Oct 17, 2017

@scottsweb: Got it; will be on the lookout for your DM!

@home-assistant home-assistant locked and limited conversation to collaborators Mar 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0