Sonoff ZBDongle-E communication error change states ONLINE - OFFLINE

Hello,

I am running OpenHAB 4.2.0 on a Raspberry Pi Model 3 B Rev 1.2 1Gb.

I have just plugged in a Sonoff ZBDongle-E as my Zigbee coordinator. It is running firmware 6.10.3.0

It initialises fine, comes online but eventually goes offline due to a communication error. I haven’t configured any channels. I only have the dongle connected, and no other Zigbee devices yet.

Setup and error below.

I’m not sure what I am missing, and hope someone can help.

Cheers.

UID: zigbee:coordinator_ember:1fc61926dc
label: Ember Coordinator
thingTypeUID: zigbee:coordinator_ember
configuration:
zigbee_port: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_serial_number-if00-port0
zigbee_initialise: false
zigbee_channel: 11
zigbee_concentrator: 1
zigbee_trustcentremode: TC_JOIN_SECURE
zigbee_extendedpanid: extendedpanid
zigbee_flowcontrol: 2
zigbee_baud: 115200
zigbee_panid: 22444
zigbee_powermode: 1
zigbee_txpower: 0
zigbee_networksize: 25
zigbee_linkkey: linkkey
zigbee_childtimeout: 86400
zigbee_networkkey: networkkey
zigbee_meshupdateperiod: 86400

2024-09-26 13:23:13.828 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘zigbee:coordinator_ember:1fc61926dc’ changed from OFFLINE (COMMUNICATION_ERROR) to OFFLINE: Failed to open communications port
2024-09-26 13:23:13.831 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘zigbee:coordinator_ember:1fc61926dc’ changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)
2024-09-26 13:23:26.829 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘zigbee:coordinator_ember:1fc61926dc’ changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE

Hi check your setting
Based on what you posted you have flow control set incorrectly
refer to this documentation and confirm you have it all configured as specified.

Serial port Configuration

If you are using a config file, the serial port needs to be configured as shown in the above example. Below is a list of the relevat settings concerning the serial port.

Setting Allowed values
zigbee_baud Ember controllers: 38400, 57600, 115200
Telegesis controllers: 19200, 38400, 57600, 115200
Xbee controllers: 9600, 57600, 115200
CC2531 controllers: 38400, 57600, 115200
zigbee_flowcontrol 0 = None,
1 = Hardware (CTS/RTS),
2 = Software (XOn/XOff)
zigbee_port The name of the serial port, e.g. /dev/ttyUSB1 or /dev/ttyZigbee or whatever the port is named on your system

Hi,

I have tried the correct settings and it never comes online. If I turn off flow control, OpenHAB reads the Zigbee mac address and firmware version and comes online, and then of and on again until it’s permanently offline. If I use the correct settings, it never comes online. Using no flow control, and then getting it online and adding the correct settings makes it go offline immediately.

I have just received the latest dongle from Sonoff so will look into this soon. Unfortunately I’m travelling abroad from Monday so it might become a “hotel task” for late next week or the following week… I can confirm though that it communicates fine within the standalone console that the zigbee binding uses for testing, and stays online, but that’s as far as I’ve got with testing this.

1 Like

Thank-you.

I currently have my dongle in a continuous initialising state using the following settings. If there is a better zigbee coordinator device, I’m all ears.

UID: zigbee:coordinator_ember:7c3f26d2cd
label: Ember Coordinator
thingTypeUID: zigbee:coordinator_ember
configuration:
zigbee_port: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_serial_number-if00-port0
zigbee_channel: 25
zigbee_initialise: false
zigbee_concentrator: 0
zigbee_trustcentremode: TC_JOIN_SECURE
zigbee_extendedpanid: zigbee_extendedpanid
zigbee_baud: 115200
zigbee_flowcontrol: 1
zigbee_panid: 54570
zigbee_powermode: 0
zigbee_txpower: 0
zigbee_networksize: 25
zigbee_linkkey: zigbee_linkkey
zigbee_childtimeout: 86400
zigbee_networkkey: zigbee_networkkey
zigbee_meshupdateperiod: 86400

You could try zigbee2mqtt and not use the ZigBee binding.

The above site says the E type Dongle is supported.

Please try checking the advanced options in the coordinator configuration, then clicking on the initialise option which I think is at the top, then save.

See if that works.

Hi Chris,
I’ve had the same problem and pressing the Reinitialize Controller Button under advanced solved the problem. It comes online and also after disabling and enabling the thing it comes online again.
Thanks for the hint!
Regards,
Boris

Thanks for the feedback. I need to update the docs, which I’ll do in the next day or two… I’ll also try and detect this issue and perform the initialisation automatically - this is how it really should be, but it’s complicated slightly by the fact that the binding supports multiple dongles…

Cheers
Chris

More for future reference, but I have now added a note about this in the docs. I’ve also changed the error message that should be shown in the UI when the device is OFFLINE. Hopefully this will help users since this seems to be a common issue.

I will look more to see if I can reliably automate this, but the consequences of reinitialising the device when it was connected to a network are to scrub a users system, which is obviously badd, so I’m keen to ensure this is reliable :wink:

Hi Chris,
when restarting openhab I get the following exception, but it comes online. Maybe it helps you.

Caused by: java.lang.IllegalStateException: Duplicate key ncpstate (attempted merging values com.zsmartsystems.zigbee.console.ember.EmberConsoleNcpStateCommand@5bb37c and com.zsmartsystems.zigbee.console.ember.EmberConsoleNcpStateCommand@15c3afc)
	at java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) ~[?:?]
	at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) ~[?:?]
	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at org.openhab.binding.zigbee.console.ember.internal.EmberZigBeeConsoleCommandProvider.<init>(EmberZigBeeConsoleCommandProvider.java:71) ~[?:?]
	... 43 more```
1 Like

Thanks. I’ve just created a PR that should fix this - it will be merged at some point today and should be in tonights snapshot.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.