niietzshe Posted May 29, 2015 Share Posted May 29, 2015 Hey all, I've created a docker based off one I found on the hub that I've added too and setup unRaid templates over on github etc... https://registry.hub.docker.com/u/christianwaite/domoticz-zwave/dockerfile/ It's a home automation server/soft that relies on a USB dongle to transmit/receive zwave commands. If I ssh into UnRaid and run lsusb on the device id: lsusb -d 10c4:ea60 It returns: Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light So we can assume (correctly I hope) that it's dev path is "/dev/bus/usb/001/004". I need to add this I think into the docker so it can see the usb device, which should be a case of: run --device=/dev/bus/usb/001/004 But I can't get it to work and am not entirely sure where I should be doing this. As part of the docker launch? Or just in the script etc... Any help much appreciated on this matter, I'm a bit out of my depth. Thanks Christian Quote Link to comment
niietzshe Posted May 31, 2015 Author Share Posted May 31, 2015 Any tips on how to get to the bash of the docker to run lsusb on it so I can see if it's something else not working? Quote Link to comment
sparklyballs Posted May 31, 2015 Share Posted May 31, 2015 i don't know anything about passing usb devices to a docker, not something i've ever tried. but i will say one thing though, that if you intend to make this docker available to others, passing the usb bus address isn't going to be portable, because their usb device list will almost certainly be different to yours. Quote Link to comment
xamindar Posted May 31, 2015 Share Posted May 31, 2015 Any tips on how to get to the bash of the docker to run lsusb on it so I can see if it's something else not working? use the "docker exec" command to run a bash shell inside a running docker. But as sparklyballs stated, every computer will most likely list that usb device in a different way. You will need to write some script to discover the correct device on its own. Or at the very least, give clear instructions on how the user needs to discover it and pass it through an environment variable. Quote Link to comment
niietzshe Posted June 1, 2015 Author Share Posted June 1, 2015 Thanks for the help, I'll give it a go tonight and see if it's listing any USB devices. As for the Bus Address, most people are using a single device to do this (AeonLabs ZStick), so it should be ok based on the ID, but I was going to expose that in some way once I get it working, probably through an EnvVar. Cheers Christian Quote Link to comment
saarg Posted June 1, 2015 Share Posted June 1, 2015 I have played with passing through a smart card readers to my oscam container and I got it working. It's some time since I did it and I didn't document it unfortunately. The most important thing is to have the driver for the device installed in unraid. Without it you will not get it working in the container. You also have to change permissions for the device in both Unraid and the container. That's all I can remember now. Quote Link to comment
niietzshe Posted June 1, 2015 Author Share Posted June 1, 2015 Thanks for the info. If you remember anymore let me know. Quote Link to comment
leonowski Posted December 11, 2015 Share Posted December 11, 2015 Hey all, I've created a docker based off one I found on the hub that I've added too and setup unRaid templates over on github etc... https://registry.hub.docker.com/u/christianwaite/domoticz-zwave/dockerfile/ It's a home automation server/soft that relies on a USB dongle to transmit/receive zwave commands. If I ssh into UnRaid and run lsusb on the device id: lsusb -d 10c4:ea60 It returns: Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light So we can assume (correctly I hope) that it's dev path is "/dev/bus/usb/001/004". I need to add this I think into the docker so it can see the usb device, which should be a case of: run --device=/dev/bus/usb/001/004 But I can't get it to work and am not entirely sure where I should be doing this. As part of the docker launch? Or just in the script etc... Any help much appreciated on this matter, I'm a bit out of my depth. Thanks Christian Hi niietzshe, I just wanted to post in here because I had the same issue as you. I have a zwave USB device that I wanted to use with a homegenie container running on unraid. I finally got it working with these options (turn on advanced view to see them): - Check "Privileged" - In extra parameters, use "--device=/dev/ttyUSB0" I only had one USB serial device. After that change to the container settings, I could access the USB serial device and run homegenie+zwave on unraid. Quote Link to comment
saarg Posted December 11, 2015 Share Posted December 11, 2015 I just saw what might be the problem now The --device tag is for passing through a device so you do not have to use the privileged option. So to correctly pass through a device it has to have both the container and host path, so a correct tag should look like this --device=/dev/ttyUSB0:/dev/ttyUSB0 There is a : between the container path and host path. Quote Link to comment
Paul_Ber Posted May 3, 2016 Share Posted May 3, 2016 I just saw what might be the problem now The --device tag is for passing through a device so you do not have to use the privileged option. So to correctly pass through a device it has to have both the container and host path, so a correct tag should look like this --device=/dev/ttyUSB0:/dev/ttyUSB0 There is a : between the container path and host path. Will unRaid also need the libftdi or something like that for the USB serial device to work correctly? I am trying to figure out how to get my lis driver USB LCD 20*2 working by way of a container and also show the unRAID system stuff that LCDproc would normally rotate thru. I got it working thru a Win 7 VM and passing the USB device but it only show the system data for only the VM. I got a container in Github and DockerHub and got most of the programing work done, just have to tie it all together. Sent from my XT1563 using Tapatalk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.