I found references to this on the forum, but no concise instructions. Full, total, and complete credit goes to this post on the OpenHab forums.
The Problem:
I run Home Assistant as a docker container under an Ubuntu VM on ESXi. I don’t have to worry about dependencies, I can still use the VM as needed, and USB passthrough for my Aeotec Z-Stick Gen5 works as expected. However, there’s a slight problem: the ESXi server is in the basement and the z-wave signal quality is questionable at best. This becomes even more of a problem when I need to add a device securely, e.g. my Schlage Connect lock. The connection often times out during setup, and nodes will occasionally show up as dead even though they’re working just fine. The mesh network is a mess when visualized.
The Solution:
Please read this post, also linked above. I just happened to have a Raspberry Pi powering a fancy MagicMirror that I built. It’s centrally located on the main floor and is basically dead-center in the house. I unplugged the Aeotec Z-Stick from ESXi, plugged it into the Pi, and installed the ser2net package on the Pi. I then installed the socat package on the Ubuntu VM, pointed it over to the Pi, and created a fake local device.
Bingo. The Home Assistant docker instance came up and accessed the remote Aeotec Z-Stick just like it was a local device. The RTT on my z-wave devices was cut down about 75% and the Schlage lock is damn near instantaneous with zero timeouts. Plus, it’s a whole lot easier to move the Pi than an entire ESXi server.
Hopefully this helps someone in a similar situation!
@TaperCrimp I have been trying to get a homeseer z-net working with this setup. I am running a docker container on a intel nuc with debian. I am able to get socat connected to the z-net and the log file indicates it is working. The symlink from /dev/pts/1 to /dev/znet works but HA is unable to connect for some reason. I get an invalid config for zwave on the overview page. Is there something else that has to be done for the HA docker container to see the device on the host os?
I’m not sure about that. I’d stick with the defined names for simplicity. What devices are being created on the host you’re plugging the stick into, e.g. dmesg output?
The z-wave device is one I purchased from HomeSeer. It is basically a pi with zwave and wireless module. It listens by default on port 2001. So the USB stick side is already operational. Others have had success in getting it to work. I believe that my problem is that my hass.io is a Docker image and I am running the socat on the debian host. I think that is preventing hass.io from accessing the usb device. I think there is a way to have the hass.io docker image use a --device flag to pass the /dev/znet or whatever symlink that gets created back to hass.io.
Here is an example of a docker hub container that has socat already built in and should work. I am going to try that next.
Gotcha. I’m just running HA in docker without HASS. I don’t know what’s involved with HASS, but I had to pass the following flags when deploying the HA docker so it could access the devices:
If you do your own mounting, please make sure that you take a look at
and
These two scripts are used in the docker image that i build to start/restart homeassistant/socat in the correct order. Make sure that if you plug and unplug your stick or restart the pi the home assistant does not get stuck with old data…