Unable to get Zwave to work

I am using HA since yesterday, fresh install. Using the latest image. I had OpenHab on another PI before. The Aeotec Zwave stick was used by Openhab. And it is linked to 4 devices (light switches). From the OpenHab configuration I copied the Network key. I added the Wave integration and provided the mentioned Network key as S0 key. After some time I get a “failed to start the z-wave js add-on”. And it is not shown in the list of Integrations. In the AddOns I do see the ZWave JS. On the info tab I see a cpu usage of 37%. And if I set the watchdog on that goes to 51%. The version it show is 0.1.74.
The configuration tab shows it on device /dev/ttyAMA0
And this is the log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/config.sh
[12:10:39] INFO: Both 'network_key' and 's0_legacy_key' are set and match. All ok.
[12:10:40] INFO: Virtual Machine not detected, enabling soft-reset
cont-init: info: /etc/cont-init.d/config.sh exited 0
cont-init: info: running /etc/cont-init.d/structure.sh
cont-init: info: /etc/cont-init.d/structure.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun zwave_js (no readiness notification)
s6-rc: info: service legacy-services successfully started
[12:10:41] INFO: Successfully send discovery information to Home Assistant.
2022-12-21T11:10:44.733Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2022-12-21T11:10:44.741Z DRIVER   version 10.3.0
2022-12-21T11:10:44.742Z DRIVER   
<--- Last few GCs --->
[183:0x7fb907b390]   941802 ms: Scavenge 2041.0 (2079.1) -> 2039.5 (2079.3) MB, 4.4 / 0.0 ms  (average mu = 0.208, current mu = 0.157) task 
[183:0x7fb907b390]   941837 ms: Scavenge 2041.1 (2079.3) -> 2039.6 (2079.3) MB, 4.1 / 0.0 ms  (average mu = 0.208, current mu = 0.157) task 
[183:0x7fb907b390]   941874 ms: Scavenge 2041.2 (2079.3) -> 2039.7 (2083.3) MB, 4.7 / 0.0 ms  (average mu = 0.208, current mu = 0.157) task 
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[11:26:32] INFO: Service restart after closing
[12:26:33] INFO: Successfully send discovery information to Home Assistant.
2022-12-21T11:26:36.623Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2022-12-21T11:26:36.631Z DRIVER   version 10.3.0
2022-12-21T11:26:36.632Z DRIVER   
<--- Last few GCs --->
[244:0x7f7f165390]   923857 ms: Scavenge 2041.2 (2081.6) -> 2038.2 (2081.8) MB, 6.0 / 0.0 ms  (average mu = 0.239, current mu = 0.212) task 
[244:0x7f7f165390]   923923 ms: Scavenge 2041.3 (2081.8) -> 2038.4 (2082.1) MB, 5.7 / 0.0 ms  (average mu = 0.239, current mu = 0.212) task 
[244:0x7f7f165390]   923988 ms: Scavenge 2041.5 (2082.1) -> 2038.5 (2082.1) MB, 5.9 / 0.0 ms  (average mu = 0.239, current mu = 0.212) task 
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[11:42:06] INFO: Service restart after closing
[12:42:08] INFO: Successfully send discovery information to Home Assistant.
2022-12-21T11:42:10.754Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2022-12-21T11:42:10.762Z DRIVER   version 10.3.0
2022-12-21T11:42:10.763Z DRIVER   

When I try adding the integration again I get a “Unable to connect”. I dont really know what state I am in now. If it would have worked would the 4 light switches showed up in de devices? I you need more information, let me know. But please tell me where I can find it, HA is still new to me. Thanks Ben

You should use the “serial/by-id” option for the stick when selecting

Thanks Bartem. I saw that in several topics when searching for a solution. But I don’t get the possibility to select another identifier during the install AFAIK. I try again. And I also had a problem finding the identifier. Googling for that shows that you get to see that info going to (I believe) the Configuration menu option. But the latest HA UI has everything changed and that makes it very difficult. I have not found it yet where I can see that. Thanks


Is it here maybe? And what would be the correct name? And can I just update the yaml somewhere?


And it does not allow me to select a different device name.


And not in the Add-On config.

What type of HA install are you running? Also I have the Zwave JS UI add-on, which is where I believe I set the path myself. Looks like you are using just the basic Zwave JS, I am not familiar with how the setup for that went as it was a very long time ago the last time I used it. I would probably try deleting the integration, restart your ENTIRE host system, and come back to hardware to see if you can find the serial/by-id path

What type am I running… good question. I used the Pi imager to: change the PI to boot from SSD and I used the imager to place the home-assistant image (that is an option in the imager) on the SSD. And I don’t really know what type that is.

/dev/ttyAMA0 on a PI is GPIO, it’s not a USB serial port. A Z-Wave “stick” (USB) will never use that, it will either be /dev/ttyACMX or /dev/ttyUSBX. The suggestion to use the /dev/serial/by-id path is the correct one, however yours doesn’t exists. “On another PI”, does this mean you are using a new PI? Is it a Pi4? If so, a Z-Stick Gen5 and Pi4 require a USB hub, the stick will not function without it.

1 Like

Openhab was running on a Pi3 . Now I have a Pi4. On the Pi3 the stick was connected directly in the USB port of the Pi. And that does not work any longer for the Pi4?

I connected it to a HUB, but have still no idea how to get the correct device path.

For a Z-Stick Gen5 it would be /dev/serial/by-id/usb-0658_0200-if00. If it’s not showing up, try some restarts. If still not showing up, I’d suspect the USB hub you’re using isn’t compatible.

I tried setting it manually:


But it is not just causing the error, it looks like it is also bringing HA on its knees. I am unable to connect now… A reboot allows me to connect. But restart does not work because it says the configuration is invalid. But changing it back to the original device name is not possible because none of the Zwave UI parts work…Blank screens…I would consider this a bug.

Zwave JS UI: just a white screen

The Add-Ons page: Just a white screen

Is there anyway I can just edit some config file to change it back or do I have to restart with HA from scratch?

If the device is not visible by HA, then I would try another USB hub.

You can’t use Z-Wave JS UI and Z-Wave JS (official) add-ons at the same time.

This worked for me:

Navigate to Settings > System > Hardware and click the stacked dots at the top right corner:

This link might work for you: http://homeassistant.local:8123/config/hardware.

Select All Hardware and scroll to the serial device starting with tty. You can use the search field to take you there.

One of those will have the path for the Z-wave device. Mine was ttyUSB0 and looks like this:

You can copy and paste the text in the ID box into the Z-WaveJS add-on configuration. The string should start with /dev/serial....

I started wit a fresh image. And this is what I see in the hardware:

So the hub is not compatible…frustrating, hub not compatible, stick not compatible…

And @freshcoast (below) I still have it, but I just invested in a PI4, SSD disk, power adapter… Need to get this to work, the question is am I going to buy another hub, another stick… Buying another stick means I need to unpair my light switches from this one and that turned out to be a hell of a job the last time (some of my switches I never got unpaired). So is there a list somewhere of compatible hubs?

And to add to the frustration I was not allowed to make a new reply because as a new user I cannot make more that 19 replies on my first day… Who ever came up with that idea :slight_smile:

What did you do with the RPi3? Docker + Z-Wave JS UI works great.

I take it that’s the only tty device you see. You might want to check the Host log after a fresh reboot to see if the USB device is being assigned. It seem unusual to me to have only one tty device.

Anther thing to consider is if the Aeotec device needs a firmware update:

https://aeotec.freshdesk.com/support/solutions

If we are talking about the original Aeotec Gen5 (which it seems like), that is hardware incompatible with the RPi4, and no firmware update will solve it. The Gen5+ was released to address this problem, it was a new hardware revision that fixes the incompatibility. Using a USB hub (not extension cable), or physically modifying (soldering) the stick are the only workarounds.

1 Like