Are there any advantages when using the mqtt part? Is the performance better?
Performance is probably slightly worse, but I’m not sure this would be noticeable in practice.
The absolutely huge advantage is that you can completely decouple the zwave part from HA. No more breaking changes in the zwave integration (because there’s no zwave integration anymore), no need to update the zwavejs server when updating HA and vice versa. You can easily mix and match versions. Your zwave network won’t randomly break after updating HA anymore, especially when using manual MQTT entities rather than discovery. More work to set up, but so much more peace of mind.
I have some zwave devices and some tasmota devices.
I run zwavejs2mqtt for the zwave things, and a separate mosquitto broker for the tasmota ones.
Could I do away with the separate mosquitto broker and run that through the same zwavejs2mqtt install?
That sounds good. I guess the way to move my devices is to uninstall zwavejs in ha and then rename the devices from the same name.
As far as I understand MQTT it should be possible to use the same broker for that. I use one for zigbee already.
It’s important to understand that there are two ways to do MQTT with zwavejs2mqtt and HA. With discovery or manually. Discovery will automatically create the entities through special MQTT topics. If your goal is to sever every dependency between your zwave network and HA (to avoid breakage on updates), then this doesn’t make a lot of sense. You get the worst of both worlds - the added complexity of MQTT and a version dependency through the MQTT discovery protocols that can break things again.
If you define your entities manually as MQTT entities, then there’s no dependency left at all. HA doesn’t even know about your zwave network anymore. All administration is done through the (excellent) zwavejs2mqtt web interface. You have full and total control. But it’s more work when you add new devices, because you have to add them manually as MQTT devices to your configuration.yaml too.
No. zwavejs2mqtt is not a broker, it’s an MQTT client. It also needs Mosquitto if you run it in MQTT mode. Of course you can share a single Mosquitto instance for both zwavejs2mqtt and Tasmota. You can also run zwavejs2mqtt without the MQTT part, this needs the zwavejs integration in HA though.
But could we say mqtt discovery is better than zwavejs integration? As it can only break when adding new devices?
I use discovery with zigbee.
The use of MQTT discovery is discouraged by the zwavejs2mqtt maintainer. Heed the warnings in the official docs: https://zwave-js.github.io/zwavejs2mqtt/#/homeassistant/homeassistant-mqtt
Better to stick with the Z-Wave JS integration, or manual MQTT if you like that kind of work.
Is this only valid for zwavejs2mqtt or for zigbee2mqtt as well? And is this statement still valid?
Those are different projects. I edited my post for clarification.
Thanks for clarifying that!
I use the MQTT part of zwavejs2mqtt. I like the decoupling aspect, that someone mentioned above, as well. I use manual entries, and do so selectively. The main reason for being selective is that I occasionally watch published messages at the MQTT broker for debugging purposes, and by selectively choosing only the data I need to get from (or send to) a ZWave device, I won’t see unnecessary chatter of MQTT zwavejs messages. The drawback is that it may not be so obvious how to set up these manual entries, and it takes time to do it.
Your reference link is gone (404) because the project’s name changed.
https://zwave-js.github.io/zwave-js-ui/#/homeassistant/homeassistant-mqtt
Last night I read this post… I figured it was too much work and configured everything with mqtt … but this morning, after finding the new ref. link and reading the content, I convince myself to start over
- exclude all zwave devices to remove them
- disable mqtt
- enable ws socket
- include all devices
- manually add them in configuration.yaml
Since this is a brand brand new install, I wonder if I shouldn’t just wipe all hass config and start over.
Then I wonder, how someone adds the entities of a device in the configuration.yaml file? For example, to add all entities for an aeon “multisensor 6” & old energy meter, fibaro leak sensor , etc… is the information shown in ZWaveJS UI device’s “DEBUG INFO” all that is needed to create that config?
Thank you.
Step 1, you didn’t need to exclude your devices. They would have been picked up instantly when enabling websocket and adding the Z-Wave integration
There’s nothing to add to configuration.yaml. Not sure what you are doing in step 5. Did you add the integration?
I just scrap everything not knowing if I’d get a helpful response soon I also wanted to rename everything, wasn’t sure how the mqtt entities would go away.
You are right, everything seems to be available. It’s some instruction on zwavejs site that I thought it was needed I edit some files but it’s possible it wasn’t applying if using the integration.
I’m so happy to have removed mqtt out of the game
Thanx!
I finally found out where I took that information from and it’s here above.
This user is using the MQTT functionality provided by Z-Wave JS UI in conjunction with the MQTT integration. That is completely separate and independent of the Z-Wave integration. The Z-Wave integration does not have any YAML configuration.