HABApp - Easy automation with openHAB

With the new release I have problems: the rule files aren’t loaded at startup.
It also looks like that it does not loads the items.
I copied in the rule files manually. That seems to work.

2023-12-01 18:53:49.490 [INFO ] [HABApp                     ] - HABApp Version 23.11.0
2023-12-01 18:53:50.222 [INFO ] [HABApp.connection.mqtt     ] - MQTT disabled
2023-12-01 18:54:54.980 [INFO ] [HABApp.connection.openhab  ] - ... offline!
2023-12-01 19:55:17.636 [INFO ] [HABApp.connection.openhab  ] - Connected to OpenHAB version 4.1.0.M3 (Milestone Build)
2023-12-02 12:55:05.459 [INFO ] [HABApp.Rules               ] - Added rule "RuleMonitor" from rules/helpers/rule_monitor.py
2023-12-02 12:56:46.649 [ERROR] [HABApp.files               ] - File /etc/openhab/habapp/rules/astro.py depends on file that doesn't exist: rules/helpers/util.py
2023-12-02 12:57:14.784 [ERROR] [HABApp.files               ] - File /etc/openhab/habapp/rules/astro.py depends on file that doesn't exist: rules/helpers/util.py
2023-12-02 12:58:06.379 [INFO ] [HABApp.Rules               ] - Added rule "Utils" from rules/helpers/util.py
2023-12-02 12:58:08.697 [ERROR] [HABApp.Rules               ] - Error "Item swi_Astro_Night does not exist!" in load:
2023-12-02 12:58:08.699 [ERROR] [HABApp.Rules               ] - Could not load /etc/openhab/habapp/rules/astro.py!
(...)

With the previous version the startup looks like this:

2023-11-10 19:23:56.938 [INFO ] [HABApp                     ] - HABApp Version 23.09.2
2023-11-10 19:23:57.091 [INFO ] [HABApp.connection.mqtt     ] - MQTT disabled
2023-11-10 19:23:57.307 [INFO ] [HABApp.connection.openhab  ] - Connected to OpenHAB version 4.1.0.M3 (Milestone Build)
2023-11-10 19:23:58.348 [INFO ] [HABApp.openhab.items       ] - Updated 913 Items
2023-11-10 19:23:58.861 [INFO ] [HABApp.openhab.items       ] - Updated 83 Things
2023-11-10 19:23:59.726 [INFO ] [HABApp.openhab.transform   ] - Transformations:
2023-11-10 19:23:59.728 [INFO ] [HABApp.openhab.transform   ] -   Map: de.map, en.map, ups.map
2023-11-10 19:24:04.095 [WARN ] [HABApp.Rules               ] - Found no instances of HABApp.Rule in /etc/openhab/habapp/rules/appliances/__init__.py
2023-11-10 19:24:04.107 [WARN ] [HABApp.Rules               ] - Found no instances of HABApp.Rule in /etc/openhab/habapp/rules/communication/__init__.py
2023-11-10 19:24:04.119 [WARN ] [HABApp.Rules               ] - Found no instances of HABApp.Rule in /etc/openhab/habapp/rules/heating/__init__.py
2023-11-10 19:24:04.133 [WARN ] [HABApp.Rules               ] - Found no instances of HABApp.Rule in /etc/openhab/habapp/rules/helpers/__init__.py
2023-11-10 19:24:04.152 [INFO ] [HABApp.Rules               ] - Added rule "RuleMonitor" from rules/helpers/rule_monitor.py
2023-11-10 19:24:04.171 [INFO ] [HABApp.Rules               ] - Added rule "OH_REST" from rules/helpers/rest.py
2023-11-10 19:24:04.187 [INFO ] [HABApp.Rules               ] - Added rule "Utils" from rules/helpers/util.py
2023-11-10 19:24:04.228 [INFO ] [HABApp.Rules               ] - Added rule "Astro" from rules/astro.py
(...)

How can I help to debug or is there an easy fix?

The roles are not loaded because the item sync is not complete.
Can you switch the HABApp logger to DEBUG?

Does requesting the items through the API explorer work?
When in doubt - does shutting down HABApp, restarting openHAB and then starting HABApp fix the issue?

The API explorer works with the items. Tested before and after restart of openhab and habapp.

Log when habapp is started after openhab:

2023-12-02 14:14:13.722 [DEBUG] [HABApp.logging             ] - LogBufferEventFile thread running
2023-12-02 14:14:13.723 [INFO ] [HABApp                     ] - HABApp Version 23.11.0
2023-12-02 14:14:13.723 [DEBUG] [HABApp.Config              ] - Added custom Level "WARN" (30)
2023-12-02 14:14:13.853 [DEBUG] [HABApp.Worker              ] - Starting thread pool with 16 threads!
2023-12-02 14:14:13.854 [DEBUG] [HABApp.Config              ] - Added library folder "/etc/openhab/habapp/lib" to system path
2023-12-02 14:14:13.855 [DEBUG] [HABApp.Config              ] - Local Timezone: Timezone('Europe/Berlin')
2023-12-02 14:14:13.856 [DEBUG] [HABApp.Config              ] - Loaded HABApp config
2023-12-02 14:14:13.856 [DEBUG] [HABApp.files.watcher       ] - Adding watcher for /etc/openhab/habapp with <FileEndingFilter ending: .yml>
2023-12-02 14:14:13.861 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileUnloadEvent))
2023-12-02 14:14:13.862 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileLoadEvent))
2023-12-02 14:14:13.945 [DEBUG] [HABApp.connection          ] - Added openhab
2023-12-02 14:14:13.949 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionHandler
2023-12-02 14:14:13.950 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForStartlevel
2023-12-02 14:14:13.952 [DEBUG] [HABApp.connection.openhab  ] - Added plugin OutgoingCommands
2023-12-02 14:14:13.954 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadItemsAndThings
2023-12-02 14:14:13.956 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SseEventListener
2023-12-02 14:14:13.958 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SyncItemsAndThings
2023-12-02 14:14:13.959 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadTransformations
2023-12-02 14:14:13.961 [DEBUG] [HABApp.connection.openhab  ] - Added plugin Ping
2023-12-02 14:14:13.963 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForPersistenceRestore
2023-12-02 14:14:13.965 [DEBUG] [HABApp.connection.openhab  ] - Added plugin TextualThingConfig
2023-12-02 14:14:13.967 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ThingOverview
2023-12-02 14:14:13.968 [DEBUG] [HABApp.connection.openhab  ] - Added plugin BrokenLinks
2023-12-02 14:14:13.970 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionStateToEventBus
2023-12-02 14:14:13.972 [DEBUG] [HABApp.connection.openhab  ] - Added plugin AutoReconnect
2023-12-02 14:14:13.983 [DEBUG] [HABApp.connection          ] - Added mqtt
2023-12-02 14:14:13.985 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionHandler
2023-12-02 14:14:13.987 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin SubscriptionHandler
2023-12-02 14:14:13.988 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin PublishHandler
2023-12-02 14:14:13.990 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionStateToEventBus
2023-12-02 14:14:13.992 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin AutoReconnect
2023-12-02 14:14:13.993 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/params with <FileEndingFilter ending: .yml>
2023-12-02 14:14:14.035 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/rules with <FileEndingFilter ending: .py>
2023-12-02 14:14:14.047 [DEBUG] [HABApp.connection.openhab  ] - Overview
2023-12-02 14:14:14.047 [DEBUG] [HABApp.connection.openhab  ] -  - STARTUP: 
2023-12-02 14:14:14.047 [DEBUG] [HABApp.connection.openhab  ] -  - SETUP: ConnectionHandler, TextualThingConfig
2023-12-02 14:14:14.048 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTING: ConnectionHandler
2023-12-02 14:14:14.048 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTED: ConnectionHandler, WaitForStartlevel, OutgoingCommands, LoadItemsAndThings, SseEventListener, SyncItemsAndThings, LoadTransformations, Ping, WaitForPersistenceRestore, TextualThingConfig
2023-12-02 14:14:14.049 [DEBUG] [HABApp.connection.openhab  ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect, ThingOverview, BrokenLinks
2023-12-02 14:14:14.050 [DEBUG] [HABApp.connection.openhab  ] -  - DISCONNECTED: OutgoingCommands, SseEventListener, Ping, ConnectionStateToEventBus, ConnectionHandler
2023-12-02 14:14:14.050 [DEBUG] [HABApp.connection.openhab  ] -  - OFFLINE: AutoReconnect
2023-12-02 14:14:14.051 [DEBUG] [HABApp.connection.openhab  ] -  - DISABLED: 
2023-12-02 14:14:14.051 [DEBUG] [HABApp.connection.openhab  ] -  - SHUTDOWN: ConnectionHandler
2023-12-02 14:14:14.057 [DEBUG] [HABApp.connection.mqtt     ] - Overview
2023-12-02 14:14:14.057 [DEBUG] [HABApp.connection.mqtt     ] -  - STARTUP: 
2023-12-02 14:14:14.058 [DEBUG] [HABApp.connection.mqtt     ] -  - SETUP: ConnectionHandler
2023-12-02 14:14:14.058 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTING: ConnectionHandler
2023-12-02 14:14:14.059 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTED: SubscriptionHandler, PublishHandler
2023-12-02 14:14:14.059 [DEBUG] [HABApp.connection.mqtt     ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect
2023-12-02 14:14:14.059 [DEBUG] [HABApp.connection.mqtt     ] -  - DISCONNECTED: ConnectionHandler, SubscriptionHandler, PublishHandler, ConnectionStateToEventBus
2023-12-02 14:14:14.060 [DEBUG] [HABApp.connection.mqtt     ] -  - OFFLINE: AutoReconnect
2023-12-02 14:14:14.061 [DEBUG] [HABApp.connection.mqtt     ] -  - DISABLED: 
2023-12-02 14:14:14.062 [DEBUG] [HABApp.connection.mqtt     ] -  - SHUTDOWN: 
2023-12-02 14:14:14.066 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-02 14:14:14.068 [DEBUG] [HABApp.files               ] - params/credentials.yml added
2023-12-02 14:14:14.077 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-02 14:14:14.078 [DEBUG] [HABApp.files               ] - params/host.yml added
2023-12-02 14:14:14.081 [DEBUG] [HABApp.connection.openhab  ] - SETUP
2023-12-02 14:14:14.083 [DEBUG] [HABApp.connection.mqtt     ] - SETUP
2023-12-02 14:14:14.087 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP start
2023-12-02 14:14:14.092 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/config with <FileEndingFilter ending: .yml>
2023-12-02 14:14:14.097 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP done
2023-12-02 14:14:14.098 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP start
2023-12-02 14:14:14.098 [INFO ] [HABApp.connection.mqtt     ] - MQTT disabled
2023-12-02 14:14:14.099 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP done
2023-12-02 14:14:14.100 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:14:14.101 [DEBUG] [HABApp.connection.mqtt     ] - DISABLED
2023-12-02 14:14:14.104 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:14:14.104 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:14:14.115 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED start
2023-12-02 14:14:14.115 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED done
2023-12-02 14:14:14.388 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to DEPENDENCIES_OK
2023-12-02 14:14:14.388 [DEBUG] [HABApp.files               ] - params/host.yml changed to DEPENDENCIES_OK
2023-12-02 14:14:14.401 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-02 14:14:14.455 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/credentials.yml!
2023-12-02 14:14:14.455 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to LOADED
2023-12-02 14:14:14.461 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/host.yml!
2023-12-02 14:14:14.462 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-02 14:14:14.462 [DEBUG] [HABApp.files               ] - params/host.yml changed to LOADED
2023-12-02 14:14:29.923 [DEBUG] [HABApp.files               ] - Worker done!
2023-12-02 14:14:48.961 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:14:48.962 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:14:48.962 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:14:48.963 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:14:48.965 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:14:48.967 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:14:48.968 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:14:48.970 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:14:50.022 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:14:50.023 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:14:50.024 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:14:50.027 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:14:50.028 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:15:20.249 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:15:20.250 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:15:20.250 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:15:20.252 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:15:20.255 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:15:20.257 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:15:20.258 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:15:20.261 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:15:22.269 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:15:22.270 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:15:22.272 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:15:22.275 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:15:22.276 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:15:52.503 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:15:52.504 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:15:52.505 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:15:52.507 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:15:52.509 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:15:52.511 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:15:52.513 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:15:52.516 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:15:56.523 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:15:56.523 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:15:56.525 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:15:56.528 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:15:56.529 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:16:26.750 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:16:26.751 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:16:26.751 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:16:26.753 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:16:26.756 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:16:26.757 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:16:26.759 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:16:26.762 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:16:34.768 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:16:34.769 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:16:34.769 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:16:34.771 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:16:34.772 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:17:04.980 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:17:04.981 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:17:04.982 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:17:04.984 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:17:04.987 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:17:04.990 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:17:04.992 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:17:04.995 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:17:21.002 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:17:21.003 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:17:21.005 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:17:21.008 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:17:21.009 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:17:51.211 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:17:51.211 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:17:51.212 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:17:51.214 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:17:51.217 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:17:51.219 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:17:51.220 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:17:51.223 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start

Log when both started together (habapp loaded before openhab):

2023-12-02 14:19:59.282 [DEBUG] [HABApp.logging             ] - LogBufferEventFile thread running
2023-12-02 14:19:59.283 [INFO ] [HABApp                     ] - HABApp Version 23.11.0
2023-12-02 14:19:59.284 [DEBUG] [HABApp.Config              ] - Added custom Level "WARN" (30)
2023-12-02 14:19:59.373 [DEBUG] [HABApp.Worker              ] - Starting thread pool with 16 threads!
2023-12-02 14:19:59.374 [DEBUG] [HABApp.Config              ] - Added library folder "/etc/openhab/habapp/lib" to system path
2023-12-02 14:19:59.374 [DEBUG] [HABApp.Config              ] - Local Timezone: Timezone('Europe/Berlin')
2023-12-02 14:19:59.375 [DEBUG] [HABApp.Config              ] - Loaded HABApp config
2023-12-02 14:19:59.376 [DEBUG] [HABApp.files.watcher       ] - Adding watcher for /etc/openhab/habapp with <FileEndingFilter ending: .yml>
2023-12-02 14:19:59.380 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileUnloadEvent))
2023-12-02 14:19:59.380 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileLoadEvent))
2023-12-02 14:19:59.387 [DEBUG] [HABApp.connection          ] - Added openhab
2023-12-02 14:19:59.391 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionHandler
2023-12-02 14:19:59.392 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForStartlevel
2023-12-02 14:19:59.394 [DEBUG] [HABApp.connection.openhab  ] - Added plugin OutgoingCommands
2023-12-02 14:19:59.395 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadItemsAndThings
2023-12-02 14:19:59.397 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SseEventListener
2023-12-02 14:19:59.398 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SyncItemsAndThings
2023-12-02 14:19:59.400 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadTransformations
2023-12-02 14:19:59.402 [DEBUG] [HABApp.connection.openhab  ] - Added plugin Ping
2023-12-02 14:19:59.403 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForPersistenceRestore
2023-12-02 14:19:59.405 [DEBUG] [HABApp.connection.openhab  ] - Added plugin TextualThingConfig
2023-12-02 14:19:59.406 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ThingOverview
2023-12-02 14:19:59.408 [DEBUG] [HABApp.connection.openhab  ] - Added plugin BrokenLinks
2023-12-02 14:19:59.409 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionStateToEventBus
2023-12-02 14:19:59.411 [DEBUG] [HABApp.connection.openhab  ] - Added plugin AutoReconnect
2023-12-02 14:19:59.414 [DEBUG] [HABApp.connection          ] - Added mqtt
2023-12-02 14:19:59.415 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionHandler
2023-12-02 14:19:59.417 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin SubscriptionHandler
2023-12-02 14:19:59.419 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin PublishHandler
2023-12-02 14:19:59.420 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionStateToEventBus
2023-12-02 14:19:59.422 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin AutoReconnect
2023-12-02 14:19:59.423 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/params with <FileEndingFilter ending: .yml>
2023-12-02 14:19:59.437 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/rules with <FileEndingFilter ending: .py>
2023-12-02 14:19:59.457 [DEBUG] [HABApp.connection.openhab  ] - Overview
2023-12-02 14:19:59.457 [DEBUG] [HABApp.connection.openhab  ] -  - STARTUP: 
2023-12-02 14:19:59.458 [DEBUG] [HABApp.connection.openhab  ] -  - SETUP: ConnectionHandler, TextualThingConfig
2023-12-02 14:19:59.458 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTING: ConnectionHandler
2023-12-02 14:19:59.459 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTED: ConnectionHandler, WaitForStartlevel, OutgoingCommands, LoadItemsAndThings, SseEventListener, SyncItemsAndThings, LoadTransformations, Ping, WaitForPersistenceRestore, TextualThingConfig
2023-12-02 14:19:59.459 [DEBUG] [HABApp.connection.openhab  ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect, ThingOverview, BrokenLinks
2023-12-02 14:19:59.460 [DEBUG] [HABApp.connection.openhab  ] -  - DISCONNECTED: OutgoingCommands, SseEventListener, Ping, ConnectionStateToEventBus, ConnectionHandler
2023-12-02 14:19:59.460 [DEBUG] [HABApp.connection.openhab  ] -  - OFFLINE: AutoReconnect
2023-12-02 14:19:59.461 [DEBUG] [HABApp.connection.openhab  ] -  - DISABLED: 
2023-12-02 14:19:59.461 [DEBUG] [HABApp.connection.openhab  ] -  - SHUTDOWN: ConnectionHandler
2023-12-02 14:19:59.464 [DEBUG] [HABApp.connection.mqtt     ] - Overview
2023-12-02 14:19:59.465 [DEBUG] [HABApp.connection.mqtt     ] -  - STARTUP: 
2023-12-02 14:19:59.465 [DEBUG] [HABApp.connection.mqtt     ] -  - SETUP: ConnectionHandler
2023-12-02 14:19:59.466 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTING: ConnectionHandler
2023-12-02 14:19:59.466 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTED: SubscriptionHandler, PublishHandler
2023-12-02 14:19:59.466 [DEBUG] [HABApp.connection.mqtt     ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect
2023-12-02 14:19:59.467 [DEBUG] [HABApp.connection.mqtt     ] -  - DISCONNECTED: ConnectionHandler, SubscriptionHandler, PublishHandler, ConnectionStateToEventBus
2023-12-02 14:19:59.467 [DEBUG] [HABApp.connection.mqtt     ] -  - OFFLINE: AutoReconnect
2023-12-02 14:19:59.468 [DEBUG] [HABApp.connection.mqtt     ] -  - DISABLED: 
2023-12-02 14:19:59.468 [DEBUG] [HABApp.connection.mqtt     ] -  - SHUTDOWN: 
2023-12-02 14:19:59.472 [DEBUG] [HABApp.files               ] - params/credentials.yml added
2023-12-02 14:19:59.473 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-02 14:19:59.478 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-02 14:19:59.479 [DEBUG] [HABApp.files               ] - params/host.yml added
2023-12-02 14:19:59.482 [DEBUG] [HABApp.connection.openhab  ] - SETUP
2023-12-02 14:19:59.484 [DEBUG] [HABApp.connection.mqtt     ] - SETUP
2023-12-02 14:19:59.487 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP start
2023-12-02 14:19:59.491 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/config with <FileEndingFilter ending: .yml>
2023-12-02 14:19:59.493 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP done
2023-12-02 14:19:59.494 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP start
2023-12-02 14:19:59.495 [INFO ] [HABApp.connection.mqtt     ] - MQTT disabled
2023-12-02 14:19:59.496 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP done
2023-12-02 14:19:59.497 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:19:59.499 [DEBUG] [HABApp.connection.mqtt     ] - DISABLED
2023-12-02 14:19:59.500 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:19:59.501 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:19:59.508 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED start
2023-12-02 14:19:59.508 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED done
2023-12-02 14:19:59.532 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:19:59.532 [DEBUG] [HABApp.connection.openhab  ] - Error: Cannot connect to host localhost:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)] (ClientConnectorError)
2023-12-02 14:19:59.533 [DEBUG] [HABApp.connection.openhab  ] - Error on connection status is already set
2023-12-02 14:19:59.534 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:19:59.535 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:19:59.537 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:19:59.539 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:19:59.540 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:19:59.543 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:19:59.788 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to DEPENDENCIES_OK
2023-12-02 14:19:59.789 [DEBUG] [HABApp.files               ] - params/host.yml changed to DEPENDENCIES_OK
2023-12-02 14:19:59.801 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-02 14:19:59.852 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/credentials.yml!
2023-12-02 14:19:59.853 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to LOADED
2023-12-02 14:19:59.859 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/host.yml!
2023-12-02 14:19:59.860 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-02 14:19:59.860 [DEBUG] [HABApp.files               ] - params/host.yml changed to LOADED
2023-12-02 14:20:00.548 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:20:00.549 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:20:00.550 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:20:00.552 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:20:00.552 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:20:00.570 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:20:00.570 [DEBUG] [HABApp.connection.openhab  ] - Error: Cannot connect to host localhost:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)] (ClientConnectorError)
2023-12-02 14:20:00.571 [DEBUG] [HABApp.connection.openhab  ] - Error on connection status is already set
2023-12-02 14:20:00.571 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:20:00.572 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:20:00.574 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:20:00.575 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:20:00.576 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:20:00.578 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:20:02.583 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:20:02.583 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:20:02.585 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:20:02.589 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:20:02.590 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:20:02.608 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:20:02.608 [DEBUG] [HABApp.connection.openhab  ] - Error: Cannot connect to host localhost:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)] (ClientConnectorError)
2023-12-02 14:20:02.609 [DEBUG] [HABApp.connection.openhab  ] - Error on connection status is already set
2023-12-02 14:20:02.610 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:20:02.611 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:20:02.615 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:20:02.616 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:20:02.617 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:20:02.620 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:20:06.625 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:20:06.626 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:20:06.627 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:20:06.629 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:20:06.630 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:20:06.652 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:20:06.653 [DEBUG] [HABApp.connection.openhab  ] - Error: Cannot connect to host localhost:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)] (ClientConnectorError)
2023-12-02 14:20:06.654 [DEBUG] [HABApp.connection.openhab  ] - Error on connection status is already set
2023-12-02 14:20:06.654 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:20:06.656 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:20:06.658 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:20:06.659 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:20:06.661 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:20:06.663 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:20:14.669 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:20:14.670 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:20:14.671 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:20:14.673 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:20:14.674 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:20:14.704 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:20:14.705 [DEBUG] [HABApp.connection.openhab  ] - Error: Cannot connect to host localhost:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)] (ClientConnectorError)
2023-12-02 14:20:14.706 [DEBUG] [HABApp.connection.openhab  ] - Error on connection status is already set
2023-12-02 14:20:14.707 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:20:14.709 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:20:14.716 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:20:14.717 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:20:14.721 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:20:14.724 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:20:15.303 [DEBUG] [HABApp.files               ] - Worker done!
2023-12-02 14:20:18.753 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-02 14:20:18.754 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-02 14:20:18.765 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/logging.yml', is_directory=False>
2023-12-02 14:20:18.769 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/server/server_updates.py', is_directory=False>
2023-12-02 14:20:18.773 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/server/server_startstop.py', is_directory=False>
2023-12-02 14:20:18.777 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/server/server.py', is_directory=False>
2023-12-02 14:20:18.779 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/server/__init__.py', is_directory=False>
2023-12-02 14:20:18.781 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/pv/pv_plant.py', is_directory=False>
2023-12-02 14:20:18.783 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/pv/pv_analyze.py', is_directory=False>
2023-12-02 14:20:18.785 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/pv/__init__.py', is_directory=False>
2023-12-02 14:20:18.786 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/system/system_sensorcheck.py', is_directory=False>
2023-12-02 14:20:18.788 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/system/system_network.py', is_directory=False>
2023-12-02 14:20:18.790 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/system/system_wifi.py', is_directory=False>
2023-12-02 14:20:18.794 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/system/system_things.py', is_directory=False>
2023-12-02 14:20:18.800 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/system/__init__.py', is_directory=False>
2023-12-02 14:20:18.802 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/weather/weather_climacell.py', is_directory=False>
2023-12-02 14:20:18.805 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/weather/weather_calculations.py', is_directory=False>
2023-12-02 14:20:18.808 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/weather/weather_dwdunwetter.py', is_directory=False>
2023-12-02 14:20:18.810 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/weather/__init__.py', is_directory=False>
2023-12-02 14:20:18.812 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/appliances/washing_maschine.py', is_directory=False>
2023-12-02 14:20:18.813 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/appliances/__init__.py', is_directory=False>
2023-12-02 14:20:18.815 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/test/TestEnvironment.py', is_directory=False>
2023-12-02 14:20:18.816 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/consumption.py', is_directory=False>
2023-12-02 14:20:18.819 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/persistence/persistence_influxdb_cleanup.py', is_directory=False>
2023-12-02 14:20:18.820 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/persistence/persistence_influxdb_prune.py', is_directory=False>
2023-12-02 14:20:18.822 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/persistence/persistence_influxdb.py', is_directory=False>
2023-12-02 14:20:18.828 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/persistence/__init__.py', is_directory=False>
2023-12-02 14:20:18.829 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/communication/telegram.py', is_directory=False>
2023-12-02 14:20:18.832 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/communication/buffer.py', is_directory=False>
2023-12-02 14:20:18.836 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/communication/mail.py', is_directory=False>
2023-12-02 14:20:18.838 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/communication/__init__.py', is_directory=False>
2023-12-02 14:20:18.840 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/lawnmower.py', is_directory=False>
2023-12-02 14:20:18.847 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/lawnmower_shed.py', is_directory=False>
2023-12-02 14:20:18.849 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/lawnmower_battery.py', is_directory=False>
2023-12-02 14:20:18.851 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/lawnmower_mower.py', is_directory=False>
2023-12-02 14:20:18.860 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/lawnmower_weather.py', is_directory=False>
2023-12-02 14:20:18.863 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/lawnmower/__init__.py', is_directory=False>
2023-12-02 14:20:18.864 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/vacation.py', is_directory=False>
2023-12-02 14:20:18.866 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/calendar_messages.py', is_directory=False>
2023-12-02 14:20:18.868 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/helpers/rule_monitor.py', is_directory=False>
2023-12-02 14:20:18.869 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/helpers/rest.py', is_directory=False>
2023-12-02 14:20:18.871 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/helpers/util.py', is_directory=False>
2023-12-02 14:20:18.873 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/helpers/__init__.py', is_directory=False>
2023-12-02 14:20:18.874 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/heating/heating_HTTP.py', is_directory=False>
2023-12-02 14:20:18.878 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/heating/heating_maintenance.py', is_directory=False>
2023-12-02 14:20:18.884 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/heating/heating_BLnet.py', is_directory=False>
2023-12-02 14:20:18.887 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/heating/__init__.py', is_directory=False>
2023-12-02 14:20:18.888 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/heating/heating.py', is_directory=False>
2023-12-02 14:20:18.891 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/outdoor/groundwater.py', is_directory=False>
2023-12-02 14:20:18.893 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/outdoor/outdoor_sensors.py', is_directory=False>
2023-12-02 14:20:18.896 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/ups/ups.py', is_directory=False>
2023-12-02 14:20:18.899 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/ups/__init__.py', is_directory=False>
2023-12-02 14:20:18.900 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/room_temperatures.py', is_directory=False>
2023-12-02 14:20:18.911 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/room_windows.py', is_directory=False>
2023-12-02 14:20:18.912 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/room_rollershutters.py', is_directory=False>
2023-12-02 14:20:18.914 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/room_humidity.py', is_directory=False>
2023-12-02 14:20:18.918 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/room_doors.py', is_directory=False>
2023-12-02 14:20:18.920 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/room/__init__.py', is_directory=False>
2023-12-02 14:20:18.922 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/softener/softener.py', is_directory=False>
2023-12-02 14:20:18.925 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/softener/__init__.py', is_directory=False>
2023-12-02 14:20:18.927 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/radio/radio.py', is_directory=False>
2023-12-02 14:20:18.931 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/radio/__init__.py', is_directory=False>
2023-12-02 14:20:18.933 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/astro.py', is_directory=False>
2023-12-02 14:20:18.934 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/phone/phone_phonebook.py', is_directory=False>
2023-12-02 14:20:18.936 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/phone/phone.py', is_directory=False>
2023-12-02 14:20:18.944 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/phone/phone_areacodes.py', is_directory=False>
2023-12-02 14:20:18.945 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/phone/__init__.py', is_directory=False>
2023-12-02 14:20:18.961 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/light/lights_led.py', is_directory=False>
2023-12-02 14:20:18.962 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/light/lights_vacation.py', is_directory=False>
2023-12-02 14:20:18.963 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/light/lights_christmas.py', is_directory=False>
2023-12-02 14:20:18.963 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/light/__init__.py', is_directory=False>
2023-12-02 14:20:18.964 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/rules/light/lights_basefloor.py', is_directory=False>
2023-12-02 14:20:18.965 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/config.yml', is_directory=False>
2023-12-02 14:20:30.729 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:20:30.729 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:20:30.730 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:20:30.732 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:20:30.733 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:20:31.365 [WARN ] [HABApp.connection.openhab  ] - Status 401 for GET http://localhost:8080/rest/
2023-12-02 14:20:31.366 [DEBUG] [HABApp.connection.openhab  ] - <ClientResponse(http://localhost:8080/rest/) [401 Unauthorized]>
2023-12-02 14:20:31.367 [DEBUG] [HABApp.connection.openhab  ] - <CIMultiDictProxy('Content-Type': 'application/json', 'Date': 'Sat, 02 Dec 2023 13:20:31 GMT', 'Transfer-Encoding': 'chunked', 'Server': 'Jetty(9.4.52.v20230823)')>
2023-12-02 14:20:31.368 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:20:31.368 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:20:31.370 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:20:31.373 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:20:31.374 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:20:31.376 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:20:31.379 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start
2023-12-02 14:21:01.381 [WARN ] [HABApp.Rule                ] - /opt/habapp/lib/python3.11/site-packages/aiohttp/client_reqrep.py:885: ResourceWarning:Unclosed response <ClientResponse(http://localhost:8080/rest/) [401 Unauthorized]>
<CIMultiDictProxy('Content-Type': 'application/json', 'Date': 'Sat, 02 Dec 2023 13:20:31 GMT', 'Transfer-Encoding': 'chunked', 'Server': 'Jetty(9.4.52.v20230823)')>

2023-12-02 14:21:03.385 [DEBUG] [HABApp.connection.openhab  ] - Cleared error
2023-12-02 14:21:03.386 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE done
2023-12-02 14:21:03.387 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-02 14:21:03.390 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-02 14:21:03.391 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-02 14:21:40.515 [DEBUG] [HABApp.connection.openhab  ] - Set error on connection status
2023-12-02 14:21:40.516 [DEBUG] [HABApp.connection.openhab  ] - Error in ConnectionHandler.on_connecting: Response payload is not completed (ClientPayloadError)
2023-12-02 14:21:40.516 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-02 14:21:40.517 [DEBUG] [HABApp.connection.openhab  ] - DISCONNECTED
2023-12-02 14:21:40.519 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED start
2023-12-02 14:21:40.521 [DEBUG] [HABApp.connection.openhab  ] - Task DISCONNECTED done
2023-12-02 14:21:40.522 [DEBUG] [HABApp.connection.openhab  ] - OFFLINE
2023-12-02 14:21:40.524 [DEBUG] [HABApp.connection.openhab  ] - Task OFFLINE start

It seems HABApp is receiving an incomplete resonse from openHAB and thus tries to reconnect every time.

Can you try to request the rest api from another machine?
Do these work:

# I am suspecting one of these somehow doesn't return properly
http://IP:PORT/rest/
http://IP:PORT/rest/systeminfo

# Items and Things
http://IP:PORT/rest/items?metadata=.%2A&recursive=false&staticDataOnly=false
http://IP:PORT/rest/things

You should be able to test this in your browser by doing

http://user:pw@IP:PORT/...
http://IP:PORT/rest/

is working as expected

http://IP:PORT/rest/systeminfo
	
error	
message	"Authentication required"
http-code	401

also with username / password

http://IP:PORT/rest/items?metadata=.%2A&recursive=false&staticDataOnly=false

is working as expected

http://IP:PORT/rest/things

error	
message	"Authentication required"
http-code	401

also with username / password

When I login to OH and use the API-Explorer it works.

Very strange - I can’t think of something that does cause this behavior at all.
Does installing 23.09.02 fix the issue?

First I tried again to reinstall, but same behavior.

How do I downgrade? I newer had the need before ( :slight_smile: ) and it is not described in the docs.

You can specify the version with the install command

pip install HABApp==23.09.02

Now I downgraded and HABApp works again:

2023-12-03 10:22:00.930 [DEBUG] [HABApp.logging             ] - LogBufferEventFile thread running
2023-12-03 10:22:00.930 [INFO ] [HABApp                     ] - HABApp Version 23.09.2
2023-12-03 10:22:00.931 [DEBUG] [HABApp.Config              ] - Added custom Level "WARN" (30)
2023-12-03 10:22:01.014 [DEBUG] [HABApp.Worker              ] - Starting thread pool with 16 threads!
2023-12-03 10:22:01.023 [DEBUG] [HABApp.Config              ] - Added library folder "/etc/openhab/habapp/lib" to system path
2023-12-03 10:22:01.025 [DEBUG] [HABApp.Config              ] - Local Timezone: Timezone('Europe/Berlin')
2023-12-03 10:22:01.026 [DEBUG] [HABApp.Config              ] - Loaded HABApp config
2023-12-03 10:22:01.026 [DEBUG] [HABApp.files.watcher       ] - Adding watcher for /etc/openhab/habapp with <FileEndingFilter ending: .yml>
2023-12-03 10:22:01.031 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileUnloadEvent))
2023-12-03 10:22:01.031 [DEBUG] [HABApp                     ] - Added event listener for "HABApp.Files" (filter=EventFilter(type=RequestFileLoadEvent))
2023-12-03 10:22:01.039 [DEBUG] [HABApp.connection          ] - Added openhab
2023-12-03 10:22:01.042 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionHandler
2023-12-03 10:22:01.044 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForStartlevel
2023-12-03 10:22:01.045 [DEBUG] [HABApp.connection.openhab  ] - Added plugin OutgoingCommands
2023-12-03 10:22:01.047 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadItemsAndThings
2023-12-03 10:22:01.048 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SseEventListener
2023-12-03 10:22:01.050 [DEBUG] [HABApp.connection.openhab  ] - Added plugin SyncItemsAndThings
2023-12-03 10:22:01.051 [DEBUG] [HABApp.connection.openhab  ] - Added plugin LoadTransformations
2023-12-03 10:22:01.053 [DEBUG] [HABApp.connection.openhab  ] - Added plugin Ping
2023-12-03 10:22:01.055 [DEBUG] [HABApp.connection.openhab  ] - Added plugin WaitForPersistenceRestore
2023-12-03 10:22:01.056 [DEBUG] [HABApp.connection.openhab  ] - Added plugin TextualThingConfig
2023-12-03 10:22:01.058 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ThingOverview
2023-12-03 10:22:01.059 [DEBUG] [HABApp.connection.openhab  ] - Added plugin BrokenLinks
2023-12-03 10:22:01.061 [DEBUG] [HABApp.connection.openhab  ] - Added plugin ConnectionStateToEventBus
2023-12-03 10:22:01.063 [DEBUG] [HABApp.connection.openhab  ] - Added plugin AutoReconnect
2023-12-03 10:22:01.065 [DEBUG] [HABApp.connection          ] - Added mqtt
2023-12-03 10:22:01.067 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionHandler
2023-12-03 10:22:01.069 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin SubscriptionHandler
2023-12-03 10:22:01.071 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin PublishHandler
2023-12-03 10:22:01.072 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin ConnectionStateToEventBus
2023-12-03 10:22:01.074 [DEBUG] [HABApp.connection.mqtt     ] - Added plugin AutoReconnect
2023-12-03 10:22:01.075 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/params with <FileEndingFilter ending: .yml>
2023-12-03 10:22:01.089 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/rules with <FileEndingFilter ending: .py>
2023-12-03 10:22:01.099 [DEBUG] [HABApp.connection.openhab  ] - Overview
2023-12-03 10:22:01.100 [DEBUG] [HABApp.connection.openhab  ] -  - STARTUP: 
2023-12-03 10:22:01.100 [DEBUG] [HABApp.connection.openhab  ] -  - SETUP: ConnectionHandler, TextualThingConfig
2023-12-03 10:22:01.101 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTING: ConnectionHandler
2023-12-03 10:22:01.101 [DEBUG] [HABApp.connection.openhab  ] -  - CONNECTED: ConnectionHandler, WaitForStartlevel, OutgoingCommands, LoadItemsAndThings, SseEventListener, SyncItemsAndThings, LoadTransformations, Ping, WaitForPersistenceRestore, TextualThingConfig
2023-12-03 10:22:01.102 [DEBUG] [HABApp.connection.openhab  ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect, ThingOverview, BrokenLinks
2023-12-03 10:22:01.102 [DEBUG] [HABApp.connection.openhab  ] -  - DISCONNECTED: OutgoingCommands, SseEventListener, Ping, ConnectionStateToEventBus, ConnectionHandler
2023-12-03 10:22:01.103 [DEBUG] [HABApp.connection.openhab  ] -  - OFFLINE: AutoReconnect
2023-12-03 10:22:01.103 [DEBUG] [HABApp.connection.openhab  ] -  - DISABLED: 
2023-12-03 10:22:01.103 [DEBUG] [HABApp.connection.openhab  ] -  - SHUTDOWN: ConnectionHandler
2023-12-03 10:22:01.106 [DEBUG] [HABApp.connection.mqtt     ] - Overview
2023-12-03 10:22:01.107 [DEBUG] [HABApp.connection.mqtt     ] -  - STARTUP: 
2023-12-03 10:22:01.107 [DEBUG] [HABApp.connection.mqtt     ] -  - SETUP: ConnectionHandler
2023-12-03 10:22:01.108 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTING: ConnectionHandler
2023-12-03 10:22:01.108 [DEBUG] [HABApp.connection.mqtt     ] -  - CONNECTED: SubscriptionHandler, PublishHandler
2023-12-03 10:22:01.109 [DEBUG] [HABApp.connection.mqtt     ] -  - ONLINE: ConnectionStateToEventBus, AutoReconnect
2023-12-03 10:22:01.109 [DEBUG] [HABApp.connection.mqtt     ] -  - DISCONNECTED: ConnectionHandler, SubscriptionHandler, PublishHandler, ConnectionStateToEventBus
2023-12-03 10:22:01.109 [DEBUG] [HABApp.connection.mqtt     ] -  - OFFLINE: AutoReconnect
2023-12-03 10:22:01.110 [DEBUG] [HABApp.connection.mqtt     ] -  - DISABLED: 
2023-12-03 10:22:01.110 [DEBUG] [HABApp.connection.mqtt     ] -  - SHUTDOWN: 
2023-12-03 10:22:01.113 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-03 10:22:01.115 [DEBUG] [HABApp.files               ] - params/credentials.yml added
2023-12-03 10:22:01.120 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-03 10:22:01.122 [DEBUG] [HABApp.files               ] - params/host.yml added
2023-12-03 10:22:01.125 [DEBUG] [HABApp.connection.openhab  ] - SETUP
2023-12-03 10:22:01.126 [DEBUG] [HABApp.connection.mqtt     ] - SETUP
2023-12-03 10:22:01.129 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP start
2023-12-03 10:22:01.134 [DEBUG] [HABApp.files.watcher       ] - Adding recursive watcher for /etc/openhab/habapp/config with <FileEndingFilter ending: .yml>
2023-12-03 10:22:01.137 [DEBUG] [HABApp.connection.openhab  ] - Task SETUP done
2023-12-03 10:22:01.138 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP start
2023-12-03 10:22:01.139 [INFO ] [HABApp.connection.mqtt     ] - MQTT disabled
2023-12-03 10:22:01.139 [DEBUG] [HABApp.connection.mqtt     ] - Task SETUP done
2023-12-03 10:22:01.140 [DEBUG] [HABApp.connection.openhab  ] - CONNECTING
2023-12-03 10:22:01.142 [DEBUG] [HABApp.connection.mqtt     ] - DISABLED
2023-12-03 10:22:01.144 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING start
2023-12-03 10:22:01.145 [DEBUG] [HABApp.connection.openhab  ] - Trying to connect to OpenHAB ...
2023-12-03 10:22:01.153 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED start
2023-12-03 10:22:01.154 [DEBUG] [HABApp.connection.mqtt     ] - Task DISABLED done
2023-12-03 10:22:01.317 [INFO ] [HABApp.connection.openhab  ] - Connected to OpenHAB version 4.1.0.M3 (Milestone Build)
2023-12-03 10:22:01.317 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTING done
2023-12-03 10:22:01.318 [DEBUG] [HABApp.connection.openhab  ] - CONNECTED
2023-12-03 10:22:01.320 [DEBUG] [HABApp.connection.openhab  ] - Task CONNECTED start
2023-12-03 10:22:01.340 [DEBUG] [HABApp.openhab.items       ] - Requesting items
2023-12-03 10:22:01.431 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to DEPENDENCIES_OK
2023-12-03 10:22:01.432 [DEBUG] [HABApp.files               ] - params/host.yml changed to DEPENDENCIES_OK
2023-12-03 10:22:01.433 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/credentials.yml', is_directory=False>
2023-12-03 10:22:01.495 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/credentials.yml!
2023-12-03 10:22:01.496 [DEBUG] [HABApp.files               ] - params/credentials.yml changed to LOADED
2023-12-03 10:22:01.498 [DEBUG] [HABApp.file.events         ] - <FileOpenedEvent: event_type=opened, src_path='/etc/openhab/habapp/params/host.yml', is_directory=False>
2023-12-03 10:22:01.506 [DEBUG] [HABApp.RuleParameters      ] - Loaded params from params/host.yml!
2023-12-03 10:22:01.506 [DEBUG] [HABApp.files               ] - params/host.yml changed to LOADED
2023-12-03 10:22:02.442 [DEBUG] [HABApp.openhab.items       ] - Got response with 944 items
2023-12-03 10:22:02.443 [DEBUG] [HABApp.Items               ] - Added num_Mower_Mowing_Duration (NumberItem)
(...)

Thanks for getting it back to run!

Since I got so many notifications during startup on my phone I decided to finally implement a rate limiter.
Docs of the rate limiter for HABApp Beta.
I’ve currently implement leaky bucket and fixed window elastic expiry algorithm.
Is the difference between these algorithms clear from the docs?

What do you think should be the default for adding a rate limiter?
Or should the default be omitted and the user should explicitly chose?
Currently I’m torn between providing a default and making the user chose … .

If there is other feedback I’d be happy to hear it. :slight_smile:

this is a great feature!
i think about using it for the NotifyOnError class that i copied from your examples. i always get informed via email when a rule crashes so this helps me to find my errors. only annoying when i do an openhabian update, then i receive errors over errors (because of the restart of the services?). so here a limiter would be helpful and i will try to get it implemented.

very good explained and clear for me! if you ask which of them i would use as default - dont know. i think the leaky bucket could be used more often and if nothing else is defined it could be standard but only a very personal sight

1 Like

That’s almost the same use case that I have

I thought about this some more. The fixed window elastic expiry is better to stop the notification spam because it will block until a whole interval with no notifications is seen.
However if the interval is too big and the number too small it will grow longer and longer and thus always block.
E.g. if you get a notification every day at 12 and you set the interval to 36h and 2 hits. One day you get 2 messages at 9, the next one at 12 will be blocked and the interval prolonged. The message the next day at 12 will also be blocked and so on.
So while it is more effective it’s easier to shoot oneself in the foot so I think the leaky bucket as a default makes more sense even though it’s not as effective.

Imho the best is to use both for one limiter:

  • fixed window elastic expiry with a small interval (e.g. 5 in 5 mins)
  • leaky bucket with a bigger interval (e.g. 20 per 10 hours)

Also the leaky bucket would probably be what you would be using when accessing an external api so I’ll change the default to that.

2 Likes

Good news everyone!

HABApp 24.01.0 is out!

4 Likes

@bastler
I set up the rate limiter like in the docs and instead of countless notifications I’m only receiving 5 on a fresh start. Very nice!

1 Like

I’m very embarrassed but even with your example in the docs i do not understand how to get it work. i would like to limit the mails for “notifyonerror” - always when i update / upgrade openhabian then many errors raise in a very short time. this is my code that i copied from your example:

from e_mail import E_mail           # modul unter /etc/openhab/habapp/lib
from HABApp import Rule
from HABApp.core.events.habapp_events import HABAppException
from HABApp.core.events import EventFilter
from HABApp.util import RateLimiter

e_mail = E_mail()

class NotifyOnError(Rule):
    '''
    Meldet per email wenn ein Fehler auftritt (auch wenn Fehler in anderer Datei)
    ... leider erst nachdem die Klasse geladen ist, es kann beim Systemstart
    passieren dass Fehler nicht gemeldet werden weil die Klasse nicht als erstes geladen wird ...
    '''
    def __init__(self):
        super().__init__()
        self.log = logging.getLogger('My_HABApp')
        self.listen_event('HABApp.Errors', self.on_error, EventFilter(HABAppException))

        self.limiter = RateLimiter('MyErrorLimiter')
        self.limiter.add_limit(5, 60)

    def on_error(self, error_event: HABAppException):
        '''
        Wenn HABApp einen Fehler meldet dann im log und per email benachrichtigen
        '''
        msg = error_event.to_str() if isinstance(error_event, HABAppException) else error_event
        self.log.error(f'Fehler in HabAPP: {msg}')

        e_mail.send_mail('HabAPP meldet Fehler', f'{msg}')

NotifyOnError()

i already tried to add the ratelimiter but how can i manage the e_mail to be checked and limited?

No worries - with .allow() you can check and increase the counter and with .test_allow()you can check and without increasing the counter.

So all you have to do is add it like this:

    def on_error(self, error_event: HABAppException):

        if not self.limiter.allow():
            return None

Tip:
I’ve added it as a global variable like this and parse the limits - that way the limits are more readable and they are on top of the file

from HABApp.util import RateLimiter

LIMITER = RateLimiter('MyNotificationLimiter')
LIMITER.parse_limits('5 in 1 minute', algorithm='fixed_window_elastic_expiry')
LIMITER.parse_limits("20 in 1 hour", algorithm='leaky_bucket')

Tip 2:
Rules are loaded in alphabetical order. If you rename your file __email__.py it will be loaded first and you’ll get all notifications.

1 Like

now i got it, thank you so much!

and glad you found my secret question that I didn’t dare to ask :grinning:

this is how it works now, created a file named __alert_notify.py:

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import logging

from e_mail import E_mail           # modul unter /etc/openhab/habapp/lib
from HABApp import Rule
from HABApp.core.events.habapp_events import HABAppException
from HABApp.core.events import EventFilter
from HABApp.util import RateLimiter

LIMITER = RateLimiter('MyNotificationLimiter')
LIMITER.parse_limits('5 in 1 minute', algorithm='fixed_window_elastic_expiry')
LIMITER.parse_limits("20 in 1 hour", algorithm='leaky_bucket')

e_mail = E_mail()

class NotifyOnError(Rule):
    '''
    Meldet per email wenn ein Fehler auftritt (auch wenn Fehler in anderer Datei)
    Damit auch beim Systemstart alle Fehler gemeldet werden muß die Klasse als erstes vor
    allen weiteren geladen werden. Laden erfolgt in alphabetischer Reihenfolge, 
    darum Dateiname verwendet __alert_notify.py
    '''
    def __init__(self):
        super().__init__()
        self.log = logging.getLogger('My_HABApp')
        self.listen_event('HABApp.Errors', self.on_error, EventFilter(HABAppException))

    def on_error(self, error_event: HABAppException):
        '''
        Wenn HABApp einen Fehler meldet dann im log und per email benachrichtigen
        Meldungen per email werden durch den RateLimiter begrenzt, Konfiguration erfolgt
        über globale Variablen am Anfang der Datei
        '''
        msg = error_event.to_str() if isinstance(error_event, HABAppException) else error_event
        self.log.error(f'Fehler in HabAPP: {msg}')

        if not LIMITER.allow():    # check AND increase the counter
            return None
        e_mail.send_mail('HabAPP meldet Fehler', f'{msg}')

NotifyOnError()

great, errors always are written in the log-file but if the limit is reached the sending of emails stops.

My live system is already running smoothly with it and the error notification is using the new rate limiter. @Spaceman_Spiff Thanks for the update!

1 Like

Hi,
I’m new with HABApp. Trying to setup it with OpenHab 4.1. Both (OH and HABApp) are instaled in dockers.
Manage to see each other, but there are some errors in logs, which are not clear for me. Kindly ask you to help :wink:

> [2024-01-24 15:22:03,302] [                   HABApp]     INFO | HABApp Version 0.31.2
> [2024-01-24 15:22:03,304] [     HABApp.openhab.thing]     INFO | Config folder does not exist - textual thing config disabled!
> [2024-01-24 15:22:03,304] [    HABApp.RuleParameters]     INFO | Parameter files disabled: Folder /habapp/config/params does not exist!
> [2024-01-24 15:22:03,305] [   HABApp.mqtt.connection]     INFO | Connecting to 192.168.1.6:8883
> [2024-01-24 15:22:03,329] [HABApp.openhab.connection]     INFO | Connected to OpenHAB instance 969a31bf-4a49-45be-a3eb-XXXXXXXXX
> [2024-01-24 15:22:03,329] [HABApp.openhab.connection]     INFO | OpenHAB version 4.1.1 (Release Build)
> [2024-01-24 15:22:03,442] [     HABApp.openhab.items]     INFO | Updated 337 Items
> [2024-01-24 15:22:03,466] [     HABApp.openhab.items]     INFO | Updated 24 Things
> [2024-01-24 15:22:08,942] [             HABApp.Rules]     INFO | Added rule "MyFirstRule" from rules/q_test_rule.py
> [2024-01-24 15:22:08,942] [             HABApp.Rules]     INFO | Added rule "MyFirstRule.2" from rules/q_test_rule.py
> [2024-01-24 15:22:08,942] [             HABApp.Rules]     INFO | Added rule "MyFirstRule.3" from rules/q_test_rule.py
> [2024-01-24 15:22:08,942] [             HABApp.Rules]     INFO | Added rule "MyFirstRule.4" from rules/q_test_rule.py
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR | Error 'topic' in on_sse_event:
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR | File "/usr/local/lib/python3.8/site-packages/HABApp/openhab/connection_handler/sse_handler.py", line 25, in on_sse_event
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     22   def on_sse_event(event_dict: dict):
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     23       try:
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     24           # Lookup corresponding OpenHAB event
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR | --> 25           event = get_event(event_dict)
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     26   
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     ..................................................
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |      event_dict = {'type': 'ALIVE',
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |                    'interval': 10}
> [2024-01-24 15:22:11,719] [                   HABApp]    ERROR |     ..................................................
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR | 
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR | File "/usr/local/lib/python3.8/site-packages/HABApp/openhab/map_events.py", line 29, in get_event
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |     27   def get_event(_in_dict: dict) -> OpenhabEvent:
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |     28       event_type: str = _in_dict['type']
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR | --> 29       topic: str = _in_dict['topic']
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |     30   
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |     ..................................................
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |      _in_dict = {'type': 'ALIVE',
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |                  'interval': 10}
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |      OpenhabEvent = <class 'HABApp.openhab.events.base_event.OpenhabEvent'>
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |      event_type = 'ALIVE'
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR |     ..................................................
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR | 
> [2024-01-24 15:22:11,720] [                   HABApp]    ERROR | KeyError: 'topic'

This version is from end of 2021. You need to use latest which will not show these errors (24.01.0)

1 Like