After lots of work (probably 200-300 hours or more) I am proud to announce
This is a huge release which major internal refactoring.
This introduces the following breaking changes:
- openHAB >= 3.3 and Python >= 3.8.
self.listen_eventnow requires an instance of
- Startup issues are gone with a new and improved connection mechanism. Big thanks to @j-n-k who did all the work on the openhab side. HABApp now only works with OH3.3!
- New configuration library: More settings can be configured in the configuration file. Config values are also described in the docs. Also better error messages (hopefully)
- Improved event log performance (
BufferEventFileno longer needed and should be removed)
- Improved openhab performance (added some buffers)
- Improved mqtt performance
- Better tracebacks in case of error (imho )
- EventFilters can be logically combined (“and”, “or”) so rules trigger only once
- Label, Groups and Metadata is part of the OpenhabItem and can easily be accessed
- Added possibility to run arbitrary user code before the HABApp configuration is loaded
- Fixed setup issues
- Fixed some known bugs and introduced new ones
- Docker file changed to a multi stage build. Mount points changed to
Migration to new version
self.listen_event now requires an instance of EventFilter.
from HABApp.core.events import ValueUpdateEvent ... self.my_sensor = Item.get_item('my_sensor') self.my_sensor.listen_event(self.movement, ValueUpdateEvent)
from HABApp.core.events import ValueUpdateEvent, ValueUpdateEventFilter ... self.my_sensor = Item.get_item('my_sensor') self.my_sensor.listen_event(self.movement, ValueUpdateEventFilter()) # <-- Instance of EventFilter
HABApp: ValueUpdateEvent -> ValueUpdateEventFilter() ValueChangeEvent -> ValueChangeEventFilter() Openhab: ItemStateEvent -> ItemStateEventFilter() ItemStateChangedEvent -> ItemStateChangedEventFilter() ItemCommandEvent -> ItemCommandEventFilter() MQTT: MqttValueUpdateEvent -> MqttValueUpdateEventFilter() MqttValueChangeEvent -> MqttValueChangeEventFilter()
Migration to new docker image
- change the mount point of the config from
- The new image doesn’t run as root. You can set
GROUP_IDto the user you want habapp to run with. It’s necessary to modify the permissions of the mounted fold
If you have issues with the new version you can ask for help here.