Habapp

Latest version: v24.2.0

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 11

1.0.5

- Added new item function ``post_value_if`` and ``oh_post_update_if`` to conditionally update an item
- Added support for new alive event with openHAB 3.4
- Reworked file writer for textual thing config
- Added support for ThingConfigStatusInfoEvent
- MultiModeValue returns True/False if item value was changed
- Updated dependencies

1.0.4

- New RGB & HSB datatype for simpler color handling
- Fixed Docker build
- Bugfixes

1.0.3

- OpenHAB Thing can now be enabled/disabled with ``thing.set_enabled()``
- ClientID for MQTT should now be unique for every HABApp installation
- Reworked MultiModeItem, now a default value is possible when no mode is active
- Added some type hints and updated documentation

1.0.2

- Fixed setup issues
- Fixed unnecessary long tracebacks

1.0.1

Dockerfile is Python 3.10 and non slim

1.0.0

- 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.

Page 3 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.