openHAB plugin for openLuup

I?m considering moving to openHAB from Z-Way as my interface to Z-wave and for other devices not reasonably supported by Vera/openLuup. I?m mulling over how to attempt it.

The first and most straightforward way is to simply create new devices in openLuup and have my own device file that is a copy of the original but implements the actions I need by sending POST requests to openHAB. On the openHAB side I can create rules to update the openLuup devices as needed. Very doable, but not that elegant.

Perhaps another way is to modify the L_ZWay.lua file for use with openHAB. openHAB has a REST interface and it is possible to pull all of the ?items? and get a JSON array. Arbitrary tags can be added to an item, so one way might be to add a tag with a form very similar to that being used by L_ZWay. I could, for example, have a tag with a label such as ?openLuup-7-0-37? which would be identified as a switch. It would be up to me to tag items appropriately, but this is not too hard. openHAB items don?t have anything in them that identifies them as Z-Wave related, so I might as well make it match the ZWay label. Now L_ZWay could automatically populate the devices as it does now for Z-Way. One issue is that the item ?name? needs to be preserved because it will be needed for the POST command to the device. I?m sure there is some way to tuck it away in a structure for reference later. This is some work, but seems doable.

In the reverse direction, from openHAB to openLuup, I could go back to the rules in openHAB as I mentioned in the first method. Or I could have a polling loop in in openLuup. I also believe that it is possible to write a more generic function in openHAB with a defined group of openLuup items to send updates. This would take a bit of research but seems possible.

The most interesting method to get the updates is with the server side events (SSE). openLuup could subscribe to the events from the openHAB items and get updated on the fly. I don?t know much about it but this would make a very nice interface with almost no configuration on the openHAB side.

Any comments? Is this ludicrous? Any advice? Thanks in advance.

I have been thinking about creating such a plugin for Home assistant myself. Homeassistant actually has a plugin for the vera but I still prefer the ALTUI interface and Lua/Luup engine of openLuup. There is already it seems an openhab plugin for the vera. Have you looked at porting it to openLuup?

Why OpenHab? is it a better zwave controller? At this point I am looking at replacing my Vera Plus with something more reliable. I actually already have an openHab box for quite some time but never found the energy to set it up. HomeAssistant seemed easier and more attractive.

Edit: Ok I looked further into it and it seems like the plugin is on the openHab to control the vera which, like for Homeassistant is the reverse of what you are looking for. Given the fact that the zwave support is not really up to par on either of these two solutions, I might be more interested in a hubitat bridge instead…

I’m putting some faith in Chris Jackson in the openHAB environment for Z-Wave. He’s been very quickly improving the device support and I believe it is quickly matching and will soon exceed what is available in some of the other platforms. (I have no comment on Home Assistant - just haven’t researched it.) I’m not saying it is perfect (nothing is), but it looks like a good match for what I want. And yes, I want the openLuup to control openHAB, not the reverse which is currently available. openLuup/AltUI is a very good interface and I’d like to extend it to control openHAB.

The more time I am spending with the Vera, the more I am considering replacing it with something else. I may fire up my OpenHab box (Pine64 with a zwave radio which cost me half the price of a Vera Edge) and could lead me to look for the same thing you are. I think I already have a solution for Zigbee with the USB stick we PMd about a while ago which appears to have an openLuup plugin. On the Zwave side, Hubitat would work great as it appears to have much more device support but the local API is not nearly as open and would require oauth2.

openHAB has its quirks and flaws just like any other system, but the community is fairly active and questions get answered. Developer tools are good - Eclipse SmartHome Designer - and it works with VS Code. Additionally, the interfaces to it are very good and open - very complete REST interface. But the documentation is not perfect and it has a little bit of a different model of use. In the end, though, it is an event driven system which pretty much allows you to do whatever you want. I don’t have a huge number of Z-wave devices, so I may go down the manual path of creating devices instead of trying to change the Z-way plugin. I think my next step is pair a lock with the openHAB Z-wave binding as that is one of the more temperamental devices. If that works well, I’ll probably start migrating.

Open source has its pros and cons. For me the pros are ahead and I will move in that direction.

I just read up a bit on zwave support between openHab2 and Home Assistant. You might have want to check out HASS. I am now considering moving HASS to a Pine64 and have it be my zwave bridge instead of the vera plus. Of course, a plugin would make things easier…

I’m curious to know what you learned about HASS for Z-wave support over openHAB. As far as I can tell openHAB will work fine for me. I’ve had it running on the side for some time and it seems good. I admit openHAB is a bit quirky, but it seems like it will fit my needs. But I haven’t looked at HASS - maybe it is significantly better?

HASS basically supports everything openzwave supports which is a very active community. It is based on Python and is easier to configure, looks and feels more modern than openHab. The rate of update and fixes on HASS seems also much greater. I have been running an instance for almost all of my cloud integrations and it?s been rock solid. I think I will give it a shot in the next couple weeks using my combo stick and see how much of my network it supports.

On top of it, I think getting a plugin written for it would not be too hard given the API already available: Both REST and Websocket.
https://developers.home-assistant.io/docs/en/external_api_rest.html

Hopefully HASS works out well for you. I would like to hear how it works out if you try it. I think I am going to try openHAB and see what it is like. Nothing is perfect once you dive in a little deeper, but it seems like it is worth a shot. Plus I wouldn’t mind learning a bit of Java which will be necessary. openHAB does have the REST interface which could be used for a plugin, but I think I may make it work on its own for a bit and just have some rules to bridge a few openLuup devices as needed.

Home automation is really nice, yet it’s not a requirement for me. But it has really been a huge learning experience which is fun: Lua, Z-Wave, Zigbee, nginx reverse proxy, SSL certificates, REST api’s, http PUT/POST, curl, the Raspberry Pi, UPS’s, Oauth2, JavaScript, github, openLuup, plugins, AWS, lambdas - now Java. So much to learn!

I am now considering installing Z-way. I just realized I had purchased a HomeSeer stick a while ago which seems to be identical to the UZB except for the housing. Z-way seems to be very picky on what os it installs on though. I just tried it on ubuntu and have not gotten it to work yet.