Switching from Zwave 1.4 (Deprecated) to Zwave JS

What were the entities called in the old integration? Just name them the same.

Yes

No.

the storage files aren’t meant to be edited directly by users. If you do and mess up the syntax you risk bricking your install.

Why would you want to edit them there directly anyway since editing them in the UI is doing the same thing…only safely?

It seems a migration script may be more work that it is worth. Personally lack of polling is the main thing holding me back. I guess polling will come long before migration tools. You won’t find me waiting around then.

I migrated a few nights ago and all was great… until i rebooted the host. I deleted the deprecated zwave, installed zwave JS it loaded all my devices on my USB controller and I started to rename everything. Then I rebooted the host and all my devices no longer worked. The USB controller looked like it was still fine just all the devices where a no go.

Just a shot in the dark as I haven’t played with it yet, but is there maybe a “start on boot” setting in the addon somewhere that may be accidentally disabled?

The main thing I want to try to avoid is making mistakes when doing dozens of repetitive tasks manually; something that I’m definitely prone to do. I was hoping there would be a migration tool to at least avoid/reduce making human mistakes.

1 Like

Hi,
I just desinstalled the old Zwave (which was working) with Zwave-JS

In the configuration, I added device = /dev/ttyAMA0 (like in my old Zwave config)
The network key was generated automatically. Like shown in the log file
*[cont-init.d] config.sh: executing… *
[16:43:32] INFO: No Network Key is set, generate one…
[cont-init.d] config.sh: exited 0.
*[cont-init.d] structure.sh: executing… *
[cont-init.d] structure.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

But after some hours, still no device was added to Lovelace.

The zwcfg XML file is still present and contain my USB stick and my zwave devices.

	<Manufacturer id="86" name="**AEON Labs**">
		<Product type="1" id="5a" name="**ZW090 Z-Stick Gen5 EU**" />
	</Manufacturer>

The log file of Zwave JS gives this error. My RPI Model4 indicates a usage of 24,8% (with the old Zwave the Processor use went never above 6%)

What can I do?

[16:43:34] INFO: Successfully send discovery information to Home Assistant.
*16:43:36.525 DRIVER *
<— Last few GCs —>
*[271:0x7fb1f2b290] 771876 ms: Scavenge 1891.8 (1897.5) -> 1890.3 (1897.8) MB, 4.5 / 0.0 ms (average mu = 0.223, current mu = 0.208) task *
*[271:0x7fb1f2b290] 771921 ms: Scavenge 1891.9 (1897.8) -> 1890.4 (1897.8) MB, 4.3 / 0.0 ms (average mu = 0.223, current mu = 0.208) task *
*[271:0x7fb1f2b290] 771955 ms: Scavenge 1892.0 (1901.8) -> 1890.5 (1901.8) MB, 4.7 / 0.0 ms (average mu = 0.223, current mu = 0.208) task *
<— JS stacktrace —>
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[16:56:32] INFO: Successfully send discovery information to Home Assistant.

If the network key has changed, you need to pair again all your devices?

PARTLY SOLVED - I Have already the Zwave devices powered by 230V. Still waiting for battery devices.
Using this:
image


Pairing everything is not funny, because I have mostly some mini-relays hidden in the wall behind my old switches.

In the log file ozw.log of today I found this

2021-02-08 15:41:58.205 Always, OpenZwave Version 1.4.3469 Starting Up
2021-02-08 15:42:08.786 Info, Setting Up Provided Network Key for Secure Communications
2021-02-08 15:42:08.790 Info, mgr, Added driver for controller /dev/ttyACM0
2021-02-08 15:42:08.790 Info, Opening controller /dev/ttyACM0
2021-02-08 15:42:08.791 Info, Trying to open serial port /dev/ttyACM0 (attempt 1)
2021-02-08 15:42:08.798 Info, Serial port /dev/ttyACM0 opened (attempt 1)
2021-02-08 15:42:08.799 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2021-02-08 15:42:08.799 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2021-02-08 15:42:08.799 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2021-02-08 15:42:08.799 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2021-02-08 15:42:08.799 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa

In an old snapshot I foud this in Core.config_entries

      {
            "entry_id": "8065b530a1a62a91166a7b00a58a1c42",
            "version": 1,
            "domain": "zwave",
            "title": "Z-Wave",
            "data": {
                "usb_path": "/dev/ttyACM0",
                "network_key": "0xD4, 0x03, 0x11, 0x62, 0xB7, 0x57, 0x07, 0xCC, 0x3F, 0xF3, 0xED, 0x5E, 0x5D, 0x91, 0x24, 0xEC"

Problem1: In the configuration of Zwave Js I cannot enter /dev/ttyACMO. I can only select one of both

I have chosen /dev/serialxxx and I entered the converted network_key: D4031162B75707CC3FF3ED5E5D9124EC

The Zwave JS log file looks already better: It indicates at the end

19:06:41.150 CNTRLR [Node 005] CentralSceneCC: doing a partial interview…
19:06:41.152 CNTRLR [Node 005] NotificationCC: doing a partial interview…
19:06:41.154 CNTRLR [Node 005] Interview stage completed: CommandClasses
19:06:41.155 CNTRLR [Node 005] Interview stage completed: OverwriteConfig
19:06:41.156 CNTRLR » [Node 005] requesting node neighbors…
19:06:41.175 CNTRLR « [Node 005] node neighbors received: 1, 6, 7, 11, 12
19:06:41.176 CNTRLR [Node 005] Interview stage completed: Neighbors
19:06:41.176 CNTRLR [Node 005] Interview completed

But in Lovelace, I still don’t see any Zwave devices…

Any suggestion?

I ended up installing ZwaveJS2MQTT via git clone https://github.com/zwave-js/zwavejs2mqtt, nice responsive web based gui. Making a reliable systemd startup service work with npm start was challenging, so I installed pm2 and I use it to manage start and restart tasks. Seems to work well, if anyone else wants to play with it look here:
https://pm2.keymetrics.io/docs/usage/startup/

My Zwave 1,4 is fully working, no problem ever. Is this change necessary/mandatory?

My concern is about the default name that will be assigned to each entity as soon as one starts using zwaveJS. Taking that Fibaro FGS-223 as an example as I mentioned before, you will have several entities that have duplicated names, because you have a switch, a power sensor and an energy sensor for each relay switch. We may have to do some trial and error to get it right and that is why I was trying to figure out if there is an easy way to do it.

Because making a series of edits on a text file is way faster than having to go through several clicks and dialogs on a GUI, specially when you are renaming entities from the same device where you just want to change part of the name.
If you are willing to take the risk (and for all due purposes you can always backup your file before making any changes and replace it if something goes wrong, as you will still be able to access your HASSIO via samba share - which you should have set in the first place), it is way easier.

1 Like

I switched from z-wave 1.4 to zwwavejs2mqtt and it is noticeably slower.

Examples:
I have non-a z-wave motion sensor that turns on a z-wave light switch. In 1.4 the light would be on before I even finished turning the corner into the doorway. js2mqtt I’m 2 steps into a (dark) room before it turns on.
I have a node-red automation that turns two z-wave switches on when a third z-wave switch is turned on (same for off), Under 1.4, there is almost no delay at all. Turn on the switch and I immediately hear the other two relays pop. the second two are often so simultaneous it’s hard to hear each one. Under js2mqtt, switch on, delay delay, first switch, delay second switch.

I know this is still in development, is it possible this will be able to be optimized at some point? Or is this just the price of having it run outside of the core HA?

Thank you.

My experiences have been the opposite. Now everything is on 1-2 seconds before I expect it to be on.

What trial and error? Just rename the entity_id to what you had before. The guide covers this. If you perform the preparation steps you’ll have a list of entities from the old integration. From that point on, it’s just copy/pasting entity_ids. If you named things via the customize section, you don’t even need to change the friendly name, it’ll just update for you.

Did you install using these instructions (including the uncheck the box)?

  1. Go to the Configuration panel and click “Integrations”.
  2. In the bottom left, click “+ Add Integration”.
  3. Select the “Z-Wave JS” integration from the list.
  4. A dialog box will show, asking to use the add-on:
  • UNCHECK that box, it will install the officia add-on.
  • Again, the official add-on is recommended, so…
  1. In the next dialog it will ask for the server. Enter: ws://a0d7b954-zwavejs2mqtt:3000
  2. Confirm and done!

No, I installed without instructions. I made these guides, they loosely follow what I remember doing.

What I mean is when you install the z-wave js integration, there is a checkbox on whether to install it as supervisor or not.

Do you remember which one you did?

I’m using zwavejs2mqtt, so I have it unchecked. I also used my hostname instead of the docker container name.

I don’t think I am making my self completely clear, or maybe I am not understanding your point.
Here’s an example of an FGS223:

17:
  - Corridor Light Energy
    sensor.hall_and_corridor_lights_corridor_energy
  
  - Corridor Light Power
    sensor.hall_and_corridor_lights_corridor_power
  
  - Hall Light Energy
    sensor.hall_and_corridor_lights_hall_energy
  
  - Hall Light Power
    sensor.hall_and_corridor_lights_hall_power
  
  - Corridor Light
    switch.hall_and_corridor_lights_corridor_switch
  
  - Hall Light
    switch.hall_and_corridor_lights_hall_switch
  
  - Hall and Corridor Lights
    zwave.hall_and_corridor_lights

As you can see, for the same zwave device, I have two energy, two power and two switch entities that must be properly paired regarding their names (for them to make sense).
Their default name will be something like sensor.fibaro_system_fgs_223_energy and sensor.fibaro_system_fsg_223_energy_2, which will make it hard to clearly identify the proper name based on what I currently have.
From here I cannot tell to which instance does each entity belong to, therefore the process of doing this for 15 or 20 devices is a bit cumbersome.

I was just wondering if you guys had some better idea than just doing some trial and error (in the sense that I may name “corridor” to what is actually “hall” for this particular example).

But anyway, I’ll give it a try on the next major release to benefit from the configuration panel that is missing on the current release and if anything goes wrong, I can always restore a snapshot to OZW 1.4.

Cases like this are niche, and you’ll have to do the leg work. A migration tool won’t be able to help either because it doesn’t know the order in which things are added in OZW. Unfortunately, double devices will always have this issue.