Conbee, Deconz Xiaomi Vibration sensor issues

Tags: #<Tag:0x00007f3f1a67fc18>

Hi forum,
My setup with a Conbee, deconz in HA has worked just well with various Xiaomi sensors.
I’ve just received a new Xiaomi Vibration sensor which is shown in the deconz app. But in HA the entity is only a “sensor.vibration_battery_level” and has the battery level as state without any attributes. How do I fix this to be able to use it when it detects vibration or motion?

Cheers Rasmus

There should be an attribute with the device event id which you can use for automations. Look at component documentation for examples on how to use deconz event id

As Robban says, there is an id to use. Look for the battery level sensor in dev pane (states). In atributes for that sensor you will have an event id.

So in automation editor one triggers on deconz_event and in event data one will have for example

{
“event”: 1007,
“id”: “vibration_door”
}

where 1007 is vibration and vibration_door is the event id for the sensor on my door.

1 Like

Thank you M203 and Robban for the replies. I successfully managed to use the events from the deconz. :slight_smile:

1 Like

@Robban do you know if there is a way to change the sensitivity of this sensor? I’ve been reading something about this but not sure if it’s implemented.

That is a question I can’t answer. Deconz supports some apis that can configure devices. But I don’t know them. This is better asked on deconz github.

Good question though. I know that with the Xiaomi Hub you can set the sensitivity for the sensor, but as far as I can see the Deconz don’t allow you to set the sensitivity at the moment… :confused:

Hi, can you share the events available? Tried to look in the deconz but could not find

For the sensitivity, I think they are working on it??

Of course! As far as I can see I receive these three different events:

  • 1007; Shake
  • 1008; Drop
  • 1009; Tilt

And to create automations based on events I used this approach:

- alias: 'Vibrations sensor - vibration'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: << Your Event ID for the device >>
        event: 1007
  action:
    - service...

And cool regarding the sensitivity control through the API. I’m not picking vibrations from my washing machine either… -.-

Found this thread when I tried to add my Xiaomi Aqara Vibration Sensor to Home Assistant. The sensor was successfully added to Phoscon without any issues, and all values are shown correctly.

However, Home Assistant only recognizes the sensor’s battery level, and not temperature or event status. The battery level sensor in HA only has the following attributes:

friendly_name: Mailbox Battery Level
device_class: battery
unit_of_measurement: %
event_id: mailbox

Any suggestions how to get the temperature and event status in HA?

Battery is not used as far as I know due to unreliable values. Regarding vibration and home assistant please read above in this thread.

That device works just like remote control. Check component documentation for example of usage

Great, I actually read it, but I somehow didn’t comprehend the words :stuck_out_tongue:

I see now that the event_id is present as an attribute. However, shouldn’t this be either tilt, moved or free_fall? And also no temperature reading, but I guess that is not possible to receive in HA?

Please see above. Rasser has mentioned the numerical values for the different events.

1 Like

Hi
I managed to configure automation in Hassio using 2 vibration sensors from Aqara.
I can trigger the events from both physical sensors, but the associated notification via Telegram arrive always with the same message (related to one of the sensors)
as example I have 2 similar config (see below) but I get the notification message always = to the last one (even if the trigger is done by sensor 1)
Hope it is clear. Any suggestion ?
Thx. Iv.

  • alias: ‘Trigger alarm while vibration detected Sensor 1’
    trigger:
    platform: event
    event_type: deconz_event
    event_data:
    entity_id: sensor.sensor_1
    event: 1007
    action:
    • service: notify.me
      data:
      message: “Alarm Sensor 1”

the other one is

  • alias: ‘Trigger alarm while vibration detected Sensor 2’
    trigger:
    platform: event
    event_type: deconz_event
    event_data:
    entity_id: sensor.sensor_2
    event: 1007
    action:
    • service: notify.me
      data:
      message: “Alarm Sensor 2”

I think I found a solution…
the key is to use only the ID of the sensor , that I 've found looking at the log (after enabling logger: in config.yaml)
ssh into the system and run
tail -f /config/home-assistant.log | grep deconz_event
look for id= and a name that is familiar with your vibration sensor. Use this as below

alias: 'Trigger alarm while vibration detected Sensor 1’
trigger:
platform: event
event_type: deconz_event
event_data:
id: sensor.sensor_1
action:
- service: notify.me
data:
message: “Alarm Sensor 1”

alias: 'Trigger alarm while vibration detected Sensor 2’
trigger:
platform: event
event_type: deconz_event
event_data:
id: sensor.sensor_2
action:
- service: notify.me
data:
message: “Alarm Sensor 2”

hope this help.

I cant get it working

binary sensor is up and running in HA via deconz. Motion is detected…

My test automation is

  • id:
    alias: Vibration
    trigger:
    • event_data:
      event: 1007
      id: lumivibrationaq1
      event_type: deconz_event
      platform: event
      action:
    • data:
      message: test vibration
      service: notify.ios_iphoneweneu2

Log:

019-04-30 13:56:11 DEBUG (MainThread) [pydeconz.deconzdevice] Vibrationssensor created as
{’_async_callbacks’: [],
‘_battery’: 95,
‘_deconz_id’: ‘/sensors/4’,
‘_ep’: 1,
‘_etag’: ‘1a6a019a050ce43652fd4c01b94a8545’,
‘_lowbattery’: None,
‘_manufacturername’: ‘LUMI’,
‘_modelid’: ‘lumi.vibration.aq1’,
‘_name’: ‘Vibrationssensor’,
‘_on’: True,
‘_orientation’: [0, -1, 89],
‘_reachable’: True,
‘_sensitivity’: None,
‘_sensitivitymax’: 21,
‘_sensor_class’: None,
‘_sensor_icon’: None,
‘_sensor_unit’: None,
‘_swversion’: ‘20180130’,
‘_tampered’: None,
‘_tiltangle’: 5,
‘_type’: ‘ZHAVibration’,
‘_uniqueid’: ‘00:15:8d:00:02:b7:69:bf-01-0101’,
‘_vibration’: False,
‘_vibrationstrength’: 80}

image

Does anyone have an idea ? I also tried the name vibrationssensor

Kindly use event_id in the vibration sensor, as per circled in BLACK below:

hmmm i have a binary sensor…

Iam now using it based on the state… there are no deconz event for my vibration sensor… it works like charm with e.g smart switched

1 Like