Thank you for the detailed response I’ll look into that.
That’s amazing I’ll definitely back up my stick first just in case. It will be great if I don’t need to repair 110 devices. Those instructions are very detailed I appreciate that. I would be terrified otherwise without the details to edit anything in the root ssh.
Checking in, also running the Sonoff Dongle flashed with the latest Zigbee2mqtt coordinator firmware from Koenkk. Running 5 Linkind sensors and 1 Hue motion sensor so far and all working just fine on my end (hassOS on intel NUC).
I am having an issue getting Zigbee2mqtt running with the ITead Sonoff Zigbee 3.0 dongle. Port being used is /dev/ttyUSB0 which to me appears correct. I am running Supervised HA within docker on a NUC. Any assistance would be appreciated. From the log I have extracted:
[12:39:52] INFO: Handing over control to Zigbee2mqtt Core …
Socat startup parameters:
Options: -d -d
Master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
Slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
[12:39:52] INFO: Starting socat process …
2021/10/29 12:39:52 socat[313] N PTY is /dev/pts/0
2021/10/29 12:39:52 socat[313] W ioctl(7, IOCTL_VM_SOCKETS_GET_LOCAL_CID, …): Not a tty
2021/10/29 12:39:52 socat[313] N listening on AF=2 0.0.0.0:8485
> [email protected] start
> node index.js
Zigbee2MQTT:error 2021-10-29 12:39:55: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-10-29 12:39:55: Failed to start zigbee
Zigbee2MQTT:error 2021-10-29 12:39:55: Check Frequently asked questions | zigbee2mqtt.io for possible solutions
Zigbee2MQTT:error 2021-10-29 12:39:55: Exiting…
Zigbee2MQTT:error 2021-10-29 12:39:55: Error: Error while opening serialport ‘Error: Error Resource temporarily unavailable Cannot lock port’
- at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)*
- at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)*
- at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12*
[12:39:55] INFO: Handing over control to Zigbee2mqtt Core …
> [email protected] start
> node index.js
Dongle installed on the local Pi ? Then disable socat.
Thanks Francis for the reply. I am running both a Pi4 and NUC. Closing down the Pi4 following your response fixed my issue. i am still getting errors in the log though, posted below and slightly different than before. Any suggestions?
Zigbee2MQTT:error 2021-10-29 17:22:59: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-10-29 17:22:59: Failed to start zigbee
Zigbee2MQTT:error 2021-10-29 17:22:59: Check | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2021-10-29 17:22:59: Exiting…
Zigbee2MQTT:error 2021-10-29 17:22:59: Error: Error while opening serialport ‘Error: Error Resource temporarily unavailable Cannot lock port’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[17:22:59] INFO: Handing over control to Zigbee2mqtt Core …
[email protected] start
node index.js
error-resource-temporarily-unavailable-cannot-lock-port :
FYI, Koenkk from Zigbee2MQTT now stated that current firmware does not yet support +20 dbm output:
https://github.com/Koenkk/zigbee2mqtt/discussions/8840#discussioncomment-1550449
That means that this CC2652P based Sonoff Zigbee 3.0 USB Dongle Plus adapter with its current firmware version only operate at +5 dBm output, so no wonder it does not perform better when compared to Electrorama’s zzh dongle which is based on CC2652R that physically only capable of +5 dBm output. Thus only once we get a new community firmware with correct RF switch configuration activated will enabling 20 dBm output transmit power in Zigbee2MQTT or ZHA applications setting actually work for any CC2652P or CC1352P based Zigbee coordinators.
chiakikato also manually tested Sonoff Plus dongle hardware and confirms it support +20 dBm output:
https://github.com/Koenkk/zigbee2mqtt/discussions/8840#discussioncomment-1550148
Guess that means that Mat will have to do another test and update his review when get new firmware.
I can attest that the dongle works pretty well (Using ZHA). I have it plugged in an Ubuntu i5-4570 instance. I’m coming from a Philips Hue hub for my lights and a few remotes (Philips and IKEA branded). Only thing I notice is it is slightly slower than my old hub. I have never owned a USB Zigbee dongle before so another thing I notice it takes a few more seconds after rebooting HA for it to be able to get status/control my Zigbee devices. The visualization looks cool but I have no idea how to fine tune things with that information yet. Overall, pretty happy with it.
I’d love to test out the new firmware when it rolls out hopefully not too far from now.
Understand and remember that with the way Zigbee network mesh technology works you can not tune the layout of the mesh connections via software configuration/settings. Instead, if you are having problems with one or more devices then you can utilize the visualization to find where a bottleneck or interfering router device may lie, and then you will need to physical either move around your devices and add more Zigbee router devices or remove troublesome devices. Checkout tips posted in this PR:
https://github.com/home-assistant/home-assistant.io/pull/18864
It might perhaps be a little slower connecting to all devices after reboot depending on your computer hardware and operating system, but once Home Assistant and chosen Zigbee integration are fully up-and-running your devices should not be slow to respond to a state change like turning a light on or off. If they are slow then something in your setup is probably wrongly configured or the message takes a long detour due to how your LAN and/or internet is designed. As the technology behind an implementation with correct setup works, switching on and off a light when on the local network should be just as fast as Philips HUE Hub.
Were you able to do this? If so any chance of a few steps?
cc2538-bsl.py works
Yeah. If I remember right, it was something quite close to this: Flash Firmware using cc2538-bsl - Electrolama
Has anyone migrated there Z2MQTT from a CC2531 to one of these?
From a CC2530 + CC2591. Just make sure you use 1.21.x or higher, then no re-pairing required.
Thanks (also to @francisp). Is it possible to enter BSL without disassembly? The iTEAD guide implies so using a python script (but I think it only works in Windows).
EDIT: To answer my own question, the uartLog.py can still be used, but you need to remove the hardcoded COM suffix in the serial port name for it to use Linux dev paths instead.
I removed the cover and pressed the button while inserting the stick in the USB.
Thanks - I managed to do it without opening the case (see above).
Yes, I had only to switch usb port and comment out config option related to led (z2m throwed an error, that is not able to control led on this coordinator)
All 20 zigbee devices were recognized, but most of them showed as disconnected on the map.
I didn’t wait, but started messing around wit database and backup, finally ending up with empty list of devices. After repairing a few of them (ac powered), I noticed that all were back.
Now it is working with no issues for a few days.
Coordinator type zStack3x0
Coordinator revision 20210120
Nice! I have now also confirmed that running the attached uartLog.py
script from Sonoff docx part from ITead’s HOW TO FLASH FIRMWARE TO CC2652P instructions do indeed make ITead’s Sonoff Zigbee 3.0 Plus Dongle automatically enter bootloader mode and after running that script just to get into BSL mode I could flash it directly using llama-bsl.py and cc2538-bsl.py scripts without having open the enclosure and pressing the BTL button which I too indeed found very convenient.
I first tested with llama-bsl GitHub - electrolama/llama-bsl: Python cross-platform script to upload firmware via the serial boot loader onto the CC13xx, CC2538 and CC26xx SoC.
python llama-bsl.py -p COM5 -evw CC1352P2_CC2652P_launchpad_coordinator_20210708.hex
I then also tested running the uartLog.py
script again to test cc2538-bsl GitHub - JelmerT/cc2538-bsl: Python cross-platform script to upload firmware via the serial boot loader onto the CC13xx, CC2538 and CC26xx SoC.
python cc2538-bsl.py -p COM5 -evw CC1352P2_CC2652P_launchpad_coordinator_20210708.hex
Both upgrades worked fine.
You might have to manually install/upgrade a few dependencies if do not installed/upgraded properly:
python -m pip install --upgrade pip setuptools wheelpy gevent llama-bsl
python -m pip install --upgrade pip setuptools wheelpy gevent cc2538
Though it might be better to download latest llama-bsl master branch or cc2538-bsl main branch versions from https://github.com/electrolama/llama-bsl and https://github.com/JelmerT/cc2538-bsl as latest fixes might not be in a release published on PyPi via pip
Other prerequisites is that had already installed CP210x USB to UART Bridge VCP Drivers from Silicon Labs and Python for Windows (Windows Installer 64-bit version)
As mentioned the uartLog.py
script also lists all active COM ports on MS Windows (tested on Windows 10) so only have you enter the number of the COM port, but note that the script is currently hardcoded for Windows COM ports so would need to be modified before it can be used under Linux.
PS: By the way, submitted “Auto BSL” support for Sonoff Plus Dongle as a feature request for llama-bsl here → Automatically start BSL mode on ITead SONOFF Zigbee 3.0 USB Dongle Plus stick adapters · Issue #11 · electrolama/llama-bsl · GitHub