Conbee, Deconz Xiaomi Vibration sensor issues

@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

Yes. Deconz developers changed how it gets values reported so I changed it to a sensor. If you have other sensors like these you might need to pair them again to get the new binding

3 Likes

Any news on changing the sensitivity in Deconz?
I see that it is possible to change the sensitivity in zigbee2mqtt but I want to continue using Deconz.

I don’t know the parameter but you can use the deconz service to configure your sensor. If you know the parameter you can reconfigure any device in deconz

I managed to change the sensitivity yesterday evening in about an hour without preknowledge, see my post on https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1396 for links and hints.

My next step is trying to trigger an automation. My current code is below but does not work. I plan to run throw an update to latest version of HA and deconz, delete and readd the sensor and try again this evening to see if I can crack it.

Update 2019-07-06: My code started to work after update of deconz, home assistant, removing sensor (including entity register and in integration) and adding sensor again. Nice little device, now I will turn on the lights if someone knocks on the door :slight_smile: My later plan is to install a siren above the door that is trigged if noone home and someone tries to open the door with force. I will however have to verify that I don’t get to may false-psoitive detections first.

  #Test vibration sensor
- hide_entity: false
  initial_state: 'on'
  alias: Test vibration sensor      
  trigger:
  - entity_id: binary_sensor.switch_60
    platform: state
    to: 'on'
  action:
  - service: light.turn_off
    entity_id: light.vardagsrum_litet_bord
  - service: persistent_notification.create
    data_template:
      message: '{{now().strftime(''%H:%M:%S'')}} Altandörr vibration detekterad'
1 Like