briis / hass-weatherflow2mqtt

WeatherFlow to MQTT for Home Assistant. Use UDP to get local weather data in to Home Assistant using MQTT Discovery
MIT License
129 stars 29 forks source link

Integration not working all of a sudden #238

Closed chris-in-texas closed 1 year ago

chris-in-texas commented 1 year ago

All of a sudden nothing is working in the integration. Looking at the logs: Logger: homeassistant.config_entries Source: config_entries.py:1250 First occurred: 9:27:22 AM (3 occurrences) Last logged: 11:13:51 AM

Config entry 'Claremont Springs' for weatherflow integration not ready yet: Error while retreiving forecast data: Error occured processing forecast data. Error message: 'sea_level_pressure'; Retrying in background Config entry 'Claremont Springs' for weatherflow integration not ready yet: Error while retreiving data: Empty dataset returned from WeatherFlow. Make sure the station is online.; Retrying in background

This started last night (8/29) and nothing is working even forecasts dashboards etc. The Weatherflow Local integration is working and data is being received from the unit directly. Also my Tempest app and website data are working and updating correctly. Not sure what exactly happened here.

I tried removing and re-adding the integration and still fails, so I am not sure.

Thanks, Chris

robertw commented 1 year ago

new version fails to load or loads and crashes

INFO:weatherflow2mqtt.weatherflow_mqtt:🏠 Home Assistant Supervisor Mode 🏠 INFO:weatherflow2mqtt.weatherflow_mqtt:Add-On value Unit System is: {'length': 'mi', 'accumulated_precipitation': 'in', 'mass': 'lb', 'pressure': 'psi', 'temperature': '°F', 'volume': 'gal', 'wind_speed': 'mph'} INFO:weatherflow2mqtt.weatherflow_mqtt:Timezone is America/New_York INFO:weatherflow2mqtt.weatherflow_mqtt:Unit System is imperial INFO:weatherflow2mqtt.weatherflow_mqtt:Zambretti Values: 28.3488 and 31.3018 INFO:weatherflow2mqtt.weatherflow_mqtt:Connected to the MQTT server at core-mosquitto:1883 INFO:weatherflow2mqtt.weatherflow_mqtt:The UDP server is listening on port 50222 INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Hub sensor: Status INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Hub sensor: Weather ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-7' coro=<WeatherFlowMqtt._update_forecast() done, defined at /usr/local/lib/python3.11/site-packages/weatherflow2mqtt-3.1.7-py3.11.egg/weatherflow2mqtt/weatherflow_mqtt.py:764> exception=KeyError('sea_level_pressure')> Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/weatherflow2mqtt-3.1.7-py3.11.egg/weatherflow2mqtt/weatherflow_mqtt.py", line 769, in _update_forecast if any(forecast := await self.forecast.update_forecast()): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/weatherflow2mqtt-3.1.7-py3.11.egg/weatherflow2mqtt/forecast.py", line 187, in update_forecast row["sea_level_pressure"]


KeyError: 'sea_level_pressure'
UpDryTwist commented 1 year ago

See the discussion over in briis/hass-weatherflow#81 . You'll need a new version (but the new version may or may not be stable, yet).

briis commented 1 year ago

Hi Chris, I have moved your issue to the correct Integration.

There is something with forecast that makes it crash. I need a bit of time to figure out what it is. If you clear the STATION ID and STATION TOKEN (Set them to blank) and restart the integration, it should work - just without the Weather Forecast.

briis commented 1 year ago

I have released V2.3.1, which should solve this issue. The reason for this is that on some stations the Hourly Forecast is not returning a value for Sea Level Pressure and sometimes also UV. I am not sure why this happens, and why only on some stations, but the issue is with WeatherFlow. This release now returns a 0 value, if no data is returned for the above two items, but ensures that the rest of the flow will still run.

Please let me know if this fixes the issue.

briis commented 1 year ago

This was a duplicate of #234 and they report it fixed, so I will close this.