zwavejs2mqtt
Posted: Friday 06 August 2021 13:18
For people out there who experience issues with the built-in OZW, there is now an alternative solution using zwavejs2mqtt.
A while back, I was facing a lot of issues with OZW and didn't like the fact that it's built into domoticz (e.g. every time you want a dzvents update, you are also forced to adopt all OZW updates unless you want to build from source). I got connected to @moroen and we discussed possible approaches. Since Home Assistant already switched to zwavejs2mqtt, we figured that this would provide a more future proof approach with great community support. We also agreed that it would be best to not recreate too much zwavejs functionality in domoticz to keep the plugin more manageable. zwavejs already has a great user interface so managing (including, deleting, ..) devices, creating groups and so on/forth we decided to keep within the zwavejs side but still provide bidirectional device integration to domoticz.
@moroen created a base plugin framework and did most of the heavy lifting, I helped with the connection side, adding devices and discussions on how to implement devices generically. Recently, @moroen made some more changes to 1) allow multiple instances of the plugin each with their own configured devices (so you can have sensors in one instance and plugs in another and not have to worry about the 256 device limit) and 2) to configure device types outside of the plugin to be more flexible adding devices without having to resort to python coding.
The plugin can be found at: https://github.com/moroen/ZWave-MQTT-plugin
Instructions on how to install are on that page. In essence, it's fairly simple: install and run zwavejs2mqtt (ideally in a docker container), install the plugin, restart domoticz and start adding devices.
Since I had quite a selection of devices, it took me a while before I had moved everything from OZW to zwavejs2mqtt. Keeping the shop open whilst in transition, I had to switch between OZW and zwavej2 about 3 times before I could stop OZW altogether. This is a bit of a hassle since OZW is pretty iffy about being shut down and started up again. That said, it was not a big hassle for me (despite my 150 devices in domoticz) and I have been a very happy camper since. zwavejs2mqtt has been incredibly stable, has allowed me to configure things correctly/properly for the first time in my zwave history and provides functionality that OZW just does not (like deleting dead nodes and those nodes staying dead forever, unlike OZW just recreating them and having to resort to editing zwave databases in the stick).
I am seriously pleased with it but that does not mean that there are potential bugs/issues. As always with open source, contributions are very welcome. So far at least, there have been no reported bugs for many weeks and zwavejs itself has also seen minor changes for months now underlining the stability of it. For me, the plugin has been working flawless for months, my last restart is now 25 days ago and even that was not related to zwavejs and the last plugin/zwavejs update also was months ago. Lastly, I can now update domoticz at will as it's completely independent of OZW. The only prerequisite is a working python plugin system (and there have been changes lately so be careful) and ensuring you stay within 256 individual devices per plugin instance.
For me, domoticz now truly is the integration and automation hub and that's goodness. Dzvents, python plugins and so on are great assets of domoticz. They are the key reason why I have not switched to Home Assistant. That said, if you would want to run HA next to domoticz, the beauty of zwavejs is that it allows you to do that seamlessly. I also have HA up and running (and struggle with the functionality and complexity) right next to domoticz without any issues wrt zwavejs.
Let me know if you have any questions/issues. Happy to help.
Herman
A while back, I was facing a lot of issues with OZW and didn't like the fact that it's built into domoticz (e.g. every time you want a dzvents update, you are also forced to adopt all OZW updates unless you want to build from source). I got connected to @moroen and we discussed possible approaches. Since Home Assistant already switched to zwavejs2mqtt, we figured that this would provide a more future proof approach with great community support. We also agreed that it would be best to not recreate too much zwavejs functionality in domoticz to keep the plugin more manageable. zwavejs already has a great user interface so managing (including, deleting, ..) devices, creating groups and so on/forth we decided to keep within the zwavejs side but still provide bidirectional device integration to domoticz.
@moroen created a base plugin framework and did most of the heavy lifting, I helped with the connection side, adding devices and discussions on how to implement devices generically. Recently, @moroen made some more changes to 1) allow multiple instances of the plugin each with their own configured devices (so you can have sensors in one instance and plugs in another and not have to worry about the 256 device limit) and 2) to configure device types outside of the plugin to be more flexible adding devices without having to resort to python coding.
The plugin can be found at: https://github.com/moroen/ZWave-MQTT-plugin
Instructions on how to install are on that page. In essence, it's fairly simple: install and run zwavejs2mqtt (ideally in a docker container), install the plugin, restart domoticz and start adding devices.
Since I had quite a selection of devices, it took me a while before I had moved everything from OZW to zwavejs2mqtt. Keeping the shop open whilst in transition, I had to switch between OZW and zwavej2 about 3 times before I could stop OZW altogether. This is a bit of a hassle since OZW is pretty iffy about being shut down and started up again. That said, it was not a big hassle for me (despite my 150 devices in domoticz) and I have been a very happy camper since. zwavejs2mqtt has been incredibly stable, has allowed me to configure things correctly/properly for the first time in my zwave history and provides functionality that OZW just does not (like deleting dead nodes and those nodes staying dead forever, unlike OZW just recreating them and having to resort to editing zwave databases in the stick).
I am seriously pleased with it but that does not mean that there are potential bugs/issues. As always with open source, contributions are very welcome. So far at least, there have been no reported bugs for many weeks and zwavejs itself has also seen minor changes for months now underlining the stability of it. For me, the plugin has been working flawless for months, my last restart is now 25 days ago and even that was not related to zwavejs and the last plugin/zwavejs update also was months ago. Lastly, I can now update domoticz at will as it's completely independent of OZW. The only prerequisite is a working python plugin system (and there have been changes lately so be careful) and ensuring you stay within 256 individual devices per plugin instance.
For me, domoticz now truly is the integration and automation hub and that's goodness. Dzvents, python plugins and so on are great assets of domoticz. They are the key reason why I have not switched to Home Assistant. That said, if you would want to run HA next to domoticz, the beauty of zwavejs is that it allows you to do that seamlessly. I also have HA up and running (and struggle with the functionality and complexity) right next to domoticz without any issues wrt zwavejs.
Let me know if you have any questions/issues. Happy to help.
Herman