Sonoff USB Dongle (ZBdongle-E) drops out after 4-7 days

Hi community,

newby here, starting the openHAB journey. Had my share of frustrations and successes so far. I have set up a system with few elements to make sure it is running and stable before adding more stuff.
My system so far:

  • Openhabian 3.4
  • Running on Raspi Pi 4 8BG
  • Sonoff USB Plus-E dongle is my bridge to my zigbee devices: Sonoff sensors, Zigbee smart sockets, Sonoff motion sensor, ikea smart socket.
  • A few rules to command the switches or use the motion sensor as trigger for lights.

The problem: I can set up everything. Connecting goes well and smooth. I do it directly, using the Ember zigbee binding as recommended. No MQTT involved. Several times already after 4-8 days the connection of the zigbee devices drops out. The go from “online” to “offline”. I can’t find the reason.
Only clue so far: There seems to be an issue with the “serial port” on the raspi. The dongle is assigned to /dev/ttyACM0 and works just fine. And then, out of the blue (for me) there is an error saying something like “serial port not existing” (can’t remember the exact words. They are probably in the log files but I don’t know how to access them. I have activated the “maximum” logging (openHABian | openHAB)
Is this a hardware issue (need a new dongle)? AFAIK there is no updated firmware so far. I followed the links on this entry: ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus” (model “ZBDongle-E”) based on Silicon Labs EFR32MG21 +20dBm radio MCU now sold for $19.99
Do I need a different dongle? Is my raspi pi broken?
Anything I am messing up? I am stuck. Any advice is welcome!

Johann

A few minutes ago I got this error message - which doesn’t help me at all. Same time all my smart sockets went offline.

2023-01-04 20:27:04.266 [WARN ] [ng.zigbee.handler.ZigBeeThingHandler] - null: Polling aborted due to exception

java.util.ConcurrentModificationException: null

at java.util.HashMap$HashIterator.nextNode(HashMap.java:1511) ~[?:?]

at java.util.HashMap$KeyIterator.next(HashMap.java:1534) ~[?:?]

at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$2.run(ZigBeeThingHandler.java:623) [bundleFile:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

at java.lang.Thread.run(Thread.java:829) [?:?]

One thing you could possibly try: I have the Sonoff_Zigbee_3.0_USB_Dongle_Plus (so not the one with the Ember chipset), but I noticed 2 devices were often dropping out after a few days. I changed the channel from the default 11 to 20 and it’s been rock solid since.
Do note, that this was using zigbee2mqtt and not the zigbee OH binding.

Thank you, Peter!
I had tried this before: changing the channel from 11 to 22. I did it on the admin dashboard (setttings-things-MyZigbeeCoordinator). I have changed it either in the “code” tab or in the “thing-show advanced tab”. It always jumps back to 11 either immediately or a while later. Is there another place where I can change the channel?
I have changed it to “20” now and will monitor its behaviour :slight_smile:
Again, thank you for chiming in!

With zigbee2mqtt you have to re-pair all the devices after changing the channel.

With zigbee2mqtt you have to re-pair all the devices after changing the channel.

Thanks, Peter!
In my setup it’s a mess now with things dropping out - not found - gone - others in the inbox not able to connect. Sounds like crying a fresh set up :frowning:
I’ll start from scratch, using channel 20 from the beginning, and report later.

Started an install from scratch. And after rebooting the system I ran into the issue again: The Zigbee Coordinator went offline (ERROR:COM)

2023-01-05 16:15:09.621 [ERROR] [nding.zigbee.serial.ZigBeeSerialPort] - Serial Error: Port [/dev/ttyACM0] does not exist.

2023-01-05 16:15:09.623 [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port

Defined serial port is /dev/ttyACM0

In putty command ls shows ttyACM0 (amongst many others); lsusb shows Bus 001 Device 003: ID 1a86:55d4 QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2

So, on the OH3 on the raspi seems to “see” the device but yet can’t communicate.

Here the settings for the Zigbee stick in the OH3 UI:
UID: zigbee:coordinator_ember:3e4ebd0f0c
label: Zigbee_Coordinator_Ember
thingTypeUID: zigbee:coordinator_ember
configuration:
zigbee_port: /dev/ttyACM0
zigbee_channel: 20
zigbee_initialise: false
zigbee_concentrator: 0
zigbee_trustcentremode: TC_JOIN_SECURE
zigbee_extendedpanid: BD7A56A967133DCA
zigbee_baud: 115200
zigbee_flowcontrol: 2
zigbee_panid: 20620
zigbee_powermode: 1
zigbee_txpower: 0
zigbee_networksize: 25
zigbee_linkkey: 5A6967426565416C6C69616E63653039
zigbee_childtimeout: 86400
zigbee_networkkey: 5EA9AAAB849E906F1BADD3338BB75BCE
zigbee_meshupdateperiod: 86400

puzzled

EDIT: After 3 times restarting the raspi it works. With no different readings.

In case of “Serial Error: Port [/dev/ttyACM0] does not exist.” use
ls -al /dev/serial/by-id
to check which device your dongle is connected to. It might have changed (for whatever reason).

If you are hit by interferences, a USB extension cord between your RaspberryPi and your Zigbee dongle may help (but interferences shouldn’t result in ‘Port does not exist’ 
).

My setup (RaspberryPi 4B, usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220817212806-if00 -> ../../ttyACM0 and Zigbee2MQTT) is rock solid.

Thanks, AP15e.
I have restarted my system because this can trigger the serial port issue. And it did. openhab.log reads:

2023-01-06 08:26:52.299 [ERROR] [nding.zigbee.serial.ZigBeeSerialPort] - Serial Error: Port [/dev/ttyACM0] does not exist.
2023-01-06 08:26:52.301 [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port

I followed your advice ( ls -al /dev/serial/by-id) and the result is:

lrwxrwxrwx 1 root root 13 Jan 6 08:17 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816141327-if00 → 
/
/ttyACM0

Now I am even more puzzled. Something is broken somewhere. And I have no clue where to investigate.

Maybe try it on another machine to see if the USB port on the rpi is the cause? Could also be a hardware issue with the stick itself.

In general, it’s better as @anon71759204 mentions to use a proper stable link to the device instead of /dev/ttyACM0. In my case the device is /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_dc62fdd0de11ec11b48f23c7bd930c07-if00-port0.

1 Like

Hi Peter,

Thaks for your response! Appreciate it!
I was thinking about buying backups for the core system items, anyways. But the market for raspis seems to be dried up right now, at least in Switzerland. Stores don’t have stock, and ebay prices for raspi 4s are skyrocketing


Beginner’s question: How do I assign a proper stable link? (Don’t know much about Linux) Wasn’t able to find anything in the OH forums / manual.

Hi Johann, I personally wouldn’t bother with an rpi. Any old laptop you can get your hands on for EUR50 is going to be much faster anyway. I’m running OH on a Haswell-era thinkpad and that thing flies.

As for the link, just go looking in “/dev/serial/by-id”.

Just to make sure I understood correctly:

Are we talking about the OpenHAB UI Settings - Things - Ember Coordinator “Code” page?
So far there is the entry:

configuration:
zigbee_port: /dev/ttyACM0
zigbee_channel: 20

When I replace it with what I found in /dev/serial/by-id instead; so the new entry would be

configuration:
zigbee_port: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816141327-if00
zigbee_channel: 20

it sends my system into en endless loop of re-starts. :dotted_line_face: :grimacing: I guess that’s not what you were talking about. Anything I missed / misunderstood?

Sorry that this takes so long. Probably my doing something wrong / missing something important


Are we talking about the OpenHAB UI Settings - Things - Ember Coordinator “Code” page?

That looks about right, yes. Again, I’m not using the Zigbee binding myself, but that seems plausible.

As for:

zigbee_port: /dev/ttyACM0

vs:

zigbee_port: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816141327-if00

That should absolutely work. The latter is a symlink to the former anyway, right?

it sends my system into en endless loop of re-starts. I guess that’s not what you were talking about. Anything I missed / misunderstood?

That was exactly what I meant, and really shouldn’t be. Could it be that the other port settings are wrong (flow-control maybe?)

If I were you, I’d try with zigbee2mqtt. Just to see if that makes a difference.

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