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!
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
Again, thank you for chiming in!
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
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:
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.
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â.