Remote access Zigbee/Zwave controlllers for Live Migration (High Availability)

DarthRUSerious

New Member
Feb 7, 2023
3
0
1
I'm trying to find a way to have true High Availability on my homelab cluster.

I'm currently running 3 NUC nodes in a cluster, running various tasks with the primary (and relevant) application being HomeAssistant (technically a VM running HASSOS).

On my "primary" node, I had 2 USB devices installed for use with HomeAssistant (1 Zigbee and 1 Z-wave stick). Through a total lack of complete foresight in how it would all work, I purchased a copy of VirtualHere, installed the server on my QNAP nas and have the clients running on each PVE node. That part worked flawlessly, and I have them configured in HA without issue.

However, it didn't solve the problem I really have in that the VM can't be live migrated with "local devices" attached. I have to remove the USB passthrough to the VM, migrate, then re-add the USB to the destination node.

Is there a way to either force live migration with local devices (since I can configure them the same on both nodes) or is there another way to create a remote access to these devices?

I've seen 2 alternatives, but both seem to not be real options:
  • USBip or USB2Ser, which is what VirtualHere is and would suffer the same limitation as VH, by Proxmox seeing it as a local device.
  • remote zigbee2mqtt server (same for Zwave?) - This just moves to a different SPOF and doesn't really provide HA anywhere outside the cluster (if I lose the z2m server, I lose it all anyway).
Is there some solution out there that I'm missing? I can't be the only one who's had this need?
 
Your Zigbee/Zwave radio device (USB Stick or whatever) is always going to be a single point of failure for you. So even if you get the z2m application somehow "portable" for HA you are still down if you lose the z-device itself. You won't ever achieve HA using the existing Z protocols as they don't allow for redundant controllers (I hear, but cannot confirm the details, that Matter may have a solution for this).

Best suggestion would be to get some lightweight, really reliable device to host the z2m application, plug the z-device into it, and then make the rest of your home services as HA as possible. Do this separate from the rest of your cluster and then don't ever touch it unless it breaks. Even if you put it on an RPi and hide it away it will be really robust. Not HA but as long as that is all that is running on it and you don't mess with it will probably be the best you can achieve.
 
Last edited:
I'm trying to find a way to have true High Availability on my homelab cluster.

I'm currently running 3 NUC nodes in a cluster, running various tasks with the primary (and relevant) application being HomeAssistant (technically a VM running HASSOS).

On my "primary" node, I had 2 USB devices installed for use with HomeAssistant (1 Zigbee and 1 Z-wave stick). Through a total lack of complete foresight in how it would all work, I purchased a copy of VirtualHere, installed the server on my QNAP nas and have the clients running on each PVE node. That part worked flawlessly, and I have them configured in HA without issue.

However, it didn't solve the problem I really have in that the VM can't be live migrated with "local devices" attached. I have to remove the USB passthrough to the VM, migrate, then re-add the USB to the destination node.

Is there a way to either force live migration with local devices (since I can configure them the same on both nodes) or is there another way to create a remote access to these devices?

I've seen 2 alternatives, but both seem to not be real options:
  • USBip or USB2Ser, which is what VirtualHere is and would suffer the same limitation as VH, by Proxmox seeing it as a local device.
  • remote zigbee2mqtt server (same for Zwave?) - This just moves to a different SPOF and doesn't really provide HA anywhere outside the cluster (if I lose the z2m server, I lose it all anyway).
Is there some solution out there that I'm missing? I can't be the only one who's had this need?
Hi DarthRUSerious,

I hope you can help me, I'm struggling a little bit with the installation.

"and have the clients running on each PVE node"
How did you install the VirtualHere client? In a VM or container? Can you point me in the direction how to get this to work?
Newbie with Proxmox :)

Thanks,
Jos
 
Last edited:
Hi DarthRUSerious,

I hope you can help me, I'm struggling a little bit with the installation.

"and have the clients running on each PVE node"
How did you install the VirtualHere client? In a VM or container? Can you point me in the direction how to get this to work?
Newbie with Proxmox :)

Thanks,
Jos
So, the correct way to run this is to have the server running on your network and then configure VH Client inside your VM/Container. I was trying to do this the wrong way and configure it on the PVE host itself (the VM itself doesn't have the ability to install packages), which then suffers the limitation of it being a "local resource" that can't be migrated.

If using VH, there are some not so thorough instructions on the VH website that can be used to set up the client based on your VM/lxc type. What is the nature of your VM/lxc that you wish to run VH on?
 
So, the correct way to run this is to have the server running on your network and then configure VH Client inside your VM/Container. I was trying to do this the wrong way and configure it on the PVE host itself (the VM itself doesn't have the ability to install packages), which then suffers the limitation of it being a "local resource" that can't be migrated.

If using VH, there are some not so thorough instructions on the VH website that can be used to set up the client based on your VM/lxc type. What is the nature of your VM/lxc that you wish to run VH on?
Hi,

Currently I've my Home Assistant running in a Virtualbox on a Windows OS using VirtualHere to connect some remote USB devices (RFXcom, Plugwise, smartmeter connected to a Pi with VH server) with my Windows VH client.
I'm investigating the migration to Proxmox using a NUC. Therefore I've installed Proxmox with one pve and have made a VM by following the instructions from the HA community: https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835

So far all good. Next step is to install the VH client in Proxmox. I used parts of the instructions of the VH website to receive the USB devices in a Ubuntu VM: https://www.virtualhere.com/node/1147
I can see the usb devices connected to the VH server.

Naamloze afbeelding.jpg.png

What I'm wondering:
- Is the Ubuntu VM the way to go or is it better to use a container?
- Will HA in a VM detect the USB devices that are connected to this VM?
- Other suggestions to improve this setup?

Thanks a lot for your support!

Jos
 
Hi,

Currently I've my Home Assistant running in a Virtualbox on a Windows OS using VirtualHere to connect some remote USB devices (RFXcom, Plugwise, smartmeter connected to a Pi with VH server) with my Windows VH client.
I'm investigating the migration to Proxmox using a NUC. Therefore I've installed Proxmox with one pve and have made a VM by following the instructions from the HA community: https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835

So far all good. Next step is to install the VH client in Proxmox. I used parts of the instructions of the VH website to receive the USB devices in a Ubuntu VM: https://www.virtualhere.com/node/1147
I can see the usb devices connected to the VH server.

View attachment 62287

What I'm wondering:
- Is the Ubuntu VM the way to go or is it better to use a container?
- Will HA in a VM detect the USB devices that are connected to this VM?
- Other suggestions to improve this setup?

Thanks a lot for your support!

Jos

It really depends on what you are trying to do. If you already have an Ubuntu VM with VH client working, then your only challenge (and it's not insignificant) is to install HA Supervised (assuming you want addons) on the UbuntuVM. If you don't need HA addons (not sure why you would need VH, otherwise), then running HAOS in a container is super easy, but better off being done directly from PVE.

For me, though, the holy grail is HA with the ability to use VH to connect to remote devices. It may not eliminate SPOF, but at least if you lose a host for whatever reason, you can keep running).

Installing VH (server/client) is very easy on any VM, but getting HA-Supervised installed and restoring your setup from another installation is surprisingly difficult. I did find a good web guide that walked through the challenges involved in getting HA-Supervised installed on Ubuntu, but when I restored my backup, none of my addons were working. That was very late last night, and I hadn't gone back to try and install VH client or resolve the addon issue.

The guide I followed was: HA-Supervised on Ubuntu
 
While not 100% high availability, what i ended up doing is installing ser2net on each Proxmox node to be able to share out the Zigbee and Zwave dongles via IP. I then created a VIP for each of the dongles using keepalived that uses a script to check which node the dongle is plugged into and then uses that node for the VIP. In home assistant i use the VIP as the address for the controllers in the Zigbee and Zwave integrations. Works pretty well so far. if a node that has one of the USB dongles attached dies, i can just move the dongle to any other node and the comms come back in Home Assistant.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!