Virtualised OpenHab + Z-Wave USB controller

Hmm, I’m at a bit of a loss here. My OpenHab install is running on hyper-v (Along with several other machines).

Hyper-V as far as I can tell does not support Com Port pass through so I’m at an utter loss how I’m going to allow ubuntu (openhabs host os) to see the stick.

I suspect I only have a few options:

  1. switch hypervisor. There is a good chance something else will support com pass through, but it would have to run side by side with hyper-v since I have a lot of other machines running on there

  2. find something that will expose the com port to tcp, and then a linux program that will connect to the tcp socket and export it as a com port…

Has anyone else solved this issue already?

What is your bare metal Hyper-v OS?

I’m using VMWare esxi with OpenHab running on a Ubuntu VM and pass through my USB stick just fine. I would think most Hyper-V’s should allow the pass thru as well.

Windows Server 2008R2.

It just doesn’t support USB pass through. Crazy.

Ok, I’m going to try pushing the com port over tcp.

I’m using COMbyTCP (http://sourceforge.net/projects/combytcp/) and then on ubuntu I’m using socat:

socat pty,link=/dev/virtualcom0,raw tcp:192.168.254.254:8080&

Wish me luck!

I’m not that familiar with Win Server2008. But perhaps this article will help you. I think its talking about Windows Server and adding a SCSI controller to the VM and adding the USB drive as a hard disk?

I know you can pass through hard drives, it just doesn’t appear to like com ports :-/

It does look like I have created a virtual com port but I just can’t tell if it’s working.

Habmin gives this error “Error sending action to the server!”

Telnetting into the “virtual com port” gives me this when I toggle the switch. No idea if thats right (when I see gibberish like that it normally means I have the baud wrong, but everything I can see suggests 115200 is correct).

▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒▒▒^%2’,+p▒YVr▒zs▒▒Z▒

Check out this post/thread… mentioning socat or ser2sock.

Otherwise this newer thread with an alternate approach using virtualhere (with added redundancy).

I am using XenServer and have the same problem as you. It seems that VMWare ESX server is the only major hypervisor to support serial port pass-through. I remain amazed at this because of things like hardware devices and dongles that are needed to run so many things in environments which are increasingly virtualized.

Thanks for this.

I have it all working now using socat, it’s just not very tolerant to drops in connectivity (it effectively crashes openhab).

Virtual here looks good, but it doesn’t look like the server will run on windows unfortunately.

I have a single script I can run to update everything but ideally i’d like it to be as hands off as possible!

Nice! Glad to help (and set this up myself one day)

1 Like