HASSOS in Hyper-V - Is it possible to install USB Rediector or something similar for USB support?

I know that Hyper-V doesn’t support USB devices. People with HASS.IO+Ubuntu+Hyper-V can get around this by installing USB Redirector on Ubuntu per this forum thread.

I’m curious for those of you that gotten HASSOS to with work HyperV, has anyone found a clever way to pass their serial port(s) from from Windows 10 to HASSOS using something like USB Redirector; or, a way to do this via IP?

Eltima serial2net works pretty fine… but it is not free

However, If i remember correctly, it is also possible to use netburner virtual port for free (which is eltima) it is only stuck at 9600 baud. It is not ment to be used on anything beside Netburner equipment, but it works :wink:

Also VSP3 could work:
https://www.hw-group.com/software/hw-vsp3-virtual-serial-port

on linux side ser2net https://linux.die.net/man/8/ser2net

It should be possible to connect these :slight_smile:

1 Like

@aceindy thanks so much for this. Would I be able to install and execute Ser2net within HASSOS’s pre-made docker container? I’ve never tried modifying/adding anything inside HASSOS. Would my custom modifications survive HASSOS updates?

I guess so, maybe you don’t even need it on hassos side?

f.e. zigbee2mqtt can call serial over lan

serial:
    port: 'tcp://192.168.2.13:20108'

But I have to admit I ain’t using this (yet), as i found this out after i set up my zigbee2mqtt host on Windows already.
I will try this again some day though as that is my preferred setup :yum:

1 Like

My HUSBZB-1 has both (Z-wave and Zigbee) for COM1 and COM2 respectively. How would I pass my Z-Wave adapter’s COM port over LAN? It doesn’t look like the Zigbee2mqtt addon supports Z-wave.

The link in the second post is the only way I know of and is the big reason I quit Hyper-V after 10 years of using it. I use Unraid now and I couldn’t be happier (and I wish I had known about that years ago).

Edit: I have tried with other kinds of software but none really works. Nor can you passthrough any usb port from your motherboard to any vm. There is a solution and that is to get a pci express usb expansion as you are able to passthrough the entire device.

I have tried vmware and unraid after this and I will never go back to Hyper-V (or VmWare for that matter)

I use USB Redirector from a Pi 4 (wired - POE powered) with an Aeotec Z-stick and ConBee II. I pass both devices to my Ubuntu VM in Hyper-v. I have had no problems after working out the configuration.

Use the /dev/serial/by-id/usb-* path vs the /dev/ttyACM* path. That way you don’t need to worry about any changes to the serial order.

@jimz011 Thank you for your post. I’m planning on using Home Assistant; which includes a limited Linux environment (HASSOS). I’m not sure it’s possible to install USB Redirector client in the HASSOS. It seems like USB Redirector client was meant for my own installation of Ubuntu. Do you know for sure I can install the USB Redirector client in HASSOS?

Hi @cab426 , are there instructions for installing USB Redirector client on Home Assistant’s HASSOS? The instructions for USB Redirector seem to be for a regular/full installation of Ubuntu. Also, would USB Redirector survive an HASSOS update? It seems like the whole container gets replaced with each upgrade. My apologies, I’m still quite new to Home Assistant. Currently, I only have Home Assistant running in a VirtualBox VM; however, I would be interested in using Hyper-V instead of VirtualBox.

If you are looking for a great hypervisor with native docker support I’d suggest trying Unraid. You will probably never look back. Plus it is widely used by the Home Assistant community so it is easy to find and get answers on that particular system. It is lightweight and pretty easy to use. (But yeah other systems would work fine though, this is what I would recommend)

1 Like

Both VMware as well as VirtualBox support serial ports & USB pass through.

Many of our engineers use VMware to run old software on usb2serial comports (as the programmer software is too old to be compatible with W10x64)

But yeah, Hyper-V totally sucks at it

I don’t think you will be able to install it on HASSOS. I use Ubuntu with the supervised install of HA. I installed USB Redirector on Ubuntu and the ports get passed through Docker to the HA container.

you probably don’t have to install anything om HA, you can probably connect it straight to tcp (at least for zigbee2mqtt)
You can even connect telnet to eltima and monitor whatever is tx/rx

Right now i run zigbee2mqtt on windows side, HA connects to it over tcp.
However, I’d prefer to run it on HA side, and connect to serial port over tcp.
As soon as i have some time i will check if they are compatible and how I configured it :wink:

Guys, thank you so much for all your info. I’m already using a VirtualBox VM; passing/filtering my entire USB device successfully to Home Assistant.

I was just curious how Home Assistant (and z-wave/zigbee) would run under Hyper-V in respect to Hyper-V. It sounds like I “might” be able to do this with the help of zigbee2mqtt (official add-on) and zwave2mqtt (HACS addon) without shell access.

Since the engineers here generally prefer using VirtualBox for their own personal (and development) setups over any other method, it makes the most sense for me to stick with what I have.

Thanks again for all your suggestions!

@mkanet

Promised I would get back to you once I moved my Zigbee2mqtt server from windows to HassOS using my Eltima virtual port over LAN.

How?

On Windows10:

  • CC2531 hardware is connected to USB (COM8)
  • Eltima setup as comport server on TCP port 5656, with settings com8, real port, 115200 baud ,No parity,8 data bits ,1 stop bit

On HassOS (running under Hyper-V on the same W10 machine)

serial:
  port: 'tcp://192.168.1.22:5656'

I also copied the database.db from windows to HassOS share\zigbee2mqtt\database.db, so I did not have to re-pair all my devices again :innocent:

Major advantage by having zigbee2mqtt (including its configuration) on HassOS is that it is now included in HassOS snapshot, making the maintenance & recovery a hell of a lot easier :eyes:

PS: ofc you also need an mqtt-broker

3 Likes

Thanks @aceindy. Glad you got it working. I’ll be sure to lookup your post when/if I migrate to HASSOS in Hyper-V. I’ll also have to do something similar with Zwave2m2tt as well. I don’t think my current HUSBZB-1 (which includes both zigbee and zwave radios) is compatible with either zigbee2mqtt or zwave2mqtt though.

aceindy, it seems you got this to work and its prompting me to start down the HA path to replace ST.

To be clear, which software did you use from Eltima? ( Virtual Serial Port Driver, Serial over Ethernet Connector, or USB Network Gate) It seems all three of these could work.

I’m also looking at com0com which it seems Eltima took the free version of, changed some stuff, and started charging for.

I use Eltima’s virtual serial port (I just happened to have a license laying around) If i remember correctly, it is also possible to use netburner virtual port for free (which is eltima) it is only stuck at 9600 baud
But yeah, any serial over tcp interface would do :wink:

Also see earlier post

I think VSP3 is still free :wink:

I think I’ve run into a wall created by the dongle I bought. I have the [HUSBZB-1 (Z-Wave & Zigbee USB Adapter) which is not compatible with zigbee2mqtt. It looks like the new Zigbee implementation might support this, but I haven’t figured out how to even install that yet.

And there is no mention of getting z-wave to work.

I’m starting to think this isn’t worth the effort

@Jared_Heath I came to the same conclusion… since I also have a HUSBZB-1 as well. I also ran into a similar wall when trying to do this via WSL2 on Windows 10. WSL2 doesn’t support USB devices yet. I’m currently using the Home Assistant VM on Virtualbox… passing my HUSBZB-1 via the Virtualbox USB Filter. I may give WSL2 a shot once they have official support for USB devices.