home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.82k stars 30.51k forks source link

No Communication with "Luftdaten API" - Sensors randomly not reachable #39187

Closed hudecitydave closed 3 years ago

hudecitydave commented 4 years ago

Checklist

The problem

I have two UI configured Luftdaten sensors (always reachable via Luftdaten frontend, sensors active and alive!). Felt since .110 I randomly cannot get data from my sensors within HA. After every reboot of HA one part of the sensor switches to N/A. Logfile then gives:

2020-08-23 16:06:23 ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info 2020-08-23 16:14:35 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info 2020-08-23 16:15:42 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info

It is also not possible to re-add the sensors after deleting them. After several minutes, sometimes hour it is possible to readd the sensors. (Feels like API drops requests...)

The link https://data.sensor.community/airrohr/v1/sensor/--ID--/ is working fine, too...

Expected behavior

both sensors with 4 measurement should work :-)

Steps to reproduce

UI: Just Include Luftdaten integration with two luftdaten sensor IDs

Environment

arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.4
hassio true
host_os Ubuntu 20.04 LTS
installation_type Home Assistant Supervised
os_name Linux
os_version 5.4.0-42-generic
python_version 3.8.3
supervisor 235
timezone Europe/Berlin
version 0.114.3
virtualenv false

State of relevant entities

--> unavailable

Problem-relevant configuration

UI configured

probot-home-assistant[bot] commented 4 years ago

luftdaten documentation luftdaten source (message by IssueLinks)

probot-home-assistant[bot] commented 4 years ago

Hey there @fabaff, mind taking a look at this issue as its been labeled with an integration (luftdaten) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

Ra72xx commented 4 years ago

Same here with a non-docker manual install of HA on a RPi4. Makes the integration useless, unfortunately :-( .

waverider020 commented 4 years ago

Same problem here every now and then it start working but than suddenly stops!image

caddyblack commented 4 years ago

Luftdaten will close the connection with your ip address if too many reads are done in a certain timeframe. What the limit is I never discovered. I just stopped polling the server. Now my particle sensors send data to both the luftdaten server AND to homeassistant so homeassistant does not bother the luftdaten server anymore. That solved the issue for me a few weeks ago.

hudecitydave commented 4 years ago

Maybe this is a valid workaround. Would you share your config for that? Do you read the values from influxx? That would be my setup. Thanks!

lichtteil commented 4 years ago

If the sensor is in the same network like HASS you might consider my custom component https://github.com/lichtteil/local_luftdaten

waverider020 commented 4 years ago

Got it working this way. Thanks very much.

Vriendelijke groeten

Peter Meijboom

Op 1 sep. 2020 om 10:28 heeft lichtteil notifications@github.com het volgende geschreven:

 If the sensor is in the same network like HASS you might consider my custom component https://github.com/lichtteil/local_luftdaten

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

hudecitydave commented 4 years ago

Thank you!!! Lichtteil! Worked for me 2. Way the better way to take values local. This component should be official and available as option. Even the luftdaten team will love that way without their API.

github-actions[bot] commented 3 years ago

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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.