it‘s me again
We are spending a week at my parents in law and in the next weeks some business trips will take place. To continue my current favorit thing … working on making my home smart … I installed HABmin to be able to work on my rules using my iPad.
After a weekend of working in the garden I just made me a coffee got my iPad and wanted to create some rules using HABmin (accessed using myopenhab.org).
Access and all is working fine. I can see the different rules files and can edit content… but saving doesn‘t work. When I leave the HABmin and go back into the rule file my changes aren‘t saved. I also notice that I can‘t switch between the different files. I attached two screenshots. In both shots you see the content of „benachrichtigungen.rules“ but in one of it „lueftung.rules“ is open but doesn‘t show up. I only can click one rule on the first start.
I only checked the forum and googled some ideas… but I wasn‘t able to fine something.
Anyone has some ideas??? I miss my coding sunday
As far as I know HABmin is not recommended for rules. Currently you use text files and possibly the VSCode extension for editing.
There is a beta NGRE (next generation rules engine) binding in the Paper UI that will be expanded for openHAB 3.
I thought it would work because the editor looked very handy and has a save button.
At home I use visual studio code with openhab extension. Created a samba access for the raspberry and mounted the conf folder on my windows pc which I use for coding. Works perfectly fine. So habmin looked similar to vscode which i Liked very much.
Any idea on how to do „remote coding“ without creating a vpn to the raspberry. Would really like to use my ipad for coding on my business trips. Because I started don’t carrying my notebook with me on my trips.
For now I use „koder“ app to create to code an will past the code into my raspberry when I‘m back at home. But would be way cooler if everything could be done from distance,
Not sure about iPad but you if using myopenhab, can you access the REST API? I would expect that would work for rules unless that is where HABmin is broken.
But isn‘t the REST API made for sending / receiving changes/commands and not for changing any content of the different files?
All of the current UIs use the REST API to interact with openHAB. As an example, the below is from
restdocs on my system. Restdocs also lets you run/test in the webUI.
OK learned something
So it looks like it‘s possible in theory (Post /rules - looks like the thing I‘m searching for). But to be honest… I don‘t know how to use this information for my needs
With Code-server you can use VS Code on any device everywhere. I’ve spinned up a docker with the conf path pointing to my conf files and I can use VS code on my iPad (or pc without VS code) as if I’m on my home pc.
Nothing you do through the REST API will become reflected in your text config files. It all gets saved to the JSONDB. That rules API endpoint let’s you manipulate NGRE style rules like those created using PaperUI which are in JSON.
It would not be ready to build rules using this end point without learning a lot of low level stuff. You can create some rudimentary NGRE rules using PaperUI.
Beyond that, you need to enable remote access to your machine somehow. SSH tunnels, OpenVPN, WireGuard, and reverse proxies are all popular approaches and reach come with their own advantages and disadvantages.
Yes of course VPN or something similar is a solution to do so… but I hopped to find a easier solution without need of VPN. I’m using an iPad of the company I work for… they don’t like private VPN connections on their devices
I will give it a try. In case it’s not working I try it with the “VPN way”
Thank you guys again.