Zigbee2mqtt: getting rid of your proprietary Zigbee bridges (Xiaomi, Hue, TRADFRI)

Obviously you did then :stuck_out_tongue_winking_eye:

i have hit limit in 16 devices and cant join anymore. does anyone test firmware for 60 devices , or any other way ?
it just not show “incoming new device”.

This latest coordinator firmware will now allow 20 devices as per Koenkk’s comment here.

If one of the 20 devices is another CC2531 flashed as a router using this firmware (found here), you should be able to add another 20 devices.

P.S. you will need to pair your devices again after updating the firmware, and you may need to delete the .db file to avoid conflicts.

2 Likes

thank u sounds clear.

You can also use powered devices (bulbs, outlets) to serve as routers in your network.

EDIT - Update to include a better way to generate the graph

Just in case it helps anyone else, this is how I generated a visual graph of my zigbee2mqtt network:

Note - you must be running the latest 0.1.8 version of zigbee2mqtt

  1. Install Mosquitto clients on your zigbee2mqtt Pi:
sudo apt-get update
sudo apt-get install mosquitto-clients
sudo apt-get install graphviz
  1. Have two (ssh) connections open to your zigbee2mqtt Pi so that one can run mosquitto_sub and the other mosquitto_pub

  2. Run the following sub command, replacing mqtt_broker_xx with your broker details (likely to be your HA server)

mosquitto_sub -V mqttv311 -C 1 -u mqtt_broker_user -P mqtt_broker_pass -h mqtt_broker_ip -t zigbee2mqtt/bridge/networkmap/graphviz | sed -e 's/|EndDevice//' -e 's/|[^|]\+(.*)|/|/' -e 's/No [^|]\+|//' | sfdp -Tpng > /tmp/map.$(date +%Y%m%d%H%M%S).png
  1. Run the following publish command:
mosquitto_pub -V mqttv311 -u mqtt_broker_user -P mqtt_broker_pass -h mqtt_broker_ip -m "graphviz" -t zigbee2mqtt/bridge/networkmap
  1. A PNG image of your network will have been created in /tmp which can now be copied to another machine for viewing.

Hope this helps others too.
(credit to @lolorc)

4 Likes

Do you know which outlets work as routers? I’ve tried Sylvania 72922 and the Iris Smart Plug 3210-L and they both show in the log as routers. However I was unable to extend the range of my network with them. If a door sensor has already paired to the zigbee2mqtt stick, must it be removed and repaired somehow with the outlet? Maybe I have missed the process documented somewhere?

zigbee2mqtt:info 2018-11-13 21:13:57 0x00158d00012f7914 (0x00158d00012f7914): QBKG03LM - Xiaomi Aqara double key wired wall switch (Router)
zigbee2mqtt:info 2018-11-13 21:13:57 0x00158d00014a9e71 (0x00158d00014a9e71): QBKG03LM - Xiaomi Aqara double key wired wall switch (Router)

i have a routers too but looks like they dont work

Unfortunately, according to this issue there are some problems with QBKG03LM as a router. I have not tested this myself.

@Playedin, I’m not entirely sure if you need to repair, but there is a branch of the coordinator firmware that’s optimized for larger networks and supports storing of more routes in the network.

1 Like

Hi everyone,
I’m new here, I’ve bought all hardware needed to play with this great tool.
I’m already using a zigate and never had another gateway for my xiaomi and tradfri devices.
Actually I’m using :

  • double key aqara wall switch with fire lines
  • aqara motion detector
  • aqara humidity and temp senor
  • the cube
  • aqara wireless switch double key
  • tradfri bulb
  • osram smart plug

everything is running fine in my house even with the large amount of concrete between floors.
The zigate and server are locate on the ground floor and I can receive temp updates from a sensor located on the second floor on the opposite side of the house.

But the activity around this project bring me here, I get the hardware and flash the cc2531. Install zigbee2mqtt in a docker container and connect my first device, one of the three osram plug I do not use.
The plug 0 was on the same floor just behind a wall, great it works.
Then I try to add a second osram plug (plug 1) on the first floor just above the first plug.
The join failed, then the container did not see any other join call I had to restart it.
Finally the join is a success good.
Same procedure for a plug in the second floor (plug 2), same troubles but finally zigbee2mqtt saw it and join it.

Now my issues starts, I can see my devices in hass, I can toggle them but for the device on the second floor more than 50% of the commands are lost.
I tried to see the network map, it shows me that I have something like this:

  • plug 1 connected to coordinator
  • plug 0 and plug 2 connected to plug 1

non sense.

So my question is simple, can my zigbee mesh network from my zigate interfere with the zigbee2mqtt transmission ? I dit not remove my wall switch and other tradfri devices before testing the cc2531 of course.
Or it is just my house and my concrete who are not cc2531 compliant ?

cc2531 range is not as good as zigate, that’s for sure.
osram plugs connected to each others sometimes happens here as well.
you might want to try another zigbee channel. see https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html / https://statusq.org/archives/2018/01/09/8435/

Hey,
first off all - zigbee2mqtt is amazing! Finally a solution without using multiple gateways.

I was able to pair all my xiaomi/aqara devices. But i have two problems.

The first one is that when i restart HA, it seems like the addon isnt working. My components wont get updated. I need to manually restart the addon.

The other one, i tried to create a flow in node-red with my aqara motion detector.
I can see in the logs that there is motion detected and the HA component is updated - but only once to “on”. The thing is, i dont want my lights to be on for 2 minutes when I’m only walking 10 seconds through the floor. But I also dont want it to turn “off” when there is still motion. Since the state wont change/update i cant create a usefull flow.
I tried to use the mqtt node because its always sending an update when motion is detected but i dont know how to extract the occupancy out of the payload.

I hope you can help me :slight_smile:

ok I will try to change the channel as described in your links.
But I’ve no issue with zigate (don’t know if I can change the channel there)

concerning osram plugs connected to each other that’s the idea because they are router, but they need to choose the closest one.

Why don’t you just turn off the Zigate for a while and see what happens, should then be obvious if that’s the problem rather than diving straight in and changing things unnecessarily.

I’m able to pair all my Xiaomi Zigbee sensors except Mijia temperature ones (WSDCGQ01LM).
I have enabled debug messages on module config and followed instructions from https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices unsuccessfully.

But i don’t get any message (nor error neither opposite) when i try to pair these sensors…

Any of you has had similar issue?, do you know what options i have?
I rather to use autodiscover than config all mqtt sensors manually…

I think there was a note in the wiki. On Mija devices you need to keep the device active by pressing the button every second. Otherwise its going to sleep and cant pair.

hi @0rn0lf

That’s what i tried unsuccessfully to do, following instructions from URL https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices :

First long press (4-5 seconds) until the blue light starts blinking, and then one short press every second.
However there is neither pairing nor error messages on mqtt log, so i don’t know what i’m doing wrong…

Yes I can do that but I can’t unwire and remove batteries for all devices connected on zigate.

Finally i’ve been able to solve it…
There were no messages because casually mijia sensors were the first ones that i bought , and batteries had such low energy, so sensors couldn’t been detected by zigbee bridge.
Once replaced by new ones everything is working fine…

So, finally yesterday I received all the bits an pieces to try to make this work - and I did with rather very few complications.

Thank you very much, @Koenkk, for this great piece of software and the instructions on how to make it work!

I now have 2 Aqara temperature sensors connected and am already thinking about many other uses :+1:

One quick question to the people who’ve been using it for a while with these sensors:
How long do you expect the batteries to last?

I have one of the sensors in my fridge, the other one in the freezer. Both have been running for roughly a day now, but the battery-%age has gone down significantly already.
I know it’s a rough environment for the batteries, but I’m still surprised about the battery drain so far.
I also know that the linkquality values of 35ish are probably not ideal either, but short of putting the RPi in the freezer as well :stuck_out_tongue_winking_eye: I’m not sure what to do.