Conbee, Deconz Xiaomi Vibration sensor issues

Im trying to figure this device out but Im getting it as a binary_sensor and not as a sensor so I can use the events. Any advice?

My vibration sensor is also binary_sensor, and the values it sends are not updated in home assistant. It just shows “motion detected” constantly. What to do? Phoscon shows only “refreshed” timestamp and it correctly updates when sensor is touched

elif self._device.type in Vibration.ZHATYPE:
            attr[ATTR_ORIENTATION] = self._device.orientation
            attr[ATTR_TILTANGLE] = self._device.tiltangle
            attr[ATTR_VIBRATIONSTRENGTH] = self._device.vibrationstrength

You don’t get proper attributes?

I have some questions about the sensor as well, I only have a binary sensor and it doesn’t show the event id.
I thought maybe the deconz helper appdaemon would help me but that as well doesn’t get updated when moving the sensor.

How can I get the event id, is there another way?
Is the binary sensor state simply if there is any movement of the sensor the state goes ‘on’?

I know the event values from reading above.

Could you give a hint how to configure the sensitivity in zigbee2mqtt? Can’t find anything in the documentation :-/

This thread is for deconz. There are probably similar threads that can help you

How do you get the sensor to use events. I only get it as a binary_sensor that doesnt show events?

Have you solved it?

This works for me with my sensor on the front lid of my mailbox:


- alias: Announce mailbox opened
  trigger:
  - entity_id: binary_sensor.vibration_8
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: notify.alexa_media
    data:
      target:
        - media_player.livingroom_echo_dot
        - media_player.bathroom_echo_dot
        - media_player.kitchen_echo
      message: You've got real, post office type, physical, mail!
      data:
        type: tts

and by adding this sensor template I can show my partner what the temperature inside the mailbox is and if the mailperson left the lid open :slight_smile: :

- platform: template
  sensors:
    mailbox_temperature:
      unit_of_measurement: "°F"
      value_template: '{{ (((states.binary_sensor.vibration_8.attributes.temperature) * 9 / 5) + 32) | round(1) }}'
      entity_id: binary_sensor.vibration_8
    mailbox_tiltangle:
      value_template: "{{ states.binary_sensor.vibration_8.attributes.tiltangle }}"
      entity_id: binary_sensor.vibration_8

My Xiaomi vibration sensor triggers ON state only if I vigorously shake it.
Moving it, turning it, knocking on the surface it is on, or shaking it softly does not trigger vibration state.
As far as I can tell the attributes (orientation, tilt level, and vibration strength) are only updated when the vibration state is detected.
I changed the sensitivity to 1 (most sensitive), but that did not help.
Below are the output from deconz REST command:

{
    "config": {
        "battery": 100,
        "on": true,
        "pending": [],
        "reachable": true,
        "sensitivity": 1,
        "sensitivitymax": 21,
        "temperature": 2300
    },
    "ep": 1,
    "etag": "306577ad80eb62725141081ae403f9e4",
    "manufacturername": "LUMI",
    "modelid": "lumi.vibration.aq1",
    "name": "Vibration Sensor",
    "state": {
        "lastupdated": "2019-11-08T05:53:58",
        "orientation": [
            2,
            -21,
            69
        ],
        "tiltangle": 360,
        "vibration": false,
        "vibrationstrength": 77
    },
    "swversion": "20180130",
    "type": "ZHAVibration",
    "uniqueid": "00:15:8d:00:02:c3:a8:21-01-0101"
}

Is my Xiaomi vibration sensor defective?

Thank you.

Dunno if it’s defective but, my own observations: Mine is on the mailbox, outside because the metal mailbox kinda shields the signal. It detects vibration and movement but once detected, it goes into a rest state for 60 seconds. Temperature updates are intermittent. Always after the mailperson delivers mail, sometimes every 5 minutes, sometimes an hour… not a big deal with me because I’m not THAT concerned about the temperature of my mailbox. The sensor (mailbox) is approx. 25 meters from the Desconz receiver dongle. When the outside temp drops below 5 C… it get’s flakey.

Something weird started happening and I couldn’t get it working again. I deleted and re-added 4 XIAOMI vibration sensors but the binary sensors are not getting created on HA even though I can see the logs on HA saying:

> 2019-11-09 19:38:07 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: vs_right_door_living_room
> 2019-11-09 19:38:07 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: vs_left_window_living_room
> 2019-11-09 19:38:07 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: vs_right_window_living_room
> 2019-11-09 19:38:07 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: vs_left_door_living_room

Went everywhere (states, unused entities and even on .storage) and can’t seem to find the binary sensors at all on HA meaning I can’t control them at all.
Any ideas are appreciated.

One more thing I’ve found about the Aqura vibration sensor… if it’s not “right side up”, it’ gunna act funny. “Right side up” is where when mounted, the little reset button is facing up.

Hey everyone, hate to resurrect this, but I think I’m one of many with issues with this cheap little guy.

I am able to watch the sensor in NodeRed, display the output in the NR UI. I can see it’s detecting vibration, output the level and output when it’s last updated. But when the vibrations stops it no longer reports anything. I made the rest call in the example above through DeCONZ and set the sensitivity to 1. The only time it detected motion, ie. vibration = true is when I ran down to the washer/dryer with it. Otherwise, it doesn’t show anything. Maybe luckily, neither makes enough movement.

Works like a charm, but nothing to give notification from. Best I can do is see when it stopped updating through NodeRed and into the MQTT topics I’ve setup for each. I would love to maybe just be able to run an automation at this point X minutes after the last update. Otherwise sensitivity setting doesn’t work and it doesn’t do anything in HA other than say false and that the temperature is X.

EDIT: I listen to “deconz_event” and get nothing for any sensor.

Someone please post a simple automation example for “tilt” event.

Like this?

- alias: 'Simple tilt automation'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: [your_id]
        event: 1009
  action:
    - service: light.turn_on
      data:
        entity_id: light.yourlight

1 Like

Thank you Rasser.

If I subscribe to deconz_event in Developer Tools -> Events [START LISTENING] I see nothing for Vibration sensor.

Example for my Tradfri remote control:

{
    "event_type": "deconz_event",
    "data": {
        "id": "tradfri_remote_control",
        "unique_id": "ec:1b:bd:ff:",
        "event": 1002
    },
    "origin": "LOCAL",
    "time_fired": "2020-01-22T09:44:29.131540+00:00",
    "context": {
        "id": "9d36bb086a0648919f",
        "parent_id": null,
        "user_id": null
    }
}

My vibration sensor is working, because I created a test

- id: '1579210113408'
  alias: Check mailbox.
  description: ''
  trigger:
  - device_id: cddb61386a8c443493b3
    domain: binary_sensor
    entity_id: binary_sensor.vibration_sensor
    platform: device
    type: motion
  condition: []
  action:
  - data:
      message: Message.
    service: notify.notify

I created this automation on this page:

…but because the subscribe to event is not working, how do I know values for:

event_data:
        id: XXXX
        event: XXXX

Anyone? I can’t find any event for vibration sensor. Maybe something changed in later versions, because sensor is now a separate entity?

Zigbee sensors are either having a state (on/off or a value) or they are stateless sensors.

If a sensors has a state they are represented as sensors in Home Assistant. E.g. a binary sensor for moving or not moving and a % value for a battery

Remote controls / push button switches are stateless. They send an event when you push a button. Once the button is released the switch has no state. It is not on or off.

So a vibration sensor changes between vibration and no vibration. It is on as long as it vibrates. So it is a binary_sensor with on and off.

A remote control with buttons sends events.
But it has a battery sensor that reports level which is a “sensor” in HA

Kenneth

The problem is that this vibration sensor has a function “tilt” alert/reporting, not only vibration alert.