openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 252 forks source link

Integrate HABApp #1178

Closed spacemanspiff2007 closed 3 years ago

spacemanspiff2007 commented 3 years ago

Since HABApp has a growing user base I was wondering if it would be possible to integrate it into openhabian. Installation is quite easy, I've done some documentation already. Is this something that would be possible and what would be the steps to include it?

mstormi commented 3 years ago

I'm not familiar with HABApp and don't know what it is. Is it an alternative to the Next Gen Rule Engine ? or to JSR223 ? I would be willing to discuss this with the other maintainers. However, and sorry to be frank, we quite recently agreed not to add any more features to openHABian except those we already have on our internal roadmap, so chances aren't great. You would have to prepare a PR. The install routine would need to work in unattended and in interactive mode and would also need to provide a 'remove' option. You would need to add unit tests based on BATS, too, to ensure for continuous regression testing as development moves on. Check out the code for any of the optional components like FIND3, Homegear or Tailscale as examples (packages.bash or vpn.bash in /opt/openhabian/functions/). Also check out CONTRIBUTING.md.

spacemanspiff2007 commented 3 years ago

I'm not familiar with HABApp and don't know what it is. Is it an alternative to the Next Gen Rule Engine ? or to JSR223 ?

It's a rule engine that allows you to write your rules in python (not jython, but real python 3). It is designed to write errorless rules, focuses on explicit and extended error messages and provides full type hints and checks when using an IDE. Additionally it has the possibility to automatically create and link items based on your things (and configure these things). e.g. for every Philio PST02A i can create a number item for movement, a number item for temperature, derive the names from the thing (e.g. from the thing label) and configure each device accordingly.

The install routine would need to work in unattended and in interactive mode and would also need to provide a 'remove' option.

That's easy - installation is just creating a python venv and installing it from pip.

cd /opt
python3 -m venv habapp
habapp/source/bin/activate
python3 -m pip install --upgrade pip habapp

and then create the service accordingly.

However, and sorry to be frank, we quite recently agreed not to add any more features to openHABian except those we already have on our internal roadmap, so chances aren't great.

That is really a shame to hear. I guess if you'd give it a try maybe you'll change your mind. :wink: It can also connect to a remote openhab instance so you can try it from your main machine and you can configure it to "listen only" so it doesn't make any changes on the openhab instance.

How about you discuss it with the other maintainers and then give me a heads up? I don't want to spent lots of time creating bash scripts just for them not getting merged.

mstormi commented 3 years ago

Ok I've forwarded your request but there was little feedback.

I don't mind so if you provide a PR as explained I'll be willing to add it. Re-read the hints and CONTRIBUTING.md to get it right in the first place.

That is really a shame to hear wie das auf Englisch interpretiert wird weißt du ? Nur als Tipp, einen native speaker überzeugst du damit mit Sicherheit nicht.

spacemanspiff2007 commented 3 years ago

Thank you for your hint, I was not aware that it might have sounded inappropriate or rude.

spacemanspiff2007 commented 3 years ago

PR: #1344