Rename ZWave Devices

Hello, I am new to HA and have tried finding straight answers on this but cant seem to find anything.
I added a ZWAVE stick and ZWAVE switch successfully. Right now the name shows up as UNKNOWN: ID XXXXXX. How can it be renamed “properly” so the entity name will be appropriate as well. SOmething like switch.ExteriorLights. And then give it a friendly name.

I am tried looking in the xml files as well as the OPENZWAVE control panel but cant find where to rename.

2 Likes

You will need to stop HA from running, run OZWCP, click on the device, and from the drop down right above the device list you will have a rename option. After renaming the device, save the changes (top right of OZWCP) and move the config files to the root of the HA directory. I moved the zwcfg_xxxxx.xml and zwscene.xml, although not sure i the scene.xml is required.

Great!! Thanks. When you say to the root of the HA directory, on a pi, you mean /home/hass? or /home/hass/.homeassistant?

pi@raspberrypi:/home/hass/.homeassistant

Trying it now…THANK YOU.

After renaming and saving as descibed above, I have yet to find any recently file to move. Names of the files you mention above do exists in the config folder alright but none have been modified for months. So… renaming devices in ctrl panel has been a futile exercise. Needeles to say, none of the new names stick

Here is what I just did.

  • Stop HA
  • Start OZWCP
  • Initilize device
  • Select the device
  • Under Functions, choose Name
  • Enter the name and hit Submit
  • Click Save in the top right.
  • Stop OZWCP
  • Run:

cp /srv/hass/src/open-zwave-control-panel/zwcfg_xxxxxxx.xml /home/hass/.homeassistant/zwcfg_xxxxxxx.xml
cp /srv/hass/src/open-zwave-control-panel/zwscene.xml /home/hass/.homeassistant/zwscene.xml

1 Like

I did the same as @splnut and was pretty succesful. In my case, I did leave out the zwscene.xml file as it had no changes for me. And additionally, I ran the following command:
chown hass:hass /home/hass/.homeassistant/zwcfg_xxxxxxxxxx.xml
This is because copying over the xml-file from the ozwcp directory to the hass directory changes the ownership from hass:hass to root:root. This may not cause any problems, but I’d rather be safe than sorry.

In my experience, though, renaming a ZWave device only works partially. I got my first ZWave sensor the other day and originally it showed up in HASS as binary_sensor.aeotec_zw112_door_window_sensor_6_sensor_2. The sensor is an Aeotec Door / Window Sensor 6, so “sensor_6” is part of the product name.
After naming the device Living area door sensor in OZWCP, the device was identified by HASS as binary_sensor.living_area_door_sensor_sensor_2…better but not ideal.
Finally, I named the device Living area door, which HASS then identified as ```binary_sensor.living_area_door_sensor_2````.

It seems “sensor_2” is a static part of the name of this particular device which I cannot get rid of. My OCD self would love to get rid of the “2” at the end, but oh well :relaxed:

I’ve been trying the commands that were suggested by @splnut and @fanaticDavid but am getting errors when trying to make the suggested changes. I believe I’ve identified the issue which is zwcfg_xxxx in home/hass/.homeassistant/ is owned by hass and the zwcfx_xxxx in /open-zwave-control-panel/ is owned by root. Should they both have the same ownership? If so, root or hass and how do I make that change?

Check the post just before yours.
chown hass:hass /home/hass/.homeassistant/zwcfg_xxxxxxxxxx.xml
You will need to change the zwcfg_xx to your filename or use * in place of all the x’s (as in zwcfg_*.xml)

/home/hass/.homeassistant/zwcfg_xxxxxxxxxx.xml was owned by hass:hass

/srv/hass/src/open-zwave-control-panel/zwcfg_xxxxxxx.xml was owned by root:root

Since that last post, I’ve changed all files in both directories to hass:hass. I’m hoping that resolves my issues.

I’'m working on getting rid of the node id number in the end of zwave names.
I’m new to Home Assistant and not “official” developer so it might take a while before it’s in releases.
I made a thread about this in Feature requests but no one voted it ( boo-hoo )

You can also make symbolic links between OZWCP config and hass config. I’ve symbolic links for zwcfg and options.xml. No need to cppy those files anymore.

3 Likes

I would love to use symbolic links instead of copying the files over every time. Could you elaborate on how you did that?

ln -s /usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/options.xml /home/pi/.homeassistant/options.xml
ln -s /usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/zwcfg_0xXXXXXXXX.xml /home/pi/.homeassistant/zwcfg_0xXXXXXXXX.xml

I’m not quite sure if hass has right to write those but I don’t use hass to add new devices but OZWCP.

I should also put config files to /etc/openzwave because config files are more important to keep up to date if you have new devices. I could just create a script that fetches the latest from openzwave which is easier than updating the whole software.

2 Likes

I already wrote the code to get rid of node id’s in the end of device name but the changes seem to be turned down.
So if you want this change to happen, go vote my feature request.
It of course needs the user to understand to name the devices uniquely.

I’ll be using my version because I need more control with the names. There will be problems also if device classes are renamed or moved during development.

1 Like

Of course it would help to link the post in right, Marko? :wink:

I just voted and you can too at:

I’m too modest to vote my own feature requests :slight_smile:

I simply need this. Today I had to add some devices again, and old devices have a bug in that way that they try to keep their old node id’s. So when I added an old device again, it took the same node id as one newer. So I have the add that newer device again and before that do a full reset. Then there’s the newer devices that I removed&added just to check the secure connection works and when I did this, their node id’s changed even when their old node id’s were now free.

Then I moved one temp&humidity sensor to roof and simply named it again:hass thinks it another sensor and sees two sensors, the one with the old name and one with the new name. I can move these sensor around and hass just thinks some sensor went off and another on. In the long run I can use these recorded values for planning how to control temperature and air quality.

1 Like

I just upgraded to 0.31.1 and all of my (18) z-wave devices were renamed.

Some stability please.

2 Likes

This is why you should read release notes. The reasons and procedures were clearly laid out in the release notes and it was also mentioned again in the breaking changes section.

2 Likes

So, all openzwave device names are stored in an XML file, this is nothing to do with the devices themselves and can’t be written to them?

Are there any standards for such XML files, if i spend hours and hours renaming everything and keep backups of the XML will i always be able to use it?

I’m looking to buy 25 fibaro dimmer modules, so this seems like a must for me otherwise what a pain looking at 25 x “light.fibaro_system_fgd212_dimmer_2_level_2_0” !

thanks!

edit: Also i only have one switch installed but have two entries in HA with no differences in description?:

light.main_bathroom_light_level_2_0
light.main_bathroom_light_level_2_0_2

off friendly_name: main_bathroom_light Level
location: main_bathroom
node_id: 2
supported_features: 19