Hyper-V image and USBtoSerial

Hi all,

About a year ago I installed and setup HASSIO using the Hyper-V image on Windows Server 2012R2. Everything has worked perfectly ever since and I have a nice configuration already.
Recently we installed solar panels and I want to readout the values from it. I installed a USBtoSerial device which is working in the Windows host, but I’m unable to get it working in the VM. I now found that Hyper-V doesn’t support that out of the box :frowning: . Does anyone have any suggestions to get it working or do I need to start all over using a different VM type?

Thx for your help

Hyper-V does not have USB passthrough for devices other than USB hard drives. I’m kind of in the same situation: I want to use the new Bluetooth integration but my HA install is a VM in Hyper-V. I’ve tried the free VMWare Player and USB passthrough works fine, but Hyper-V has been so solid for me that I’m not sure I want to go that route.

Not sure if you integration support tcp?
if so, you could use serial to usb.
I used to use that on my old zigbee stick, worked perfectly until i moved to a conbee stick, the trick didn’t work anymore, i moved to VMware nowadays :wink:

see also

1 Like

Do you need usb or serial connection?
If serial and you have a Pi or something else, try using ser2net. I run this to connect to my energy sensors from the Home Assistant VM inside my Synology.

@DessertBesom that is what i said, and since he already runs HyperV on windows, he can use the serial port from the host.
I all comes down to my first question, does the integration support serial2tcp :thinking:

This is the integration I want to use : https://github.com/wlcrs/huawei_solar

I already tried ubsipd (https://github.com/dorssel/usbipd-win) to share the ubs/serial port but I don’t see the port appearing in home assistant

I will have a look at your suggestion, thx!

Ok, I have managed to get a bit further. So I used usbipd to share the device on Windows Server, in Home Assistant I installed usbip but I fail to get access to the shared device

image

Wouldn’t using TCP modbus be easier??

Network connection Starting from firmware updates released in December 2021, Huawei has closed the Modbus-TCP interface on the network to which the inverter connects While it is still possible to access a Modbus-TCP interface when connecting to the SUN2000-xxx WiFi network broadcasted by the inverter, this method requires good computer networking knowledge and a device that is closely located to the inverter to connect to its AP.

Anyway, i used ser2tcp for my zigbee stick, and the zigbee integration by itself supports tcp stack,

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

meaning i never had to install anything under HA…

Not sure if that is possible; I guess it depends on what kind of installation you’re running :thinking:
Sorry I can’t be of more help here.:confused:

I think the usb.id is at a disffernt location, I came across this at some point and had to make an alis to the actual location from the location usbip looks for. If memory serves me correctly, try /usr/share/misc and see if they are in there.

PS How did you install usbip in Home Assistant?