- OpenHAB >= 3.3 and Python >= 3.8 only!
- Major internal refactoring
- Startup issues are gone with a new and improved connection mechanism.
- 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 (``BufferEventFile`` no longer needed and should be removed)
- Improved openhab performance (added some buffers)
- Improved mqtt performance
- Better tracebacks in case of error
- 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 ``/habapp/config``.
**Migration to new version**
``self.listen_event`` now requires an instance of EventFilter.
Old:
python
from HABApp.core.events import ValueUpdateEvent
...
self.my_sensor = Item.get_item('my_sensor')
self.my_sensor.listen_event(self.movement, ValueUpdateEvent)
New:
python
from HABApp.core.events import ValueUpdateEventFilter
...
self.my_sensor = Item.get_item('my_sensor')
self.my_sensor.listen_event(self.movement, ValueUpdateEventFilter()) <-- Instance of EventFilter
text
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 ``/config`` to ``/habapp/config``
- The new image doesn't run as root. You can set `USER_ID` and `GROUP_ID` to the user you want habapp to run with. It's necessary to modify the permissions of the mounted folder accordingly.