OpenZWave / qt-openzwave

QT5 Wrapper for OpenZWave
GNU Lesser General Public License v3.0
105 stars 30 forks source link

USB Device not Recognized #191

Closed GoingOffRoading closed 3 years ago

GoingOffRoading commented 3 years ago

qt-openzwave deployment is in Kubernetes, USB ZWave dongle is a Aeotec Z-Stick Gen5.

In Kuberenets, to mount a USB device, you need the directory path and set the container as secuityContext: privilaged: true

I have done both and have verified this works as I was connecting my zwave dongle to ZWave2MQTT with the same methodology.

Only when I start qt-openzwave, the container collapses with the following error:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] ozw-logs: applying...
[fix-attrs.d] ozw-logs: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] ozw-logs: executing...
[cont-init.d] ozw-logs: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[novnc]: Executing: /usr/local/bin/websockify --web /opt/novnc/ 7800 127.0.0.1:5901
[ozwadmin]: /usr/local/bin/ozwadmin -platform vnc:port=5901 -c /opt/ozw/config/ -u /opt/ozw/config/
[ozwdaemon]: Setting Up.....
[ozwdaemon]:
[ozwdaemon]: ========================================================================
[ozwdaemon]: Detailed Logging is available in the logs directory of the mapped volume
[ozwdaemon]: ========================================================================
[ozwdaemon]:
[ozwdaemon]: USB Path "/dev/ttyUSB0" does not exist or is not a Character Device
[ozwdaemon]: Exited with Status Code 251
[ozwdaemon]: Shutting Down Container
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

The device exists but I can not find a definition of a Character Device. Thereis a list of compatible devices on the realted HomeAssistant integration Link of which the Aeotec Z-Stick Gen5 is on there.

So I'm not sure how to diagnose this issue further.

Thoughts?

kpine commented 3 years ago

An Aeotec is not /dev/ttyUSB0 on the host. Did you map it into the container as that?

GoingOffRoading commented 3 years ago

@kpine I did not... And I'm an idiot... EXCELLENT CATCH

I misread the documentation to read that the default device path is /dev/ttyUSB0 and not /dev/ttyACM0 like other zwave containers/devices.

Documentation: https://github.com/OpenZWave/qt-openzwave

Testing fix/correct now

GoingOffRoading commented 3 years ago

Fix worked... Closing issue