Another Aeon Gen 5 Issue - No Device

In addition, this is on the console when entering the Aeon Gen5 USB stick:

[41659.759782] usb 3-2: new full-speed USB device number 4 using uhci_hcd
[41659.940727] Got empty serial number. Generate serial number from product.
[41662.320319] cdc_acm 3-2:1.0: This device cannot do calls on its own. It is not a modem.
[41662.328451] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[41662.335941] usbcore: registered new interface driver cdc_acm
[41662.341742] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

I’ve also tried the addon z-wave binding version 1.8.0-SNAPSHOT, no difference, still
"Port /dev/ttyACM0 does not exist"…

thanks

Did you restart the NAS after adding the user running openhab to the dialout group?

Hi Jim,

Thanks for your feedback.

Yes I did do a restart after adding the user to the dialout group.
The settings of the /dev/ttyACM0 I have to do again after every reboot or unpluggin/plugin of the z-wave stick. It’s created as root/root and permission 600

I found this post in a synology forum:


Now I have spent many hours trying to figure this out, why it works for some and others not.
Aotec Gen 5 stick uses cdc-acm driver.
It looks like your NAS have an older kernel with an older cdc-acm driver and that’s the problem.
I’ll try to find a solution, but no promises.

Regards
Jadahl


This is the version on my Synology:

Linux version 3.10.35 (root@build2) (gcc version 4.7.3 20130102 (prerelease) (crosstool-NG 1.18.0) ) #5644 SMP Fri Jan 22 13:38:47 CST 2016

Could this be the problem?

It is possible. I do not know for sure though. Do you have any DSM updates for your system that are pending?

Thanks.

Synology Nas is up to date.
Info:
DS412+
Current DSM version: DSM 5.2-5644 Update 5
DSM date: 2016/02/18

Also all packages are up to date.

I’ve been browsing the web in search for a newer version of the “cdc-acm driver” for the Aeon Gen 5 z-wave stick to be installed on Linux version 3.10.35, I can’t seem to find it.

  • Any ideas on where to find one that supports the stick and can be installed on Linux version 3.10.35 ?
  • Any ideas what to do to get rid of this message: “Port /dev/ttyACM0 does not exist”?
  • Is anyone familiar with a functioning configuration consisting of a Synology NAS with DSM 5.2 and the Aeon z-wave stick Gen5?
  • Or a configuration with Linux version 3.10.35 and the z-wave stick?

All in search for some enlightenment :slightly_smiling:

Thanks !

Took me three days of my life, but found a post from 2014 with the solution.

After doing the following I got the connection working:


(see also https://groups.google.com/forum/#!topic/openhab/lrzcZDYI3Ug[101-125])

Adjust user id and groups
- Create groups “dialout” and “uucp” in DSM
- Change user id of “openhab” to make it a system user
○ Edit /etc/passwd and replace id by a number < 100 (e.g. 95)
○ Change user id for existing files to new user id, here 1066 is the old user id and 95 the new one:
- find / -user 1066 -exec chown -h 95 {} ;
- Change group ids of “dialout” and "uucp"
○ Edit /etc/group and replace group ids by 800 / 801
○ Assign user openhab to both groups (also in /etc/group)

Adjust owner and rights for usb serial
- In terminal:
○ chown -R root.uucp /var/lock
○ chmod -R g+w /var/lock/
○ chown -R root.dialout /dev/ttyACM0
○ chmod 660 /dev/ttyACM0
- If openhab was started as roots, there may be lock-files remaining in folder /var/locks that cannot be removed by user openhab, so remove them manually

BTW, I didn’t replace the id numbers. Just created the groups, added the user and adjusted the owner and rights for the usb serial. I think the essential thing was the rights to the /var/lock file.

Next I would like to have the ownership and permission to the ACM0 port set correctly by default. So that I wouldn’t have to change them manually after each NAS startup or renewed plugin of the USB stick.

Any suggestions on how to do that?

Thanks

That one can be accomplished by changing udev rules on most systems. Here is an example: http://unix.stackexchange.com/questions/147494/how-can-i-set-device-rw-permissions-permanently-on-raspbian

Should work on most distributions including DSM, though I have not tried it.

Thanks Jim,

For whom it might be useful:

Created a file named openhab-zwave.rules in /lib/udev/rules.d with this content:
ACTION==“add”, KERNEL==“ttyACM0”, MODE=“0660”, GROUP=“dialout”

(See the previous posts for why the group setting)

Works great !

Oh boy, next challenge.

So now the settings for the /dev/ttyACM0 are right, but…

How to get the settings for /var/lock set right after reboot?

It’s these commands:

  • chown -R root.uucp /var/lock
  • chmod -R g+w /var/lock/

I tried 2 scenario’s:
1 - create a xxx.conf file with these commands in the folder /etc/init
2 - added the commands to the startup file start_runtime.sh

Both strategies didn’t work.

Anyone any suggestions on what might be the problem or the solution?

OK, done !

This worked for me to add a startup script for owner and rights of usb serial lock on my Synology:

create script file =filename=.sh in /usr/syno/etc.defaults/rc.d

set rwx as 755

contents:


start_modules(){
echo ls -l /dev/tty* >> /volume1/Public/tmp/zwavelog.txt
chown -R root.uucp /var/lock
chmod -R g+w /var/lock
}

stop_modules(){
echo “do nothing”
}

case “$1” in

start)
start_modules
;;

stop)
stop_modules
;;

*)
echo “usage: $0 { start | stop }” >&2
exit 1
;;

esac

exit 0


Supper find

I’m new to OpenHAB and I’m having the same problem as LeoVe.
I’m running a Synology DS1815+ with DSM 6.07321 I have OpenHAB 1.8.2, the latest HABmin, and the demo running.

I plugged in the Aeon Gen 5 z-wave stick and the Synology sees the device and assigns it /dev/ttyACM0, it even shows it plugged into the system via the control panel.

[ 25.111311] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
[ 25.120340] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[ 25.128397] usbcore: registered new interface driver cdc_acm

I followed these steps as per the previous posts:

  • created a dialout group via DSM
  • created a uucp group via DSM
  • assigned the openhab user to both groups via DSM
  • ran chown -R root.dialout /dev/ttyACM0 as root
  • ran chmod 660 /dev/ttyACM0 as root
  • ran chown -R root.uucp /var/lock as root
  • ran chmod -R g+w /var/lock/ as root
  • Created a file named openhab-zwave.rules in /lib/udev/rules.d with this content:
  • ACTION==“add”, KERNEL==“ttyACM0”, MODE=“0660”, GROUP=“dialout” as root
  • restarted the DSM, and reran ran chown -R root.uucp /var/lock as root & ran chmod -R g+w /var/lock/ as root

When I run ls -l /dev/ttyACM0 I get:

  • crw-rw---- 1 root dialout 166, 0 Mar 31 02:09 /dev/ttyACM0

My openhab.log still tells me:

23:46:38.991 [ManagedService Update Queue] ERROR o.o.b.z.i.protocol.ZWaveController - Serial Error: Port /dev/ttyACM0 does not exist

23:46:38.997 [org.openhab.core.internal.logging.OSGILogListener$NLogListener@99d7fe9] ERROR OSGi - port : Port /dev/ttyACM0 does not exist
org.openhab.binding.zwave.internal.protocol.SerialInterfaceException: Port /dev/ttyACM0 does not exist

Did I miss a step? I realize that the lock permissions will need to be reassigned every reboot without a script, but I can’t get it to run at all.

Try to just reinstall the package spk so that all files from openhab have the correct permissions.
The rest of the commands i use to exept the 660 is not needed in 5.2, i do not have 6 installed

Normally it should not mather what stick or port.

Grtz

I have reinstalled several times. I can run the debug as root and I can see my devices nodes 2, 3, &4 and they send update events.

However I don’t see the values updating on the UI (standard) and if I go back to launching from DSM now I get a does not exist even though it is there. I even tired adding -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 to start.sh as suggested on another thread. no dice.

19:31:06.357 [ManagedService Update Queue] INFO  o.o.b.z.i.protocol.ZWaveController - Starting Z-Wave controller
19:31:06.358 [ManagedService Update Queue] INFO  o.o.b.z.i.protocol.ZWaveController - Z-Wave timeout is set to 5000ms. Soft reset is false.
19:31:06.358 [ManagedService Update Queue] INFO  o.o.b.z.i.protocol.ZWaveController - Connecting to serial port /dev/ttyACM0
19:31:06.421 [ManagedService Update Queue] ERROR o.o.b.z.i.protocol.ZWaveController - Serial Error: Port /dev/ttyACM0 does not exist
19:31:06.426 [NTP Refresh Service] INFO  o.o.c.service.AbstractActiveService - NTP Refresh Service has been started
19:31:06.426 [NTP Refresh Service] DEBUG o.o.binding.ntp.internal.NtpBinding - There is no existing NTP binding configuration => refresh cycle aborted!
19:31:06.434 [org.openhab.core.internal.logging.OSGILogListener$NLogListener@4233cd6] ERROR OSGi - port : Port /dev/ttyACM0 does not exist
org.openhab.binding.zwave.internal.protocol.SerialInterfaceException: Port /dev/ttyACM0 does not exist

config

################################ Z-Wave  Binding ######################################
#
# The Z-Wave controller port. Valid values are e.g. COM1 for Windows and /dev/ttyS0 or
# /dev/ttyUSB0 for Linux
zwave:port=/dev/ttyACM0

# Z-Wave nightly heal time. This is the hour (eg 2AM) at which the automatic nightly
# network heal will be performed.
zwave:healtime=4
#zwave:masterController=True

items

group All
Group Main_Floor	(All)
Group Basement		(All)
Group Second_Floor	(All)
Group Doors			(All)
Group Batteries		(All)

Contact frontdoor_sensor    "Front door is [%s]"                   	<door>				(Doors,Main_Floor)          		{zwave="2:command=BASIC"}
Number  frontdoor_battery   "Front door sensor battery [%d %%]"    	<battery>       	(Batteries)                			{zwave="2:command=BATTERY"}

Contact sidedoor_sensor    "Side door is [%s]"                     	<door>	            (Doors,Main_Floor)          		{zwave="3:command=BASIC"}
Number  sidedoor_battery   "Side door sensor battery [%d %%]"      	<battery>   	    (Batteries)               			{zwave="3:command=BATTERY"}

Contact Motion_Main_Floor "Motion [MAP(motion.map):%s]" 			<motion>			(Main_Floor) 						{zwave="4:command=sensor_binary,respond_to_basic=true" }
/*Number Alarm_Main_Floor "Alarm: [%s]" 													(Main_Floor) 						{zwave="4:command=alarm" }*/
Number Temp_Main_Floor "Temperature: [%.1f °C]" 					<temperature>		(Main_Floor) 						{zwave="4:command=sensor_multilevel,sensor_type=1,sensor_scale=0" }
Number Humid_Main_Floor "Humidity: [%.0f %%]" 											(Main_Floor) 						{zwave="4:command=sensor_multilevel,sensor_type=5" }
Number Lumin_Main_Floor "Luminance: [%.0f Lux]" 										(Main_Floor) 						{zwave="4:command=sensor_multilevel,sensor_type=3" }
Number UV_Main_Floor "Luminance: [UV index %d]" 										(Main_Floor) 						{zwave="4:command=sensor_multilevel,sensor_type=27" }
Number Battery_Main_Floor "Battery: [%d %%]" 						<battery> 			(Batteries) 						{zwave="4:command=battery" }

sitemp

sitemap piggpin label="Home"
{
  Frame label="Pig Pen" {
  	Text label="Main Floor" icon="groundfloor"{
  		Group item=Main_Floor
  		Text item=frontdoor_sensor
  		Text item=sidedoor_sensor
  		Text item=Temp_Main_Floor
  		
  }
  Text label="Second Floor" icon="firstfloor"{
  	Group item=Second_Floor
  	}
  Text label="Basement" icon="cellar"{
  	Group item=Basement
  	}  
  }
}

I got some feedback from a friend and he suggested that I edit the start-stop-status.sh and add chmod 777 /dev/ttyACM0 and chmod 777 /run/lock/

It worked. I know that 777 is bad juju but I tried that on the command line for the device and it didn’t help. Wan it /run/lock? I already had /var/lock set as root.uucp and openhab was added to the group.

First thing, never run openhab as root, it will change a lot of files on synology, other systems no problem i think.

The last comment i see that you change rights on the device and its lockfile en thats correct, that is how it works for me to.
Search google for how to install openhab on xpenology, you will find a tut i wrote in the old forums.

Grtz

After the last update Synology replaced the lock files, the .sh file in my post needs to be amended, this worked for me:

NasTV> cat /usr/syno/etc.defaults/rc.d/S98openhabzwave.sh

start_modules(){
echo ls -l /dev/tty* >> /volume1/Public/tmp/zwavelog.txt
chown -R root.uucp /run/lock
chmod -R g+w /run/lock
chown -R root.uucp /var/lock
chmod -R g+w /var/lock
}
stop_modules(){
echo “do nothing”
}
case “$1” in
start)
start_modules
;;
stop)
stop_modules
;;
*)
echo “usage: $0 { start | stop }” >&2
exit 1
;;
esac
exit 0

Another Synology/Z-Stick problem…

I’m running OpenHAB2 on a DS214play, and finally (after trying a million different things from different webpages, including some of what’s above) got OpenHAB2 to see the z-stick when I ran start.sh from the commandline as root. If I run it from the package manager OpenHAB2 tells me that /dev/ttyACM0 doesn’t exist.

Can someone please advise me of the best way to cure this (what I guess is a rights) issue so that I can run Openhab as a normal package?

Thanks.

After further testing I discovered that my startup script wasn’t executing, presumably because it wasn’t 755’d as specified here:-
https://developer.synology.com/developer-guide/integrate_dsm/run_with_system_boot.html

It wouldn’t let me change the status of the script in the startup directory (/usr/local/etc/rc.d/ for DSM6), but it would let me delete it.

So I created and 755’d the file in another directory, and then moved it to the startup directory, and then everything worked as it should.

Thank gawd. :slight_smile: