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

I’m using one Osram Smart+ Plug as well, the device extends the network, so I believe it works as router.

hey thanks, sadly i just ordered one of thos xiaomi onces and an adapter yesterday. Wanted to have a working router when the rest arrived. But i will get one of those smart plugs as well as they have a good price. Will test it then as well.

Hello everyone! I have a question (probably a dumb one)…
Is it possible to add support for new zigbee devices with the hass.io zigbee2mqtt add-on? So if e.g. I have a lamp (CLA60 RGBW OSRAM) which is currently not supported, how would I go about adding it to the pool of known devices? If it’s possible can someone briefly describe it :slight_smile:
Thanks in advance!

This page should help: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices

Thanks @jarrah but I already know about that page. Let me be a little more specific. E.g. where do I find the file node_modules/zigbee-shepherd-converters/devices.js when using the add-on? What’s the path and is it even accessible at all?

Can someone answer a question about zigbee2mqtt and xiaomi zigbee power plugs.

I currently have the power plugs in H.A. via the gateway. The plugs report watts used. If i plug in a heater and switch it between high and low, the power (wattage) used updates in the mi home app immediately, however it takes over a minute to update in H.A.

Question:

  1. Does zigbee2mqtt report the power usage of these plugins.
  2. How long does the plug take to update in h.a. when the power usage (watts) changes?

I need to create an automation based on power usage of a 220v device and the Xiaomi update frequency currently is too slow.

Yes

Takes about a minute. The xiaomi app i recall was instant (i might be wrong). The ha xiaomi component using the xiaomi gateway reported every 3 minutes and half approximately, no matter if there was significant change.

I use these as a fan sensor. They report me the fan speed (6) and if the fan light is on/off. So i had to map 14 different states of power to have this working. It works very good ATM.

How much power are we talking about? If you need faster report the use a sonoff POW with tasmota. Those you can adjust the power report to one second if you want. I had them for my fans at the beginning, but at low powers (The fan tops 50W at full speed and light on) when fan was idle POW kept reporting spikes of 8W sometimes making look the fan was on when it wasn’t. Xiaomi plugs are more stable at low power.

Just personally i wouldn’t use a POW over 9A or 10A (2KW).

Yes. Xiaomi app is instant / within a few seconds.

I’m needing to monitor a rangehood fan. It has 3 or 4 speeds and led lights on / off. I can put the power monitor before the rangehood or i can put it between the rangehood and the fan (the rangehood had a remotely mounted fan). If the power usage is accurate I’ll put it before the rangehood so i can check the led state.

What are you using for your fan sensor, you didn’t state in your answer.

1 minute is not too bad, just wish it could be about 5s or so for the Xiaomi plug. It’s not as though it uses battery power.

The other option to monitor fan speed would be either a small turbine inside the tube or a microphone to monitor motor noise db.

The sensor is the plug. I know what speed is on and light is on/off by power usage.

I put in a github issue asking if the polling frequency or reporting frequency can be increased.

Is it possible to add new devices using the addon only? (https://github.com/danielwelch/hassio-zigbee2mqtt)

A few of us here use this method. Have a read through the github readme, all you need to know is there.

Either im blind or cant read - can you show me where please?

p.s. I am not talking about pairing. I am talking about adding new devices to devices.js (or whatever it was called in non-addon method of install)

Ahh, I thought you meant pairing.

Adding new devices needs to be raised with the zigbee2mqtt git. The addon simply builds from code from the original git.

You can try raise an issue through the git, hopefully someone can help you out there.

Thanks @scottdarby The two devices arrived well packaged and have been pressed into immediate service. Thanks again.

+1 thanks to @scottdarby - star

Thanks heaps for this project, you’re a legend! (and Andrew Linden too).
The stick is dirt cheap and the software is great.

Received the stick today, firmware programming was super easy following the instructions. Paired an Aqara door sensor without any issues, hass picked it up straight away! It is even better than native xiaomi gateway integration (requires hass reboot) and that one is pretty good.
Mija switch (the round one) gave me some hard time even with the hint from the instructions but i figured that if i just keep pressing the reset button for like 30 sec after it turns on it will pair OK; then i paired a mija motion sensor doing so on the first attempt.
In terms of the zigbee range the USB stick seems to be much better than xiaomi gateway. I had ongoing issues in one of the rooms where i have a motion sensor and a zigbee socket, the room is behind a couple of walls on 2nd floor though it was just ~5m away on a direct line from the gateway. It looks more stable with USB stick so far, and faster too.
Then i also tried a door sensor on my front gate which is about 20m away from the stick through a few brick walls and also got a good result; that’s pretty good and i didn’t expect it to reach that far!

Now will monitor this small setup for a while and if all OK will move the rest of xiami devices to the stick and will only use xiaomi gateways as speakers for the alarm system and night light.
I have upwards of 30 devices, mostly xiaomi sensors, buttons(switches) and sockets, and a few other devices such as broadlink TC2 and orvibo. As Xiaomi sensors and switches (for some reason virtually no other company makes buttons!?) are the core of my setup, having this USB stick option is really helpful. Xiaomi recently pissed me off quite a bit by blocking the ios app and even though i did manage to get it to work again the app it horribly slow and unreliable. The only drawback is that there is no option to upgrade sensor’s firmware through the stick but that’d be pretty hard i’d imagine.

I didn’t see the Philips Hut Tap switches (the ones with three buttons) among supported devices, unfortunately. I think those would be a bit better than xiaomi switches in terms of the easiness of use, is it possible to add them at all? I suspect it might be using some non-standard pairing bypassing the bridge.

2 Likes

I have a xiaomi zigbee power plug which i have just moved from xiaomi gateway to the USB stick. it is all connected to hass (raspbian build).
Now with the plug working via zigbee2mqtt, when i switch the plug off the meter switches to zero instantly. When i turn it on it takes about 7-10 seconds for the meter to start showing usage. I have a LED strip which only consumes about 6 Wt on this plug so can’t tell if it will take more time if there was more load.
ps. i’m using CC2531ZNP-Prod.hex if it makes any difference

1 Like

I’m using the hassio zigbee2mqtt addon and my PR for supporting a new device to the zigbee-shepherd-converters repo just got merged. Now I logically want to use my new device but after reinstalling the addon it still says it is not supported. Do I have to wait until the next versioned release of the addon or am I just doing something wrong?
Thanks for you help!