RPi as Z-Wave/ZigBee-over-IP server for Hass

So my situation is the following:
I have Home Assistant running on a Rasberry pi 4B 4GB.
And i have 2 rasberry pi zero. And i want to connect a zwave and a zigbee usb to each.

And then place the 2 pi zero inside the house. And the home assistant is in the garage 30 meter away. Whats the best way to connect these pi zero’s to my main home asisstant. I’ve read this guide but it says it needs to install some apt on the rasberry, but i am running the native iso from home assistant. Can anyone give me some insight?

I would not recommend putting your Z-Wave and ZigBee sticks on a wireless connected device, not reliable enough in my opinion.

Nothing on my HA instance looks like anything here. It doesn’t even have the apt package (or any way to install it from what I can see).

I have been doing linux admin for 30 years and I am literally lost. This home assistant thing looked like a promising replacement for smartthings but it is turning into a nightmare.

All I want is to run Home Assistant on my Hyper-V server and have it run my Zigbee & Zwave network. Is that too much to ask of this product?

1 Like

Then you installed Home Assistant OS, which doesn’t have this functionality. You can run Home Assistant Container, Home Assistant Supervised on top of Debian or Home Assistant Core in a venv. Here’s a good overview of the different install methods and suggested skill levels.

That’s definitely possible, lots of people do this (including myself). It’s better to open a separate topic with your issues.

1 Like

That just led me down another rabbit hole that ends up installing Supervised in Docker…which according to this thread doesn’t work.

1 Like

I don’t know what you are trying to achieve, please open a separate topic for your issue and give some more details about your goal and current setup. You can tag me there if you like to.

Your best bet is zwave2mqtt. Or Ozwdaemon in docker.

I keep getting referred to this post for usbip, but I’m using Debian 10 and it won’t let me install linux-tools-generic – has anyone successfully gotten usbip installed on a debian 10 instance?

2 Likes

Yeah, it looks like it’s not a part of the current Debian repository. Looks like there might be a way to install that package by adding a different repo : here, but I’ve just been manually mounting on restarts until I get it sorted:

usbip  list -r xxx.xxx.xxx.xxx

Find the bus id of your target device (ex: 1-1.2)

usbip attach -r xxx.xxx.xxx.xxx -b 1-1.2

this has been working well for meI even have a udev rule reattaching if it gets disconnected, until i added another instance on both client and server for a bluetooth dongle. I noticed that the script as i understand it won’t work with a seconds instance as i understand it on the client the service stop will pick the first port usbip port and detach it regardless which port is actually required to be stopped. IYSWIM…I have also a problem with starting it also where it starts the service ok but just doesn’t work properly…this requires more investigation (starting manually works ok)…

Here’s a blog post I’ve written for the approach I’ve been using USB Support for Home Assistant in Hyper-V – DVLUP

I intensely prefer Hyper V over anything else, it is a superior system over other systems (at least on Windows)

These are both paid versions correct?

Yes, both options are commercial software.

Hi there. Anyone finished a working udev rule for usbip host? Have trouble to get one working on RPi. Second thing is a reconnect script on the client, any ideas?

Did you manage to make it work on Debian 10? I also can’t install linux-generic-tools, and I’m stuck

1 Like

welp, that was just me that had a firewall rule issue, finally got it work on Debian 10(as the client)

definition on Debian looked a little different for me

[Unit]
Description=usbip client
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "usbip attach -r 192.168.0.10 -b $(usbip list -r 192.168.0.10 | grep '10c4:8a2a' | cut -d: -f1)"
ExecStop=/bin/sh -c "usbip detach --port=$(usbip port | grep '<Port in Use>' | sed -E 's/^Port ([0-9][0-9]).*/\\1/')"

[Install]
WantedBy=multi-user.target

pretty much the same except for the location of the “usbip” executable

2 Likes

How did you get it to work on Debain and what was the firewall issue? I can’t for the life of me get it to install and the alternative repository seems to be dead.

The firewall issue that I had was my pfSense rule about communicating between devices in the same subnet(I think it just my unique setup)

and if you got HA installed on Debian10, then your configuration on Debian should look like the one I posted

Hm, it still can’t find usbip. When I run sudo systemctl start usbip.service I get

Job for usbip.service failed because the control process exited with error code.
See “systemctl status usbip.service” and “journalctl -xe” for details.

And systemctl status returns

● usbip.service - usbip client
   Loaded: loaded (/lib/systemd/system/usbip.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-04-24 10:54:49 EEST; 14s ago
  Process: 3932 ExecStart=/bin/sh -c usbip attach -r 192.168.1.16 -b $(usbip list -r 192.168.1.16 | grep '0451:16a8' | cut -d: -f1) (code=exited, status=127)
 Main PID: 3932 (code=exited, status=127)

Apr 24 10:54:49 debian10 systemd[1]: Starting usbip client...
Apr 24 10:54:49 debian10 sh[3932]: /bin/sh: 1: usbip: not found
Apr 24 10:54:49 debian10 sh[3932]: /bin/sh: 1: usbip: not found
Apr 24 10:54:49 debian10 systemd[1]: usbip.service: Main process exited, code=exited, status=127/n/a
Apr 24 10:54:49 debian10 systemd[1]: usbip.service: Failed with result 'exit-code'.
Apr 24 10:54:49 debian10 systemd[1]: Failed to start usbip client.

Any ideas?

Looks like you don’t have the usbip client installed. With Ubuntu, this comes with apt-get install linux-tools-generic -y.