Xiaomi Vibration Sensor Use Cases

I have put one under the mattress of my bed to see if it can track sleep cycles like deep sleep and REM sleep. At this point I’m just logging the data to see if there is anything interesting in the raw data. Might need to tweak the sensitivity (is at the factory default now). Below you is a graph of some of the values the sensor emits for one night.

4 Likes

Hi …

Have a Smartthings hub and a few lights that flip on with a ST sensor which is set to turn them off after 30 minutes of no motion. I’m looking for exactly the same setup you seem to have (lights to NOT go off when I’m sitting at the desk at which time the motion sensor won’t detect me).

Would you be willing to share the set up you have currently? Specifically

  1. What sensor do you have placed under the desk
  2. Where have you placed that sensor “strategically” (could you share a picture)
  3. What are this sensor’s settings?

Thanks

Hi there.
I’m using the vibration sensor with the conbeeII usb dongle. great integration.
Does anybody know how to see tilt vibration and inclination value of the sensor to be used as trigger or condition in hass.io?

Pretty sure it breaks those out into different sensors. Find the I’d of your sensor then run a find function for that I’d and you will see all of the sensor options. Think there is around 3-4 different ones. Vibration and bed are 2 off top of my head.

I started this topic ages ago and still don’t have a decent use case yet.

1 Like

Mailbox? At least that was my original idea

I have one there but it’s too far from my gateways. Think maybe bed presence sensor.

Cranked open the washing machine and stuck the sensor next to the dum and its much better but every time I need to replace battery or change sensitivity I have have to open the washing machine’s back case. Tiz much easy to use the power status via Sonoff.

for what its worth here is my washing machine code

- alias: WashingMachineActivate
  trigger:
    platform: event
    event_type: xiaomi_aqara.movement
    event_data:
      entity_id: binary_sensor.vibration_158d0002a54c7d
      movement_type: vibrate 
  action:
    - service: timer.start
      entity_id: timer.washmachine_timer

- alias: WashingMachineWorking
  trigger:
    platform: state
    entity_id: timer.washmachine_timer
    to: "active"
    for:
      seconds: 185
  action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.washmachine

- alias: WashingMachineFinish
  trigger:
    platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.washmachine_timer
  condition:
    condition: state
    entity_id: input_boolean.washmachine
    state: 'on'
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.washmachine  
    - service: notify.mobile_app_bertybassettiphone11promax
      data:
        title: "Home Assistant"
        message: "The washing machine has completed it cycle, please remove your clothes"  
1 Like

I taped a disk magnet to the sensor with the adhesive ring and stuck it to the dryer door (I have a stacked washer/dryer unit, dryer on top). I am using zigbee2mqtt and set the sensitivity of the sensor to “high”. This by itself gave too many false positives, so I implemented a statistics sensor:

  - platform: history_stats
    name: vibe_count
    entity_id: sensor.aqara_vib_action
    state: 'vibration'
    type: count
    end: '{{ now() }}'
    duration: 00:10:00

Everything else is similar as posted above. If vibe_count goes above 4 the dryer timer gets cancelled & started again (there was a bug where timers wouldn’t reset if you just started them again, cancelling them first is the workaround, this might be gone by now, I haven’t checked). If the timer expires, I get a message over Alexa. This is sensitive enough to detect both washer and dryer cycles ending.

1 Like

Hi @hgelpke ! Have you tried to use it for those purposes? I am thinking on attaching the sensor to the main door to be able to detect when the door is being forced by drilling, bumping or hammering. By doing this, you can take advantage of the time needed by the thieves to force the door (this time depends on the quality of the door, shield and the cylinder) and call the police before they enter into the perimeter of the house/flat.

I am planning to try this somewhere on my parked car. In my area bad guys break into cars often and the police cannot/don’t do anything. Not even a police report in many cases.
I’m hoping if I’m alerted and confirm via outdoor camera, the police will visit the location promptly when their activity is in-progress. Camera motion alone is usually not good enough due to false-positives.

Re: washer
Turns out my washer doesn’t vibrate enough! (sensor affixed to the outer panel)
So that didn’t work in my case.
BUT I tuya-convert’d some very good BN-LINK smart plugs, and they show the power consumption (Watts), so now I know the watts for wash vs spin cycle as well.

yeah - i had the same - tbh, this is good - means you have a well balanced washing machine :slight_smile:

I bought one vibration sensor and I want to use to close my blind when the wind can crash the blind. I have a deconz usb key and I use the phoscon integration. I want to implement the code with node red. But according with this post is not possible to change the sensitivity and also I need a waterproof case. I see an example case in: https://www.thingiverse.com/thing:4385429, but is not clear that the file can be printed as the images are showed…, but I will try tomorrow to print the case.

I’ll show the results in the next few days.

Hello, if your printer is calibrated correctly, the printer should work in one. But I suspect that you would have to glue the sensor into the housing, and then attach the housing firmly to your blind so that the vibrations are transmitted … Will the sensor still recognize the vibrations? I suspect that a simple lid with a rim would be better suited for this, it is very easy to draw with “TinkerCAD” or “FreeCAD” and then print. But still good luck with your project, and please let us know if and how well it works … Greetings

The first try with the box was horrible, the hinges were broken and same for the flange to close the box only the first time that I closed the box… And as you said the vibration sensor is not ajusted to the internal measurements. Then I need to design a new box by myself, and I don’t have exprience in 3D design, but I will try…

check further up, and else where - unless this is a limitation of the deconz key

You can change the sensitivity via Deconz Rest API using a Conbee II.
I have done that approx 6 months ago.

I am trying to use the vibration sensors on my washer and dryer so I will receive an alert at the begining and end of a wash/drying cycle. The 2 sensors are integrated with HA via a Conbee II USB key on a Pi but they are not detecting the vibrations of my machines for some reason. I dont now if thier sensitivity can be modified. They do respond if they are tapped a few times. Has anyone seen this before?

Hi Frank
If you are using them via zigbee2mqtt you can. see https://www.zigbee2mqtt.io/devices/DJT11LM.html

why not just use a plug with power monitoring? much more precise