Cannot find location of Aeon USB Stick

Just follow the steps from the docs, that is all you need:

http://docs.openhab.org/installation/linux.html#privileges-for-common-peripherals

Yes, indeed - I added openhab to dialout and tty as shown there when I followed those instructions previously.

Checked again and confirmed:

The user `openhab' is already a member of `dialout'.

Same for tty:

The user openhab' is already a member of `tty'

Looks like I did uncomment and “adapt” the recommended line of code to /etc/default/openhab2 as well. Perhaps there is a mistake here? My openhabian system doesn’t seem to have ttyS* so these are not included:

[18:19:38] root@openHAB:~# grep 'EXTRA_JAVA_OPTS="-' /etc/default/openhab2

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyAMA0"

I wasn’t very detailed in my previous post, so I apologize. This is the basis from which I meant to ask if anything further needs to be done. :upside_down_face:

Interesting. I just rebooted my RasPi again and I notice that the Paper UI shows the following on the thing’s page:

Status: OFFLINE - COMMUNICATION_ERROR zwave.thingstate.serial_notfound

Instead of this, as I noted yesterday:

Status: OFFLINE - BRIDGE_OFFLINE Controller is offline

Still digging to see what I may have missed. Perhaps someone with a working Aeon USB Stick setup under openhab2/openhabian could share their EXTRA_JAVA_OPTS line (if it differs from mine) or other experience along these lines.

One last thing. Looking at the logs, I saw some issues apparently related to the Z-Wave network key:

2017-11-12 22:55:47.246 [ERROR] [mmandclass.ZWaveSecurityCommandClass] - Error parsing zwave:networkKey
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.hexStringToByteArray(ZWaveSecurityCommandClass.java:1053)
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.setRealNetworkKey(ZWaveSecurityCommandClass.java:948)
	at org.openhab.binding.zwave.handler.ZWaveControllerHandler.handleConfigurationUpdate(ZWaveControllerHandler.java:299)
2017-11-12 22:55:47.319 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2017-11-12 22:55:47.319 [ThingUpdatedEvent         ] - Thing 'zwave:serial_zstick:5900b29b' has been updated.
2017-11-12 22:55:47.321 [ERROR] [ome.io.rest.core.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/zwave:serial_zstick:5900b29b/config' for thing 'zwave:serial_zstick:5900b29b': The service has been unregistered
2017-11-12 23:00:48.612 [ERROR] [mmandclass.ZWaveSecurityCommandClass] - Error parsing zwave:networkKey
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.hexStringToByteArray(ZWaveSecurityCommandClass.java:1053)
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.setRealNetworkKey(ZWaveSecurityCommandClass.java:948)
	at org.openhab.binding.zwave.handler.ZWaveControllerHandler.handleConfigurationUpdate(ZWaveControllerHandler.java:299)

Curiously, when I change the network key in the Paper UI as an experiment I get a 500 server error in the browser. I think this corresponds to the HTTP PUT exception here in the log.

I switched secure inclusion mode for the Z-Wave Serial Controller to “Do Not Use Security” and then back again hoping to resolve the key issue; result:

2017-11-12 23:36:01.064 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_5900b29b_serial_nak-zwave:serial_zstick:5900b29b:serial_nak' has been added.
2017-11-12 23:36:01.074 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_5900b29b_serial_oof-zwave:serial_zstick:5900b29b:serial_oof' has been added.
2017-11-12 23:36:01.099 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_5900b29b_serial_sof-zwave:serial_zstick:5900b29b:serial_sof' has been added.
2017-11-12 23:36:01.109 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_5900b29b_serial_ack-zwave:serial_zstick:5900b29b:serial_ack' has been added.
2017-11-12 23:36:01.133 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_5900b29b_serial_can-zwave:serial_zstick:5900b29b:serial_can' has been added.
2017-11-12 23:36:01.386 [ThingAddedEvent           ] - Thing 'zwave:serial_zstick:5900b29b' has been added.
2017-11-12 23:36:10.186 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:5900b29b' changed from UNINITIALIZED to INITIALIZING
2017-11-12 23:36:15.188 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zwave:serial_zstick:5900b29b' takes more than 5000ms.
2017-11-12 23:36:15.213 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2017-11-12 23:36:15.215 [ThingUpdatedEvent         ] - Thing 'zwave:serial_zstick:5900b29b' has been updated.
2017-11-12 23:36:15.241 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:5900b29b' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-11-12 23:36:15.354 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-11-12 23:36:15.381 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-11-12 23:36:15.411 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2017-11-12 23:36:15.414 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2017-11-12 23:46:18.942 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-11-12 23:46:18.963 [ThingUpdatedEvent         ] - Thing 'zwave:serial_zstick:5900b29b' has been updated.
2017-11-12 23:46:19.157 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2017-11-12 23:46:19.180 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2017-11-12 23:46:19.192 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-11-12 23:46:19.193 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-11-12 23:46:19.195 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2017-11-12 23:46:19.197 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

Now it’s back to:

Status: OFFLINE - BRIDGE_OFFLINE Controller is offline

:rofl:

Do a

dmesg -T | grep tty

to find the correct port for your stick. If only one usb device is connetect to a RPi, it is almost never AMA0.

1 Like

So, it seemed like ttyAMA0 to me based on almost everyone else’s examples and questions here, but repeating this with the device connected and disconnected was extremely helpful and clarifying:

[Sun Nov 12 23:35:01 2017] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[Sun Nov 12 23:35:04 2017] usb 1-1.5: cp210x converter now attached to ttyUSB0
[Sun Nov 12 23:51:18 2017] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[Sun Nov 12 23:51:23 2017] usb 1-1.5: cp210x converter now attached to ttyUSB0
[Mon Nov 13 00:34:22 2017] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[Mon Nov 13 00:35:52 2017] usb 1-1.5: cp210x converter now attached to ttyUSB0

Thanks for this sihui!

It’s funny, I wonder how many other folks are chasing their tail on this one. Switching from /dev/ttyAMA0 to /dev/ttvUSB0 under “Serial Port” in the Paper UI was all I needed.

1 Like