How do I switch to Zwave JS?

Cool cool cool! Well… even cooler if there would be a clear path to migrate from the previous zwave integration (ozw beta) to the new zwave integrstion (ozw js). There is SO MANY posts and information but I have not found 1 easy to follow and realiable write up.

It would really help me!

I am now afraid to “just” install ozwjs put the usb stick in that addon and delete the old one…
All my entity ids… all my automations…

Help!!! :sweat_smile:

8 Likes

EDIT: 4 Community guides are being worked on. THEY ARE NOT COMPLETE. People will be contributing to the guides over the next few days. Please check them out, in time they will have all the information you need to Migrate without a Migration tool. Thanks

ZWave Overview

OpenZwave (beta) → ZwaveJS2MQTT

OpenZwave (beta) → Zwave JS

Zwave 1.4 → ZwaveJS2MQTT

Zwave 1.4 → Zwave JS

Preparation

In home assistant.

  1. Browse to Developer Tools.

    image

  2. Click on the template tab

    image

  3. Paste the following code into the template section.

    {%- for node, zstates in states | selectattr('attributes.node_id', 'in', range(1000)) | groupby('attributes.node_id') %}
    {{ node }}:
      {%- for s in zstates %}
      - {{ s.name }}
        {{ s.entity_id }}
      {% endfor %}
    {%- endfor %}
    

  4. Copy the results and paste them to a text file for safe keeping. You’ll reference this at a later time.

    image

From Zwave 1.4 → Zwave JS or ZwaveJS2MQTT

  1. Write down device and network_key, preferably copy them to a text file.

  2. Remove Zwave 1.4 from HA.

    This requires you to delete it from the integrations in the UI

    or

    Delete it from configuration.yamlThis of course depends on how you integrated it.

  3. Reboot your entire system.

    These steps are needed because the zwave 1.4 is tightly integrated with home assistant. Without restarting the hardware, home assistant keeps holding on to the zstick.

  4. Install ZwaveJS2MQTT or Zwave JS addon.

  5. Watch the logs and wait for it to fully start up.

  6. Fix all ‘unknown’ devices by waking them up. No need for a refresh node, just wake them up.

  7. Install Zwave JS integration and see what you have.

    (optional but this is what I did)

    7.1. Delete Zwave JS integration (I did this because names were unknown in HA still)
    7.2. Restarted Zwave JS after waking all devices.
    7.3. Install Zwave Js Integration and see what you have.
    7.4. Go to Step 7.1 if things aren’t where you want them.

  8. Rename Devices using the text file as a reference from the Preparation #4 step.

From OpenZwave (beta) → Zwave JS or ZwaveJS2MQTT

  1. Install ZwaveJS2MQTT or Zwave JS addon.

  2. Copy device and network_key from OpenZwave configuration.

  3. Stop OpenZwave (beta) addon.

  4. Start ZwaveJS2MQTT / Zwave JS addon.

  5. Watch the logs and wait for it to fully start up.

  6. Fix all ‘unknown’ devices by waking them up. No need for a refresh node, just wake them up.

  7. Install Zwave JS integration and see what you have.

    (optional but this is what I did)

    7.1. Delete Zwave JS integration (I did this because names were unknown in HA still)
    7.2. Restarted Zwave JS after waking all devices.
    7.3. Install Zwave Js Integration and see what you have.
    7.4. Go to Step 7.1 if things aren’t where you want them.

  8. Rename Devices using the text file as a reference from the Preparation #4 step.

22 Likes

For what it’s worth, I still have all the addons installed (OpenZwave, Zwavejs2MQTT, and Zwave JS) and ready to boot up. It’s really easy to switch between them. It gets more difficult after you rename things

1 Like

Thank you!

Credentials? Do you mean the devcie: and network_key:?

Rename… how? where? In home assistant or on another location? Like in the interface of Zwave JS? Or just rename the hard entity id (which I have NEVER done before…)

I prefer 1 flavor as an advance simple user :slight_smile:

EDIT:
I thus have a lot of “equal” devices like:
binary_sensor.door_window_detector_access_control_door_window_open_1
binary_sensor.door_window_detector_access_control_door_window_open_2
binary_sensor.door_window_detector_access_control_door_window_open_3
binary_sensor.door_window_detector_access_control_door_window_open_4

How will that turn out? Will they be named that exact same way?

yea

Bro, common, how do you name any entity_id in HA? I know you’ve done it. I’ve talked with you about it. Go to the integration page for zwave_js, click on devices, open the device and look at the entities it created. Rename the entity_id’s to what they were with openzwave.

No, that’s why you have to rename them :wink:

Run my template in the template editor and it will organize everything for you based on the node id.

For real :slight_smile: I have never intentionally renamed the entity id… Especially not one created by zwave…

Can I just rename an entity id like here:
image

For real… never done that :see_no_evil:

Yep, you can just rename it and it will stick.

1 Like

Done that, that is a clear overview! This is a matter of just doing it I think… but I do not dare because I do not know what the new “outcome” will look like… will the node ids remain the same and is that my unique reference point to do the renaming?

You don’t have to rename anything. You can keep it what the integration names it. But then you’ll have to update your automations and UI.

node IDs will stay the same as they are specific to the controller, not to the integration

Everything is handled under the hood. There’s a unique_id attached to all the zwave entities. You change the entity_id to anything you like and it will stick forever.

Get that, but since I do not know what the new integration will present me, even if the names are mixed… How will I know device A (ozwbeta) is device X in (ozwjs) and device B (ozwbeta) is device Y (ozwjs)…

Based on the node and a little intuition. The template I wrote outputs the node and it’s entities and the friendly names.

SO in the new zwave_js integration, open the list of devices. Click on a device. I’tll list the node. Look at the node and compare it to what the template output. Then look at the entities under the device. You’ll know what’s what.

Thanks :slight_smile:

5 Likes

This is excellent, I really appreciate the walk through!

Do you think it’ll be easy to switch from the zwavejs2mqtt server to the Supervisor zwavejs addon server? As in, will I have to rename the devices yet again, or will the name stick because we’re using the same integration, just a different server?

Oh that will be super easy. All you have to do is turn on the server access inside the zwavejs2mqtt settings. Then turn off the toggle for the MQTT portion. Install the integration and you’re off running.

Maybe, I haven’t gone this route. The names come from the server, so in theory, you don’t have to rename. Just turn off MQTT discovery, you might have to delete the topics.

Ah, I was just wondering because I figured I should start with zwavejs2mqtt since it has a full UI for node configuration. Eventually I would prefer to use the “official” server add-on, but since it’s very new and there’s a lot still being added, it sounds like it’ll be more effective to start with zwavejs2mqtt.

Basically, I made the jump to OZW a while ago because I was going to add dozens of new nodes, and didn’t want to rename everything down the road (haha, oh well), and I was hoping if I jumped to the ZWaveJS integration now using zwavejs2mqtt as the backend, I’d be able to avoid a 3rd renaming session later :laughing:

But I don’t really mind. From what I’ve heard, this will be worth it for the performance gains. Either way, I’m super appreciative of all the hard work everyone has been doing!

the performance gains are unreal. When I have Alexa turn on the lights now, they turn on before the response sometimes. That never happened in ozw.

1 Like