Problem with Zwave device discovery

Hi,

I have used Z-wave for ~5 years and ~4 years with openHAB but now exploring Home Assistant as replacement.
I am using AEON Labs ZW090 Z-Stick Gen5 EU controller.

In order to get familar with Home Assistant I have installed it several times, played with it and reset by reflashing the SD-card.

First time (May 17) after initial config I just plugged in the Z-wave stick and added config

zwave:
  usb_path: /dev/ttyACM0

HA discovered a number of Z-wave devices (but not all and one “Unknown”)

Yesterday (May 20) I re-flashed and did the same configuration. Then only the stick itself were discovered and after some time 3 more Z-wave plugs. Got tired of it left it over night.

Today with fresh eyes I shutted down the HA and moved the stick to openHAB and fired it up. All 14 Z-wave devices appeared and “online”.
So re-flashed HA, added Samba and SSH add-ons. Plugged in USB stick, rebooted and configured the integration vi UI this time. No Z-wave devies more that Z-wave stick appears.

Do you have any tricks on how to resolve this

I see these in the logs

2020-05-21 12:43:06 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 2 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:06 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 2 Switch (node_id: 2) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 4 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 4 Switch (node_id: 4) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 5 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 5 Switch (node_id: 5) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 9 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 9 Switch (node_id: 9) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 10 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 10 Switch (node_id: 10) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 11 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 11 Switch (node_id: 11) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 12 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 12 Switch (node_id: 12) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 13 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 13 Switch (node_id: 13) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 17 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 17 Switch (node_id: 17) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:07 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 19 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 22 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave entity Unknown Node 22 Level (node_id: 22) not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 24 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 25 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 26 not ready after 30 seconds, continuing anyway
2020-05-21 12:43:09 WARNING (MainThread) [homeassistant.components.zwave] Z-Wave node 28 not ready after 30 seconds, continuing anyway

Anyone having an idéa?

EDIT: There was an update of HA at May 20,…any issues there?

Ok, back to openHAB for the time being
EDIT: And it is working, do I need to get another USB Z-wave stick and migrate each device to it???

What operating system are you running and have you taken the precautions needed for said operating system?

Raspberry Pi 3 Model B+
I have flashed the image with both BalenaEtcher and Rufus - with the same results

That’s not what I asked. What operating system are you running?

Ehh,…What is included in hass.io image
Flashing this: https://github.com/home-assistant/operating-system/releases/download/3.13/hassos_rpi3-3.13.img.gz

Ok, so there shouldn’t be anything to do in regards to your os (which is HassOS).

So, look in your zwave logs. At the bottom of the zwave configuration is a ui that has the ability to tail the zwave logs. Tail the logs and see if there are any failures.

As posted above, I get some strange warnings.
Thinking of it is is not possible to just migrate - that I need a fresh/new USB Z-wave stick and move device by device…not very attempting though…

As of now my openHAB solution works as expected

The post above is not the correct logs which is why I asked you to tail the zwave logs in the configuration.

EDIT: I don’t have the ability to take a screenshot of the page at the moment. But it’s at the bottom of the zwave configuration page. There’s a textbox that allows you to put in a number and a button named ‘tail’. Type 1000 and hit tail and you should see the zwave logs.

Did you make sure that you use the same home-ID and the Z-Wave Network security key in HA as before in openHAB?

Interesting @Osorkon can you please elaborate a bit?

All devices you have included secure in openHAB.
Can only works if you setup the same Z-Wave Network security Key in HA as used before in openHAB.
And I think, the same for the home-ID .

1 Like

Thanks @Osorkon, I will look into that…however I I have paired my devices to the AEON Z-wave stick and not to the openHAB installation itself. The openHAB installation just recognize the devices…but will look into it

The point is, if you included any devices securely in openHAB, the HA installation needs to use the same network key, otherwise talking to those devices will fail. The key is stored in the software, not on the USB stick. If you did not use secure inclusion, that doesn’t matter then.

You might get more insight if you post your zwcfg*.xml file and the complete OZW_Log.txt file. Also describe what kind of devices you have. Are they all mains-powered? Any battery powered? Secure inclusion or not? For the XML file you’ll either need to stop HA to flush the file to disk, or “Save Configuration” from the control panel to do the same.

The “not ready after 30 seconds” message means HA does see the some of the node information, like manufacturer and product name, so it assumes the discovery has not completed yet.

1 Like

Yesterday I flashed a fresh image on RPi 3 and did the basic config.
The morning today I got the Z-wave Network Security Key from openHAB and configured HA.

homeassistant:
  name: Hemma
  time_zone: Europe/Stockholm
  unit_system: metric
  temperature_unit: C
  latitude: **.****300
  longitude: **.***932
  elevation: 69

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

zwave:
  usb_path: /dev/ttyACM0
  network_key: "0x13, 0x6D, 0x83, 0x50, 0xAB, 0x94, 0x11, 0xF4, 0x32, 0x8D, 0x06, 0x26, 0xC4, 0xEF, 0xDD, 0x78"

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I have Z-wave devices like

  • Fibaro FGS221 Double Relay Switch 2x1.5kW
  • Fibaro FGRGBW RGBW Controller (currently without power)
  • Fibaro FGWP101 Metered Wall Plug Switch
  • Fibaro FGD212 Dimmer 2
  • Aeotec ZW100 Multisensor 6
  • Philio PAN11 Smart Energy Plug In Switch
  • Telldus TZWP-102 Telldus socket and energy meter

All powered by main with the exception of RGBW controller which “sits behind” a Fibaro FGS221 Double Relay Switch 2x1.5kW. No battery ones.
I have not, so far I can rember, not done secure inclusions. All inclusions have been done via the button on AEON Labs ZW090 Z-Stick Gen5 EU controller. Then if openHAB have done anything behind the scenes. Therefore I added the network key to be sure and as recommended.

Still no devices and plan to leave it for a while before rebooting.

Uploaded zwcfg_0xc13c926f.xml and OZW_Log.txt to
https://drive.google.com/drive/folders/1imglX-wFeM3lfCC9kA-oALszaALs_3xY

I really appreciate your help with this so I can go further and make use of Home Assistant.

I have had the same experience coming from Openhab; the zwave library worked very well and all my devices were discovered and running (around 90 nodes).

HA is MUCH better sw, and much better supported, but the zwave is rubbish* and when it does find a node, adds many non-related attributes

*the qt-openzwave using ozw1.6 looks to be the saviour, but it’s not out of beta.

In the meantime, tweaking the options file improved my discovery rate from around 5-10 nodes to about 70; it has been trial and error, but this set of numbers works for me the best.

options.xml in the config folder

<?xml version="1.0" encoding="utf-8"?>
<!-- To be effective, this file should be placed in the user data folder specified in the Options::Create method -->
<Options xmlns="http://code.google.com/p/open-zwave/">
  <Option name="logging" value="false"/> <!-- default true-->
  <Option name="Associate" value="true"/>
  <Option name="NotifyTransactions" value="false"/>
  <Option name="DriverMaxAttempts" value="5"/>
  <Option name="SaveConfiguration" value="true"/>
  <Option name="RetryTimeout" value="70000" /> <!--def 20000, bestso far 70000, and 25000 (below)-->
  <!-- If you are using any Security Devices, you MUST set a network Key -->
  <!-- <Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" /> -->
  <!-- Some Devices have a big UserCode Table, that can mean startup times
  when refreshing Session Variables is very long (Especialy on Security
  Devices) This option will make the UserCode CC stop on the first
  "available" usercode slot rather than retrieve every one -->
  <Option name="RefreshAllUserCodes" value="true"/> <!-- def false, best so far true -->
  <Option name="ThreadTerminateTimeout" value="20000"/> <!-- def 15000 , best so far ON , but Windows RT only setting--> 
  <Option name="UserPath" value="/config/"/>
</Options>

Well, I can tell you why your nodes aren’t being found:

2020-05-23 11:13:34.106 Info, Node021, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=21): 0x01, 0x04, 0x00, 0x41, 0x15, 0xaf
2020-05-23 11:13:35.106 Error, Node021, ERROR: Dropping command, expected response not received after 1 attempt(s)

Lots of those timeouts, nodes failing to respond or too slow. That request and similar fail and it’s early enough in the interview process that the remaining queries (e.g. manufacturer info) are skipped.

Also a lot of these:

2020-05-23 11:14:04.123 Detail, CAN received...triggering resend

I believe it means there was a collision in the Z-Wave network, but this is all I know. http://www.openzwave.com/knowledge-base/rfissues

If you are simply swapping software and the USB stick does not change location, it seems strange that it would be an RF issue.

Thanks @x.ha , I tried that but didn’t help :frowning:

Thanks @freshcoast, I have 2 RPi (openHAB on RPi 2 and HA on RPi 3) on the same desk and swap the USB stick.

For now I started up openHAB and back