spacemanspiff2007 / HABApp

Easy home automation with MQTT and/or openHAB
Apache License 2.0
54 stars 23 forks source link

Error while processing some weather forecast events #437

Closed kimifish closed 4 months ago

kimifish commented 4 months ago

openHAB 4.1.1 HABApp 24.01.0

I have a series of openHAB items, set up by Openweathermap binding docs, that are forecast data with timestamps in future for persistence. Items are like: Number:Length localMinutelyForcastRainVolume "Осадки [%.1f %unit%]" <rain2> (Weather,Forecast) { channel="openweathermap:onecall:api:local:forecastMinutely#precipitation" } During the update of values for these items, the followin log is generated:

02/10 00:06:54 HABApp:34 │ERROR │ --------------------------------------------------------------------------------

02/10 00:06:54 HABApp:34 │ERROR │ Traceback (most recent call last): 02/10 00:06:54 HABApp:34 │ERROR │ File "/usr/local/lib/python3.10/dist-packages/HABApp/openhab/process_events.py", line 44, in on_sse_event 02/10 00:06:54 HABApp:34 │ERROR │ event = get_event(event_dict) 02/10 00:06:54 HABApp:34 │ERROR │ File "/usr/local/lib/python3.10/dist-packages/HABApp/openhab/map_events.py", line 47, in get_event 02/10 00:06:54 HABApp:34 │ERROR │ raise ValueError(msg) from None 02/10 00:06:54 HABApp:34 │ERROR │ ValueError: Unknown Event: ItemTimeSeriesUpdatedEvent for {'topic': 'openhab/items/localHourlyForcastSnowVolume/timeseriesupdated', 'payload': '{"timeSeries":[{"type":"Quantity","value":"0 m","timestamp":"2024-02-09T21:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-09T22:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-09T23:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T00:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T01:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T02:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T03:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T04:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T05:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T06:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T07:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T08:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T09:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T10:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T11:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T12:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T13:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T14:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T15:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T16:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T17:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T18:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T19:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T20:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T21:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T22:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-10T23:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T00:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T01:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T02:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T03:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T04:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T05:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T06:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T07:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T08:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T09:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T10:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T11:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T12:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T13:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T14:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T15:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T16:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T17:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T18:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T19:00:00Z"},{"type":"Quantity","value":"0 m","timestamp":"2024-02-11T20:00:00Z"}],"policy":"REPLACE"}', 'type': 'ItemTimeSeriesUpdatedEvent'}

I must note, this error multiplied by dozen of items inflates logs so fast...

spacemanspiff2007 commented 4 months ago

Can you try the DEV branch and see if this fixes your issues?