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.
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.
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.
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.
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.
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…
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
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```