I use iRule on a couple of iPad mini’s as a UI for openhab. It connects to Openhabs REST interface, and uses json for feedback.
It’s very flexible, and you can make nice looking UI’s. There is a bit of a learning curve though, and the documentation sucks.
I have lots of screens, but this is the basic lighting controller screen (there are 4 other lighting screens). The tabs are various other devices.
The main difficulty is that the interface is tricky. iRule has HTTP “gateways” they are called, but they don’t work well (you can’t customize the headers). It also has a tcp “raw socket” interface (gateway), so I use that, and make my own POST and GET strings. It’s not too hard.
One thing that I found challenging is that openhab’s REST interface really does not work as the wiki describes. I spent most of my time trying to figure this out. The difficult bit is getting notification (subscriptions) to work.
I could only get HTTP streaming to work (well I am using raw sockets), and then if I streamed on a socket, it would tie up that whole socket, so I would have to open multiple sockets to handle other POST’s and GET’s. It also times out after 5 minutes (you can re-connect on a timer or “automatically” but it’s kludgey).
I finally gave in and wrote myself a socket/HTTP server in python. Which works amazingly well. Latency is as near zero as you can tell, and the REST interface makes everything in iRule device independent, so it’s easy to work with. It should really be an openhab binding, but it’m not good with Java.
On the screenshot, most of the controls are Insteon lights/sensors, the TV lights are ZWAVE though.
Some weird things I found with the REST interface (contrary to what the wiki says), is that you can’t get notifications on items, other than individual items. So for instance you can’t stream on /rest/item/group_name, or /rest/items (for all items). You can stream on /rest/sitemaps/name/group_name (which is weird), or /rest/sitemaps/name/page_number (the wiki says “page id” and implies it’s the group name - it’s not it’s a number like 0000, 0001 where the number is the page in the sitemap from top down). You can stream on group names though, just not how it describes.
I would like to be able to stream on all items, but can’t figure it out. You can only stream on things that have items directly in them (not things that have lists of sub items/pages etc.). So I have to set up multiple streams.
Can anyone confirm that this is really how it works? just seems odd that you can’t stream on /rest/items or /rest/groups.
If anyone is interested I can share the basic set up (OK for simple things), for more complex things you need my python server, but you can have that also if you need it.