Setup HUSBZB-1 (EMBER EM35x Coordinator) Help Please

Greetings,

I’m having some difficulty on my Linux Mint 18.2 system with ZULU Java installed. OpenHAB 2. A friend tried on his Windows machine with similar issues, so I could use a step by step to get this newbie up and running, please!!

The controller…

First, this is what $ dmesg | grep tty shows…

[    0.000000] console [tty0] enabled
[   25.691024] usb 8-1.1: cp210x converter now attached to ttyUSB0
[   25.704233] usb 8-1.1: cp210x converter now attached to ttyUSB1
[   26.218733] cp210x ttyUSB1: failed set req 0x1e size 4 status: -32
[   26.218738] cp210x ttyUSB1: failed to set baud rate to 300

I added the zigbee and z-wave bindings, went to search for things, selected the Ember EM35x NCP coordinator option, and installed the zigbee side of my controller on ttyUSB0. It is stuck at “initializing”. I read in other threads that the baud rate needs to be set at 57600, but I don’t know where or how to set that.

Secondly, when I add the z-wave side of the controller to ttyUSB1, it shows offline with a communication error. I assume because of the error I listed above from my dmesg printout.

I’m not a programmer here, so go gentle. LOL. But any help here would be greatly appreciated. I’m just trying to get set up to begin messing with this software, and see what it can do. I have lots of zigbee devices, and hue lighting. I’d love to get the receivers up and running so I can tinker.

Where to start, please!! And thanks!

I get these too… and my QuickStick is functional.

My ports are symlinked in case they ever changed, but ttyUSB0 is zwave and ttyUSB1 is zigbee. It looks like you either you have yours swapped or they came up differently than mine. If the former, this is likely the issue with the zwave binding.

Did you set it up in Habmin or PaperUI? Either way, the port configuration option will be available when setting up the coordinator, just slightly different between the UIs. Are you using the 2.2.0 snapshot version of the zigbee binding? If not, uninstall the binding and copy the one here into your addons folder.

Scott,

I installed the Zigbee 2.1 binding from PaperUI. I don’t find the add-ons folder anywhere, so where do I copy this information? Are the options different on the 2.2 binding?

Tried installing the z-wave on ttyUSB0 and it still shows my z-wave as offline. Error is…

zwave.thingstate.serial_notfound

I’ve uninstalled all bindings and things and we’ll start from scratch once I get some instruction. A bit lost here. To be clear, I haven’t done anything at this point. It’s an out of the box 2.1 install.

http://docs.openhab.org/installation/linux.html#file-locations

Yes, there have been several updates. The baud rate setting looks like it was committed on July 4th. You can check the version (includes date) of your binding by running bundle:list in the Karaf console, but I’m sure the baud settings were after 2.1.

Do you have the serial binding installed? What errors do you see in the log on startup?

Sorry… Totally new here.

I only checked the folders I learned from the article about what to backup. Assumed your add-ons would be there. I found it now. Nothing in there right now, and nope, didn’t realize you needed the serial binding separate? I suppose I should install that first? Good grief.

So serial binding, then the z-wave setup on ttyUSB0? Then install the 2.2 zigbee binding and install that on ttyUSB1?

And thanks for the patience, but do I just copy the files you pointed me to into the add-on folder? Anything special to know there?

Only the manually added bindings will be in this folder. I’m running the development zwave binding and I don’t recall if PaperUI installs the serail binding as a dependency. I’m pretty sure it does. Install zwave and check if the serial binding is installed… if not, click it :slight_smile:. I’m pretty sure zwave will be on ttyUSB0. There are also some permissions on the serial port that you may need to setup too. The log will be very helpful. log:set DEBUG org.openhab.binding.zwave in the Karaf console.

You only need to copy in the jar file.

No - it won’t install the serial binding - it will install the serial transport (ie serial drivers), but not the serial binding.

No such luck. Installed the serial binding, Zigbee 2.2 and Z-Wave 2.1 bindings… Added openHAB to the dialout and tty groups… I added the things, and I get both interfaces showing offline.

2017-09-18 18:25:58.286 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2017-09-18 18:25:58.292 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2017-09-18 18:25:58.298 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2017-09-18 18:28:28.325 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://172.16.0.110:8080
2017-09-18 18:28:28.333 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://172.16.0.110:8443
2017-09-18 18:28:28.490 [INFO ] [andler.ZigBeeCoordinatorEmberHandler] - Connecting to serial port [ttyUSB1] at 57600
2017-09-18 18:28:28.736 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-09-18 18:28:28.783 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-09-18 18:28:28.837 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-09-18 18:28:30.677 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port 'ttyUSB0'

==> /var/log/openhab2/events.log <==
2017-09-18 18:25:58.119 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:52977b35' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-09-18 18:25:58.228 [ThingRemovedEvent         ] - Thing 'zigbee:coordinator_ember:9dbb2e4f' has been removed.
2017-09-18 18:25:58.229 [ThingRemovedEvent         ] - Thing 'zwave:serial_zstick:52977b35' has been removed.
2017-09-18 18:28:27.181 [ThingAddedEvent           ] - Thing 'zigbee:coordinator_ember:9dbb2e4f' has been added.
2017-09-18 18:28:27.269 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:9dbb2e4f' changed from UNINITIALIZED to INITIALIZING
2017-09-18 18:28:27.311 [ThingAddedEvent           ] - Thing 'zwave:serial_zstick:52977b35' has been added.
2017-09-18 18:28:28.635 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_ember:9dbb2e4f' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Serial Error: PortttyUSB1 does not exist
2017-09-18 18:28:30.676 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:52977b35' changed from UNINITIALIZED to INITIALIZING
2017-09-18 18:28:30.683 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:52977b35' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-09-18 18:28:30.702 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:52977b35' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound

Next?

What OS are you using? The names of the ports look strange - it doesn’t look like it’s Windoze, and for Linux, the should look like /dev/ttyUSB0 or something like that - not just ttyUSB0.

Using Linux Mint 18.2.

dmesg | grep tty
[    0.000000] console [tty0] enabled
[   23.877678] usb 8-1.1: cp210x converter now attached to ttyUSB0
[   23.885093] usb 8-1.1: cp210x converter now attached to ttyUSB1
[   24.306538] cp210x ttyUSB1: failed set req 0x1e size 4 status: -32
[   24.306543] cp210x ttyUSB1: failed to set baud rate to 300

strange - never seen this. What if you resort to good old ls?

ie - ls /dev/tty* - what does that show?

/dev/tty /dev/tty13 /dev/tty19 /dev/tty24 /dev/tty3 /dev/tty35 /dev/tty40 /dev/tty46 /dev/tty51 /dev/tty57 /dev/tty62 /dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8
/dev/tty0 /dev/tty14 /dev/tty2 /dev/tty25 /dev/tty30 /dev/tty36 /dev/tty41 /dev/tty47 /dev/tty52 /dev/tty58 /dev/tty63 /dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9
/dev/tty1 /dev/tty15 /dev/tty20 /dev/tty26 /dev/tty31 /dev/tty37 /dev/tty42 /dev/tty48 /dev/tty53 /dev/tty59 /dev/tty7 /dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4 /dev/ttyUSB0
/dev/tty10 /dev/tty16 /dev/tty21 /dev/tty27 /dev/tty32 /dev/tty38 /dev/tty43 /dev/tty49 /dev/tty54 /dev/tty6 /dev/tty8 /dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5 /dev/ttyUSB1
/dev/tty11 /dev/tty17 /dev/tty22 /dev/tty28 /dev/tty33 /dev/tty39 /dev/tty44 /dev/tty5 /dev/tty55 /dev/tty60 /dev/tty9 /dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6
/dev/tty12 /dev/tty18 /dev/tty23 /dev/tty29 /dev/tty34 /dev/tty4 /dev/tty45 /dev/tty50 /dev/tty56 /dev/tty61 /dev/ttyprintk /dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7

Sorry, but there it is. LOL

So now I would suggest to change the ports to /dev/ttyUSB0 (etc) - it’s highly likely to solve your problem based on this.

I did, might have to restart the PC… Let me try that and let you know.

You shouldn’t need to restart the PC - it won’t change the port - just restart the binding.

Tried deleting and recreating the coordinator things. My z-wave is online, but the zigbee portion stuck at initializing, even after restarting the PC.

Try setting up the logging for zigbee to get more details in the log…

Tried to recreate the zigbee controller with debugging on, and this is what it shows…

==> /var/log/openhab2/openhab.log <==
2017-09-18 19:21:48.460 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
2017-09-18 19:21:48.460 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2017-09-18 19:21:48.460 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2017-09-18 19:21:48.460 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-09-18 19:21:48.461 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2017-09-18 19:21:48.461 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [93C0].
2017-09-18 19:21:53.456 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zigbee:coordinator_ember:30f50753' takes more than 5000ms.
2017-09-18 19:21:53.458 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [21F8E993428602C5].
2017-09-18 19:21:53.464 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-09-18 19:21:53.465 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-09-18 19:21:53.466 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Creating random ZigBee network key.
2017-09-18 19:21:53.469 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee network key.

==> /var/log/openhab2/events.log <==
2017-09-18 19:21:53.463 [ThingUpdatedEvent         ] - Thing 'zigbee:coordinator_ember:30f50753' has been updated.

==> /var/log/openhab2/openhab.log <==
2017-09-18 19:21:53.470 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialised String 8A 11 44 5E A1 90 53 D7 CA A9 46 C7 EE F2 1E D9
2017-09-18 19:21:53.473 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialised array [138, 17, 68, 94, 161, 144, 83, 215, 202, 169, 70, 199, 238, 242, 30, 217]
2017-09-18 19:21:53.473 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key final array [138, 17, 68, 94, 161, 144, 83, 215, 202, 169, 70, 199, 238, 242, 30, 217]
2017-09-18 19:21:53.473 [DEBUG] [andler.ZigBeeCoordinatorEmberHandler] - ZigBee Coordinator Ember opening Port:'/dev/ttyUSB1' PAN:93c0, EPAN:21F8E993428602C5, Channel:-1
2017-09-18 19:21:53.473 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start

==> /var/log/openhab2/events.log <==
2017-09-18 19:21:53.475 [ThingUpdatedEvent         ] - Thing 'zigbee:coordinator_ember:30f50753' has been updated.
2017-09-18 19:21:53.476 [ThingUpdatedEvent         ] - Thing 'zigbee:coordinator_ember:30f50753' has been updated.
2017-09-18 19:21:53.483 [ThingUpdatedEvent         ] - Thing 'zigbee:coordinator_ember:30f50753' has been updated.

==> /var/log/openhab2/openhab.log <==
2017-09-18 19:21:54.473 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2017-09-18 19:21:54.474 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2017-09-18 19:21:54.474 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_ember:30f50753
2017-09-18 19:21:54.474 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_ember:30f50753
2017-09-18 19:21:54.476 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=298, service.bundleid=184, service.scope=singleton} - org.openhab.binding.zigbee
2017-09-18 19:21:54.476 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialise [138, 17, 68, 94, 161, 144, 83, 215, 202, 169, 70, 199, 238, 242, 30, 217]
2017-09-18 19:21:54.477 [INFO ] [andler.ZigBeeCoordinatorEmberHandler] - Connecting to serial port [/dev/ttyUSB1] at 57600
2017-09-18 19:21:54.493 [INFO ] [andler.ZigBeeCoordinatorEmberHandler] - Serial port [/dev/ttyUSB1] is initialized.
2017-09-18 19:21:54.494 [WARN ] [bee.dongle.ember.ash.AshFrameHandler] - Trying to send when not connected.
2017-09-18 19:21:55.872 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initResponse is NOT_JOINED
2017-09-18 19:21:55.872 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initializeNetwork is true
2017-09-18 19:21:57.551 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialise done....... 21  65535  21F8E993428602C5

==> /var/log/openhab2/events.log <==
2017-09-18 19:21:57.554 [ThingUpdatedEvent         ] - Thing 'zigbee:coordinator_ember:30f50753' has been updated.

==> /var/log/openhab2/openhab.log <==
2017-09-18 19:22:09.064 [ERROR] [bee.dongle.ember.ash.AshFrameHandler] - <-- RX ASH frame: BAD PACKET 11 11 57 4E A1 9C C5 26 54 9A

Did you set the EXTRA_JAVA_OPTS for both ports?

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