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

I’m trying to get this working, but I can’t figure it out. I have done the following.
I’m running everything on a HASSOS VM (Hass.io)

  1. Setup Z2M
  2. Install Mosquitto
  3. Setup MQTT integration in HA with discovery enabled

If I look at the logs of Z2M I see that I have added 2 devices, and they are reporting changes.
I see that Z2M connect to Mosquitto on startup, and when looking at Mosquitto log I see 2 connections, one is labeled homeassistant, the other mqttjs_77d37628 (I’m guessing this is Z2M)

But no devices show up on integrations panel of MQTT

What am I missing ?

EDIT I got it working as far as I could tell Z2M connected as a guest or readonly or something, it didn’t write anything, when I got proper login setup it was working.

Have you looked in unused entities (3 vertical dots on upper l̶e̶f̶t̶ Right on Hass frontend) for the auto discovered items?

I’m having problems like those above. One of my Ikea lights showed after many tries, but not the other. Here is the log:

zigbee2mqtt:info 5/5/2019, 5:38:12 PM New device ‘undefined’ with address 0xd0cf5efffe2ed70f connected!
zigbee2mqtt:info 5/5/2019, 5:38:12 PM MQTT publish: topic ‘zigbee2mqtt/bridge/log’, payload ‘{“type”:“device_connected”,“message”:“0xd0cf5efffe2ed70f”,“meta”:{}}’
zigbee2mqtt:warn 5/5/2019, 5:38:12 PM Device with modelID ‘undefined’ is not supported.
zigbee2mqtt:warn 5/5/2019, 5:38:12 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
zigbee2mqtt:info 5/5/2019, 5:38:12 PM MQTT publish: topic ‘homeassistant/light/0xd0cf5efffe2ed70f/light/config’, payload ‘{“brightness”:true,“schema”:“json”,“command_topic”:“zigbee2mqtt/0xd0cf5efffe2ed70f/set”,“state_topic”:“zigbee2mqtt/0xd0cf5efffe2ed70f”,“name”:“0xd0cf5efffe2ed70f_light”,“unique_id”:“0xd0cf5efffe2ed70f_light_zigbee2mqtt”,“device”:{“identifiers”:“zigbee2mqtt_0xd0cf5efffe2ed70f”,“name”:“0xd0cf5efffe2ed70f”,“sw_version”:“Zigbee2mqtt 1.3.1”,“model”:“TRADFRI LED bulb E27 1000 lumen, dimmable, opal white (LED1623G12)”,“manufacturer”:“IKEA”},“availability_topic”:“zigbee2mqtt/bridge/state”}’
zigbee2mqtt:info 5/5/2019, 5:38:12 PM MQTT publish: topic ‘homeassistant/sensor/0xd0cf5efffe2ed70f/linkquality/config’, payload ‘{“unit_of_measurement”:"-",“value_template”:"{{ value_json.linkquality }}",“state_topic”:“zigbee2mqtt/0xd0cf5efffe2ed70f”,“json_attributes_topic”:“zigbee2mqtt/0xd0cf5efffe2ed70f”,“name”:“0xd0cf5efffe2ed70f_linkquality”,“unique_id”:“0xd0cf5efffe2ed70f_linkquality_zigbee2mqtt”,“device”:{“identifiers”:“zigbee2mqtt_0xd0cf5efffe2ed70f”,“name”:“0xd0cf5efffe2ed70f”,“sw_version”:“Zigbee2mqtt 1.3.1”,“model”:“TRADFRI LED bulb E27 1000 lumen, dimmable, opal white (LED1623G12)”,“manufacturer”:“IKEA”},“availability_topic”:“zigbee2mqtt/bridge/state”}’
zigbee2mqtt:info 5/5/2019, 5:38:13 PM Device incoming…
zigbee2mqtt:info 5/5/2019, 5:38:13 PM MQTT publish: topic ‘zigbee2mqtt/bridge/log’, payload ‘{“type”:“pairing”,“message”:“device incoming”}’

I’ll just quote myself because it may be of help to antonholmstedt

1 Like

Turned out that my problem was solved by not using Anonymous login to mosquitto, like @yrune a few posts above.

I have another problem though. I’ve paired some light bulbs and controller socket, but the remote included with that remote isn’t showing up at all when I try to pair it. I press the button inside four times and it starts to blink read, but nothing happens. Since nothing shows up in the log, I think that I’m not in pairing mode on the remote at all? Have you guys successfully paired it?

I made a factory reset by pressing 4 times, but I read now in the manual and it makes me confused:

1 Hold the ON/OFF switch close to the
control outlet you want to add (no more
than 5 cm away).
2 Press and hold the pairing button for
at least 10 seconds , you can find the
pairing button under the rear cover.

FACTORY RESET YOUR DEVICE
For wireless ON/OFF switch:
Press the pairing button 4 times within 5
seconds.

Anyone know if this dimmer from xiaomi/yeelight works with zigbee2mqtt? It’s new on the market and not listed in the supported devices!

Thanks

Afaik it’s Bluetooth not zigbee

I’m getting a new error now. Even tried a fresh hassio install but that didn’t work. Any ideas how to solve it? Running on a rpi 3b+.

zigbee2mqtt:info 5/6/2019, 8:10:24 PM Starting zigbee-shepherd
zigbee2mqtt:error 5/6/2019, 8:10:31 PM Error while starting zigbee-shepherd! (Error: request timeout)
zigbee2mqtt:error 5/6/2019, 8:10:31 PM Press the reset button on the stick (the one closest to the USB) and start again
zigbee2mqtt:error 5/6/2019, 8:10:31 PM Failed to start
{“message”:“request timeout”,“stack”:“Error: request timeout\n at CcZnp. (/app/node_modules/cc-znp/lib/ccznp.js:269:22)\n at Object.onceWrapper (events.js:273:13)\n at CcZnp.emit (events.js:182:13)\n at Timeout. (/app/node_modules/cc-znp/lib/ccznp.js:248:18)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)”}
zigbee2mqtt:error 5/6/2019, 8:10:31 PM Exiting…
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-05-06T18_10_31_367Z-debug.log

Hello everyone,

This is not solely a z2m related question but it has a bit to do with z2m: how do you guys go about making legacy wall light switches smarter? Any Zigbee module that I one can put in the recessed container behind the light switch?

There are a few listed in the supported devices for z2m manufactured by sunricher.

Cool! We’ll check that. I guess that if one only has neutral wiring, it won’t suffice… we’ll read up on that

Already found it in amazon but it looks pricey around 42€. At that price tag one can take the fibaro route, which I believe offers a bit more and if I’m not mistaken no live wiring is needed.

Agree - its not cheap.
I contacted sunricher on alibaba to try to order ten (their minimum consignment size) but they told me they will only deal with resellers, not end users.

Tell them you are a reseller :slight_smile:

They wanted the url for my web store.
It would have to be a fairly elaborate hoax…

So I had everything up and running, 3 tradfri motion sensors and 2 xiaomi vibration sensors.
Then the next day my tradfri motion sensors where not working anymore.
If I reset them and add again they work for a short time before they stop working again.

Any ideas what is wrong ?

This is log from re-adding to stop responding.

  zigbee2mqtt:info 5/8/2019, 9:02:07 PM Zigbee: allowing new devices to join.
  zigbee2mqtt:info 5/8/2019, 9:02:07 PM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.3.1","commit":"unknown","coordinator_firmware":20190223,"log_level":"info","permit_join":true}'
  zigbee2mqtt:warn 5/8/2019, 9:02:21 PM Device with modelID 'undefined' is not supported.
  zigbee2mqtt:warn 5/8/2019, 9:02:21 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
  zigbee2mqtt:info 5/8/2019, 9:02:23 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":118,"battery":47}'
  zigbee2mqtt:warn 5/8/2019, 9:02:26 PM Message without device!
  zigbee2mqtt:info 5/8/2019, 9:02:32 PM Device incoming...
  zigbee2mqtt:info 5/8/2019, 9:02:32 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
  zigbee2mqtt:warn 5/8/2019, 9:02:38 PM Device with modelID 'undefined' is not supported.
  zigbee2mqtt:warn 5/8/2019, 9:02:38 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
  zigbee2mqtt:info 5/8/2019, 9:02:50 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":68,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:02:54 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":15,"battery":47}'
  zigbee2mqtt:warn 5/8/2019, 9:03:14 PM Failed to configure 0x90fd9ffffe871633 (0x90fd9ffffe871633) ('Error: Timed out after 10000 ms') (attempt #3)
  zigbee2mqtt:warn 5/8/2019, 9:03:14 PM This can be ignored if the device is working properly
  zigbee2mqtt:info 5/8/2019, 9:03:48 PM Device incoming...
  zigbee2mqtt:info 5/8/2019, 9:03:48 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
  zigbee2mqtt:info 5/8/2019, 9:03:54 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":false,"linkquality":15,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:06:55 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":13,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:07:55 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":false,"linkquality":13,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:08:08 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":23,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:08:24 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":26,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:08:26 PM Zigbee: disabling joining new devices.
  zigbee2mqtt:info 5/8/2019, 9:08:26 PM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.3.1","commit":"unknown","coordinator_firmware":20190223,"log_level":"info","permit_join":false}'
  zigbee2mqtt:info 5/8/2019, 9:08:27 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":26,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:09:27 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":false,"linkquality":26,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:09:31 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":true,"linkquality":18,"battery":47}'
  zigbee2mqtt:info 5/8/2019, 9:10:31 PM MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffe871633', payload '{"occupancy":false,"linkquality":18,"battery":47}'

I had the same. Try moving it nearer to your Coordinator for a while and see if it stays connected.

If yes you will have to extend your range somehow.
One way tondo this would be to add an antenna to the coordinator.

seems like it might be a range issue yes, because today one of them was connected again without me doing anything. I’ve gotten an extender cable now, maybe it’s too much noise behind the computer. I guess there is poor antenna in the tradfree sensors then, since the Xiaomi sensors work fine.

Anyone know if how close the device you wish to pair to the CC2530/31 is SPECIFICALLY WHEN PAIRING? Last night I was trying to add additional devices to my network. I tried to pair a Mijia PIR sensor and a Mijia Temp sensor and neither were having it. With the temp sensor the only hint I got in the log that ANYTHING was progressing was a “timed out” error message. Otherwise there were no hints that any messages were being received by the CC chip from the new Mijia devices. Obviously I had “allow new devices” set to true. But…I was a couple of floors away from the CC chip. I have paired devices this far away from the CC chip and they work very reliably - but is it a different matter when they’re not yet paired?

Also, anyone know how to pair the Mijia temp sensor? I’ve seen some guides where it says you have to keep pressing the button every second and other guides where it says don’t!

Thanks