For a few years I have had a USB dongle based on the CC2530 or CC2531 IC with the cigbee2mqtt firmware used.
Nun ist mit der Zeit das Zigbee-Netzwerk so weit gewachsen, dass es Zeit für einen Leistungsfähigeren Zigbee-USB-Dongle wurde. Die auf dem CC2530 bzw. CC2531 IC basierenden Zigbee-Coordinator (so nennt man die “Rolle” des Zigbee-USB-Dongles in einem Zigbee-Netzwerk.) können mit der Standardfirmware nämlich maximal 15 Zigbee-Geräte verwalten.
At first I was a bit reluctant to do so because I believed that I would then have to reconnect all my existing Zigbee devices to the coordinator.
But then I saw that there is now a way to integrate a new Zigbee USB adapter without this effort. You can therefore exchange the Zigbee USB dongle (coordinator) without having to re-teach all Zigbee devices. 🙂
I have described how to do this in the following article.
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Before you start with this article, you should have prepared a RaspberryPi so that it can be reached via the network and controlled via SSH. In addition, zigbee2mqtt should of course already be installed.
The following articles describe what needs to be done to prepare the RaspberryPi.
- Zigbee - Installing zigbee2mqtt on the Raspberry Pi
- Zigbee - register devices, sensors and actuators with zigbee2mqtt
- Zigbee - Administration of Zigbee2mqtt via the dashboard
In the following lists you will find all the parts you need to implement this article.
|1x||SONOFF Zigbee 3.0 USB Dongle Plus Buy at Amazon|
|1x||USB extension cable Buy at Amazon|
|1x||Raspberry Pi Buy at Amazon|
|1x||Raspberry Pi power supply Buy at Amazon|
|1x||Raspberry Pi case Buy at Amazon|
|1x||Micro SD card 64GB Buy at Amazon|
Log into the NodeRed configuration interface
Before you can edit your NodeRed configuration, you must - if activated - first log into the NodeRed configuration interface.
Find out the IEEE address of the old Zigbee Coordinator (USB dongle).
The trick to the whole thing is that the new coordinator must have the same IEEE address as the old coordinator. So you only have to read the current IEEE address (assigned to your old coordinator) and transfer the same address to the new coordinator when flashing the zigbee2mqtt firmware. 🙂
To read out the old IEEE address, a look at the zigbee2mqtt database is enough. Connected Zigbee devices including their IEEE addresses are saved in this file.
To do this, open the database file with the following command.
sudo nano /opt/zigbee2mqtt/data/database.db
You will then (very likely) find the data for your coordinator in the first line.
Die Zeile die dem Eintrag Eures Coordinators entspricht hat bei der Eigenschaft “type” den Wert “Coordinator”. In der gleichen Zeile findet Ihr dann auch den Wert der “ieeeAddr”. Beide Teile sind in dem links stehendem Bild rot markiert.
Merkt Euch nun den Wert im Feld “ieeeAddr” und speichert Ihn zum Beispiel in einer einfachen Textdatei.
Transfer IEEE address to the new Zigbee coordinator
Now you have to transfer the IEEE address you just found out to the new Zigbee coordinator. This is (currently) unfortunately only possible during the flash process. Since you have to equip your new Zigbee coorindator with the appropriate firmware anyway, this is not really an additional effort.
The complete process of how to equip a Sonoff Zigbee 3.0 USB Dongle Plus with the zigbee2mqtt firmware and also transfer the old IEEE address is described in the following article.
Nevertheless, I have listed the most important steps for transferring the IEEE address below.
Öffnet dazu die Software “SmartRF Flash Programmer 2” und dann den Reiter
Enter the desired MAC address in the text field shown and program the IEEE address including the desired firmware on the Zigbee USB dongle.
In the article Zigbee – Prepare a Sonoff zigbee 3.0 USB Dongle Plus for zigbee2mqtt this is described in more detail as mentioned above.
More articles on the topic
I have summarized other articles on the subject of Zigbee and zigbee2mqtt in the following category. There you will also find articles on various Zigbee devices and how they look like NodeRed can be controlled.
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂