Luftdaten component is randomly stopping updates and is giving the following message:
2019-03-04 00:09:41 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info
2019-03-04 00:09:41 ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info
2019-03-04 00:19:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 140, in refresh_sensors await luftdaten.async_update() File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 183, in async_update self.data[DATA_LUFTDATEN].update(self.client.meta) AttributeError: ‘NoneType’ object has no attribute ‘update’
2019-03-04 00:29:38 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 140, in refresh_sensors await luftdaten.async_update() File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 180, in async_update await self.client.get_data() File “/usr/local/lib/python3.7/site-packages/luftdaten/init.py”, line 62, in get_data for measurement in self.values.keys(): AttributeError: ‘NoneType’ object has no attribute ‘keys’
I set up the component by “Configuration via frontend” or Configuration/Integrations. HA Version 0.88.2 on RP 3.
Just started using luftdaten a couple of days ago, so I can’t say if it’s an issue with the current HA version. The sensor id I added was online the hole time and data available via https://maps.luftdaten.info . If I reboot the host system, data are coming in again. This seems to be some sort of loop: Can’t find data → couldn’t find data in last periode → …
First error message see first post, since then followed by:
2019-03-04 14:20:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 140, in refresh_sensors await luftdaten.async_update() File “/usr/local/lib/python3.7/site-packages/homeassistant/components/luftdaten/init.py”, line 180, in async_update await self.client.get_data() File “/usr/local/lib/python3.7/site-packages/luftdaten/init.py”, line 62, in get_data for measurement in self.values.keys(): AttributeError: ‘NoneType’ object has no attribute ‘keys’
Got tired of Luftdaten’s peculiarities and instabilities. I figured, as I’m hosting a sensor station myself, I might as well get the data locally instead of polling the cloud. I managed to set this up using a rest sensor and then a template one for each value I need (temp, pressure, humidity, pm10, pm25)
I can share my code as an example if anybody else is interested.