Hi,
I’ve updated Openhab and HabApp to the latest versions again.
HabApp:
_ _ _ ____ _
| | | | / \ | __ ) / \ _ __ _ __
| |_| | / _ \ | _ \ / _ \ | '_ \| '_ \
| _ |/ ___ \| |_) / ___ \| |_) | |_) |
|_| |_/_/ \_|____/_/ \_| .__/| .__/
|_| |_|
1.0.6
usage: habapp [-h] [-c CONFIG] [-wos WAIT_OS_UPTIME] [-b] [-di]
OpenHab:
openHAB 3.4.0
Build #3178
I fixed an error in one rule and everything seems to be working. However, the HABApp.log file is filling up with loads of these:
[2022-11-18 20:50:16,567] [ HABApp] ERROR | --------------------------------------------------------------------------------
[2022-11-18 20:50:16,568] [ HABApp] ERROR | Traceback (most recent call last):
[2022-11-18 20:50:16,568] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/connection_handler/sse_handler.py", line 31, in on_sse_event
[2022-11-18 20:50:16,569] [ HABApp] ERROR | event = get_event(event_dict)
[2022-11-18 20:50:16,569] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/map_events.py", line 31, in get_event
[2022-11-18 20:50:16,569] [ HABApp] ERROR | topic: str = _in_dict['topic']
[2022-11-18 20:50:16,570] [ HABApp] ERROR | KeyError: 'topic'
[2022-11-18 20:50:26,551] [ HABApp] ERROR | Error 'topic' in on_sse_event:
[2022-11-18 20:50:26,552] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/connection_handler/sse_handler.py", line 31 in on_sse_event
[2022-11-18 20:50:26,553] [ HABApp] ERROR | --------------------------------------------------------------------------------
[2022-11-18 20:50:26,553] [ HABApp] ERROR | 28 | def on_sse_event(event_dict: dict):
[2022-11-18 20:50:26,554] [ HABApp] ERROR | 29 | try:
[2022-11-18 20:50:26,554] [ HABApp] ERROR | 30 | # Lookup corresponding OpenHAB event
[2022-11-18 20:50:26,555] [ HABApp] ERROR | --> 31 | event = get_event(event_dict)
[2022-11-18 20:50:26,556] [ HABApp] ERROR | 33 | # Update item in registry BEFORE posting to the event bus
[2022-11-18 20:50:26,556] [ HABApp] ERROR | 34 | # so the items have the correct state when we process the event in a rule
[2022-11-18 20:50:26,556] [ HABApp] ERROR | ------------------------------------------------------------
[2022-11-18 20:50:26,557] [ HABApp] ERROR | (ItemAddedEvent, ItemUpdatedEvent) = (<class 'HABApp.openhab.events.item_events.ItemAddedEvent'>, <class 'HABApp.openhab.events.item_events.ItemUpdatedEvent'>)
[2022-11-18 20:50:26,557] [ HABApp] ERROR | (ThingStatusInfoEvent, ThingUpdatedEvent) = (<class 'HABApp.openhab.events.thing_events.ThingStatusInfoEvent'>, <class 'HABApp.openhab.events.thing_events.ThingUpdate>[2022-11-18 20:50:26,557] [ HABApp] ERROR | e = KeyError('topic')
[2022-11-18 20:50:26,558] [ HABApp] ERROR | event_dict = {'type': 'ALIVE', 'interval': 10}
[2022-11-18 20:50:26,558] [ HABApp] ERROR | log = <Logger HABApp.openhab.connection (INFO)>
[2022-11-18 20:50:26,558] [ HABApp] ERROR | TOPIC_ITEMS = 'openHAB.Items'
[2022-11-18 20:50:26,559] [ HABApp] ERROR | TOPIC_THINGS = 'openHAB.Things'
[2022-11-18 20:50:26,559] [ HABApp] ERROR | ------------------------------------------------------------
[2022-11-18 20:50:26,559] [ HABApp] ERROR |
[2022-11-18 20:50:26,560] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/map_events.py", line 31 in get_event
[2022-11-18 20:50:26,560] [ HABApp] ERROR | --------------------------------------------------------------------------------
[2022-11-18 20:50:26,561] [ HABApp] ERROR | 29 | def get_event(_in_dict: dict) -> OpenhabEvent:
[2022-11-18 20:50:26,561] [ HABApp] ERROR | 30 | event_type: str = _in_dict['type']
[2022-11-18 20:50:26,561] [ HABApp] ERROR | --> 31 | topic: str = _in_dict['topic']
[2022-11-18 20:50:26,562] [ HABApp] ERROR | 33 | # Workaround for None values in the payload str
[2022-11-18 20:50:26,562] [ HABApp] ERROR | ------------------------------------------------------------
[2022-11-18 20:50:26,563] [ HABApp] ERROR | _events = {'ItemStateEvent': <class 'HABApp.openhab.events.item_events.ItemStateEvent'>, 'ItemStateChangedEvent': <class 'HABApp.openhab.events.item_events.ItemStateC>[2022-11-18 20:50:26,563] [ HABApp] ERROR | _in_dict = {'type': 'ALIVE', 'interval': 10}
[2022-11-18 20:50:26,564] [ HABApp] ERROR | _in_dict['type'] = 'ALIVE'
[2022-11-18 20:50:26,564] [ HABApp] ERROR | event_type = 'ALIVE'
[2022-11-18 20:50:26,564] [ HABApp] ERROR | ------------------------------------------------------------
[2022-11-18 20:50:26,565] [ HABApp] ERROR |
[2022-11-18 20:50:26,565] [ HABApp] ERROR | --------------------------------------------------------------------------------
[2022-11-18 20:50:26,565] [ HABApp] ERROR | Traceback (most recent call last):
[2022-11-18 20:50:26,566] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/connection_handler/sse_handler.py", line 31, in on_sse_event
[2022-11-18 20:50:26,566] [ HABApp] ERROR | event = get_event(event_dict)
[2022-11-18 20:50:26,567] [ HABApp] ERROR | File "/opt/habapp/lib/python3.9/site-packages/HABApp/openhab/map_events.py", line 31, in get_event
[2022-11-18 20:50:26,567] [ HABApp] ERROR | topic: str = _in_dict['topic']
[2022-11-18 20:50:26,567] [ HABApp] ERROR | KeyError: 'topic'
Any ideas what’s causing them?
This also seems very similar to an issue I had earlier in the year: HABApp - Easy automation with openHAB - Apps & Services / 3rd Party - openHAB Community
Thanks,
Richie