Setup HUSBZB-1 (EMBER EM35x Coordinator) Help Please

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"

Ahhh, nope. :wink:

Some of this is a little unclear in the documentation. When running through the steps, it seems that some of this implies that it was only necessary during a manual installation, and I installed from the repository so didn’t do most of this. Hopefully, this thread will serve as a reference for others who buy this stick.

So this…

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

I just enter this command in the standard linux terminal, or the Karaf console?

There have been a few threads where people were trying to get this stick going… but they’ve mainly been about learning OH! And yes, hopefully they can all be used as a reference for others! I learn something new every time I go through the forum, and there are a lot of helpful people here who made my initial OH setup so much easier than going at it alone! :+1:

Which version of OH are you running? You can find it on the bottom of the home page/welcome screen or Karaf console after a startup. When I first setup this stick, I was stuck about where you are! It looks like after the controller was first setup, it stayed in Initializing until the binding was restarted. After creating/configuring the coordinator, what happens when you restart OH?

It was in the link with the permissions setup…
http://docs.openhab.org/installation/linux.html#privileges-for-common-peripherals

… so I thought you might have only half set it up, and was hoping that would explain why only the zwave was working. If you didn’t set it for the zwave side, then this is likely not the issue. It’s more for non-standard port names setup through udev rules. To answer your question though, you would put that line in a text file named openhab2 in /etc/default. You could try it… I don’t think it could hurt anything. Maybe try running OH as root to eliminate the possibility of a permissions issue? You said zwave was online. Have you included anything and is everything functional?

1 Like

I have no z-wave things to try. I have all kinds of zigbee devices connected to my existing alarm system though. And that’s the one that will not work at this point. I did do a lot of the steps in that document anyhow as part of troubleshooting, figuring they couldn’t hurt. Like adding the openhab user to the groups mentioned. No such luck though.

At this point, all openhab will do is zwave.

What about this?

Same thing. It just stays at initializing. I’ve rebooted the entire PC, open OpenHAB, and it’s initializing…

Wondering how the hardware on this stick works… Wouldn’t the fact that the z-wave portion is currently online rule out that there was a permission or install problem? Is there a way to test the z-wave portion of the stick short of buying things? Is zigbee passing through the same circuitry?

Seems that if the software can access ttyUSB0, then it should be able to access ttyUSB1?

OMFG!!

Keeping it family friendly… So last night I removed the controllers… Both. Restarted the PC and left it running after I’d essentially given up for the night. Just now I re-installed the z-wave portion, and it’s online. Re-installed the zigbee portion, and it went online too…!!!

Damned if I know, unless it was holding onto a configuration on the backend somewhere which has since been removed? I had initially installed with the 2.1 zigbee binding, and don’t think I ever restarted after removing the stuck controller… I put in 2.2 of the binding and tried again… Maybe something was stuck and since cleared out?

I’ll leave it alone for a day and report back if it still stays online after a restart?

I would think so. But, based on your log, it looks like the binding is talking to the stick. Before the baud rate setting was configurable, my log only got to β€˜Trying to send when not connected’.

OH! You just got it working! Wahoo!

I remember having to restart a bunch of times to clear out the 2.1 binding. You can do a bundle:list in the Karaf console to see what bindings are installed. Maybe they were both installed and the restarts finally cleared the older one. Now the fun begins!

Ah, yes! Fun! I’ll be in here a million times being told to do other things I should have done before asking in the first place. LOL

Thanks for the help to both you and Chris!

I’ll keep the thread updated if anything develops. In the meantime, I want to say that I have made the switch to open source over the last few years, and this is why… I find the community to always help out, and I always appreciate it. In regards to this project, although I know nothing about how the software works yet, I completely support the efforts everyone is making in developing it. OpenHAB is EXACTLY what home automation needs, and open source is the only way it can happen. Google has no interest in making samsung or apple products work. Samsung doesn’t care to integrate with Ecobee, etc…

This project enables some miracles to happen, and no other community is positioned to do that. Keep up the awesome work!!

Now, I’m off to break some sh*^%$… :smile:

1 Like

True!

Moving forward, get familiar with Habmin. It has some advantages over PaperUI. And if you run into trouble with zigbee, don’t be afraid to pop into the other thread. Once you’ve run discovery, you will likely find some devices that the binding is not ready for. Yet. We just need to be really nice to Chris… and be patient. Or, better yet, contribute to the development!

Quick Question…

Does it matter what these coordinator things are named? Documentation says spaces aren’t allowed when naming things, but these have spaces in the name. β€œEmber EM35x Coordinator”. Any issues? Or should I rename them. Afraid to mess with them at this point… LOL

All of my Things have spaces in their names and I’ve renamed most of them, including my Zigbee coordinator. It would help to see a link to the documentation you referenced, in case it needs to be updated.

Okay, ITEMS can’t have spaces in the names. Sorry, been reading too much. Glad I’m in the beginners forum. LOL

http://docs.openhab.org/configuration/items.html#name

So it doesn’t survive a restart.

I restarted, and both the z-wave and zigbee controllers are OFFLINE. Gotta run out tonight, but I wanted to update. What is the Karaf command to restart the bindings? I’ll try later.

That’s odd. Did you happen to unplug the stick and then plug it back in again? If so, it could have come up on different ports. A system restart should put them back, or you could look into udev rules to make them static. If not, I don’t know what could cause this, but you could do a bundle:list in Karaf console and you’ll see something like this:

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID β”‚ State    β”‚ Lvl β”‚ Version                β”‚ Name
────┼──────────┼─────┼────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 15 β”‚ Active   β”‚  80 β”‚ 2.1.0.201709182108     β”‚ ZWave Binding
 16 β”‚ Active   β”‚  80 β”‚ 2.2.0.201709152241     β”‚ ZigBee Binding
 17 β”‚ Active   β”‚  80 β”‚ 5.3.1.201602281253     β”‚ OSGi JAX-RS Connector
 18 β”‚ Active   β”‚  80 β”‚ 2.4.5                  β”‚ Jackson-annotations
 19 β”‚ Active   β”‚  80 β”‚ 2.4.5                  β”‚ Jackson-core
 20 β”‚ Active   β”‚  80 β”‚ 2.4.5                  β”‚ jackson-databind
 21 β”‚ Active   β”‚  80 β”‚ 2.4.5                  β”‚ Jackson-dataformat-XML

If the binding state is Resolved, then it is not started. Do a bundle:start X, where X is the ID listed from the bundle:list results. Here I have zwave on ID 15 and zigbee on ID 16. Did you see anything in the logs?

Bindings show as active. Z-Wave on /dev/ttyUSB0 shows β€œOFFLINE - COMMUNICATION_ERROR zwave.thingstate.serial_notfound” and ZigBee controller shows β€œOFFLINE - COMMUNICATION_ERROR Serial Error: Port/dev/ttyUSB1 does not exist”.

Looks like this is now a port issue…

dmesg | grep tty
[    0.000000] console [tty0] enabled
[   23.773896] usb 8-1.1: cp210x converter now attached to ttyUSB0
[   23.781596] usb 8-1.1: cp210x converter now attached to ttyUSB1
[   24.046497] cp210x ttyUSB1: failed set req 0x1e size 4 status: -32
[   24.046503] cp210x ttyUSB1: failed to set baud rate to 300
[  184.798996] cp210x ttyUSB1: failed get req 0x1d size 4 status: -110
[  184.799006] cp210x ttyUSB1: failed get req 0x4 size 2 status: -19
[  184.799019] cp210x ttyUSB1: failed set request 0x3 status: -19
[  184.799035] cp210x ttyUSB1: failed set request 0x3 status: -19
[  184.799047] cp210x ttyUSB1: failed set request 0x3 status: -19
[  184.799052] cp210x ttyUSB1: failed get req 0x14 size 16 status: -19
[  184.799059] cp210x ttyUSB1: failed set req 0x1e size 4 status: -19
[  184.799063] cp210x ttyUSB1: failed to set baud rate to 300
[  184.799255] cp210x ttyUSB0: failed set request 0x0 status: -19
[  184.799260] cp210x ttyUSB0: cp210x_open - Unable to enable UART
[  184.803084] cp210x ttyUSB1: failed set request 0x0 status: -19
[  184.803091] cp210x ttyUSB1: cp210x_open - Unable to enable UART
[  184.803158] cp210x ttyUSB0: failed set request 0x0 status: -19
[  184.803162] cp210x ttyUSB0: cp210x_open - Unable to enable UART
[  199.110051] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[  199.110401] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1

ttyUSB0 or ttyUSB1 dont show in ls /dev/tty*. Tried unplugging and reinserting the stick.