since I started with it has always been puzzling to me how hard it is to write automation rules in openHAB.
Things got a little bit better with the jsr223 integration and I think @steve1 contributed some great ideas.
But with openHAB2 and the new API things got worse again and unfortunately even after long hours I did not manage to migrate my jython rules. Also jython has lots of drawbacks and is syntactically python2.
I even tried HomeAssistant because and even though it has lots of pros thanks to the great Z-Wave work of @chris I am back on the openHAB track (if someone is interested I can write a small comparison of openHAB and HomeAssistant).
But whilst trying HomeAssistant I managed to get some fresh ideas and point of views and I still really wanted to create my rules in Python.
This is why created HABApp.
It is a multithreaded, asyncIO based automation framework which allows easy and fast creation of rules.
HABApp connects to openHAB through the Rest-API and therefore allows quick and seamless integration and transition.
This approach has the great benefit that any python library can be easy loaded and integrated into the automation rules.
HABApp is currently still in beta, but I think this approach is interesting to more people.
It would be nice if I could get some feedback on the idea in general and on the current implementation status.
- Did some refactoring - it may be necessary to fix some imports.
Tip: run HABApp with the read_only config switch from another machine to fix them
- Added bugfixes, documentation and tests
- Added openHAB items (Switch, Contact, Rollershutter, Dimmer) with special functions e.g.:
- Items can be compared without having to use the state-member:
if my_number_item < 5: ....