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

Hi!

Maybe a noob question but I need some help. How do I control the transition time for my hue white bulb. When I send a manual publish with transition time for 2 it works. My light fades slowly to the next brightness setting. But how do I implement this in the frontend of home assistant. So when i push the switch in the control center is also fades slowly and not hard.

Many thanks!

1 Like

create an automation

hi to all. I apologize but I’m a beginner. I wanted to know this file (zigbee2mqtt.yaml) in which location should be placed.

I too would like to know this. I tried a few of my hue globes, but they didn’t play very nice with zigbee2mqtt. They were very random. Added them back to my hue hub and they are working perfectly again.

I have a few sensors that seem to be on the edge of the zigbee2mqtt network, so a router device would be great to expand the coverage.

I have these two arriving today which I’ll be testing. I don’t see the “-A” on the end:

Sylvania 72922 on Amazon

Iris Smart Plug on Amazon

Found the GE Ez Smart Dimmer 45852GE on Ebay for $25. Receiving it Saturday. I hope among these three I’ll find a good candidate for extending the range of the network.

Can anyone please help me troubleshoot the Xiaomi Vibration Sensor. I’m using Zigbee2mqtt successfully with Xiaomi Door Sensors, Water Sensor, Temperature Sensor, and Motion Sensor. However with the vibration sensors, I cannot successful monitor a state which would allow me to trigger an automation.

I have paired 2 of the Xiaomi Vibration Sensors. On the HA states screen, each sensor shows up as sensor.0x00XXXXXXXXXXXXXX wth the following attributes:

angle_y: 26
angle_y_absolute: 64
battery: 100.00
angle_x_absolute: 61
unknown_data: 3932160
voltage: 3045
angle_z: 49
angle_x: 29
friendly_name: 0x00158d0002a52581
icon: mdi:gesture-double-tap

No binary sensors show up. I was expecting a binary_sensor.vibration_xxxx000000 as described HERE:

I had assumed I shouldn’t setup the Aqara compoment since I’m not using (and don’t have) the Xiaomi Aqara hub.

I want to use these to alert on when the Washer and Dryer ends their cycle. As it is, placing the sensors on the machines do not create an event in the zigbee2mqtt log when the machine is started or stopped. I can tap on the sensors rhythmically and it still doesn’t register an event. Ever so often in the zigbee2mqtt log while I’m handling the sensors and pushing the little button, I will see an “action:vibration” but it is infrequent and it never changes unless another action occurs such as action:tilt.

Below is a partial log of me attempting to pair and then test the sensors on a running clothes dryer and/or me tapping on them. The ids of the 2 vibration sensors are: 0x00158d0002a52581 and 0x00158d0002a23e28. Any and all help or comments are appreciated.

Log
  zigbee2mqtt:info 2018-10-28 10:57:36 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":18,"angle_y":5,"angle_z":71,"angle_x_absolute":72,"angle_y_absolute":85,"linkquality":21,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 10:57:39 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":18,"angle_y":5,"angle_z":71,"angle_x_absolute":72,"angle_y_absolute":85,"linkquality":15,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"tilt","angle":5}'
  zigbee2mqtt:info 2018-10-28 10:57:40 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":20,"angle_y":1,"angle_z":70,"angle_x_absolute":70,"angle_y_absolute":89,"linkquality":18,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 10:57:46 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":20,"angle_y":1,"angle_z":70,"angle_x_absolute":70,"angle_y_absolute":89,"linkquality":23,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"tilt","angle":5}'
  zigbee2mqtt:info 2018-10-28 10:58:30 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":20,"angle_y":1,"angle_z":70,"angle_x_absolute":70,"angle_y_absolute":89,"linkquality":21,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"tilt","angle":9}'
  zigbee2mqtt:info 2018-10-28 10:58:35 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":11.82,"humidity":74.46,"pressure":977,"linkquality":70,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 10:58:35 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":11.82,"humidity":74.23,"pressure":977,"linkquality":70,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 10:58:35 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":11.82,"humidity":74.23,"pressure":977,"linkquality":70,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 10:58:49 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":20,"angle_y":1,"angle_z":70,"angle_x_absolute":70,"angle_y_absolute":89,"linkquality":23,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 10:58:50 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":20,"angle_y":1,"angle_z":70,"angle_x_absolute":70,"angle_y_absolute":89,"linkquality":15,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"tilt","angle":24}'
  zigbee2mqtt:info 2018-10-28 10:58:54 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":-4,"angle_y":3,"angle_z":85,"angle_x_absolute":94,"angle_y_absolute":87,"linkquality":10,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 10:59:48 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":-1,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":91,"linkquality":26,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:00:50 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":-1,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":91,"linkquality":15,"unknown_data":2162688,"battery":"100.00","voltage":3045,"action":"tilt","angle":6}'
  zigbee2mqtt:info 2018-10-28 11:00:50 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":-2,"angle_y":1,"angle_z":88,"angle_x_absolute":92,"angle_y_absolute":89,"linkquality":15,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:01:04 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":36,"unknown_data":2162688,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:03:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":0,"unknown_data":8650752,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:03:58 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":57,"unknown_data":8650752,"battery":"100.00","voltage":3045,"action":"tilt","angle":56}'
  zigbee2mqtt:info 2018-10-28 11:04:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":28,"unknown_data":8847360,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:05:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":34,"unknown_data":7995392,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:06:08 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":false,"linkquality":7,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:06:40 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":31,"unknown_data":7995392,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:06:40 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":true,"linkquality":15,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:06:54 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":26,"unknown_data":7995392,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:07:14 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":false,"linkquality":0,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:07:14 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":false,"linkquality":15,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:07:25 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":true,"linkquality":5,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:07:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":52,"unknown_data":7995392,"battery":"100.00","voltage":3045,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:07:52 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":2,"angle_y":-2,"angle_z":87,"angle_x_absolute":88,"angle_y_absolute":92,"linkquality":84,"unknown_data":7995392,"battery":"100.00","voltage":3045,"action":"tilt","angle":25}'
  zigbee2mqtt:info 2018-10-28 11:08:03 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":2,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":88,"linkquality":81,"unknown_data":7995392,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:10:09 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.21,"humidity":74.23,"pressure":977,"linkquality":57,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:10:09 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.21,"humidity":70.83,"pressure":977,"linkquality":57,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:10:09 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.21,"humidity":70.83,"pressure":977,"linkquality":57,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:11:01 Zigbee: allowing new devices to join.
  zigbee2mqtt:info 2018-10-28 11:14:13 Zigbee: disabling joining new devices.
  zigbee2mqtt:info 2018-10-28 11:14:16 Zigbee: allowing new devices to join.
  zigbee2mqtt:info 2018-10-28 11:15:47 New device with address 0x00158d0002a23e28 connected!
  zigbee2mqtt:info 2018-10-28 11:15:47 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x00158d0002a23e28"}'
  zigbee2mqtt:info 2018-10-28 11:15:50 MQTT publish, topic: 'homeassistant/sensor/0x00158d0002a23e28/action/config', payload: '{"icon":"mdi:gesture-double-tap","value_template":"{{ value_json.action }}","json_attributes":["battery","voltage","angle","side","from_side","to_side","brightness","angle_x_absolute","angle_y_absolute","angle_z","angle_y","angle_x","unknown_data"],"force_update":true,"state_topic":"zigbee2mqtt/0x00158d0002a23e28","availability_topic":"zigbee2mqtt/bridge/state","name":"0x00158d0002a23e28","unique_id":"0x00158d0002a23e28_action_zigbee2mqtt"}'
  zigbee2mqtt:info 2018-10-28 11:16:02 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"action":"vibration","linkquality":120}'
  zigbee2mqtt:info 2018-10-28 11:16:06 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"action":"tilt","angle":70,"linkquality":105}'
  zigbee2mqtt:info 2018-10-28 11:16:06 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":2,"angle_y":-1,"angle_z":88,"angle_x_absolute":88,"angle_y_absolute":91,"linkquality":105}'
  zigbee2mqtt:info 2018-10-28 11:16:41 Device incoming...
  zigbee2mqtt:info 2018-10-28 11:16:41 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
  zigbee2mqtt:info 2018-10-28 11:16:56 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":2,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":88,"linkquality":13,"unknown_data":3932160,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:17:34 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":2,"angle_y":-1,"angle_z":88,"angle_x_absolute":88,"angle_y_absolute":91,"linkquality":105,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:17:37 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":2,"angle_y":-1,"angle_z":88,"angle_x_absolute":88,"angle_y_absolute":91,"linkquality":99,"action":"drop"}'
  zigbee2mqtt:info 2018-10-28 11:17:46 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":2,"angle_y":-1,"angle_z":88,"angle_x_absolute":88,"angle_y_absolute":91,"linkquality":107,"action":"tilt","angle":6}'
  zigbee2mqtt:info 2018-10-28 11:17:54 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":30,"angle_y":2,"angle_z":60,"angle_x_absolute":60,"angle_y_absolute":88,"linkquality":99}'
  zigbee2mqtt:info 2018-10-28 11:18:19 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":30,"angle_y":2,"angle_z":60,"angle_x_absolute":60,"angle_y_absolute":88,"linkquality":52,"action":"tilt","angle":27}'
  zigbee2mqtt:info 2018-10-28 11:18:19 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":55}'
  zigbee2mqtt:info 2018-10-28 11:18:40 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":31,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:20:18 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002369013', payload: '{"water_leak":false,"linkquality":31,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:20:18 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002369013', payload: '{"water_leak":false,"linkquality":31,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:20:18 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002369013', payload: '{"water_leak":false,"linkquality":31,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:20:18 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002369013', payload: '{"water_leak":false,"linkquality":31,"battery":"100.00","voltage":3035}'
  zigbee2mqtt:info 2018-10-28 11:23:43 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.65,"humidity":70.83,"pressure":977,"linkquality":60,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:23:43 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.65,"humidity":69.68,"pressure":977,"linkquality":57,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:23:43 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.65,"humidity":69.68,"pressure":977,"linkquality":60,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:24:11 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":2,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":88,"linkquality":21,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:24:11 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":39,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:24:17 Zigbee: disabling joining new devices.
  zigbee2mqtt:info 2018-10-28 11:24:17 Zigbee: disabling joining new devices.
  zigbee2mqtt:info 2018-10-28 11:24:18 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":63,"action":"tilt","angle":11}'
  zigbee2mqtt:info 2018-10-28 11:24:20 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":70}'
  zigbee2mqtt:info 2018-10-28 11:25:05 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":1,"angle_y":2,"angle_z":88,"angle_x_absolute":89,"angle_y_absolute":88,"linkquality":81,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"tilt","angle":40}'
  zigbee2mqtt:info 2018-10-28 11:25:06 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":4,"angle_y":-44,"angle_z":46,"angle_x_absolute":86,"angle_y_absolute":134,"linkquality":78,"unknown_data":3932160,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:25:10 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":4,"angle_y":-44,"angle_z":46,"angle_x_absolute":86,"angle_y_absolute":134,"linkquality":78,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:25:19 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":4,"angle_y":-44,"angle_z":46,"angle_x_absolute":86,"angle_y_absolute":134,"linkquality":102,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"tilt","angle":45}'
  zigbee2mqtt:info 2018-10-28 11:25:21 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":97,"unknown_data":6946816}'
  zigbee2mqtt:info 2018-10-28 11:25:24 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.65,"humidity":69.68,"pressure":977,"linkquality":65,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:25:24 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":12.68,"humidity":69.67,"pressure":976.98,"linkquality":65,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:25:25 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":24,"angle_y":16,"angle_z":61,"angle_x_absolute":66,"angle_y_absolute":74,"linkquality":105,"unknown_data":3932160,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:25:30 Zigbee: allowing new devices to join.
  zigbee2mqtt:info 2018-10-28 11:25:37 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":24,"angle_y":16,"angle_z":61,"angle_x_absolute":66,"angle_y_absolute":74,"linkquality":115,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"tilt","angle":13}'
  zigbee2mqtt:info 2018-10-28 11:25:37 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":29,"angle_y":26,"angle_z":49,"angle_x_absolute":61,"angle_y_absolute":64,"linkquality":115,"unknown_data":3932160,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:26:00 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":29,"angle_y":26,"angle_z":49,"angle_x_absolute":61,"angle_y_absolute":64,"linkquality":141,"unknown_data":3932160,"battery":"100.00","voltage":3045,"action":"tilt","angle":51}'
  zigbee2mqtt:info 2018-10-28 11:26:03 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a52581', payload: '{"angle_x":29,"angle_y":26,"angle_z":49,"angle_x_absolute":61,"angle_y_absolute":64,"linkquality":123,"unknown_data":3932160,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:warn 2018-10-28 11:26:09 Message without device!
  zigbee2mqtt:error 2018-10-28 11:26:43 Cannot get the Node Descriptor of the Device: 0x00158d0002a52581 (Error: Timed out after 10000 ms)
  zigbee2mqtt:info 2018-10-28 11:29:42 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":47,"unknown_data":6946816,"action":"vibration"}'
  zigbee2mqtt:info 2018-10-28 11:29:49 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a23e28', payload: '{"angle_x":3,"angle_y":-1,"angle_z":87,"angle_x_absolute":87,"angle_y_absolute":91,"linkquality":84,"unknown_data":6946816,"action":"tilt","angle":58}'
  zigbee2mqtt:warn 2018-10-28 11:29:54 Message without device!
  zigbee2mqtt:info 2018-10-28 11:31:01 Device incoming...
  zigbee2mqtt:info 2018-10-28 11:31:01 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
  zigbee2mqtt:info 2018-10-28 11:32:05 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002393f65', payload: '{"contact":true,"linkquality":23,"battery":"55.00","voltage":2995}'
  zigbee2mqtt:error 2018-10-28 11:32:14 Cannot get the Node Descriptor of the Device: 0x00158d0002a52581 (Error: Timed out after 10000 ms)
  zigbee2mqtt:info 2018-10-28 11:35:31 Zigbee: disabling joining new devices.
  zigbee2mqtt:info 2018-10-28 11:35:31 Zigbee: disabling joining new devices.
  zigbee2mqtt:info 2018-10-28 11:36:46 MQTT publish, topic: 'zigbee2mqtt/0x00158d000232de0a', payload: '{"battery":"100.00","voltage":3095,"linkquality":68,"contact":true}'
  zigbee2mqtt:info 2018-10-28 11:36:47 MQTT publish, topic: 'zigbee2mqtt/0x00158d000232de0a', payload: '{"battery":"100.00","voltage":3095,"linkquality":68,"contact":true}'
  zigbee2mqtt:info 2018-10-28 11:37:28 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.16,"humidity":69.67,"pressure":976.98,"linkquality":73,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:37:28 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.16,"humidity":69.09,"pressure":976.98,"linkquality":76,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:37:28 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.16,"humidity":69.09,"pressure":976,"linkquality":73,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:41:42 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb13c', payload: '{"contact":true,"linkquality":68,"battery":"100.00","voltage":3045}'
  zigbee2mqtt:info 2018-10-28 11:42:04 MQTT publish, topic: 'zigbee2mqtt/0x00158d000243672e', payload: '{"contact":true,"linkquality":47,"battery":"99.00","voltage":3005}'
  zigbee2mqtt:info 2018-10-28 11:45:31 MQTT publish, topic: 'zigbee2mqtt/0x00158d000232c071', payload: '{"battery":"42.00","voltage":2985,"linkquality":60,"contact":true}'
  zigbee2mqtt:info 2018-10-28 11:47:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.44,"humidity":69.09,"pressure":976,"linkquality":63,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:47:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.44,"humidity":65.73,"pressure":976,"linkquality":63,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:47:41 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001b7ef17', payload: '{"temperature":13.44,"humidity":65.73,"pressure":977,"linkquality":63,"battery":"31.00","voltage":2965}'
  zigbee2mqtt:info 2018-10-28 11:57:53 MQTT publish, topic: 'zigbee2mqtt/0x00158d00023eb10f', payload: '{"contact":true,"linkquality":13,"battery":"100.00","voltage":3035}'

Did you figure this one out? I’m facing the same issue.
I see that the binary sensor is updating, but I cannot use the mqtt trigger…

1 Like

You now too :slight_smile: how nice!
Its a “real” binary sensor in Home Assistant. (only on/off - no extra data)
I think its save to use the sensor instead of the topic here.

automation:

  - alias: motion_badkueche_aus
    initial_state: 'on'
    trigger:
      - platform: state
        entity_id: binary_sensor.badkueche
        to: 'off'
        for:
          minutes: 4
    condition:
      - condition: state
        entity_id: input_boolean.boolean_shower_mode
        state: 'off'
    action:
    - service: light.turn_off
      entity_id: light.badkuche

binary_sensor:
  - platform: template
    sensors:
      badkueche:
        friendly_name: "Bad und Küche"
        device_class: motion
        value_template: >-
            {{ is_state('binary_sensor.motion_bad', 'on') or is_state('binary_sensor.motion_kueche', 'on') }}

So in your case entity_id: binary_sensor.0x00158d000165fe40

1 Like

This is NOT the xiaomi_aqara component from Home Assistant. Things do not work exactly the same.

The vibration sensor is exposed as a single “sensor”. The “action” in the JSON payload indicates what the device has detected: vibration, tilt, or drop. You’ll want to use that as a trigger, either as an MQTT trigger directly, or as a entity based state change trigger.

Mine looks like this:

- alias: Detect Dryer Vibrations
  trigger:
    - platform: state
      entity_id: sensor.vibration_dryer
      to: 'vibration'
1 Like

This comes sometimes with issues.
Not really intended this way. See https://github.com/Koenkk/zigbee2mqtt/issues/469#issuecomment-431485463

Indeed it does. It depends on HOW you’re using the sensor. In my case, a single detected “vibration” does nothing. This is, in part, because I use it on a clothes dryer and simply shutting the dryer door will trigger a vibration. So, in my case, I monitor for repeated vibrations over a period of time to detect the dryer as running, and then I monitor for those vibrations to stop to detect the dryer as finished. In this particular use case, the Home Assistant MQTT sensor works just fine.

1 Like

Can you please provide your code showing how you’re able to monitor for repeated vibration over a period of time to detect the dryer as running? I keep falling on my face with this.

I don’t want to use the cache and happy to manually configure the sensors in Home Assistant but you get the issue (that the cache resolves) that values are wiped out when not included. Receiving your three message would result in only pressure having a value and the other two a “-”. I have worked around this with an if statement in the sensor but was wondering if you solved it differently.

My code uses a custom_component that I wrote that works as a timer, because the built in Home Assistant Timer is a little annoying for my tastes. But here’s the basic idea.

Create an input_select to keep track of the state of the dryer: “Running”, “Starting”, or “Stopped”.

Make an automation that triggers on Vibration with a condition of “Stopped”:

  trigger:
    - platform: state
      entity_id: sensor.vibration_dryer
      to: 'vibration'
  condition:
    - condition: state
      entity_id: input_select.clothesdryer
      state: 'Stopped'

The action on this automation should start a 5 minute timer (or however long it takes you to typically unload your dryer).

Make another automation that listens for the timer event the fires when the above timer expires. It should also have the “Stopped” condition from above. The action should set the input_select to “Starting”.

Make an automation that triggers on the “Starting” status for 5 minutes with an action that sets it back to “Stopped”.

Make another automation that triggers on vibration with a condition of the “Starting” status. The action should set the status to “Running” and start a 5 minute timer (less if your dryer is really wobbly, more if it isn’t).

Make another automation that triggers on the event fired when the above timer expires. It should have a condition of “Running” and the action will set the Status to “Stopped”.

Make another automation that triggers on vibration with a condition of the “Running” status. It’s action should simply restart the timer.

What happens is, if the dryer is “Stopped” and vibration is detected, you could be unloading clothes, or the dryer could be running, we don’t know yet. So we wait 5 minutes (to make sure you’ve finished unloading clothes) and then set the status to “Starting” which means the dryer MIGHT be starting. If 5 minutes goes by without any vibration, then the dryer isn’t running so we set the status back to “Stopped”. But, if during that second 5 minute window we see a vibration then the dryer must be running, so set the status to “Running”. Then we wait for a 5 minute period with no vibrations to know that the dryer is done.

It can be fooled, of course. If you take longer than 5 minutes to unload the dryer, it’ll think it’s running, and then some time later, it’ll go back to “Stopped” and you’ll probably have an alert automation for the stopped status, so you’ll get a false positive on that alert. Or, if you are, perhaps, loading the washer during that second 5 minute window and accidentally bump the dryer, same issue. So, occasionally, you can get false positives.

If you don’t care about false positives at all, then you could make every vibration while “Stopped” go straight to “Running”. However, when you unload your dryer, it’ll think you’ve started it again and 5 minutes after unloading you’ll get another “Stopped” alert.

It’s not an easy automation to write. And it takes quite a bit of tweaking. And Home Assistant’s very limited automation capabilities make it a lot less simple than it could be.

1 Like

Yes, I’ve worked this around with if as well. It make the config a bit more painful, especially knowing you have to restart home assistant every time you change the sensor config…

value_template: "{% if 'temperature' in value_json %} {{ value_json.temperature }} {% else %} {{ states('sensor.temperature_aqara_12') }} {% endif %}"

at the moment I’m still configuring this by hand, I’ll either use some kind of Makefile to generate the zigbee2mqtt part, but it might as well be easier to hack zigbee2mqtt so it auto configures home asssitant with my own config statements.
Or even better, I’d prefer if home assistant was not wiping the attributes not included in mqtt messages. (don’t know if this is a bug or a feature)

Hi,

I have been using a cc2531 for a few weeks now as I have been experimenting with HA using Hass.io.

Up until a few days ago I had a few Xiaomi sensors and was using them with NodeRed before diving into purchasing lights or sockets.

However since joining my first Ikea Tradfri light LED1624G9, the debugger no longer works.

With my most recent attempt at reinstalling zigbee2mqtt (well specifically zigbee2mqtt-edge) and starting from scratch (again!), I get the following log:-

Sun, 04 Nov 2018 13:07:07 GMT zigbee-shepherd zigbee-shepherd is _ready and _enabled
zigbee2mqtt:info 2018-11-4 13:07:07 zigbee-shepherd started
zigbee2mqtt:info 2018-11-4 13:07:07 Coordinator firmware version: 'undefined'
zigbee2mqtt:debug 2018-11-4 13:07:07 zigbee-shepherd info: {"enabled":true,"net":   {"state":"Coordinator","channel":11,"panId":"0x1a63","extPanId":"0xdddddddddddddddd","ieeeAddr":"0x00124b0012013a09","nwkAddr":0},"firmware":{"error":"Unable to get firmware version"},"startTime":1541336827,"joinTimeLeft":0}

Also, normally I disable the led via the Hass.io configuration and this doesn’t seem to be working and sending any messages via MQTT fails:-

zigbee2mqtt:debug 2018-11-4 13:20:09 Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
zigbee2mqtt:info 2018-11-4 13:20:09 Zigbee: allowing new devices to join.
Sun, 04 Nov 2018 13:20:09 GMT zigbee-shepherd:request REQ --> ZDO:mgmtPermitJoinReq
zigbee2mqtt:info 2018-11-4 13:20:12 
{"message":"request timeout","stack":"Error: request timeout\n    at CcZnp.<anonymous> (/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.<anonymous> (/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)"}

Basically nothing works as it once did and I can no longer add devices.

Do I need to re-flash my cc2531, as the process described to reset with the S2 button doesn’t seem to help?

How can I find out the firmware version or perform any further diagnostics?

Many thanks.

Has anyone been able to get this working with the CC2530? I’ve tried it directly wired and through a USB TTL converter, re-flashed and still nothing…

Are there additional steps required beyond just wiring it in correctly and setting up the addon?

Is there a changelog for the CC2531 firmware? I am interested to know what changes are being made as I dont want to have to rejoin my 25+ devices (after flashing) unless there are some features or fixes that I would find useful.

Compare versions of https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/CC2531/README.md

Fist of all, many thanks for releasing this @Koenkk. I just followed the detailed instructions and everything works first time with no issues on a raspberry pi3 running home assistant. I have tried to join a couple of xiaomi temperature sensors. They paired and report valid values. My only concern is that they both seem to report values twice or more, all the time. So my log looks like:

Nov 06 09:33:39 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:33:39 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_1', payload: '{"temperature":21.17,"linkquality":34,"humidity":62.6,"battery":"100.00","voltage":3175}'
Nov 06 09:33:39 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:33:39 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_1', payload: '{"temperature":21.13,"linkquality":34,"humidity":63.55,"battery":"100.00","voltage":3175}'
Nov 06 09:37:57 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:37:57 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.17,"linkquality":120,"humidity":65.63,"pressure":1006,"battery":"31.00","voltage":2965}'
Nov 06 09:37:57 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:37:57 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.17,"linkquality":118,"humidity":65.5,"pressure":1006,"battery":"31.00","voltage":2965}'
Nov 06 09:37:57 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:37:57 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.17,"linkquality":118,"humidity":65.5,"pressure":1006,"battery":"31.00","voltage":2965}'
Nov 06 09:51:22 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:51:22 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.17,"linkquality":128,"humidity":65.5,"pressure":1006,"battery":"31.00","voltage":2965}'
Nov 06 09:51:22 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 09:51:22 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.23,"linkquality":128,"humidity":65.75,"pressure":1006.71,"battery":"31.00","voltage":2965}'
Nov 06 10:12:31 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 10:12:31 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.36,"linkquality":126,"humidity":65.75,"pressure":1006.71,"battery":"31.00","voltage":2965}'
Nov 06 10:12:31 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 10:12:31 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.36,"linkquality":126,"humidity":65.48,"pressure":1006.71,"battery":"31.00","voltage":2965}'
Nov 06 10:12:31 raspberrypi3 npm[12524]:   zigbee2mqtt:info 2018-11-6 10:12:31 MQTT publish, topic: 'zigbee2mqtt/xiaomi_temperature_2', payload: '{"temperature":20.36,"linkquality":126,"humidity":65.48,"pressure":1007,"battery":"31.00","voltage":2965}'

Looking at the file database.db, I see kind of duplicated entries (truncated file to show only beginning of lines)?

{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018ed22cd", "nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"o ...
{"id":2,"type":"EndDevice","ieeeAddr":"0x00158d00015aeff7", "nwkAddr":18084,"manufId":4151,"manufName":"LUMI","powerSour ...
{"id":3,"type":"EndDevice","ieeeAddr":"0x00158d0001d6df5a", "nwkAddr":24414,"manufId":4151,"manufName":"LUMI","powerSour ...        
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018ed22cd", "nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"o ...
{"id":2,"type":"EndDevice","ieeeAddr":"0x00158d00015aeff7", "nwkAddr":18084,"manufId":4151,"manufName":"LUMI","powerSour ...
{"id":3,"type":"EndDevice","ieeeAddr":"0x00158d0001d6df5a", "nwkAddr":24414,"manufId":4151,"manufName":"LUMI","powerSour ...`

Is this normal behaviour? Thanks!