Help - First install on VM running Ubuntu

Hi,

I have a virtual machine running Unbuntu 18.04 on Oracle VirtualBox. I followed this doc: https://www.home-assistant.io/docs/installation/raspberry-pi/ and the Home Assistant website comes up. When I go to modify the configuration.yaml to add my zwave I get invalid config.

Doing a ls -la /dev/ttyA*, my path to the zwave stick (Aeotec Gen5) is /dev/ttyACM0. In the config file I added at the end:

zwave:
usb_path: /dev/ttyACM0

Here is the error message I get from the webpage:

Log Details (ERROR)

Fri Jun 08 2018 02:25:49 GMT-0700 (PDT)

Error during setup of component zwave

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/openzwave/option.py”, line 78, in init
raise ZWaveException(u"Can’t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: “Zwave Generic Exception : Can’t find device /zwaveusbstick : [‘NoneType: None\n’]”

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py”, line 143, in _async_setup_component
hass, processed_config)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/init.py”, line 245, in async_setup
config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
File “/srv/homeassistant/lib/python3.6/site-packages/openzwave/option.py”, line 81, in init
raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: ‘Zwave Generic Exception : Error when retrieving device /zwaveusbstick : [‘Traceback (most recent call last):\n’, ’ File “/srv/homeassistant/lib/python3.6/site-packages/openzwave/option.py”, line 78, in init\n raise ZWaveException(u"Can\‘t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n’, ‘openzwave.object.ZWaveException: “Zwave Generic Exception : Can\'t find device /zwaveusbstick : [\‘NoneType: None\\\\n\’]”\n’]’

Any help would be greatly appreciated!

dum question does the VM have access to the USB Drive

If I was you I would go down the path of Docker

You need to pass the USB device through to the VM. By default the VM has no knowledge of devices connected to the host.

1 Like

Hi Im not sure if its correct for VM, but for docker I use these commands:

ls -ltr /dev/tty*|tail -n 1 && sudo usermod -G dialout user

user=username

The VM has to have the device passed through first.

The differences between VM and Docker are vast.

I am not sure what you all mean by passed through. I can see the USB stick when I do ls -la /dev/ttyA*. However I do have to go to devices and mount the USB stick prior to do doing this. Is there something else I should be doing? Also the Guest Additions are installed on this VM.

I have never used docker, should I try going down that path instead? If so can someone provide me a “beginners” guide for using it with Home Assistant. I’ll find some docs online and read up on what exactly docker does and how to set it up.

Thanks!

Ok so if you can see the usb with the ls command, type the next command I gave you

sudo usermod -G dialout user

Give the user access to the usb stick

Hi,

When I do:
groups homeassistant

The user homeassistant already has dialout. I went ahead and reran it though. I still get the invalid path. I am trying to get passthrough going on this virtual machine now. When I go to USB settings and try to enable USB2.0 it doesnt allow it. I installed Oracle_VM_VirtualBox_Extension_Pack-5.2.12-122591.vbox-extpack, but it still doesnt like it.

I do:
VBoxManage list extpacks

Output:
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 5.2.12
Revision: 122591
Edition:
Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:

I think if I can figure this out it will work with passthrough like others have stated. I hope… Or I can look into another solution for running Home Assistant.

HI Sorry I cant help with VM as I have little knowledge. Im using docker.
This is the installation page

if you decide to go that route, I can try help.

Thank you. I think I may go this path. I just got USB2.0 working on VirtualBox but it still not working properly.

Very beginner question… Do I install Docker on VM or is it its own thing? How is yours setup?

Thanks

some people install it on VM, I have docker installed directly on the base operating system. (no vm)
I run a NuC with Ubuntu 18.04LTS
are you starting from zero?

I am installing a VM through VirtualBox on my main computer to run this. However I may try VMware player. It will just be on the background. I do have an old Pi laying around I think its version 1, not sure if it would run this software on it.

No Pi1 dont think so.
if you want to pursue the vm, perhaps ping edif30 on discord. he’s running esxi.
he’s got experience on vm and he’s helpful

Thanks, ill try that. If I do figure this out I’ll reply. It may help someone else in the future.

I haven’t used VirtualBox in years (it’s great for playing around with, but not for a serious hypervisor), but as I recall, there was an option in the lower right hand corner of the VB console, that lists your USB devices. You would select the device that you want to pass through and use the option to present it to the VM. You want the VM to have the only access to that device, and not allow the Host OS to use it.

A quick search shows this might be how you do it now.