Lost and frustrated... Aeotec Z-Wave Stick via USB=>IP (Startech) in Windows VM (Hyper-V) venv or Docker?

Thanks for reading! I’ve been using HASS on a dedicated PC (ASUS VivoPC Celeron 1.0GHz, 8GB of RAM) for several months but wanted to make a change. The previously working setup was using Ubuntu 18.04 Desktop on the ASUS mini-PC with the Aeotec Z-Wave (Gen5) USB Stick inserted directly, but since I’m running a Dell PE R710 as a Hyper-V Type 1 hypervisor, I’ve been wanting to move the operation to the more robust environment and I’m struggling… LOL. The R710 is equipped with a pair of X5675 CPUs and 72 GB of RAM, so I figured it’s a better landing spot for performance’s sake, and would hopefully be less quirky on Windows… I may have been sorely mistaken :-/

The desired goal is to have HASS running in a Windows VM using venv or Docker with Z-Wave functionality, as all my in-wall dimmers are Z-Wave GE units. Since I’m using Hyper-V 2016 as the hypervisor, I’ve surmised I will likely be unable to pass the Aeotec USB device to the VM through a local USB port… so I’ve purchased a Startech USB1000P USB over Ethernet device to allow access to the Z-Wave Stick. Unfortunately, I can only find a driver for Windows, not Linux… :-/

I currently have HASS running in the Windows 10 Pro VM in a Python 3.7 (x86) virtual environment, and everything works except for Z-Wave. I have the Startech driver installed, and the Aeotec device shows up as “UBZ (COM3)” in Device Manager. Of course, OpenZWave doesn’t understand Windows COM ports, so there’s that. Considering these hurdles, I decided to try running HASS and OpenZWave as Docker images, hoping that would resolve my issues.

Predictably, I’m having a hell of a time getting Docker to run in my Windows VM. I’ve enabled CPU virtualization extensions for the guest VM, so I no longer get a Hyper-V error when Docker starts up, but it’s still bombing due to something else… I’m beyond frustrated.

So what would you guys recommend? Docker Toolbox? Switch to rPi (sigh)? Go back to the dedicated ASUS mini-PC? I’m so tired of jacking with it and I just really want my freaking lights to work :frowning:

I feel like I’m getting so caught up on the mechanics of the setup that I can’t even have fun piddling with the new UI, FloorPlan, etc.

Why using Windows VM. I think windows may have poor support.

Linux VM or docker on Linux will be more supported platform I believe

Also are you using Linux for host OS?
Make no sense go windows. Linux will eliviate many of the headache you mention. You can get HA running on docker in under 5min

I run HA in as a virtual machine (ESXi) and have no issues and would assume HyperV would do as well. I would agree with @tmjpugh Linux would certainly help your situation.

Thanks, guys… the reason I’m running Windows is the Startech USB1000IP (https://www.startech.com/Networking-IO/USB-PS2/10-100-1000-Mbps-Gigabit-1-Port-USB-over-IP-Device-Server~USB1000IP) that I’m trying to use to allow my VM to access my Aeotec Z-wave Stick. Apparently there is no Linux driver for it, and Hyper-V won’t reliably pass my Aeotec through to a VM when plugged into a local USB port.

I previously had HA running on Ubuntu, and I’d be okay with Ubuntu in a VM, but how do I get the USB Z-wave device to come through when using Hyper-V?

I had no idea that USB passthrough is not supported with Hyper-V. It has been supported on ESXi for years. I am just using the free version of ESXi and have one HA instance with a Zwave stick and another instance with a Zwave stick and a Bluetooth dongle. Flawless.

USB passthrough only works for storage devices on Hyper-V :-/

I figured that since Docker containers are OS / Hardware agnostic, and I’m setting up Docker for Windows with Linux images… it would be virtually the same as running HA on CentOS or Ubuntu?

I was testing Virtualhere with an HA VM and vittualhere running on a Pi. Seems to work just fine.

No. Docker does Not run native in windows. Runs in Linux VM. I am not a VM person but I am certain this adds a layer where problems can occur or support may be lacking

Confused

You using Windows only for usb1000.
OR
Using Windows+USB1000 because no usb support for Linux vm with hyperV?

USB1000 only has Windows drivers, and no passthrough of non-storage USB through Hyper-V :-/

I ended up rebuilding my (standalone) media server with Mint 19, and I must say I’m very impressed with the look and feel of the OS! Of course, I have HA running in a venv and the Aeotec stick has kernel driver support in *nix, so all is well on that front :slight_smile:

I also run Plex on that server, and it seems to run much better on Linux anyway, so that’s a plus…

Part of the “musical chairs” routine in this rebuild was moving 4 x 3TB drives from the Windows Hyper-V server to the media server, requiring a reinstall of Hyper-V since those drives housed the boot volume andVM images. Now that they’re in the Linux box I’m excited to use zfs for data protection… the 4 drive “RAID 10” was established in seconds, and throughput seems snappy!

All in all, a lot of work but I’m glad I did it

Glad you got yourself up and running. :grinning:

1 Like

Update for posterity’s sake:

I built up an ESXI host (for its USB passthrough capabilities) and installed Mint 19. Passed the USB ZWave stick through and all was well. In order to protect the USB stick from damage, I inserted it into a USB adapter (~ 1.5" in length, flexible) and planned to firmly attach it to the back of the server via double sided tape. It happened that I was out of said tape at the time, and made a mental note to attach the ZStick at a later date.

Unfortunately, that theoretical date was preceded by my need to slide the server out and connect an antenna lead to the tuner card. Upon pushing the server back into position I heard a loud crunch and saw two pieces of white plastic housing fall out under the server… oops. I had not only broken away the housing of the ZStick, I tore the USB connector from the PCB board :-/

Since my soldering skills are dwarfed only by my Latin dance skills (that’s a story for another day), my feeble attempts to re-solder the connector ended like my senior prom…

A quick aside for context: I actually only discovered Home Assistant in a Google search after purchasing some Sonoff WiFi switches to go with my original controller, a Wink Hub v1 (currently still available on Amazon for $28-32 US). After seeing the possibilities in HA, I quickly ditched the Wink Hub in favor of an Aeotec ZStick on a dedicated bare metal Ubuntu install. This was working fine for a while, but I decided I wanted more horsepower behind HA, which is what prompted me to open this question in the first place…

Well, with my Aeotec ZStick not functioning I still needed a way to control my in-wall dimmers. It took me far longer than I’d care to admit publicly to realize I could use the Wink Hub to control the dimmers / switches through HA… but I did eventually connect the dots, and all is working as expected. Of course, the Wink Hub v1 is a cloud only device, so commands take a little longer, and it won’t work without internet. In my use case scenario, I actually only have physical in-wall devices anyway… so if the internet goes down I can always walk over and hit the switch. And my preferred method of control (with voice commands through Alexa) won’t work without internet anyway…

“Cool story, bro! But why do I care?” I wish on all that is holy I’d seen the following recommendation when I first started with HA:

Do your future self a solid, and spend a little extra to buy network connected devices instead of USB or internal. Seriously. This applies to literally anything you’d like to interface with HA

I had another consideration that weighed into the decision to go with ESXI… I use an internal PCI-E Hauppage tuner card for Live TV / DVR functionality in Plex. Since passing a PCI-E device through on Hyper-V is difficult at best, this further reinforced my decision to use ESXI. Again, a network connected tuner would have eliminated this problem entirely.

I did learn a lot about ESXI during this experiment, as well as learning a boatload about linux, especially cli based administration, so I wouldn’t necessarily call it wasted time… but I still wasted a LOT of time on this project.

In closing, my advice to anyone wanting to control their light switches and dimmers with HA is this:

  1. Buy WiFi switches and dimmers. I can’t overstate the relative simplicity of a setup using these devices as opposed to anything else out there. Period. Every other solution requires some kind of gateway or hub device to facilitate control. GAWD I wish I’d seen this advice before starting!! Worth noting, currently it’s about 40% cheaper to buy an in-wall WiFi dimmer than an in-wall Z-Wave dimmer. And if you have to beef up your WiFi coverage to control the switch / dimmer, you can at least use the extra coverage for regular WiFi devices.

  2. If you must use Zigbee / Z-Wave: Use a separate, network connected (preferably hard-wired) device as a gateway. The top dollar Homeseer devices are apparently great if money is no object, but for the rest of us I’d recommend any of the latest Wink, Samsung SmartThings, or Vera Edge hubs. These are all around $100 US, and all have local control in their most recent versions.

With any of these devices, I could have run HA in a linux VM on Hyper-V (or ESXI, KVM, RHEV, or XenServer) with zero issues. It was the use of the much loved, applauded, and highly recommended Aeotec ZStick that severely limited my options. Mind you, this is no indictment of the Aeotec device, rather an honest assessment of the easiest, most flexible way to address light switches / dimmers in HA.

I welcome your comments /corrections / critique.

I use a 15 foot USB cable to connect my Z-Wave stick to the ESXi server. That way I can position it away from the server. The server is away from people and the stick is centrally positioned for optimum Z-Wave access. Has not been an issue for a year and a half. I have a second Z-wave stick connected to a second VM on that same machine with a test HA server.

My advice is opposite

WiFi switches are nice and preferred but the market is not there. You either get gorved to use some crap app for setup or device connects through third party server. No API based switches really exist unless you count the sonoff stuff that need mqtt. This is easy for me but super complex for novice and not something I can sell to customer beithout expectation of support needed

ZWave i don’t like and tried to avoid but honestly, the GE switches and dimmers are both elegant looking, sturdily built, UL certified and just work. I would recommend smarthing hub+ZWave any day. (For record I never use smarthings) but reason is ZWave had been more stable for me.

Esp8266 is amazing however and I would use this all day…for myself. Again, I can recommend this for any non super technical person cuz they are not user friendly. Also again, this is ugly verse a decora zwave dimmer from GE.

Need and budget will drive much of what gets used, looks and function drive the rest.

Right on! If I’d used an extension cable on mine I wouldn’t have ended up with a broken ZStick… but if I’d started by spending another ~$30 US, I’d have had a SmartThings v2 hub that would’ve been safe from my clumsiness.

Also, if I’d started with one of the listed hubs, I could easily move the hub around (even unplug it and move it to another part of the house) to join those occasional stubborn devices. #YMMV

Some hubs don’t work offline.
Deleting Hub was my purpose for use HA
ZWave stick work without issue.

I think your problem started when try to use Windows. Without this your install would have not had problem

I have usb sticking out back of 1u server +2yr now without issue (jinx). Sorry for you bad luck and good story though!!

I currently own several of the GE Z-Wave Plus In-Wall Dimmer units… I completely agree that they are very attractive and super stable,and I love mine.

Perhaps my WiFi recommendation is a bit premature for some, but I’ve installed several no-name WiFi dimmers / switches, and they took about as much initial effort as the GE Z-Wave dimmers for me. Granted, they are not as attractive, but they definitely get the job done… and as long as I have WiFi they just work. (I did have issues at first with a couple of the WiFi dimmers during initial programming. It turns out the problem was my crappy Android MetroPCS phone, and switching to my iPhone or iPad completely resolved the issue. Again, YMMV but I’d recommend always using a newer device for programming to avoid those issues in particular.)

Hence my mention of the ST v2 specifically :slight_smile:

My initial purpose was to control the Sonoff devices, but removing the necessity for a hub was also appealing. It didn’t really register with me at the time that the use of Z-Wave implies the necessity of a hub… so the Z-Stick doesn’t remove the hub, it just relocates it to a different (albeit smaller) device. I guess it comes down to how one defines a “hub”