Z-Wave switch - when is a switch not a switch

I have added two z-wave switches to home assistant. I’m using an Aeon-tech z-stick on Raspberry Pi.

The only reference to them in my configuration.yaml file is

zwave:
  usb-path: /dev/ttyUSB0

They show up as state cards on my home screen, and correctly reflect the state of the switch. Using the developer tools I can call services on the switch domain to turn them on and off. But the state cards frequently do not show the UI widget to let me toggle them on and off from the main States screen. There is some pattern of restarting the raspberry and restarting home assistant which makes it work, but I have not been able to diagnose or reproduce it.

It is like home assistant knows they are entities in the network, but doesn’t realize they are switches?

Has anyone seen anything similar? Any advice on how to approach debugging this?

I was experimenting at the same time with auto starting home assistant using systemd. Is it possible that this is some kind of startup sequencing problem – like home assistant and openzwave/python-openzwave/z-stick get into some kind of bootstrapping race condition?

Because now that I cold booted the pi, killed the auto-started home-assistant and then started it manually in the background, it seems to be working… for now at least?

My instance of home-assistant died overnight (for reasons I haven’t diagnosed yet). When I restarted it this morning, I was back to the “no switch” state card. Various restarts of the pi and home-assistant didn’t fix it. But when I cleared all Safari history, it started rendering correctly again. If/when it happens again, I will test with chrome/firefox concurrently and report back on what I find.

Maybe something to do with the javascript FE.

Weird. :slight_smile:

Linux will allow multiple programs to open the same serial port. However when this happens, one of the programs will get some of data and the other program will get some of the data. Which leads to things not woking.

Make sure that there really is only one process with the zwave dongle open. lsof will list all of the open files on the system.

You can try running: lsof | grep ttyACM (substitute ttyUSB if thats appropriate for your system).

If lsof is missing, then you should be able to install it by doing:sudo apt-get install lsof