Zwave 2 mqtt help

Hi, I need some help. I’m trying to migrate from zwave to mqtt. I’ve got a quite big zwave network (around 43 devices). I have everything setup and I’ve even set mqtt autodiscovery and my devices are appearing there. However, when I try to use one (a cover for example) and I try to close it, I can see that all my devices states go to close together, as if they were one alone. Moreover, it really does nothing to the cover (no working at all, not to open, neither to close). I have made some screen captures of my config below.

Any help would be greatly appreciated. My idea was to use a RPi3 for Zwave2Mwqtt and a mosquito broker and then, have my functional HA on another RPi 4 with all these devices using mqtt autodiscovery. They appear, but they do not work (not from RPi3 neither from RPi4.
Here is my config on my Rpi3 HA (here it was repopulating the graph after a restart):


In this last one you can see all the discovered covers as working together (though they do not work).

Really hard to tell whats going on. Maybe if someone else has experienced this issue they could help, but I think if you were able to use developer tools and subscribe to the topic, then post what exactly is seen when you subscribe to the topic and publish the message (aka try to close the cover). That will give an idea of what hass is doing when you push the close cover button and what gets sent to mqtt. Also, perhaps some entries from the log, also in developer tools section.

Im not sure i can help as i dont use hass.io nor zwave2mqtt, but i have to imagine that additional help will provide missing info that can help others help you. good luck.

1 Like

Thanks a lot @John_Gratis, the problem is that I do not know what topic to subscribe for. I mean I know, for example the topic for my other mqtt sensors and I can check subscribing to their topics and see they’re working fine but I do not know what topics zwave2mqtt uses for each sensor so I’m not able to subscribe and check. I’ve tried with just the prefix and the name of the nodes, but nothing returned as listened after trying to use the covers (opening or cosening).

Regarding the zwave2mqtt log and the mqtt log itself, this is what I got:

-Zwave2mqtt log: seems normal, and similar to a usual zwave log
-mqtt log: Here I think I’ve got something, look at this screen capture:

It seems that my mosquitto configuration on zwavetomqtt config menu is not right. I’ve tried to change host name from mqtt://myIP to just myIP.

I’ll report back if that was the problem, as when you change something to mqtt2zwave setup it starts again the zwave network wich is very slow. Thank you!!

sounds like a good candidate as it definitely sounds like the zwave component isn’t connecting. You can subscribe to topic wildcards with # so if you know the base topic you can just subscribe to it. i know homeassistant is the typical default, so you might try subscribing to homeassistant/# That is just a bit of FYI since it sounds like the real problem is not mqtt but zwave2mqtt connection to mqtt.

If that didnt let me know and we can try a few other tricks to figure out whats going on. mqtt.fx is a great tool if youre going to be doing a lot of mqtt stuff, btw. its an mqtt client you can install on your desktop which allows you to connect to the broker and scan for topics, subscribe to them, and even publish on them. Probably your no.1 tool for working with mosquitto in any setup/debug scenario.

1 Like

HI again, now it is transmitting mqtt messages (thanks for the # trick!!) but it is still not working, sometimes it has worked (one or 2 sensors) but not all (even if they were from the same kind and model). Now after one day, most of them are shown as discovered sensors (most but not all ) and seem to be enabled and available, however, now, none of them are working. I am about to go back to zwave alone. Here I show some of the screen captures I made just in case you could see something I can’t. Thanks:

First, is there a reason you want to switch to mqtt? Perhaps zwave was causing some issues? Or maybe you’re just like me and enjoy complicating things needlessly because it’s fun! LOL. Anyway, thats just to guage how much time you’re willing to justify in resolving the mqtt portion.

Now on to some ideas… Firstly, the devices will likely not show up until they’ve been activated at least once, many zwave devices that are battery powered do not wake simply to send updated status unless they’re triggered, and until a message shows up on mqtt zwave2mqtt will have no idea a device exists.

So, when you say a device isn’t working, is the message showing up within mqtt? If so, perhaps you can paste the payload in here. Screenshots are ok, but pasting actual data is a little easier, imo (not easy to do with the hass.io way of configuring, i get that - but the mqtt payloads and stuff would be easier to look through if pasted as code). Anyway, we need to figure out where the break down is. Let me ask a question to understand whats going on as i havent used this integration…

What problem does zwave2mqtt solve? Where does the mqtt come into play? As in, what is publishing the message to mqtt broker, and what is subscribing to the messages? What is the end result expected? Im just hoping a little better understanding on my part can help figure out the next troubleshooting step until someone familiar can chime in :smiley:

Edit: to say nothing in the screenshots shout out as being incorrect. It appears they’re configured and even seeing messages. Thats good. Just need to figure out if the zwave action is being missed, or if it is erring publishing a message, or if subscriber is somehow getting disconnected and/or not receiving the message properly. Through mqtt.fx you should see every message, as qos0 do not expire. If you see messages via mqtt.fx which do not show up where they should, then it means they were published but not read. If you do see every message using mqtt.fx (or whatever mqtt gui you have) which shows up on the ‘backend’ then it means the problem is publishing or before that.

1 Like

Hi again @John_Gratis!. I wanted to use mqtt, because I wanted to control from separate devices zwave and the rest of my system. In that way I can use my RPi3 centered in my house with a zwave usb stick, and the rest and core of my HA system in a RPi4 hidden. Even if it was in the same machine, zwave2mqtt is installed inside an add-on (on a docker) thus, if you restart HA it continues working and it does not have to reset all the zwave network again: this is really convenient.
I was going to follow the steps you indicated but suddenly, I found my issue and managed to make it work. The thing is that I don’t quite understand why: my zwave2mqtt configuration had its ssl option set to ‘false’. When I changed it to ‘true’, everything started working fine. I really don’t know why this makes a difference. But I wanted to let everyone know in case they had the same issue.
So now, I have my zwave (zwave2mqtt) in my Pi3 and all my home assistant system on my RPi4, controlling via MQTT my zwave devices.
The only issue I’m seeing is that auto mqtt discovered covers have a not working ‘stop’ button. It is not that important because I can use up, down or indicate the exact position but, the ‘stop’ button is not working. I guess it’s an error of how the mqtt topics were programmed for that button and I hope it will be solved soon in an upcoming release.
Thank you for all your help!!. :wink: