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

Hello everyone,

I have 2 ikea bulbs that were correctly paired but have started to act up a bit. Is there anyway one can double check whether they are still in the network? a sort of a “zigbee layer ping”?

The z2mqtt addon does see them while starting up.

thanks

  1. That means you did not completely complete the pairing process, try repairing and keep pressing the reset button for a longer time.
  2. I have this bulb and it is working, are you sure it is within range?
  3. Could this be the bulb from 2?
  1. That’s what I thought, but today I came across this video and all of the sudden I started to wonder whether I was doing something wrong: https://youtu.be/uhMrcIAdGxg

  2. Good tip!! many thanks @Koenkk

  1. how weird. I pressed it like a maniac and attempted pairing several times in a row. Will keep pressing the button longer and report back.
  2. It is absolutely within range and it has previously worked well with IKEA hub.
  3. Mmmm, fair point! I will disconnect the bulb from electricity and monitor the log.

@Koenkk, there is something fishy with the uplink from my home system towards my router devices. Initially I thought that the problem was limited to IKEA bulbs acting up a bit, but I’m now just through with setting up a Xiaomi power switch, with same results.

Here you can see how the two bulbs won’t accept orders comming from HA
2018-7-30 02:03:24 WARN Cannot handle MQTT message with topic ‘zigbee2mqtt/kitchen.light.1.tradfri/set’ and message ‘{“state”: “ON”}’
2018-7-30 02:03:48 INFO MQTT publish, topic: ‘zigbee2mqtt/kitchen.occupancy.xiaomi’, payload: ‘{“occupancy”:false}’
2018-7-30 02:04:45 WARN Cannot handle MQTT message with topic ‘zigbee2mqtt/corridor.light.1.tradfri/set’ and message ‘{“state”: “ON”}’
2018-7-30 02:04:45 WARN Cannot handle MQTT message with topic ‘zigbee2mqtt/corridor.light.1.tradfri/set’ and message ‘{“state”: “ON”}’

Zigbee2MQTT seems to recognize them as valid devices when it starts up:

2018-7-30 01:13:18 INFO kitchen.light.1.tradfri (0x000b57fffedc1058): LED1623G12 - IKEA TRADFRI LED bulb E27 1000 lumen, dimmable, opal white (Router)
2018-7-30 01:13:18 INFO corridor.light.1.tradfri (0x90fd9ffffe4bf6fd): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

same with the freshly installed power switch:

2018-7-30 02:53:03 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'
2018-7-30 02:53:10 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'
2018-7-30 02:53:18 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'
2018-7-30 02:53:43 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'
2018-7-30 02:53:43 INFO Zigbee: allowing new devices to join.
2018-7-30 02:53:48 INFO Zigbee: disabling joining new devices.
2018-7-30 02:53:56 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'

but when I manually switch the power switch on, HA gets updated (the UI reflects it by flapping the radio button). This is what leds me to think that the communication path between the usb stick and the devices is somehow experiencing problems, while the retune path seems to work just fine: I see accupancy sensors information being displayed in HA, door sensors do appear in HA just right too, and now seeing that the power switch informs HA as well.

I’ve now switched the debug level to “debug” but I don’t get much more information on what is going on, apart of the message I reported earlier:

2018-7-30 10:37:42 INFO Switching log level to 'debug'
2018-7-30 10:37:50 DEBUG Check online 0x000b57fffedc1058
2018-7-30 10:37:50 DEBUG Check online 0x90fd9ffffe4bf6fd
2018-7-30 10:37:50 DEBUG Check online 0x00158d00022f35ca
2018-7-30 10:37:56 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/power-plug.1.xiaomi/set' with data 'ON'
2018-7-30 10:37:56 WARN Cannot handle MQTT message with topic 'zigbee2mqtt/power-plug.1.xiaomi/set' and message 'ON'
2018-7-30 10:38:50 DEBUG Check online 0x000b57fffedc1058
2018-7-30 10:38:50 DEBUG Check online 0x90fd9ffffe4bf6fd
2018-7-30 10:38:50 DEBUG Check online 0x00158d00022f35ca
2018-7-30 10:39:50 DEBUG Check online 0x000b57fffedc1058
2018-7-30 10:39:50 DEBUG Check online 0x90fd9ffffe4bf6fd
2018-7-30 10:39:50 DEBUG Check online 0x00158d00022f35ca
2018-7-30 10:40:50 DEBUG Check online 0x000b57fffedc1058
2018-7-30 10:40:50 DEBUG Check online 0x90fd9ffffe4bf6fd
2018-7-30 10:40:50 DEBUG Check online 0x00158d00022f35ca
2018-7-30 10:40:55 DEBUG Recieved zigbee message with data {"cid":"genBasic","data":{"65281":{"3":34,"5":12,"7":"0x0000000000000000","8":4886,"9":256,"100":0,"149":0.0014568129554390907,"150":2240,"152":0,"154":16}}}
2018-7-30 10:40:55 INFO MQTT publish, topic: 'zigbee2mqtt/power-plug.1.xiaomi', payload: '{"state":"OFF","power":0,"voltage":224,"consumption":0,"temperature":34}'
2018-7-30 10:40:55 DEBUG Recieved zigbee message with data {"cid":"genBasic","data":{"65281":[null,null,null,null,null,12,null,"0x0000000000000000",4886,256,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,2240,null,0,null,16]}}
2018-7-30 10:41:50 DEBUG Check online 0x000b57fffedc1058

I don’t see much information around the relevant message:
2018-7-30 10:37:56 WARN Cannot handle MQTT message with topic ‘zigbee2mqtt/power-plug.1.xiaomi/set’ and message 'ON’

Does anybody have any experience with similar behaviour with Routers? Can anybody please advice what to do?

Thanks

I’ve been having 2 issues with my TRADFRI lights so far.

First of all, some of my lights keep trying to repair with my zigbee router and flashing.
This shows up in the log:

spinlock: false []
device already in network

Any ideas why this is happening?

Second of all, I’ve been having quite a bit of lag with some of the lights. When I try to turn on/off a light group, most of the time, only a few of the lights in the group turn off, while the rest need a few tries to actually turn on/off. I’ve checked the wifi channel in my apartment and it’s on 1, but due to living in a small apartment, there is a lot of other 2.4GHz wifi channels in the area, some on channel 11 too. Is there anything I can do to reduce the lag? It didn’t seem to happen when I used the TRADFRI gateway though.

My Ikea bulbs do that I think, along with this too. Can you confirm?

2018-7-29 10:56:48 INFO Device incoming…
2018-7-29 10:56:48 INFO MQTT publish, topic: ‘zigbee2mqtt/bridge/log’, payload: ‘{“type”:“pairing”,“message”:“device incoming”}’

Big shout-out to @Koenkk!! Apparently z2mqtt did not digest friendly names with either dots in between (or maybe they were simply too long or a combination of both). I’m back up and running and also the problem with the IKEA bulbs has been also solved along the way.

Hi Guys!

Anyone else with problems regarding release 0.1.1?

I’ve updated Z2M by updating github checkout, but didnt flashed the CC2531, since there is no new version…

The only change was setting “disable_led: true” under serial… Will try reflashing CC2531 just in case if the command messed the dongle.

Z2M starts normally but it stopped receiving messages at all.

Any hints?

Thanks in advace!

Troitino

Has anyone followed the instructions for Linux? I believe I have installed the dependencies but I still get a compile error.

checking for Boost headers version >= 1.39.0... no
configure: error: cannot find Boost headers version >= 1.39.0

Anyone else having issues with latest Hassio addon update 0.1.1?

I’m getting the following:

https://github.com/danielwelch/hassio-zigbee2mqtt/issues/42

I think that relates to the work in issue 150

https://github.com/Koenkk/zigbee2mqtt/issues/150

Thanks. Any way to roll back to a previous version?

It all worked pretty flawlessly using hassio and danielwelch’s add-on.

I have enabled mqtt autodiscovery and connected my first sensor, a xiaomi open/close door/window sensor. I notice that in the mqtt stream my my broker it shows the correct state

For some reason the status is reversed in HA so I end up with

mqtt : "true" = HA state: "off"
mqtt : "false" = HA state: "on"

Any ideas what I might have done wrong?

How are you placing the xiaomi sensor. It’s default close state is when the sensor and the magnet are next to each other.

@Koenkk do you have any advice regarding my post here.

  1. The spinlock/device is already in network is normal for Tradfri bulbs, this will be hidden in the next release of zigbee2mqtt.

  2. I haven’t had this issue so far, but this indeed sounds like some interference/range issue.

Thanks for the reply.

Regarding #1, will the update also stop the Tradfri lights from blinking?

And regarding #2, will it be possible to change the channel of the zigbee devices to something other than channel 11?

Hi all. Not sure if I’m being stupid but in the getting started guide it advises to “Download the firmware CC2531ZNP-Prod.hex”. What does that actually mean? Save that file?

Sorry if this is a really stupid question…

It’s a link to a section where you download the firmware. Are you not seeing the hyperlink?

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531/bin