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

Just rebooted my NUC and my lights wont work anymore with Zigbee2Mqtt.

I am using the Latest docker image and commit #52c51b6.

> [email protected] start /app
> node index.js

2018-6-29 15:19:33 INFO Starting zigbee2mqtt version 0.0.0 (commit #52c51b6)
2018-6-29 15:19:33 INFO Starting zigbee-shepherd
2018-6-29 15:19:34 INFO zigbee-shepherd started
2018-6-29 15:19:34 INFO Currently 10 devices are joined:
2018-6-29 15:19:34 INFO dining_rm (0x000b57fffeaff3ec): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO sitting_rm (0x000b57fffe9b7a5e): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO unknown (0x000b57fffeaa2748): unkown - undefined unknown (EndDevice)
2018-6-29 15:19:34 INFO side_lamp (0x000b57fffe9db595): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO corner_lamp (0x000b57fffe9b9c1a): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO 0x000b57fffeb2d061 (0x000b57fffeb2d061): unkown - undefined unknown (EndDevice)
2018-6-29 15:19:34 INFO dining_lamp (0x90fd9ffffe1fbdaa): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO cam_bedside (0x90fd9ffffe8cf708): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 INFO dimmer_small (0x000b57fffe2c5c77): ICTC-G-1 - IKEA TRADFRI wireless dimmer (EndDevice)
2018-6-29 15:19:34 INFO sally_bedside (0x90fd9ffffe897d97): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)
2018-6-29 15:19:34 WARN `permit_join` set to  `true` in configuration.yaml.
2018-6-29 15:19:34 WARN Allowing new devices to join.
2018-6-29 15:19:34 WARN Set `permit_join` to `false` once you joined all devices.
2018-6-29 15:19:34 INFO Zigbee: allowing new devices to join.
2018-6-29 15:19:34 INFO Connecting to MQTT server at mqtt://192.168.85.5
2018-6-29 15:19:34 INFO zigbee-shepherd ready
2018-6-29 15:19:34 INFO Connected to MQTT server
2018-6-29 15:19:34 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'
2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffeaff3ec/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/dining_rm/set","state_topic":"zigbee2mqtt/dining_rm","availability_topic":"zigbee2mqtt/bridge/state","name":"dining_rm"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9b7a5e/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/sitting_rm/set","state_topic":"zigbee2mqtt/sitting_rm","availability_topic":"zigbee2mqtt/bridge/state","name":"sitting_rm"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9db595/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/side_lamp/set","state_topic":"zigbee2mqtt/side_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"side_lamp"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9b9c1a/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/corner_lamp/set","state_topic":"zigbee2mqtt/corner_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"corner_lamp"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe1fbdaa/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/dining_lamp/set","state_topic":"zigbee2mqtt/dining_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"dining_lamp"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe8cf708/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/cam_bedside/set","state_topic":"zigbee2mqtt/cam_bedside","availability_topic":"zigbee2mqtt/bridge/state","name":"cam_bedside"}'
2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/sensor/0x000b57fffe2c5c77/brightness/config', payload: '{"unit_of_measurement":"brightness","icon":"mdi:brightness-5","value_template":"{{ value_json.brightness }}","json_attributes":[],"state_topic":"zigbee2mqtt/dimmer_small","availability_topic":"zigbee2mqtt/bridge/state","name":"dimmer_small"}'

2018-6-29 15:19:34 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe897d97/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/sally_bedside/set","state_topic":"zigbee2mqtt/sally_bedside","availability_topic":"zigbee2mqtt/bridge/state","name":"sally_bedside"}'
2018-6-29 15:19:35 INFO 
	{"message":"request unsuccess: 17","stack":"Error: request unsuccess: 17\n    at /app/node_modules/zigbee-shepherd/lib/components/zdo.js:46:21\n    at CcZnp.<anonymous> (/app/node_modules/cc-znp/lib/ccznp.js:257:13)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at CcZnp.emit (events.js:211:7)\n    at CcZnp._mtIncomingDataHdlr (/app/node_modules/cc-znp/lib/ccznp.js:357:14)\n    at /app/node_modules/cc-znp/lib/ccznp.js:333:22\n    at _combinedTickCallback (internal/process/next_tick.js:131:7)\n    at process._tickCallback (internal/process/next_tick.js:180:9)"}

2018-6-29 15:19:44 INFO Zigbee publish to '0x000b57fffeaff3ec', genOnOff - on - {} - null

And i cant add any new lights.

Any Help please

1 Like

@cmille34 I use the discovery feature and find it works well (no need to manually add sensors to HA yaml files, but note that devices wonā€™t automatically appear in sensors.yaml - you can see them in the states page in HA)

You only use retain: true in zigbee2mqttā€™s configuration.yaml within each device. This will remember any sensor states during a HA reboot.

e.g. zigbee2mqtt configuration.yaml:

homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.1.50'
  user: homeassistant
  password: removed
serial:
  port: /dev/ttyACM0
devices:
  '0x00158d0001b149eb':
    friendly_name: window_ensuite_velux
    retain: true

home assistant configuration.yaml:

mqtt:
  discovery: true
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

@cameron use the reset button on the stick and reboot your system. Iā€™d also avoid using ā€œpermit_joinā€ default to ā€œtrueā€, better use the button and timer to allow joining from the interface.

You can add retain: true on the zigbee2mqtt configuration.yaml.
on Hassio is under \IP\share\zigbee2mqtt\configuration.yaml (On other systems you have to find it). Thereā€™s already an entry for retain: false in each sensor so you just have to change it to true.
Be carefull with this file as if it gets corrupted you wont be able to restart the addon. Before editing copy both configuration.yaml and database.db to another location so you can replace in case of need.

Like kimon_m explained there was an issue with an old version that would cause your addon to crash.
As thereā€™s no versioning for the moment you can just uninstall and reinstall de addon just to be sure. Anytime thereā€™s a change in zigbee2mqtt the addon is recreated every 30m I believe, but thereā€™s no warning regarding updates.

As far as your question, Iā€™m also using a CC2531 as router and I felt that sometimes some sensors took some time to update (xiaomi DHTs) but I couldnā€™t pinpoint the exact issue.
I also add a few IKEA bulbs to the mix that also act as router and I think itā€™s better now.

Thanks for the reply. @ciotlosm

When you say reset button on the stick which one I have two buttons on my stick .CC2531

And not sure what you mean by use the button and timer to add new devices.

Thanks for the reply. Iā€™m experiencing the same as you in that the devices take a while to update, but the router seems to be working well.

I added some xiaomi motion sensors and they didnā€™t seem to push battery levels for over 6 hours but finally appeared overnight, weird behaviour.

Hi,

Thank you developers for giving such a great alternative to other more expensive options.

Is it possible to implement tagged versioning on docker containers?
I am using that on all my containers so in case something doesnā€™t work as intended I can easily switch back.

Yes, this will be done when version 0.1 launches (which is soon).

2 Likes

Using this can I have my Xiaomi and hue devices on the same zigbee network so that the hue bulbs extend the range ?

Yes you can

Still having problems with this when i switch on a light using HA it does not work and the Zigbee2mqtt terminal says

2018-7-1 13:15:01 INFO Zigbee publish to '0x000b57fffeaff3ec', genOnOff - on - {} - null

This is the Startup of Zigbee2mqtt.

> [email protected] start /app

> node index.js

2018-7-1 13:13:45 INFO Starting zigbee2mqtt version 0.0.0 (commit #52c51b6)

2018-7-1 13:13:45 INFO Starting zigbee-shepherd

2018-7-1 13:13:48 INFO Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)

2018-7-1 13:14:48 INFO Starting zigbee-shepherd

2018-7-1 13:14:50 INFO zigbee-shepherd started

2018-7-1 13:14:50 INFO Currently 9 devices are joined:

2018-7-1 13:14:50 INFO dining_rm (0x000b57fffeaff3ec): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO sitting_rm (0x000b57fffe9b7a5e): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO unknown (0x000b57fffeaa2748): unkown - undefined unknown (EndDevice)

2018-7-1 13:14:50 INFO side_lamp (0x000b57fffe9db595): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO corner_lamp (0x000b57fffe9b9c1a): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO dining_lamp (0x90fd9ffffe1fbdaa): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO cam_bedside (0x90fd9ffffe8cf708): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO sally_bedside (0x90fd9ffffe897d97): LED1545G12 - IKEA TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (Router)

2018-7-1 13:14:50 INFO Router (0x00124b0012022e3f): CC2530.ROUTER - Custom devices (DiY) [CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/) (Router)

2018-7-1 13:14:50 INFO Connecting to MQTT server at mqtt://192.168.85.5

2018-7-1 13:14:50 INFO zigbee-shepherd ready

2018-7-1 13:14:50 INFO Connected to MQTT server

2018-7-1 13:14:50 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffeaff3ec/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/dining_rm/set","state_topic":"zigbee2mqtt/dining_rm","availability_topic":"zigbee2mqtt/bridge/state","name":"dining_rm"}'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9b7a5e/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/sitting_rm/set","state_topic":"zigbee2mqtt/sitting_rm","availability_topic":"zigbee2mqtt/bridge/state","name":"sitting_rm"}'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9db595/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/side_lamp/set","state_topic":"zigbee2mqtt/side_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"side_lamp"}'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x000b57fffe9b9c1a/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/corner_lamp/set","state_topic":"zigbee2mqtt/corner_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"corner_lamp"}'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe1fbdaa/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/dining_lamp/set","state_topic":"zigbee2mqtt/dining_lamp","availability_topic":"zigbee2mqtt/bridge/state","name":"dining_lamp"}'

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe8cf708/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/cam_bedside/set","state_topic":"zigbee2mqtt/cam_bedside","availability_topic":"zigbee2mqtt/bridge/state","name":"cam_bedside"}

2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/light/0x90fd9ffffe897d97/light/config', payload: '{"brightness":true,"color_temp":true,"platform":"mqtt_json","command_topic":"zigbee2mqtt/sally_bedside/set","state_topic":"zigbee2mqtt/sally_bedside","availability_topic":"zigbee2mqtt/bridge/state","name":"sally_bedside"}'
2018-7-1 13:14:50 INFO MQTT publish, topic: 'homeassistant/binary_sensor/0x00124b0012022e3f/router/config', payload: '{"payload_on":true,"payload_off":false,"value_template":"{{ value_json.state }}","device_class":"connectivity","json_attributes":["description","type","rssi"],"state_topic":"zigbee2mqtt/Router","availability_topic":"zigbee2mqtt/bridge/state","name":"Router"}'

2018-7-1 13:15:01 INFO Zigbee publish to '0x000b57fffeaff3ec', genOnOff - on - {} - null
2018-7-1 13:15:04 INFO Zigbee publish to '0x000b57fffeaff3ec', genOnOff - on - {} - null

Any help pleaseā€¦ this was a good project but am not sure its working anymore.

Hey guys, Iā€™ve flashed my USB stick and installed and configured the HASS add-on however Iā€™ve been getting these errors in my logā€¦

2018-7-1 12:18:15 INFO Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)
events.js:114
function emitOne(handler, isFn, self, arg1) {
            ^
RangeError: Maximum call stack size exceeded
at emitOne (events.js:114:17)
at SerialPort.emit (events.js:211:7)
at SerialPort._error (/app/node_modules/serialport/lib/serialport.js:150:10)
at SerialPort.close (/app/node_modules/serialport/lib/serialport.js:370:17)
at SerialPort.spErr (/app/node_modules/cc-znp/lib/ccznp.js:79:22)
at emitOne (events.js:116:13)
at SerialPort.emit (events.js:211:7)
at SerialPort._error (/app/node_modules/serialport/lib/serialport.js:150:10)
at SerialPort.close (/app/node_modules/serialport/lib/serialport.js:370:17)
at SerialPort.spErr (/app/node_modules/cc-znp/lib/ccznp.js:79:22)

Maybe something changed in dependencies on last update. Best to raise an issue here: https://github.com/Koenkk/zigbee2mqtt/issues

@ChrisR615 maximum call stack size exceeded is usually when you donā€™t have the right firmware. Please flash the latest (it shows updated 10 days ago) from stable.

Reflashed. Same result.

Whatā€™s the advantage of this vs just buying a elelabs zigbee usb stick or shield?

Thanks!!emphasized text

How many devices do you have?

@kiwijunglist see: https://www.reddit.com/r/homeassistant/comments/8qq4h4/hassio_addon_zigbee2mqtt_hassio/e0m5mxb/

Thanks.

I donā€™t see Yale locks listed. Will this support zigbee Yale locks?