Hass.io on rpi3 Z-stick install problems

So my install for the zstick was going swimmingly well until the network security key I generated as per the docs was added to my config…
Reboot
And: Invalid config
The following components and platforms yada yada yada please check your config

Anyone else run into this problem after adding the security key to their zwave config?

Do I have to reset my key and start over?

Not aware of any issues related to yada yada yada. Without any details, you likely won’t get any help.

I did not feel the need to post the entirety of the standard canned hass.io “your configuration is wrong” notification.

Perhaps a better question for me to pose, then,is “Has anyone come across a better walk through of adding an Aotech gen5 z-stick to a ras pi3 hass.io install than what is available in the docs?”.

Clearly I am missing a step somewhere that is not self evident from the docs.

From memory you need to remove the spaces from the generated key.

Failing that, have a look through the homeassistant.log file and paste any relevant errors here.

1 Like

Seriously?
You have got to be kidding me…
(facepalm) If it’s that simple and that sort of crucial detail seems to be nowhere in the docs, not sure what to say about that.

I’ll give that a try in the morning and let you know.

I’ve got spaces in my key, it’s fine.

Now, if the last value has a comma after it, right before the quote… that’s a problem. This is fine:

network_key: "0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x10, 0x11, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07"

This isn’t:

network_key: "0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x10, 0x11, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07,"

However, the output of hassio homeassistant logs will tell you what the actual problem is.

@Shazster So there has been a few back and forths with just guesses. Putting the actual error messages and the snippet of your configuration with the network key would have been a big help.

There is a zwave related file in the configuration directory (that I assume either gets auto created once the component is called or the service is setup). I would image the more detailed error info I’m looking for is to be found there, no?

The home-assistant.log file should show the errors, but the developer tools from the menu may show it / them.
developer_tools
The highlighted icon.
If you click on the error it may show additional information.

3-18 10:41:48 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/openzwave/option.py”, line 78, in init
raise ZWaveException(u"Can’t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: “Zwave Generic Exception : Can’t find device /dev/ttyACM0 : [‘NoneType: None\n’]”

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/setup.py”, line 145, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/zwave/init.py”, line 275, in setup
config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
File “/usr/lib/python3.6/site-packages/openzwave/option.py”, line 81, in init
raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: ‘Zwave Generic Exception : Error when retrieving device /dev/ttyACM0 : [‘Traceback (most recent call last):\n’, ’ File “/usr/lib/python3.6/site-packages/openzwave/option.py”, line 78, in init\n raise ZWaveException(u"Can\‘t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n’, ‘openzwave.object.ZWaveException: “Zwave Generic Exception : Can\'t find device /dev/ttyACM0 : [\‘NoneType: None\\\\n\’]”\n’]’

I think it’s telling me it can’t find the z stick

Config info (spaces removed as per suggestion above, actual values ##'d out here for privacy)
zwave:
usb_path: /dev/ttyACM0
network_key: “0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##,0x##”

What is your Zwave configuration glob look like from the configuration.yaml file.
The stick can change device ids if it gets removed and then replaced. There are likely other scenarios where it can change as well but that is the most common. I use the by-id number. ssh into the Pi and do
ls /dev/serial/by-id/
Then use the result as in /dev/serial/by-id/usb-xxx-xxx-xx in place of the ls /dev/serial/by-id/
The by-id will not change even if moved to another Pi install.

I’m restoring Hass to a earlier state from snapshot pre zwave install. I’ll re-start from scratch, by the numbers.

The device may have become usb_path: /dev/ttyACM1 You will only know if you check. If the device has changed, rolling back won’t fix that and it won’t prevent it changing in the future. By setting up using by-id you eliminate the change affecting your configuration.

OK So…by the numbers

  • I have ssh set up and am logged into it. nothing plugged in
    so Plug in Stick
    reboot hass
    login vis ssh
    run ls /dev/serial/by-id/
    note the results
    add zwave component to config yaml with the results

then work on generating security key…
sound right?

You should not need to reboot the Pi. Just plug the stick in then run ls /dev/serial/by-id/ then enter the results in your config using the complete path. If you type in ls /dev/serial/by-id/ and then hit the tab key it will complete the entry then just copy the line (minus the ls) and paste it into your config. That line won’t change.

ls: /dev/serial/by-id/: No such file or directory

See what ls /dev/ttyA* shows. I don’t use hass.io and perhaps resin doesn’t include by-id.

Same deal

ls: /dev/ttyA*: No such file or directory

I manually changed config to
zwave:
usb_path: /dev/ttyACM1

from
zwave:
usb_path: /dev/ttyACM0

and now it shows up. But that’s no guarantee it will keep running until I “fix” the path, correct?

There is no guarantee correct. If you remove the stick and replace it, it will likely always change. Don’t remove the stick. I may try installing hass.io to see if I can see what is happening. The ssh session is likely a docker container and doesn’t expose /dev so I will see what I see.

ahhhh.
But at any rate this IS progress? (Or am I deluding myself until the next time I have to reboot this thing?)
But I now HAVE a Zwave management panel, I now HAVE an OZW log, so that helps no?
I assume there is no point in trying to generate and add the security key into the config until I have this ironed out?
So for the moment I will not breath on it or look at it funny, just back away slowly…