I've done some research, and have created a proof-of-concept plugin using zwavejs2mqtt as a backend, so it's quite doable. This is in it self not surprising in light of stas-demydiuk/domoticz-zigbee2mqtt-plugin, which clearly shows that the plugin framework is more than capable of handling MQTT.
I think one possible issue is the plethora of z-wave devices, so while I think that creating a basic zwave-mqtt plugin shouldn't be to much work, maintaining it and implementing support for all possible devices might turn out to be a momentous task. On the other hand, zwavejs2mqtt handles much of the heavy lifting in that regard, so from the plugins standpoint, it might be "just" making sure that the plugin responds to all the relevant MQTT messages, and those appear to be somewhat standardized by zwavejs2mqtt.
IMHO in order to make this manageable, we should prioritize what functionality is required, and what is "nice to have". I would suggest that required functionality is:
- Switching of devices
- Setting levels of dimmable devices
- Reading sensors
- Responding to events (buttons, scene controllers)
Nice to have:
- Node management
- Device configuration
Initially the nice to haves can be managed with the zwavejs2mqtt web interface, which in my opinion is quite good. Setting up zwavejs2mqtt was a breeze, using docker.
We should perhaps also discuss the motivation for such a plugin. If the main motivation is stability, I already have some reservations. When I first started with home automation, I chose zwave because according to what I read at the time, it appeared to be most stable, using mesh and two-way communication. I've since added rfxcom (mostly Nexa) and Ikea Tradfri, and among those three, zwave has by far been the tech I've had the most trouble with, devices dropping out or intermittently not responding etc. This has been debated in other threads on this forum. Now, some of this might be due to openzwave, but in my (albeit limited) time using zwavejs2mqtt, the latency, unresponsiveness etc. have been more or less the same as using openzwave...
That said, with openzwave currently looking a bit "dead in the water", perhaps this is a good time to explore other possibilities...
As to if we should try to adapt the zigbee2mqtt plugin or create something "from scratch" is open to debate. zigbee2mqtt is quite complex, and as far as I can tell, some parts, like the adapters, might not be needed, with zwavejs2mqtt more or less acting as a adapter. If I were to partake in this, I must confess that for me personally, it would be much simpler to create a plugin based on the principles of the tradfri-plugin.
We should also consider if it would be worth waiting for the next version of the plugin framework, IMHO much of what @Dnpwwo has laid out for the next version, would greatly simplify creating a zwave2mqtt plugin for Domoticz.
Regards,
M