Switching from Zwave 1.4 (Deprecated) to Zwave JS

The entity below exist for each device,

number.door_windows_sensor_basic

So since I have two devices that are the same just different windows, do I manually change the value to “2” for each device or just set each to “1”; currently they both show “0”?

Then since the sensors have the entity name of binary_sensor.door_windows_sensor_any and binary_sensor_any_2 , the “any” implies the sensor will reflect open if either sensor is triggered.

I’m just not sure why each sensor had the word “any” added to the entity name. This wasn’t the case with Zwave 1.4.

what does it matter, the entity_id name doesn’t imply anything. It’s just the entity_id. The number entity is most likely completely unrelated to the binary sensor. Can you just take a screenshot of the device with it’s entities in integrations → device → click on device, because everything you’re saying doesn’t make much sense.

Here you go.

Also when you select the send entity, this is what I get.
wNum

It looks to me that there is an effort to group the window sensors together, These are from Nortek, wadwaz_1. I have two other brand window sensors but I don’t get this with them. Perhaps because I only have one of each brand/model.

I’m not sure what your dilemma is. I just looked up the device, and it’s a simple open/close sensor. So the binary_sensor is all you need. I’m not sure why you’re focused on the number entity. That’s most likey an entity that changes a property of that single device. It has nothing to do with other door/window sensors.

It’s not really a dilemma, and yes I know it is a simple sensor, but I would like to understand why this showed up after the transfer. I’m naturally curious and this was not expected. Assuming it was not by error, and instead as you say likely and entity that changes a property, I would like to know how to use/exploit it. I don’t spend a lot of time on Home Assistant but I do like to understand how things work however, there is not a lot of relevant current documentation since HA is constantly evolving. So we are left with asking questions on the forums in hope that someone in the know can explain it. That’s all.

I had to work through several issues in transferring the few devices I have and since the provided conversion script didn’t clean up everything, I also wanted to make sure I didn’t miss anything.

You’re way off the mark with your assumptions. That particular number sensor provides the ability to Set and Get the Basic Command Class value. If you don’t know what the Basic CC is, then you probably don’t need that entity. There’s a reason it’s disabled by default.

The new zwave platform exposes everything it can about your z-wave device. If you’re unfamiliar with the terminology that comes across, you should be googling the name after the colon with the keyword zwave. You’ll get all the information you need about the command classes that come through. You may not understand them, but you how have access to them.

OK, thanks, that’s all I needed. What through me off was entity id started with number, and the previous entity id had “any” tagged on so immediately thought this was something new that allowed me to group several sensors and respond if any went off. Been so long since I did anything with zwave, I never thought it had something to do with command class. I don’t need that functionality at the moment so I’m pretty set.

Thanks again.

since you have two of those devices it’s likely that they both got migrated in the same manner.

so you also likely have another entity_id that is the same but with a “_2” appended that is related to your second device.

like so:

binary_sensor.door_windows_sensor_any
number.door_windows_sensor_basic

and

binary_sensor.door_windows_sensor_any_2
number.door_windows_sensor_basic_2

I have about 50 zwave devices in my home, but these constitute over 230 separate entities. Some of my zwave devices have 10+ entities associated with them.

I’d like to switch from Zwave 1.4 to Zwave JS, and can stomach renaming 50 devices, but would really like to avoid renaming every single entity. The way I used zwave 1.4 was to add devices, then stop homassistant, then rename the devices in zwcfg_*.xml, then delete the entities in .storage/core.{device,entity}_registry, then restart homeassistant. I know this isn’t really what you are supposed to do, but the only way to make my scripts and automations at all human readable is to have the devices themselves have vaguely human-readable names. I also like to cut and paste automations between different instances of a particular device, so it’s super useful just to be able to search and replace back_door for front_door, for example.

Is there any way, when moving to the zwave JS integration, to rename devices and have the names of the entities all be adjusted? I don’t mind doing ugly things like stopping homeassistant and editing files in .storage/*.

Thanks.

Yes, sort of.

when you rename the device (any device not just zwavejs) the UI asks if you want to rename all of the entities as well. if you say yes the new entity id’s will be based on the new device name.

If you have your entity ids based on some standard then you might be able to find a method of renaming the device to end up with the desired entity id’s.

But I kind of doubt. zwavejs gives some non-intuitive entity ids as default. I think you will be forced to accept that you will just have a lot of manual renaming to look forward to.

Actually, I hadn’t realized this happens. Even though the rename is for the human-readable name, I think I can chose a human-readable name that ends up producing the exact same entity-ids I had before, which means I might be able to keep all my automations and scripts after editing 50 device names through the UI.

This is still nowhere near as convenient as doing it with a text editor in the .homeassistant directory, but I think it might be tolerable.

Thanks!

I suggest an update to this guide: at step 6, the network_key has to be filled in the s0_legacy_key, and the s2_*_key has to be left empty to that they are autogenerated at first start of the add-on

Just a quick question about network key. I never used one, since i had no use for encryption when i started with homeassistant.
Will migration work when no network key exist?

Search around in the Config/.storage directory for the network key. It was likely autogenerated when you first enabled zwave in HA. Without that key, you will not be able to connect to your zwave network. Write it down and store it somewhere safe.

I have successfully migrated to ZwaveJS from Zwave after having to factory reset my kwickset 888 locks and then re-adding them they all now work. The problem that I currently have is, in the old Zwave integration the lock status was reported as locked or unlocked, and how it was last locked in an attribute field. The attribute case that I was using was “Locked with Keypad by user 0” , which I would use as a trigger from any of the three locks to trigger a script that would lock all of the doors. So when leaving the house if you pushed the lock button on the outside of the door the automation would be triggered to lock all of the doors.
The problem that is now the lock doesn’t carry any “attributes” and the “status” is only locked or unlocked. I suppose I could use the status to trigger the script, but I am afraid it may error as the script executes and re-triggers the automation.
Is there a way that I can get the status of how the lock was “locked”, in the same manner as the old integration? I see there are more things that can be done in the background with the yaml but I am not quite up to that without some guidance.
Thanks

OK, I found out how to get the data that I needed to be able to all the doors, when the external lock button is pressed on one of the three locks. There is a Youtube video that shows how to get event data which is much more detailed than the status that is on the entity. I hope it is ok that I have linked the video here, if not then please delete and let me know.

His Youtube page is This Smart House

2 Likes

Hello everyone. I’m trying to figure out what I am doing wrong with my migration. None of my devices will migrate. I entered my network_key that was in my configuration.yaml except I removed all of the commas and “0x” as the s0_legacy_key, left all other fields blank except for the usb path. I also tried with entering nothing, same result.

Just tried to do this after updating to the latest core today and I’m still stuck. Error is utterly useless. I finally found the “key” deep in the files and pasted it in the legacy key box, acted like it was starting then just didn’t work.

Version core-2022.3.5
Installation Type Home Assistant OS
Host Operating System Home Assistant OS 7.5
Update Channel stable
Supervisor Version supervisor-2022.03.5

I am running Home Assistant, see below, and I want to migrate from the legacy zwave to zwavejs.

I have successfully installed zwavejs and I want to start it by running the --config options.

I want to add in my config file a network key and my /dev/zwave which points to the USB stick.
How can I create a config file to use?

System Health

version: core-2022.3.6
installation_type: Home Assistant Core
dev: false
hassio: false
docker: false
user: homeassistant
virtualenv: true
python_version: 3.9.2
os_name: Linux
os_version: 5.10.103-v7l+
arch: armv7l
timezone: Europe/Nicosia