saarg Posted November 25, 2016 Share Posted November 25, 2016 Hi, Im also very interesting in this configuration! I have tried to set up my zwave.me but without any luck so far after reading a lot on this topic (a bit confusing...). If someone has got this working, it would be nice to get both Unraid docker setup and zwave config for the USB device! Thanks! /tompa My Aeotech Z-stick is /dev/ttyACM0, so you should be able to add this as device pass through in the docker template. If it works or not depends on how the container is built. It's working in my Domoticz container. Quote Link to comment
tompa Posted November 26, 2016 Share Posted November 26, 2016 Thanks for your replay saarg, much appreciated! My device; root@T5:~# ls /dev/ttyACM* /dev/ttyACM0 Adding this as "device" in docker template --device=/dev/ttyACM0, using Domoticz in this example and getting this error; docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": lstat /dev/ttyUSB0: no such file or directory. Im lost at the moment /tompa Quote Link to comment
saarg Posted November 26, 2016 Share Posted November 26, 2016 Thanks for your replay saarg, much appreciated! My device; root@T5:~# ls /dev/ttyACM* /dev/ttyACM0 Adding this as "device" in docker template --device=/dev/ttyACM0, using Domoticz in this example and getting this error; docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": lstat /dev/ttyUSB0: no such file or directory. Im lost at the moment /tompa You have passed through /dev/ttyUSB0 also. Remove that one and it should work. You have to enable advanced view and remove it in the extra parameters box. I didn't know there was already a domoticz container, so haven't tried it. The one I'm running is from us and will be released shortly (When I get some time to write up all the info and XML). Quote Link to comment
CHBMB Posted November 26, 2016 Share Posted November 26, 2016 Not familiar with this, but when we passthrough devices for DVB you need to change permissions on the adapter to allow the docker to access. Quote Link to comment
saarg Posted November 26, 2016 Share Posted November 26, 2016 Not familiar with this, but when we passthrough devices for DVB you need to change permissions on the adapter to allow the docker to access. For these devices all needed is to add the user running the software in the container to the dialout group. Which is done in our domoticz container Quote Link to comment
CHBMB Posted November 26, 2016 Share Posted November 26, 2016 Not familiar with this, but when we passthrough devices for DVB you need to change permissions on the adapter to allow the docker to access. For these devices all needed is to add the user running the software in the container to the dialout group. Which is done in our domoticz container We have a domoticz container? Quote Link to comment
saarg Posted November 26, 2016 Share Posted November 26, 2016 Not familiar with this, but when we passthrough devices for DVB you need to change permissions on the adapter to allow the docker to access. For these devices all needed is to add the user running the software in the container to the dialout group. Which is done in our domoticz container We have a domoticz container? Yes https://github.com/linuxserver/docker-domoticz Quote Link to comment
tompa Posted November 27, 2016 Share Posted November 27, 2016 Thanks for your replay saarg, much appreciated! My device; root@T5:~# ls /dev/ttyACM* /dev/ttyACM0 Adding this as "device" in docker template --device=/dev/ttyACM0, using Domoticz in this example and getting this error; docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": lstat /dev/ttyUSB0: no such file or directory. Im lost at the moment /tompa You have passed through /dev/ttyUSB0 also. Remove that one and it should work. You have to enable advanced view and remove it in the extra parameters box. I didn't know there was already a domoticz container, so haven't tried it. The one I'm running is from us and will be released shortly (When I get some time to write up all the info and XML). Thanks, got it working with Domoticz now! I'm new to this and didn't understand the "advanced setting switch", I thought it was the "show advanced setting" Thanks again! /tompa Quote Link to comment
poldim Posted February 25, 2017 Share Posted February 25, 2017 Just sharing what I've done: Inserted my Z Wave stick into my UNRAID server. Went to the main UNRAID log and found this: Feb 24 08:52:12 ChiRAID kernel: usb 5-1: new full-speed USB device number 4 using uhci_hcd Feb 24 08:52:12 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 08:52:12 ChiRAID kernel: usbcore: registered new interface driver cdc_acm Feb 24 08:52:12 ChiRAID kernel: cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters Found that the system is referring to the stick as ttyACM0 per above. Went into Home assistant docker settings, enabled advanced view, and made the following changes: Extra Parameters: --device=/dev/ttyACM0 Privileged: ON Followed instructions on setting up z-wave stick by adding the required code to the yaml file: zwave: usb_path: /dev/ttyACM0 Quote Link to comment
saarg Posted February 25, 2017 Share Posted February 25, 2017 9 hours ago, poldim said: Just sharing what I've done: Inserted my Z Wave stick into my UNRAID server. Went to the main UNRAID log and found this: Feb 24 08:52:12 ChiRAID kernel: usb 5-1: new full-speed USB device number 4 using uhci_hcd Feb 24 08:52:12 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 08:52:12 ChiRAID kernel: usbcore: registered new interface driver cdc_acm Feb 24 08:52:12 ChiRAID kernel: cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters Found that the system is referring to the stick as ttyACM0 per above. Went into Home assistant docker settings, enabled advanced view, and made the following changes: Extra Parameters: --device=/dev/ttyACM0 Privileged: ON Followed instructions on setting up z-wave stick by adding the required code to the yaml file: zwave: usb_path: /dev/ttyACM0 Setting privileged to on makes your device tag excessive as privileged gives the container access to all devices of the host. If the container dev did it correctly the only thing you need is the device tag. Quote Link to comment
poldim Posted February 27, 2017 Share Posted February 27, 2017 On 2/25/2017 at 2:03 AM, saarg said: Setting privileged to on makes your device tag excessive as privileged gives the container access to all devices of the host. If the container dev did it correctly the only thing you need is the device tag. True - I went back and removed the privileged tag and it's working without issues. Is there a clearly define way of how I get it to always load the zwave stick into the same path? It seems that if I remove it and plug it back in, it jumps between ACM0 and ACM1, but not every time. Quote Link to comment
saarg Posted February 27, 2017 Share Posted February 27, 2017 Probably is a way, but I don't know how. The easy way is to not unplug it Quote Link to comment
poldim Posted March 7, 2017 Share Posted March 7, 2017 On 2/27/2017 at 1:21 PM, saarg said: Probably is a way, but I don't know how. The easy way is to not unplug it I've now had the device change it's address from /dev/ttyACM0 to /dev/ttyACM1 and /dev/ttyACM1 to /dev/ttyACM0 at separate times completely on it's own. How do I stop this from happening? Quote Link to comment
saarg Posted March 7, 2017 Share Posted March 7, 2017 11 minutes ago, poldim said: I've now had the device change it's address from /dev/ttyACM0 to /dev/ttyACM1 and /dev/ttyACM1 to /dev/ttyACM0 at separate times completely on it's own. How do I stop this from happening? I have not had the same experience with my Z-wave stick. For some reason your device disconnects. Check your log for any USB errors. Quote Link to comment
poldim Posted March 7, 2017 Share Posted March 7, 2017 2 hours ago, saarg said: I have not had the same experience with my Z-wave stick. For some reason your device disconnects. Check your log for any USB errors. Here's the log: root@ChiRAID:~# cat /var/log/syslog | grep ttyACM Feb 24 08:52:12 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 13:32:54 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 24 14:37:16 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 15:04:46 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 25 18:54:44 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 25 19:05:48 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 26 14:29:27 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:32 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:45 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:59 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 28 02:30:02 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM1: USB ACM device Feb 28 09:55:06 ChiRAID root: home-assistant: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyACM0": lstat /dev/ttyACM0: no such file or directory Error: failed to start containers: home-assistantunifi: started succesfully! Mar 1 02:30:01 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Mar 2 02:30:02 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM1: USB ACM device I think I know what it is: I had HA initializing a soft reset based on the suggestion on their zwave config page (all the way at the bottom) that ran nightly at 2:30. Any idea what's after cdc_acm in the log? Is it the USB bus/device/etc? I'd still like to find a solution to permanently bind the device to a static mapping. I've got a separate thread HERE for it, but no responses. Quote Link to comment
saarg Posted March 7, 2017 Share Posted March 7, 2017 1 hour ago, poldim said: Here's the log: root@ChiRAID:~# cat /var/log/syslog | grep ttyACM Feb 24 08:52:12 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 13:32:54 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 24 14:37:16 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 24 15:04:46 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device Feb 25 18:54:44 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 25 19:05:48 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 26 14:29:27 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:32 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:45 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:59 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 28 02:30:02 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM1: USB ACM device Feb 28 09:55:06 ChiRAID root: home-assistant: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyACM0": lstat /dev/ttyACM0: no such file or directory Error: failed to start containers: home-assistantunifi: started succesfully! Mar 1 02:30:01 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Mar 2 02:30:02 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM1: USB ACM device I think I know what it is: I had HA initializing a soft reset based on the suggestion on their zwave config page (all the way at the bottom) that ran nightly at 2:30. Any idea what's after cdc_acm in the log? Is it the USB bus/device/etc? I'd still like to find a solution to permanently bind the device to a static mapping. I've got a separate thread HERE for it, but no responses. I have no idea what is after cdc_acm. Only having the lines with ttyACM from the log doesn't make any sense when troubleshooting. Quote Link to comment
poldim Posted March 7, 2017 Share Posted March 7, 2017 Feb 25 18:52:52 ChiRAID kernel: usb 5-1: USB disconnect, device number 7 Feb 25 18:54:44 ChiRAID kernel: usb 5-1: new full-speed USB device number 8 using uhci_hcd Feb 25 18:54:44 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 25 19:05:44 ChiRAID kernel: usb 5-1: USB disconnect, device number 8 Feb 25 19:05:48 ChiRAID kernel: usb 5-1: new full-speed USB device number 9 using uhci_hcd Feb 25 19:05:48 ChiRAID kernel: cdc_acm 5-1:1.0: ttyACM1: USB ACM device Feb 25 19:07:15 ChiRAID emhttp: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog Feb 25 21:27:00 ChiRAID kernel: br0: port 3(vnet1) entered disabled state Feb 25 21:27:00 ChiRAID kernel: device vnet1 left promiscuous mode Feb 25 21:27:00 ChiRAID kernel: br0: port 3(vnet1) entered disabled state Feb 26 00:00:01 ChiRAID kernel: mdcmd (40): check Feb 26 00:00:01 ChiRAID kernel: md: recovery thread: check P ... Feb 26 00:00:01 ChiRAID kernel: md: using 1536k window, over a total of 4883770532 blocks. Feb 26 01:00:01 ChiRAID root: mover started Feb 26 01:00:01 ChiRAID root: mover finished Feb 26 09:08:55 ChiRAID kernel: md: sync done. time=32934sec Feb 26 09:08:55 ChiRAID kernel: md: recovery thread: completion status: 0 Feb 26 14:28:36 ChiRAID kernel: usb 5-1: USB disconnect, device number 9 Feb 26 14:28:44 ChiRAID kernel: usb 2-1: new high-speed USB device number 10 using ehci-pci Feb 26 14:28:44 ChiRAID kernel: hub 2-1:1.0: USB hub found Feb 26 14:28:44 ChiRAID kernel: hub 2-1:1.0: 4 ports detected Feb 26 14:29:27 ChiRAID kernel: usb 2-1.4: new full-speed USB device number 11 using ehci-pci Feb 26 14:29:27 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:34:33 ChiRAID emhttp: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog Feb 26 14:34:59 ChiRAID emhttp: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog Feb 26 14:35:20 ChiRAID emhttp: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog Feb 26 14:35:23 ChiRAID kernel: usb 2-1: USB disconnect, device number 10 Feb 26 14:35:23 ChiRAID kernel: usb 2-1.4: USB disconnect, device number 11 Feb 26 14:35:32 ChiRAID kernel: usb 2-1: new high-speed USB device number 12 using ehci-pci Feb 26 14:35:32 ChiRAID kernel: hub 2-1:1.0: USB hub found Feb 26 14:35:32 ChiRAID kernel: hub 2-1:1.0: 4 ports detected Feb 26 14:35:32 ChiRAID kernel: usb 2-1.4: new full-speed USB device number 13 using ehci-pci Feb 26 14:35:32 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:41 ChiRAID kernel: usb 2-1: USB disconnect, device number 12 Feb 26 14:35:41 ChiRAID kernel: usb 2-1.4: USB disconnect, device number 13 Feb 26 14:35:44 ChiRAID kernel: usb 2-1: new high-speed USB device number 14 using ehci-pci Feb 26 14:35:45 ChiRAID kernel: hub 2-1:1.0: USB hub found Feb 26 14:35:45 ChiRAID kernel: hub 2-1:1.0: 4 ports detected Feb 26 14:35:45 ChiRAID kernel: usb 2-1.4: new full-speed USB device number 15 using ehci-pci Feb 26 14:35:45 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Feb 26 14:35:54 ChiRAID kernel: usb 2-1: USB disconnect, device number 14 Feb 26 14:35:54 ChiRAID kernel: usb 2-1.4: USB disconnect, device number 15 Feb 26 14:35:58 ChiRAID kernel: usb 2-1: new high-speed USB device number 16 using ehci-pci Feb 26 14:35:59 ChiRAID kernel: hub 2-1:1.0: USB hub found Feb 26 14:35:59 ChiRAID kernel: hub 2-1:1.0: 4 ports detected Feb 26 14:35:59 ChiRAID kernel: usb 2-1.4: new full-speed USB device number 17 using ehci-pci Feb 26 14:35:59 ChiRAID kernel: cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device Quote Link to comment
saarg Posted March 7, 2017 Share Posted March 7, 2017 For some reason your usb is disconnecting. Are you doing something when this happens? Or scheduled something in HA? Have you checked if there are any bios updates available for your motherboard? Quote Link to comment
kstile Posted March 12, 2017 Share Posted March 12, 2017 I've been fighting this same annoyance (ttyACM0 => ttyACM1 =>ttyACM0) since I set up my z-wave network last month. A quick lsusb -v would confirms Aeon Labs Aeotec Z-Wave Z-Stick, Gen5 maps to idVendor=0658 idProduct=0200 Bus 001 Device 008: ID 0658:0200 Sigma Designs, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0658 Sigma Designs, Inc. idProduct 0x0200 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Given that, I'm planning on editing my go script to create the udev rule: echo 'SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave"' > /etc/udev/rules.d/99-usb-serial.rules I manually created the rule, unplugged and replugged the zwave stick, and it looks like the rule works: me@tower:/# ls -al /dev/zwave lrwxrwxrwx 1 root root 7 Mar 11 19:12 /dev/zwave -> ttyACM0 I passed the udev alias to docker: --device=/dev/zwave and mapped to it in my configuration.yaml zwave: usb_path: /dev/zwave Aside from the mess of sensors I need to go map, everything appears to be working. I just don't know if this is durable beyond a reboot. @Saarg's comment below makes me wonder. Where can i find the CHBMB build script? On 5/25/2016 at 4:56 AM, saarg said: I don't know how udev works, but I suspect the udev rule have to be made before the go script executes for this to work? If so, you will have to unpack bzroot, add the udev rule and then pack it again. You could look at CHBMB build script for the media build for how to do it. Quote Link to comment
saarg Posted March 12, 2017 Share Posted March 12, 2017 The simplest way to test this is to reboot The scripts are here Quote Link to comment
kstile Posted March 15, 2017 Share Posted March 15, 2017 @saarg bah. you're right. It is at least consistently available on /dev/zwave I just have to unplug/replug after rebooting unraid. Quote Link to comment
poldim Posted March 17, 2017 Share Posted March 17, 2017 On 3/14/2017 at 5:05 PM, kstile said: I just have to unplug/replug after rebooting unraid. Why do you have to do this? Quote Link to comment
kstile Posted March 18, 2017 Share Posted March 18, 2017 @poldim I don't quite understand it. Repacking the bzroot so udev runs at boot is probably the right answer, I just haven't had a chance to play with that. Quote Link to comment
ken-ji Posted March 18, 2017 Share Posted March 18, 2017 New udev rules can be loaded in run time with udevadm trigger, so fixing your device to a specific devicename could work. Quote Link to comment
kstile Posted April 12, 2017 Share Posted April 12, 2017 putting this /boot/config/go before works! echo 'SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave"' > /etc/udev/rules.d/99-usb-serial.rules udevadm control --reload-rules udevadm trigger sleep 5 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.