I recently bought the Sonoff Zigbee 3.0 USB Dongle so that I can remove my Hue bridge and Tradfri gateway. I’m struggling to get it to work with the Zigbee binding, it’s either sat at Initialising or Comms Error after trying a number of combinations. Has anyone managed to get this working or have I gone down the wrong path?
Searching for answers with Google just brings back loads of information on how to get setup using Home Assistant. Which is a case of plugging it in and wham bam, thank you mam. Which I was hoping would be the case for openHAB, but sadly not. Which makes it a little frustrating.
I believe the Sonoff uses the Ember chipset. Is that what you are doing when creating the Coordinator thing? What parameters are you entering for the other fields like BAUD rate and such?
Double check that usb port. It defaults on ttyUSB0 or somesuch, until it doesn’t and you’re left scratching your head as to why it’s not working.
Also, check the permissions. Just because the port is correct does not mean that the openHAB user has the rights to access it/read it.
Had a play around last night and this morning. Tried a number of different options I’m still no closer. Here’s the logs that seem to suggest the Binding doesn’t want to keep the port open.
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_ember:db367f96e9].
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel 0
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key 5A 69 67 42 65 65 41 6C 6C 69 61 6E 63 65 30 39
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Config: zigbee_initialise found, initializeNetwork=false
2022-09-28 07:59:33.880 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ExtendedPanId or PanId not set: initializeNetwork=true
2022-09-28 07:59:33.881 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-09-28 07:59:33.881 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key initialised 48100E0DCDCB9AB62B50633068AA5471
2022-09-28 07:59:33.881 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key final array 48100E0DCDCB9AB62B50633068AA5471
2022-09-28 07:59:33.881 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String 5A 69 67 42 65 65 41 6C 6C 69 61 6E 63 65 30 39
2022-09-28 07:59:33.882 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2022-09-28 07:59:33.882 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel set to 11.
2022-09-28 07:59:34.172 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [4863].
2022-09-28 07:59:34.296 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [50A953B4917D885D].
2022-09-28 07:59:34.604 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link key final array 5A6967426565416C6C69616E63653039
2022-09-28 07:59:34.604 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - Initializing ZigBee Ember serial bridge handler.
2022-09-28 07:59:34.604 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - ZigBee Ember Coordinator opening Port:'/dev/ttyUSB1' PAN:4863, EPAN:50A953B4917D885D, Channel:11
2022-09-28 07:59:34.604 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - Ember end device poll timeout set to (169 * 2^9) = 86528 seconds
2022-09-28 07:59:34.604 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
2022-09-28 07:59:35.605 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2022-09-28 07:59:35.606 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2022-09-28 07:59:35.607 [DEBUG] [ding.zigbee.internal.ZigBeeDataStore] - Creating ZigBee persistence folder /var/lib/openhab/zigbee/zigbee_coordinator_ember_db367f96e9/
2022-09-28 07:59:35.608 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Connecting to serial port [/dev/ttyUSB1] at 115200 baud, flow control FLOWCONTROL_OUT_NONE.
2022-09-28 07:59:35.608 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=INITIALISING
2022-09-28 07:59:35.912 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Serial port [/dev/ttyUSB1] is initialized.
2022-09-28 07:59:45.925 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=OFFLINE
2022-09-28 07:59:46.927 [INFO ] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee dongle inactivity timer. Reinitializing ZigBee
2022-09-28 07:59:46.940 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=SHUTDOWN
2022-09-28 07:59:47.288 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Serial port '/dev/ttyUSB1' closed.
2022-09-28 07:59:47.288 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - Initializing ZigBee Ember serial bridge handler.
2022-09-28 07:59:47.289 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - ZigBee Ember Coordinator opening Port:'/dev/ttyUSB1' PAN:4863, EPAN:50A953B4917D885D, Channel:11
2022-09-28 07:59:47.289 [DEBUG] [ng.zigbee.ember.handler.EmberHandler] - Ember end device poll timeout set to (169 * 2^9) = 86528 seconds
2022-09-28 07:59:47.289 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
2022-09-28 07:59:48.289 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2022-09-28 07:59:48.290 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2022-09-28 07:59:48.291 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Connecting to serial port [/dev/ttyUSB1] at 115200 baud, flow control FLOWCONTROL_OUT_NONE.
2022-09-28 07:59:48.291 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=INITIALISING
2022-09-28 07:59:48.640 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Serial port [/dev/ttyUSB1] is initialized.
Hi Maximo,
Did you ever get this working, I am running it on Windows10 and it comes up with “ERROR: COMM” could it be an error with data/parity/stop bits ?,
The version of the dongle I have isn’t compatible with the Zigbee binding, so it’s not a configuration issue and can’t be resolved. I’ve put the dongle to one side until I decide what to do next. It works great with HA and that is an option, but I prefer how openHAB works, also it would take a great deal of effort to migrate my current setup.
Hopefully someone is working on a fix to the binding that will allow it to work and can re-visit this in the future.
Yes I’ve seen this and have setup it up to try out. Although I managed to get it working, it’s not the ideal setup as it then adds more components into the mix. But haven’t ruled it out as an option either.
Hi All,
I have played around with a couple of options, my main thing is be off cloud, I am still testing a variety of options, I just need a Zigbee link. Will do further testing and let you know next week.
OK, then I have the wrong version It was sold as compatible with openHAB, so the seller apparently mixed up the two versions. Thank you so much for clarifying this.
I guess part of the confusion might be that it is the newer version that openHAB supports while the old version is “not yet” supported…
You have the bought the same one as me, although it works with Zigbee2Mqtt it doesn’t work directly with the Zigbee binding. It’s it’s a little more complicated to get setup and means you have to also manage your MQTT broker. So far now mine is sat in the draw gather dust, I’ve looked to see if I can get hold of the E version.
Yes, I eventually managed to set it up via zigbee2mqtt. But it was a pain because zigbee2mqtt sends a JSON-formated payload by default so I tried to get the JSONpath to work in OH3 until I stumbled across this post, telling me that there is a hidden feature in zigbee2mqtt that gets rid of all that and just produces “normal” mqtt topics with their respective states. Once I had that set up, it worked nicely.
At first I was sceptical about introducing yet another app into the system, but now I see the advantage of not doing everything on OH3. Managing the zigbeenetwork independently of OH3 kinda makes sense and it feels I’m less dependent on OH3.
Also super useful for troubleshooting.
If you have a weird issue, maybe it’s openHAB, or an error on a rule, or something acting up.
Turn off openHAB and send a command directly to the device, which you can do with zigbee2mqtt.
Additionally, that zigbee map is super nice to see whether or not you have link quality problems.
I have now managed to get hold of ZBDongle-E, here’s the output from usb-devices below. Having tried various configuration combinations I still can’t get OH to see it.
Having looked at zigbee2mqtt previously, sticking with a Hue Bridge and Tradfri Gateway provides me with the same level of functionality and needs less effort. But this defeats my objective of removing them altogether and have a single Zigbee controller.
Has anyone managed to get the ZBDongle-E configured and working directly with the Zigbee Biding? If so, can you share you configuration.
The only error I have to work with is:
[ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port