I can't get the Z-Wave ZWA-2 device to pass through to a bhyve VM where I'm running Home Assistant because it only allows full PCI pass through of a device or USB controller. It does get exposed as a serial device which I can sorta pass through to byhyve, but it doesn't really work.
I was able to get a console on the HASS VM and figure out which serial device was matching com2 that I was connecting into it and I could connect from the host and pass through some ascii chars back and forth, but when HASS tried to talk to the device it kept saying there were errors talking to it. Very odd. Lights were blinking on the device though confirming communication of some sort was happening. I looked at the Z-Wave-JS code and saw it was using 115200,8n,0 essentially so that's what I used... no dice.
Someone on the FreeBSD forums suggested using a virtual null modem device inbetween and then using socat to connect to the other end of the virtual null modem cable, but that didn't work either.
However, I can configure HASS to talk to zwave-js-server running in a FreeBSD Jail as you can custom configure the websocket connection to point to anywhere instead of localhost. That did seem to work! It found the device and even did a firmware update on it. So it "works".
I need to clean up this setup because I'm literally running it as root at the moment and I'm using a git clone of their master branch 🥲
Now I just need to figure out how to ensure I can have a consistent serial device name in /dev so this doesn't break in the future.
Once that's sorted I'll have to write a blog post about it
github.com/zwave-js/zwave-js-s…
GitHub - zwave-js/zwave-js-server: Small server wrapper around Z-Wave JS to access it via a WebSocket
Small server wrapper around Z-Wave JS to access it via a WebSocket - zwave-js/zwave-js-serverGitHub
Marcos Simental 🇲🇽
in reply to Federico Mena Quintero • • •