GoControl USB stick - serial port not found

I just got a GoControl USB stick (https://www.amazon.com/GoControl-CECOMINOD016164-HUSBZB-1-USB-Hub/dp/B01GJ826F8) that I’m trying to get set up with OpenHAB. I’m attempting to add the device as a Zigbee coordinator Thing (will do Z-Wave after - I just have Sengled Zigbee bulbs to test with right now), and in both the Paper and HABmin UIs when I try to add it using the Zigbee binding > Ember coordinator, the serial port for this device does not appear in the dropdown. The only entry in the dropdown is /dev/ttyArduinoUno, which is a udev symlink for a MySensors serial gateway that has been functioning just fine for a few months.

I am running Ubuntu 14.04 amd64 and OpenHAB 2.4. I have made sure that the openhab user is in the tty and dialout groups and the openhab process is running under the openhab user. I used lsusb and dmesg to get the vendor/product IDs and serial for the device and set up /etc/udev/rules.d/99-usb-serial.rules to set up a /dev/ttyZigbee symlink that points to /dev/ttyUSB0, which is owned by root:dialout and has read/write permissions for both self and group. I modified /etc/default/openhab2 to include EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyZigbee:/dev/ttyUSB0". I heard about some serial port issues with different JREs, and even though this seemed to mainly be for 64-bit ARM I tried installing and switching to the recommended Zulu Java 8 JRE just to be sure. I’ve restarted OpenHAB and my computer multiple times.

I’ve also tried adding the Thing by editing /etc/openhab2/things/default.things to include Thing zigbee:coordinator_ember:45bc1f9a "ZigBee Coordinator" @ "Apartment" [ zigbee_port="/dev/ttyZigbee", zigbee_baud="57600", zigbee_flowcontrol=2 ], and when I save and the Things reload (or I restart OpenHAB), I get the following in my logs (with debug logs enabled for Zigbee):

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.263 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from OFFLINE (COMMUNICATION_ERROR) to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.271 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Start.
2019-01-04 22:54:33.280 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Done.
2019-01-04 22:54:33.282 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.zigbee.ember.handler.EmberHandler@4f4d40e6': null
java.lang.NullPointerException: null
	at com.zsmartsystems.zigbee.app.discovery.ZigBeeDiscoveryExtension.extensionShutdown(ZigBeeDiscoveryExtension.java:96) ~[?:?]
	at com.zsmartsystems.zigbee.ZigBeeNetworkManager.shutdown(ZigBeeNetworkManager.java:529) ~[?:?]
	at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.dispose(ZigBeeCoordinatorHandler.java:303) ~[?:?]
	at org.openhab.binding.zigbee.ember.handler.EmberHandler.dispose(EmberHandler.java:128) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2019-01-04 22:54:33.286 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while disposing handler of thing 'zigbee:coordinator_ember:45bc1f9a': null
java.lang.NullPointerException: null
	at com.zsmartsystems.zigbee.app.discovery.ZigBeeDiscoveryExtension.extensionShutdown(ZigBeeDiscoveryExtension.java:96) ~[?:?]
	at com.zsmartsystems.zigbee.ZigBeeNetworkManager.shutdown(ZigBeeNetworkManager.java:529) ~[?:?]
	at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.dispose(ZigBeeCoordinatorHandler.java:303) ~[?:?]
	at org.openhab.binding.zigbee.ember.handler.EmberHandler.dispose(EmberHandler.java:128) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2019-01-04 22:54:33.294 [DEBUG] [org.openhab.binding.zigbee.ember    ] - ServiceEvent UNREGISTERING - {org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler}={service.id=317, service.bundleid=217, service.scope=singleton} - org.openhab.binding.zigbee.ember
2019-01-04 22:54:33.295 [DEBUG] [org.openhab.binding.zigbee.ember    ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.firmware.FirmwareUpdateHandler}={service.id=318, service.bundleid=217, service.scope=singleton} - org.openhab.binding.zigbee.ember

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.299 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.328 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.things'
2019-01-04 22:54:33.334 [DEBUG] [org.openhab.binding.zigbee.ember    ] - ServiceEvent REGISTERED - {org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler}={service.id=393, service.bundleid=217, service.scope=singleton} - org.openhab.binding.zigbee.ember
2019-01-04 22:54:33.336 [DEBUG] [org.openhab.binding.zigbee.ember    ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.firmware.FirmwareUpdateHandler}={service.id=394, service.bundleid=217, service.scope=singleton} - org.openhab.binding.zigbee.ember
2019-01-04 22:54:33.338 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - Initializing ZigBee Ember serial bridge handler.
2019-01-04 22:54:33.339 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_ember:45bc1f9a].

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.339 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.340 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel 0
2019-01-04 22:54:33.340 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2019-01-04 22:54:33.340 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2019-01-04 22:54:33.341 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2019-01-04 22:54:33.341 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key 5A 69 67 42 65 65 41 6C 6C 69 61 6E 63 65 30 39
2019-01-04 22:54:33.342 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Config: zigbee_initialise found, initializeNetwork=false
2019-01-04 22:54:33.342 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ExtendedPanId or PanId not set: initializeNetwork=true
2019-01-04 22:54:33.342 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2019-01-04 22:54:33.342 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key initialised 276F2A2DD6C5BE7BB7C34ECDE852B8E7
2019-01-04 22:54:33.343 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key final array 276F2A2DD6C5BE7BB7C34ECDE852B8E7
2019-01-04 22:54:33.343 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String 5A 69 67 42 65 65 41 6C 6C 69 61 6E 63 65 30 39
2019-01-04 22:54:33.343 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2019-01-04 22:54:33.343 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel set to 11.
2019-01-04 22:54:33.345 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [C160].

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.345 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_ember:45bc1f9a' has been updated.

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.345 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [EF82F3566B7D67BB].
2019-01-04 22:54:33.346 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link key final array 5A6967426565416C6C69616E63653039

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.347 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_ember:45bc1f9a' has been updated.

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.347 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - ZigBee Ember Coordinator opening Port:'/dev/ttyZigbee' PAN:c160, EPAN:EF82F3566B7D67BB, Channel:11

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.347 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_ember:45bc1f9a' has been updated.

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:33.347 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:33.348 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_ember:45bc1f9a' has been updated.
2019-01-04 22:54:33.348 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from INITIALIZING to UNKNOWN
2019-01-04 22:54:33.351 [nt.FirmwareStatusInfoEvent] - Firmware status of thing zigbee:coordinator_ember:45bc1f9a changed to UNKNOWN.

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:34.349 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2019-01-04 22:54:34.349 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2019-01-04 22:54:34.351 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Start.
2019-01-04 22:54:34.357 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Done.
2019-01-04 22:54:34.362 [DEBUG] [ding.zigbee.handler.ZigBeeSerialPort] - Connecting to serial port [/dev/ttyZigbee] at 57600 baud, flow control FLOWCONTROL_OUT_XONOFF.
2019-01-04 22:54:34.363 [ERROR] [ding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port /dev/ttyZigbee does not exist.
2019-01-04 22:54:34.363 [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - Unable to open Ember serial port
2019-01-04 22:54:34.369 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=OFFLINE

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:34.375 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from UNKNOWN to OFFLINE: Failed to open communications port

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:34.378 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=UNINITIALISED
2019-01-04 22:54:34.379 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.things'

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:34.383 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:45bc1f9a' changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)

==> /var/log/openhab2/openhab.log <==
2019-01-04 22:54:34.386 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Start.
2019-01-04 22:54:34.386 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Done.
2019-01-04 22:54:34.387 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.openhab.binding.zigbee.ember.handler.EmberHandler@13b8590b': null
java.lang.NullPointerException: null
	at com.zsmartsystems.zigbee.app.discovery.ZigBeeDiscoveryExtension.extensionShutdown(ZigBeeDiscoveryExtension.java:96) ~[?:?]
	at com.zsmartsystems.zigbee.ZigBeeNetworkManager.shutdown(ZigBeeNetworkManager.java:529) ~[?:?]
	at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.dispose(ZigBeeCoordinatorHandler.java:303) ~[?:?]
	at org.openhab.binding.zigbee.ember.handler.EmberHandler.dispose(EmberHandler.java:128) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:206) ~[?:?]
	at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.thingUpdated(ZigBeeCoordinatorHandler.java:315) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

==> /var/log/openhab2/events.log <==
2019-01-04 22:54:34.394 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_ember:45bc1f9a' has been updated.

What might be going wrong? One debugging step I’m interested in is how the dropdown options for the serial ports are generated. I was reading that rxtx will look for /dev/ttyS* on Linux, and that the Java command line option gnu.io.rxtx.SerialPorts I’ve supplied would override that, but neither of those seem to be true in my case.

Thank you,
Matt

Have you checked the openhab group members? Make sure that tty and dialout is added to the openhab group.

Serial Error: Port /dev/ttyZigbee does not exist.

Also from the karaf console check that openhab-transport-serial feature is installed. If not then add with feature:install openhab-transport-serial

Thank you for your response!

I checked that the openhab user is part of both the tty and dialout groups:

$ groups openhab
openhab : openhab tty dialout

I’ve also verified that the permissions for /dev/ttyZigbee (and /dev/ttyUSB0, which it points to) should allow the dialout group to read and write:

$ ls -l /dev/ttyZigbee /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jan  2 07:55 /dev/ttyUSB0
lrwxrwxrwx 1 root root         7 Jan  1 21:39 /dev/ttyZigbee -> ttyUSB0

And also, that the openhab process is actually running as the openhab user so the process itself should be able to access the serial port:

$ ps aux | grep openhab
mmalloz+ 20040  0.0  0.0  44152  2940 pts/4    S+   10:02   0:00 ssh -p 8101 openhab@localhost
mmalloz+ 20229  0.0  0.0  15940   932 pts/14   S+   10:06   0:00 grep --color=auto openhab
openhab  26565  0.0  0.0   4444   792 ?        S    Jan04   0:00 /bin/sh /usr/share/openhab2/runtime/bin/karaf server
openhab  26683  1.4  5.6 5823912 460388 ?      Sl   Jan04  10:10 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Djava.library.path=/var/lib/openhab2/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Djava.library.path=/var/lib/openhab2/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -XX:+UseG1GC -Djava.awt.headless=true -XX:+UseG1GC -Dgnu.io.rxtx.SerialPorts=/dev/ttyZigbee:/dev/ttyUSB0:/dev/ttyUSB1 -Djava.endorsed.dirs=/usr/lib/jvm/zulu-8-amd64/jre/lib/endorsed:/usr/lib/jvm/zulu-8-amd64/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/zulu-8-amd64/jre/lib/ext:/usr/lib/jvm/zulu-8-amd64/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/var/lib/openhab2/tmp/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.logs=/var/log/openhab2 -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/activation-1.1.1.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-api-2.3.0.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-core-2.2.11.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-impl-2.2.11.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

I had already installed openhab-transport-serial for a MySensors serial and it’s been working for that, but I verified:

openhab> feature:install openhab-transport-serial
openhab> feature:info openhab-transport-serial
Feature openhab-transport-serial 2.4.0
Description:
  Serial Transport
Feature has no configuration
Feature has no configuration files
Feature depends on:
  esh-io-transport-serial-rfc2217 0.0.0
  esh-config-serial 0.0.0
  esh-config-discovery-usbserial 0.0.0
Feature contains followed bundles:
  mvn:org.openhab/nrjavaserial/3.15.0.OH2
Feature has no conditionals.

I’m quite stumped :\

I’m with you on this one.:expressionless:

If you use ls -al /dev do you see a serial0 and serial1 with a soft link? Not sure if this info will help or not but on my server both serial is root:root I have soft links to ttyAMA0 and ttyS0 and they are root:dialout.

@chris, I can’t find the PR… was the USB discovery removed before the 2.4 release?

I don’t have /dev/serial* devices, but I do have a /dev/serial/ directory which seems to just have symlinks for alternate ways of identifying these same devices. But /dev/ttyUSB0 and 1 seem to be the master devices that everything else links to. The symlinks all seem to be root:root, but with 777 permissions the openhab user shouldn’t have any difficulty traversing those to get to /dev/ttyUSB0 and 1 which have 770 permissions but root:dialout ownership.

I’m trying to understand the source code to see where the list of serial devices in the dropdown comes from, if I can understand that then I might be able to figure out what is filtering out (or never seeing in the first place) my intended devices.

$ ls -al /dev/serial/**
/dev/serial/by-id:
total 0
drwxr-xr-x 2 root root 100 Jan  1 21:39 .
drwxr-xr-x 4 root root  80 Jan  1 19:57 ..
lrwxrwxrwx 1 root root  13 Jan  1 19:57 usb-Arduino__www.arduino.cc__Arduino_Uno_5563931313335190E090-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root  13 Jan  1 21:39 usb-Silicon_Labs_HubZ_Smart_Home_Controller_61200AE7-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root  13 Jan  1 21:39 usb-Silicon_Labs_HubZ_Smart_Home_Controller_61200AE7-if01-port0 -> ../../ttyUSB1

/dev/serial/by-path:
total 0
drwxr-xr-x 2 root root 100 Jan  1 21:39 .
drwxr-xr-x 4 root root  80 Jan  1 19:57 ..
lrwxrwxrwx 1 root root  13 Jan  1 21:39 pci-0000:00:1a.0-usb-0:1.1:1.0-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root  13 Jan  1 21:39 pci-0000:00:1a.0-usb-0:1.1:1.1-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root  13 Jan  1 19:57 pci-0000:00:1a.0-usb-0:1.2:1.0 -> ../../ttyACM0

Yep -:

1 Like

That PR looks like it deals with ZWave, I’m currently trying to get Zigbee working since I only have Sengled bulbs to test with, but I’ll tackle ZWave next. Does that revert mean it was removed from the 2.4 release but it’s in master/snapshots/nightly? Would it affect Zigbee initialization at all?

For some additional debugging information, this same problem seems to exist when trying to set up the ZWave side of the same USB stick - adding a ZWave controller thing gives me a dropdown that only contains /dev/ttyArduinoUno and not ttyZigbee, ttyZwave, ttyUSB0, ttyUSB1, or for some reason even ttyACM0 which ttyArduinoUno symlinks to. So any filtering logic or whatever is tripping me up is probably in common code between the two - common serial port code (rxtx library?), core OpenHAB, or common add-ons/binding code.

My next step will be to unplug the Arduino Uno serving as a MySensors gateway, and restart OpenHAB and/or my computer to see if the dropdown options change. That should at least tell us whether that dropdown list of serial devices is coming from a static list somewhere (is there something I might have accidentally overridden?) or if it’s dynamically trying to read real devices that are plugged in.

OH is definitely doing a discovery. I remember some recent posts about incompatibility with other bindings/devices… unplugging everything else sounds like a good test.

Yes, sorry, I assumed that was the question, but I hadn’t read back through and the question didn’t state the binding. There was never any discussion about removing it from ZigBee…

There are other discussions ongoing about that but those changes in ZigBee were driven by DT so I’m leaving it to them…

Please feel free to comment if this is the issue you’re having.

1 Like

Hmm… from what I understand, the issue there seems to be that when using udev to give a friendly/stable alias to the serial port, as the underlying devices changes names across reboots people are erroneously seeing the device in the inbox. I’m not seeing anything in the inbox for this at all, and I’m not able to get the Thing set up in the first place, so that thread is probably not about the same issue I’m having. I might have the same issue in a little while though once I get this first part working :slight_smile:

@chris - how is the dropdown of the list of available serial ports generated? Digging through the source it seems to be related to the <context>serial-port</context> part of the binding, present for Zigbee and ZWave and others, but I haven’t yet found where a field with that context gets its dropdown options from. Is it supposed to just reflect the java arg gnu.io.rxtx.SerialPorts when present? Or does it filter down that list somehow? Or can it come from something else entirely?

I don’t really know. It’s not part of the binding - it’s added somewhere in ESH when the context is set to serial-port, but I’m not sure where that is. Possibly it’s in one of the the .ui bundles in ESH (or maybe there’s a .ui bundle in OH - I’ve never looked for this - sorry).

@mmallozz not sure if either of these topics will help with your issue but maybe give some idea’s.:crossed_fingers:

Best of Luck.

Thank you! I ended up wiping and reinstalling OpenHAB, and then following the most basic instructions (add openhab user to tty/dialout groups, add udev rules to make symlinks to the new serial ports, add serial ports to EXTRA_JAVA_OPTS, install the Zigbee binding) and this time it worked! I’ll have to re-add my previous MySensors configuration - I backed up /var/lib/openhab2 and /etc/openhab2 for reference - and see if there was something in there incompatible with my Zigbee configuration or if it was just a fluke. But my Sengled bulbs are up and running so I’m happy! If I do come across anything concrete that seems incompatible I’ll update this thread and create an issue on Github if appropriate.

1 Like