I've been using it for quite a while cigbee2mqtt to Zigbee sensors and actuators in my SmartHome to involve
For a few years I have had a USB dongle based on the CC2530 or CC2531 IC with the cigbee2mqtt firmware used.
Now, over time, the Zigbee network has grown so much that it's time for a more powerful Zigbee USB dongle. The Zigbee coordinator based on the CC2530 or CC2531 IC (this is what the “role” of the Zigbee USB dongle in a Zigbee network is called.) can manage a maximum of 15 Zigbee devices with the standard firmware.
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.
Safety instructions
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.
https://www.nerdiy.de/sicherheitshinweise/
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. 🙂
Requirements
Helpful articles:
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.
Required tool:
Number | Link |
---|---|
1x | Screwdriver set Buy at Amazon |
1x | SD card reader Buy at Amazon |
Required material:
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.
The line that corresponds to your coordinator's entry has the value "Coordinator" in the "type" property. In the same line you will also find the value of "ieeeAddr". Both parts are marked in red in the picture on the left.
Now note the value in the "ieeeAddr" field and save it in a simple text file, for example.
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.
To do this, open the “SmartRF Flash Programmer 2” software and then the tab
MAC Address
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.
External links:
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. 🙂