I am planing to migrate my own proprietary web GUI (PHP framework) into Openhab2. Any suggestion on references on how to build such binding? The intention is to maintain a single Web GUI for both openhab and my own system admin portal. Thanks
My only suggestion would be to become very familiar with the REST API and review the source code for the existing UIs (they are all open source) and go from there. All the UIs interact with OH through the REST API.
Thanks for the feedback. Actually, i am more looking at the other way round.
When we access Openhab URL, it prompts us to select installed UIs, e.g. Classic, PaperUI, HabPanel, etc.
I am more interested in adding my own UI binding so that it is listed in OpenHab URL. By clicking that UI item, it actually launch my PHP-based Web UI within OpenHab. Anyway, i will try to go through some UI source code to figure things out. Initially, i thought if someone has done it before then he/she can share some ideas. Cheers
Actually you don’t have it backwards. Even those UIs that are listed interact with OH through the REST API. Including PaperUI.
So if you look at HabPanel or CometVisu (which I think is written in PHP, or at least involves PHP in some way) you should be able to see how they work. While not complete or sufficient, there is some documentation for developing add-ons here.