Making Xiaomi Motion Sensor a Super Motion Sensor

I just recently installed this xiaomi motion sensor in my wardrobe to automate the light on/off routine
and what I noticed that there is huge delay between opening door and turing on the lights, after some tests I realised that sensor not sending event quick enough, after some googling I got to this article…

Not sure if I want to do that soldering process, probably I might attempt it, but anyway, I think this is poor design of the device!
Instead of putting 2 min delay, it should be event driven system!

If there is motion event - send event data instantly to the hub
No events - don’t send anything.

Additionally for example on my Domotics or Hassio server this device remains on/active for next 2 minutes after motion detected and I can’t change the value of that. Motion sensor should not stay active for 2 minutes after event happened. it should be 1 off trigger stating that something is moving - that’s it.
It is my/Domoticz/Hassio code logic to decide after how many seconds turn off the light, rather than being detected by sensor stop being active after threshold I can’t control.

Regarding avoid events flood in case if motion continue, there could be set an timeout time for repeat data send. for example if motion happened and continue, don’t send next package for next 5 sec and only then if motion continue repeat send action.

Maybe someone know better sensors and able to recommend?

i believe you can just jumper tp4 to tp15 as when i test continuity btw where you are shorting tp4 to, it seems to be connected to tp15

You can use the solder it self as a wire or just take wires from a broken elecronic

Hi is TP4 connected to anything else? Mine was a bit fragile and broke off during soldering :<

Thank you for your nice mod!
Now my sensor sends the message every time I move a lot in the room.
Is there a way to make it more sensitive to smaller motions?

My use-case:
I am sitting at my computer playing video games. I don’t want the light to turn off, while I am in the room. The sensor does not notice me sitting there, only if I wave my arms…

Kind regards
Dustin

Set up two motions and make a virtual “combined motion” trigger.
Put the other one under your monitor facing your keyboard and you :slight_smile:
As this is you’re first post I doubt WebCore is in your vocabulary yet but I am sure you can do this in the new Automations; I just don’t use those.

Hi,
Anything on this?

Hi all,

what is the best way to reset the value to occupancy = no with hassio and node red? i dont find a good solution for me, can you give me a description of the solution?

Thank you

best regards

Mathias

Hello sir!

I just did the soldering on one of my sensors, but it doesn’t seem to change anything at all. Do I need to change something in the code too? i am using a4refillpad DTH for aqara sensors.

Old thread, but still valid and still awesome. Makes the motion sensors actually way more valuable than stock. Thank you!

Any ideas on doing the same thing to the Aqara vibration sensor? Right now, there is an action rearm delay of 60 seconds. Would be nice to get that to 5-ish as well.

The devices are easy to open, but since we haven’t discussed what signal or voltage TP4 is, it’s tricky to transfer that knowledge to the vibration sensor.

Thoughts?

Here is my Node Red flow to “fake rearm” the modified motion sensors within HA. I am sure there are better ways of doing this, but this works well for me. The flow can handle an arbitrary number of motion sensors, below has two as example. The flow can handle an arbitrary rearm delay, the example uses 10s; however, nothing outside the range of about 6s and 90s makes sense. You’ll need to modify to point to your own MQTT server.

[
    {
        "id": "1988cfb9.49c74",
        "type": "tab",
        "label": "Fix Aqara Motion Sensors Occupancy Reset",
        "disabled": false,
        "info": "This flow resets occupied state of Aqara mini motion sensors to false after a set of seconds after it goes true.  This goes hand-in-hand with the \"famous\" hardware mode of the Aqara sensors that allows them to retrigger after 5 seconds rather than 90 (but the HA software still assumes 90 seconds, hence the need for this).\n\nMAJOR CAUTION: ensure there is NO CHANCE of an infinite loop in flows like this -- first iteration of this took down HA and generated millions of MQTT updates. Specifically, you MUST ensure that the flow has no chance to process it's own output.  This flow sets a flag and kills output if flag is thusly set.  There may be other methods to achieve same result, TBD."
    },
    {
        "id": "25e97774.b16c38",
        "type": "mqtt in",
        "z": "1988cfb9.49c74",
        "name": "motion-01 in",
        "topic": "zigbee2mqtt/aqara-motion-01",
        "qos": "0",
        "datatype": "json",
        "broker": "224853ed.7c89fc",
        "x": 90,
        "y": 40,
        "wires": [
            [
                "3f4a6e85.e15e52"
            ]
        ]
    },
    {
        "id": "3f4a6e85.e15e52",
        "type": "function",
        "z": "1988cfb9.49c74",
        "name": "Occupancy FALSE when Occupancy TRUE",
        "func": "if( msg.payload.occupancy == true && msg.payload.occupancy_reset_by_flow != true ) {\n    msg.payload.occupancy = false;\n    msg.payload.occupancy_reset_by_flow = true;\n} else {\n    msg = null;\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 410,
        "y": 100,
        "wires": [
            [
                "a732b7ee.e4df98"
            ]
        ]
    },
    {
        "id": "4abd3efb.dc3cb",
        "type": "debug",
        "z": "1988cfb9.49c74",
        "d": true,
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 510,
        "y": 220,
        "wires": []
    },
    {
        "id": "a732b7ee.e4df98",
        "type": "delay",
        "z": "1988cfb9.49c74",
        "name": "",
        "pauseType": "delay",
        "timeout": "10",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 300,
        "y": 160,
        "wires": [
            [
                "4abd3efb.dc3cb",
                "36bdf49d.6985ac"
            ]
        ]
    },
    {
        "id": "36bdf49d.6985ac",
        "type": "mqtt out",
        "z": "1988cfb9.49c74",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "broker": "224853ed.7c89fc",
        "x": 530,
        "y": 160,
        "wires": []
    },
    {
        "id": "f98c657a.f56468",
        "type": "mqtt in",
        "z": "1988cfb9.49c74",
        "name": "motion-02 in",
        "topic": "zigbee2mqtt/aqara-motion-02",
        "qos": "0",
        "datatype": "json",
        "broker": "224853ed.7c89fc",
        "x": 90,
        "y": 100,
        "wires": [
            [
                "3f4a6e85.e15e52"
            ]
        ]
    },
    {
        "id": "224853ed.7c89fc",
        "type": "mqtt-broker",
        "name": "HA MQTT",
        "broker": "192.168.0.18",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    }
]

The motion sensor IS event based. It sends the message as soon as it detects motion. There’s just a 60 second cooldown. The delay you experience is not related to this cooldown. It would help to know more about your setup to diagnose this delay. I would also try contact sensor for wardrobe lighting. It makes more sense and works better.

Hello.
I already import your Flow, change the mqtt broker but I think I must change the topic in the mqqt in node.
Your topic is: zigbee2mqtt/aqara-motion-01
What I must change in my topic in order to select my sensor? aqara-motion-01 is you entity id?
Hope you can help me.
Thanks

I just received 4 aqara motion sensors, bought from mi store on aliexpress. The production date says it is 2021.11, so pretty new. After soldering 3 of em a noticed, that the 5s interval stopped working after the “training” mode was done after 24h. Now the status changed from motion to no motion in 5 seconds, but then it won’t detect motion again for 60 seconds.

The one not soldered does also have a 60 second cooldown, so looks to me like the hack doesn’t work on this new devices, and the cooldown was changed from 120 seconds to 60 seconds. The board looks identical, so do the solder-points. Anyone having same issues with newer models? thx

1 Like

Yes, same here. Does anyone have any idea if the new ones can be put into a 5 second cool down? Thank you

1 Like

Same issue as well, new aqara motion sensors with the 5 second mod as above (soldered) and works for a day or 2 and is now taking 60 seconds between activations.

Same here :frowning:

guys i have an aqara vibration sensor. The time is 1 minute and 30. Is it the same change that I have to make? The different device. Thanks so much

I have one too, but mine immediately reports whenever there’s vibration. I have it attached below my mailbox where it’s protected from weather and it reports every time the door is opened and then closed, which well less than your time of 1 minute 30 seconds. What device handler are you using?

I have a key CC2652P ZigBee 3.0 USB key for ZigBee2mqt…
lucky you, I remain in “detected” for all that time