Remote USB

To get the best out of my Z-Wave the ideal location of the controller is some where near the center of the house. Our home sever that runs the firewall, file server etc. on a bunch of virtual servers is unfortunately not near the center of the house. It is actually located in a shed outside the main house.

The solution to this is to place a Raspberry Pi3 with a Z-Wave USB stick near the center of the house and then use USB over IP to access the USB stick through the network.

Raspberry PI

On the Raspberry Pi i have installed raspbian on the pi. First install the usbip package. After installation you need to ensure that the kernel module usbip-host is loaded. Do this by adding it to /etc/modules. After that you need to run something like below.
usbipd -D
usbip –debug bind –busid=1-1.2

You get the busid by running usbip list -l

Server running Home Assistant

The server is running Ubuntu. To install usbip on ubuntu you need to install the packageĀ linux-tools-generic. After that you need to ensure that the kernel module vhci-hcd is loaded. Do this by adding it to /etc/modules. After that attach the exported USB device with below command.

sudo usbip attach -r HOSTNAME -b 1-1.2

where HOSTNAME is the hostname or IP of the pi exporting the USB device. The bus id (-b) is the same ID as used on the pi when exporting the device.

You are done and can now use the device from home assistant.

Comments are closed