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

Your battery health figures will then be slightly off in comparison with others, no problem of course.

But around 100% is not very interesting IMO. I’m more interested when the battery comes near 2.80 -2.70 Volt range. Then I know the battery comes to end of life with a steep fall off and probably I have around 10% left and need to change the battery!

For example Xiaomi gives a life expectancy of two years for their sensors (with CR2032 batteries), so there will still be weeks left to change the battery before they stop working (I suppose because I haven’t any clue at what voltage level they stop working).
My oldest Xiaomi / Aqara sensors are about a year old and still pretty healthy.

Anyone here that knows how to flash with a Mac? the GitHub instructions aren’t really doing it for me

i did the flashing on a macbook pro and the github instructions worked fine for me.

I think pkg-config was installed wrong or not at all, trying again now

this is what i found in my .bash_history

brew install libusb
brew install boost
brew install pkgconfig
cd
git clone https://github.com/dashesy/cc-tool.git
cd cc-tool
./configure
make
./cc-tool

Hey all, is there a wiki page which explains how to create battery sensors for the various devices? I have added a few based on searching through this page but Im not sure exactly what is the code I need. I have added a few but Im waiting to check if they get a value at some point before adding the rest.

This is what I’ve done for the temp sensors:

- platform: mqtt
  name: “Battery Kitchen Temp Sensor”
  state_topic: “zigbee2mqtt/0x00158d000227b801”
  unit_of_measurement: ‘%’
  value_template: “{{ value_json.battery }}”

So far the values aren’t reporting but I think its a matter of waiting. Do I need something different for the motion sensors / door sensors?

Thanks!

Ok turns out I was being stupid. The tap event DOES in deed work. I was simple tapping the top of the cube expecting that to register but after watching a review video on YouTube I understand that to trigger the tap you have to physically lift the cube and tap the it on a surface TWICE.

The downside of receiving instructions in Chinese :grinning:.

Thanks again.

The door sensors and motion sensors will report immediately if you trigger them.

@Koenkk

Hi, couldn’t work out how to add a pull request to zigbee-shepherd-converters so have posted the code to add Osram SMART+ Spot GU10 Multicolor bulbs in the issues instead, hopefully you can use it like that.

They’re just the same as the other Osram RGBW bulbs you already have bar the change of ID, name etc, so hopefully an easy add.

thanks, will merge it!

1 Like

I connected a Xiaomi double wireless wall switch and it works great but does anyone know if it’s supposed to display the battery automatically as an attribute or do I need to configure a template battery sensor myself?

EDIT:

I got this solved. I didn’t know this one had a button.


Guys,

I’ve got a Xiaomi Aqara water leak sensor but I can’t figure out a way how to connect that.

I followed this step from https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices but still it does not show up.

  • Most Aqara devices: press and hold reset button on the device for ± 5 seconds (until the blue light starts blinking), release and wait.

Below is the status of zigbee2mqtt on my rpi3.

pi@raspberrypi:~ $ sudo systemctl status zigbee2mqtt.service
● zigbee2mqtt.service - zigbee2mqtt
   Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-09-29 15:41:17 CEST; 16s ago
 Main PID: 26488 (npm)
   CGroup: /system.slice/zigbee2mqtt.service
           ├─26488 npm
           ├─26501 sh -c node index.js
           └─26502 node index.js

Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:20 Coordinator firmware version: '20180815'
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:20 Currently 0 devices are joined:
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:warn 2018-9-29 15:41:20 `permit_join` set to  `true` in configuration.yaml.
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:warn 2018-9-29 15:41:20 Allowing new devices to join.
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:warn 2018-9-29 15:41:20 Set `permit_join` to `false` once you joined all devices.
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:20 Zigbee: allowing new devices to join.
Sep 29 15:41:20 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:20 Connecting to MQTT server at mqtt://localhost
Sep 29 15:41:21 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:21 zigbee-shepherd ready
Sep 29 15:41:21 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:21 Connected to MQTT server
Sep 29 15:41:21 raspberrypi npm[26488]:   zigbee2mqtt:info 2018-9-29 15:41:21 MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'

What am I missing that I can’t discover that device?

Just received my water sensor today. If you look at pics on the chinese instruction booklet, you will see a pic of squeezing the center of the sensor. this is a waterproof sensor with no visible pairing button that I can see. I put the bridge in pairing mode and then squeezed the sensor for a few seconds, it paired for me:

zigbee2mqtt:info 2018-9-29 11:57:56 MQTT publish, topic: 'homeassistant/binary_sensor/0x00158d0002369013/water_leak/config', payload: '{"payload_on":true,"payload_off":false,"value_template":"{{ value_json.water_leak }}","device_class":"moisture","json_attributes":["battery","voltage"],"state_topic":"zigbee2mqtt/0x00158d0002369013","availability_topic":"zigbee2mqtt/bridge/state","name":"0x00158d0002369013","unique_id":"0x00158d0002369013_water_leak_zigbee2mqtt"}'

For future reference, if you go to their English site there are usually English versions of the instructions for download.

Working perfectly, thanks, much appreciated.

Ha! I didn’t even realise you had to do it twice :smiley: (I dont use the cube for much tbh)

I had the same with the ‘fall’ command, it was all setup in z2mqtt and I knocked it off the desk. To my surprise I registered it as a command lol

It is funny when a guest is messing about with it and drops it to hear ‘Ouch’ come through the speakers :smiley:

2 Likes

Did you go through any particular process to pair the double wireless wall switch? I’ve paired about 12 other devices but this one keeps failing for me.

I don’t really remember sorry, I think I held both for a couple of seconds and then you have to keep it alive by pressing either switch every few seconds. Hope that works.

Thanks. Found english manuals here:

https://www.aqara.com/en/manuals.html

1 Like

I’m having a problem with devices being recognised and added to configuration.yaml and database.db, but then they stop working and no longer send any MQTT messages.

At the top of my log:

2018-10-2 07:33:01 - info: motion_kitchen (0x00158d0002162ac7): RTCGQ01LM - Xiaomi MiJia human body movement sensor (EndDevice)
2018-10-2 07:33:01 - info: wall_bedroom (0x00158d000183b707): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice)
2018-10-2 07:33:01 - info: button_bedroom (0x00158d0001b12769): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice)

And another one of my wall switches (the same model) doesn’t pair at all, with the “Cannot get the Node Descriptor of the Device” error.

I only have 11 devices paired at the moment so it’s not a device limit. Has anyone experienced this and know of a fix?