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

Anyone use zigbee2mqtt to received data from xiaomi aqara temperature sensors? All work ok… But when I poweroff raspberry (i’m still config it so it’s not powered on 24h at the moment) and power on after hours or day later, temperature is not updated and still remain to last value (i’ve set retain to true). To update values for each xiaomi sensor i’ve to push little button under the sensor… It seems they go to sleep when raspberry is not online…?

Hello! I finally got this working. I have info about device in zigbbee2mqtt logs:

  zigbee2mqtt:info 2018-12-3 17:20:09 MQTT publish, topic: 'zigbee2mqtt/0x00158d00022833b3', payload: '{"temperature":23.73,"linkquality":47,"humidity":43.39}'
  zigbee2mqtt:info 2018-12-3 17:20:12 MQTT publish, topic: 'zigbee2mqtt/0x00158d00022833b3', payload: '{"temperature":23.9,"linkquality":128,"humidity":43.39}'
  zigbee2mqtt:info 2018-12-3 17:20:12 MQTT publish, topic: 'zigbee2mqtt/0x00158d00022833b3', payload: '{"temperature":23.9,"linkquality":128,"humidity":66.46}'
  zigbee2mqtt:info 2018-12-3 17:20:15 MQTT publish, topic: 'zigbee2mqtt/0x00158d00022833b3', payload: '{"temperature":23.91,"linkquality":128,"humidity":66.46}'
  zigbee2mqtt:info 2018-12-3 17:20:15 MQTT publish, topic: 'zigbee2mqtt/0x00158d00022833b3', payload: '{"temperature":23.91,"linkquality":128,"humidity":76.42}'

But I can not find that entity_id in services
Need some help on this…

And will I get battery info?

They update every few hours or when temperature changes. Try to put them in your freezer to see if they update.

You have to manually add them to your home assistant configuration or configure MQTT discovery. See the zigbee2mqtt wiki here.

Yes, mine took 12-24 hours but finally they did.

I am using hassio add-on. Should I still use that instruction?


I just can not figure out how to get devices as I have tried automatic and manual ways.

You can add autodiscovery true in mqtt

I did that
Actually, now I am getting this issue:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/binary_sensor/mqtt.py", line 119, in async_added_to_hass
    await MqttAvailability.async_added_to_hass(self)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 830, in async_added_to_hass
    availability_message_received, self._availability_qos)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 280, in async_subscribe
    topic, msg_callback, qos, encoding)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 662, in async_subscribe
    await self._async_perform_subscription(topic, qos)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 697, in _async_perform_subscription
    _raise_on_error(result)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 782, in _raise_on_error
    'Error talking to MQTT: {}'.format(mqtt.error_string(result_code)))
homeassistant.exceptions.HomeAssistantError: Error talking to MQTT: The client is not currently connected.

Pretty obvious that smth is wrong with connection to mqtt. But I do not know what exactly, because right now I can get info from water leak sensor on zigbee2mqtt logs

Never mind. I did not wrote user and password in config…
Now it works!

Hello there,
I’ve just managed to add the zigbee usb dongle to Raspberry and make it start.
Everything should be ok, it also found the only Phiiph hue lamp I’ve attached, it says:

 zigbee2mqtt:info 2018-12-3 22:42:08 Starting zigbee2mqtt version 0.2.0 (commit #5b38ad6)
 zigbee2mqtt:info 2018-12-3 22:42:08 Starting zigbee-shepherd
 zigbee2mqtt:info 2018-12-3 22:42:10 zigbee-shepherd started
 zigbee2mqtt:info 2018-12-3 22:42:10 Coordinator firmware version: '20180815'
 zigbee2mqtt:info 2018-12-3 22:42:10 Currently 1 devices are joined:
 zigbee2mqtt:info 2018-12-3 22:42:10 unknown (0x0017880xxx6725da): 8718696449691 - Philips Hue 
 White Single bulb B22 (Router)
 zigbee2mqtt:warn 2018-12-3 22:42:10 `permit_join` set to  `true` in configuration.yaml.
 zigbee2mqtt:warn 2018-12-3 22:42:10 Allowing new devices to join.
 zigbee2mqtt:warn 2018-12-3 22:42:10 Set `permit_join` to `false` once you joined all devices.
 zigbee2mqtt:info 2018-12-3 22:42:10 Zigbee: allowing new devices to join.
 zigbee2mqtt:info 2018-12-3 22:42:10 Connecting to MQTT server at mqtt://xxx.cloudmqtt.com:xxxxx
 zigbee2mqtt:info 2018-12-3 22:42:10 zigbee-shepherd ready
 zigbee2mqtt:info 2018-12-3 22:42:10 Connected to MQTT server
 zigbee2mqtt:info 2018-12-3 22:42:10 MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'

So, if you confirm that everything is ok, my biggest problem now is: how to use this bulb with home assistant???

I’ve tried the MQTT autodiscovery in HA configuration.yaml

mqtt:
  broker: xxx.cloudmqtt.com
  port: xxxxx
  username: xxxxxx
  password: xxxxx
  discovery: true
  birth_message:
    topic: 'hass/status'
    payload: 'online'
    retain: true
  will_message:
    topic: 'hass/status'
    payload: 'offline'
    retain: true

But no devices are found… so I’ve tried

light:
  - platform: mqtt
    command_topic: 'zigbee2mqtt/0x0017880xxx6725da'

But it is not working at all…
What am I missing? What’s wrong?

Thanks in advance!

cc2530 as zigbee2mqtt co-ordinator

I can’t find any straight forward detailed instructions on how to flash the cc2530 with external aerial and then subsequently connect to my Intel NUC running ubuntu with hass.io installed to make a zigbee2mqtt co-ordinator.

Here is the device I have (cc2530 with external antenna)

cc2530

I also have these for flashing chips

FTDI232 USB-TTL adapter

And I also have a 3x CC2531 USB sniffers

and the CCDebugger and CC2531 downloader cable

Thanks for any help, I’m really confused.

1 Like

There seems to be some instructions here

1 Like

I got it flashed, but i’m stuck with this error

Zigbee2mqtt requires node version >=8.11 10, you are running v8.11.4!
zigbee2mqtt:info 2018-12-4 01:13:23 Logging to directory: ‘/app/data/log/2018-12-04.01-13-22’
zigbee2mqtt:info 2018-12-4 01:13:23 Starting zigbee2mqtt version 0.2.0 (commit #b0d3c2f)
zigbee2mqtt:info 2018-12-4 01:13:23 Starting zigbee-shepherd
zigbee2mqtt:info 2018-12-4 01:13:26 Error while starting zigbee-shepherd, attemping to fix… (takes 60 seconds)
zigbee2mqtt:info 2018-12-4 01:14:26 Starting zigbee-shepherd
zigbee2mqtt:error 2018-12-4 01:14:29 Error while starting zigbee-shepherd!
zigbee2mqtt:error 2018-12-4 01:14:29 Press the reset button on the stick (the one closest to the USB) and start again

zigbee2mqtt:error 2018-12-4 01:14:29 Failed to start

{“message”:“request timeout”,“stack”:“Error: request timeout\n at CcZnp. (/app/node_modules/cc-znp/lib/ccznp.js:255:22)\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 Timeout. (/app/node_modules/cc-znp/lib/ccznp.js:234:18)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)”}

Install the correct version of Node.js(8.11.10) required by Zigbee2mqtt.

Zigbee2mqtt requires node version >=8.11 10, you are running v8.11.4!

No they don’t update. I tried to bring it in one hand (fist). No changes until i push button. When i push button, after some seconds HA updates values of temp.

Are they not just going into power saving mode because they get no response from the server.

Why do you bother to power down even if you’re still setting it up?

What can be wrong if some xiaomi devices added and some did not? I have 4 smoke sensors, the are exactly the same, but two of them just can not connect to zigbee2mqtt. There is just nothing in logs, like there is no sensor. I tried 50 times and they are really close (half a meter) to raspberry.

And on some devices I get Cannot get the Node Descriptor of the Device: 0x00158d000222ff55 (Error: Timed out after 10000 ms) again and again

Ok thanks. Cause i’ll prefer this way… Until i’ve not mounted all my shelly1 i’ve no benefit to mantain raspberry powered on 24h… To see only weather and temps :slight_smile:

Not much benefit turning it off either :smile:

May be try to change the batteries. I had simillar issues with my motion sensors. After switching the batteries between the sensors, it worked better (however, not perfekt).

Does anyone know if this supports the Xiaomi Yeelight Smart LED Light Strips?

I don’t have them, but I am pretty sure the yeelights use WiFi (not Zigbee). This component is for Zigbee devices.

Ah. You’re correct. Thanks!