Set the sensitivity for Xiaomi Vibration sensor through Rest API (Deconz)

to change the sensitivity I tried this guide which was very simple and well explained if it can be useful to others:

1 Like

Is there some documentation I’m unaware of that tells what possible configuration exists?

I stumbled onto the viberation sensor sensitivity…I was unaware anything else had any configurable options. How do you know what can be changed?

I have a bunch of the PIR “human body”, several “door” ones, and a few vibration ones…for most things they work good-enough but some I wonder if they could be tweaked better but I don’t know what is possible.

1 Like

Changed mine using Developer Tools => Services and entering the blow

service: deconz.configure
data:
  entity: binary_sensor.vibration_NUMBER
  bridgeid: GETFROMINTEGRATIONSECTION
  data:
    sensitivity: 1
  field: /config
1 Like

Hmm…i dont have a number in the entity_id. It´s beside the daylight sensor the only device so far. Is this critical?

1 Like

did you find out how to achieve it?

I tried with this:

service: deconz.configure
data:
  bridgeid: 00212EFFFF04F4C4
  entity: binary_sensor.vibration_sensor
  data:
    sensitivity: 1
 field: /config

But I found this error in log:

pydeconz.errors.RequestError: /sensors/31/sensitivity parameter, sensitivity, not available

any hint?

Hi,

I am able to set the sensitivity via the API:

http://192.168.1.xx:40850/api/xxxx/sensors/61/config

{"sensitivity": 1}

BUT, when I query the device:

{
    "config": {
        "battery": 55,
        "on": true,
        "pending": [
            "sensitivity"
        ],
        "reachable": true,
        "sensitivity": 1,
        "sensitivitymax": 21,
        "temperature": 2800
    },

The change is in a pending state (pressing the button a few times makes the change take affect)
Does anyone know if it’s possible to ‘commit’ the pending change via the API?
I’ve tried every combination of PUT I can think of but with no luck

If I changed the name of the device / entity and I deleted that number, how can I find the sensor number?
LE: I managed to find it while playing with the numbers and remembering when I have re-added the sensor to Conbee 2 stick.

you need one space before your “field”

Bit of a late reply. but yeah

1 Like

Thanks for this post. I also saw that nothing happened until I pressed the reset button on the sensor a couple of times. I really thought I did something wrong.

It’s strange because I set the timeout duration of my motion sensors to 5 seconds (after applying the fast update hack) and that went through almost immediately.

I just ran across this thread as I’m having issues with the Aqara vibration sensor picking up the dryer as well. To clear the ‘pending’ attribute, I used the restart option HA deCONZ Add-On.

However, while the JSON shows the “sensitivity” attribute at 21 now (from 1), the sensor’s “lastseen” updates very infrequently. Further, under “state”, the “lastupdated” has not chanced in 2-months and the “vibration” and “vibrationstrength” values do not seem to change.

Under “config”, the “reachable” tag is ‘true’ and the “temperature” tag does change based on the fact the dryer heats up.

Any thoughts? Is this possibly due to using the Conbee2 stick rather than one of the Aqara hubs?

From May 7, 2022 at 13:30, the drying reached 2200 (22.00 c or about 71.6 f) and is cooling down:

{
    "config": {
        "battery": 100,
        "on": true,
        "pending": [],
        "reachable": true,
        "sensitivity": 21,
        "sensitivitymax": 21,
        "temperature": 2100
    },
    "ep": 1,
    "etag": "221bfacce9642a7f43fa42b51e5c3472",
    "lastannounced": null,
    "lastseen": "2022-05-07T17:20Z",
    "manufacturername": "LUMI",
    "modelid": "lumi.vibration.aq1",
    "name": "Vibration Sensor 01",
    "state": {
        "lastupdated": "2022-03-25T19:54:05.454",
        "orientation": [-1, -1, 89],
        "tiltangle": 5,
        "vibration": false,
        "vibrationstrength": 10
    },
    "swversion": "20180130",
    "type": "ZHAVibration",
    "uniqueid": "00:15:8d:00:07:c6:2d:39-01-0101"
}

Given that a sensitivity of 21 means “least sensitive”, perhaps the dryer just doesn’t move enough for the sensor to pick up?

Thank you for the quick response.

The initial sensitivity was “1” and I was not seeing much in the way of response. I then moved the value to “11” with the same results so I tried “21”. So, I’ve tried both ends of the range without success.

I’m wondering if my issue is using the Conbee2 stick instead of the Aqara hub which perhaps interacts with the device while the Conbee2 stick does not.

I’ve use the same device with the Conbee 2 and deCONZ and never had issues with it. I’ve since moved to a Sonoff Zigbee dongle and z2m, and also no problems. I use one stuck to the lid of the letterbox at the top of the driveway (sensitivity “medium” in z2m, which is 11 I think).

I’m not sure what type of dryer you have, but mine hardly moves at all :sweat_smile:

I’m now wondering if either there’s an issue with my Conbee2 or perhaps with the Aqara sensor. This morning I added an Aqara button (took a couple of attempts), but HA shows it as a temperature sensor, but Phoscon lists it under Switches. Looking in deCONZ, interestingly the button shows up ‘attached’ to the Conbee2 with a green line, but the vibration sensor is not linked to the Conbee2.

Making this stranger, the temperature which the vibration sensor displays is relatively accurate to the room temperature. The button’s temperature display in HA is also showing relatively accurate to the room in which it is currently sitting. Note the two temperatures displayed in HA are slightly different.

I guess I’ll breakdown and pickup the Aqara usb Hub and reset the two units to see if that fixes my issue.

@robertklep I failed to mention, I did add a couple of ‘dryer balls’ which do bounce around a lot and make a racket. Putting my hand on the side of the dryer with the dryer balls bouncing around does make a fair amount of movement where the sensor is located.

Just a quick update. I setup an Aqara E1 USB Hub and while I couldn’t get the Aqara integration to work, I did setup the Hub and the associated devices via HomeKit Controller after using the Aqara app on my (Android) phone to set the WiFi SSID and password.

After a couple of false starts I was able to set the sensor’s sensitivity to “High” in the Aqara app and it has been properly reporting the start and stopping of the dryer.

However, using the HomeKit Controller the sensor no longer reports temperature, which to be honest wasn’t very important to me.

Hi Guys,
@robertklep @Miguel_Queiroz @Zoriontsu
I’ve read that setting sensitivity to 1 is the most sensitive, but also read that 21 is the most sensitive.
Which one is correct?

Does this also need a restart to take effect?

According to the deCONZ documentation: 1 = most sensitive, 21 = least sensitive.

You don’t have to restart anything, but because it’s a sleeping device you have to wake up the device (and keep it awake) if you want to apply the setting immediately (if the device is kept sleeping, deCONZ will queue the configuration change until the device wakes up by itself, but you won’t know exactly when that is). Short-press its button to wake it, and short-press it once every few seconds to keep it awake.

1 Like

@robertklep Does the multiple short-presses every few seconds keep the unit awake all the time (i.e. once you stop pressing the button)?

The problem I’m having now is it sometimes seems to “fall asleep” during the dryer cycle and HA continues to report the dryer vibration level. I’ve had to augment my Automation with the sensor’s temperature which appears to work with the deCONZ, but not if I use the sensor with the E-1 and Homekit.

I don’t know how long the device will remain awake after you short-pressed the button, but if I were to guess it’ll be about 10 seconds or so. After that it will go back to sleep until it senses movement. It doesn’t have a “permanently awake” mode AFAIK.

I’ve used this sensor for a while with deCONZ and never had any issues with it, other than the battery running out. Earlier this year I moved from deCONZ to zigbee2mqtt and still no issues. I use one inside the letterbox at the end of the driveway to notify me that post arrived.