Problem with renaming of devices discovered by Zwave2mqtt

Background
I’m just starting to migrate my existing ZWave network to HA. I’ve chosen to use zwave2mqtt to do this as my primary HA instance is a dockerised VM and not in a good position for ZWave. So, I have a second HA instance on a Pi, running hassio and the zwave2mqtt addon.

I’ve also chosen to start afresh with the network: i.e. I’m excluding devices from the old network and adding them into the new one. There are only 10 nodes. The mqtt broker is in a separate VM as it’s been there for ages.

Problem
I configured zwave2mqtt as per the docs, using homeassistant as the mqtt prefix and as the discovery prefix in both the OZW control panel and in configuration.yaml.

When I add a device to the ZWave network, it appears in the OZW control panel and is discovered by HA. However, if I then go in and give the node a decent name (rather than just “nodeID_3”, the change is not picked up by HA: which continues to “know” it as “nodeID_3”.

How do I resolve this, other than by going into every device on the node and editing its json configuration? I can do this, and have done for one device; but it’s far too tedious to do it for all the devices on all the nodes.

Also, where is the configuration stored if I click “Store” and I haven’t defined a Config path? Ideally, I’d like it to be stored in the HA /config folder so I can manage it with git. Any idea how I achieve this?

Gareth

For Home Assistant you may be able to customize the entity_id. Not every integration supports that, and I don’t use Zwave2MQTT to be sure if it does (the source suggests it should).

Gareth,

I’m on a similar learning curve with zwave2mqtt at the moment.

Currently I believe that not having the discovery set to ‘retain’ will help prevent hassio/hass from continuing to pick up old device names is part of the solution.

Then I either disable gateway before adding new devices, giving me time to name them before enabling gateway. Or if this is not possible, then I have found that if you simply go to settings in zwave2mqtt and click save, then all HASS devices appear to get rebuilt.

However, devices that come up dead won’t get their generated HASS device, so if you have battery devices then you may need to look at the ‘assume awake’ option, i’ve found that has helped with my aeotec recessed door sensors.

so in short, rename in zwave2mqtt and then go to settings and click save. then wait for the zwave network to both restart and for the HASS devices to get generated.

Now if you do have retained broken devices in MQTT, then it is a PITA to fix. I’ve been destroying and recreating my mosquito instance to purge the persistence.db, this also requires purging the mqtt hassio integration too.

hope some of my experiences help you, let me know if you’ve found other solutions since your posting.

thanks,

Andy

1 Like

Hi Andy,

I’m on the same boat… that I’ve got a module that was renamed after it was propagated (and retained)… And even after destroying the mqtt client and broker, the original nodeID_ form can seemingly appear again.

Do you have any guides or pointers on this? Thanks in advance, take care.

Hi Leo,

in the last 11 months Openzwave (beta) has become the direction for Zwave integration in Home Assistant.
Whilst ZwaveToMQTT by RobertsLando is still a fantastic solution. There is more integration between HA and Openzwave(beta).

So that would be my suggestion!

kind regards

Thanks so much… I’ll check that out. I hope it’s as easy to put the zwave adapter on a separate pi and connect it via network to OpenZwave (beta). I had my zwave2mqtt on a separate pi… and was planning to setup another one to cover a different location via network.