Aqara P1 Motion Sensor stays „Occupied„

I paired a new aqara P1 motion sensor with zigbee2mqtt. The sensor is detected instantly and seems to output everything correct but the big issue i have with the sensor is, that is stays in occupied state and does not clear even in a dark room with no person in it. I tried it in different rooms but no change. I also updated the firmware of the sensor and re-paired it a couple of times, but this does not change anything. Is this a fault sensor or i am doinng something wrong?

When you go into the Z2M dash and select the sensor and then go to states, like below, your occupancy always says true?

image

Yes it do.

{
    "battery": 100,
    "detection_interval": 2,
    "device_temperature": 31,
    "illuminance": 119,
    "linkquality": 0,
    "motion_sensitivity": "medium",
    "occupancy": true,
    "trigger_indicator": false,
    "voltage": 3134,
    "update": {
        "state": null
    },
    "update_available": null
}

Ignore the low linkquality. It also does this with good linkquality.

Maybe just a bad sensor? Do you have more of this same sensor that work? If not, could also try pairing to the ZHA and see if you get same results.

No, i only have this one. It seems you are right.
I also think it is a bad sensor, as no other similar topics are found about this sensor.
Maybe i will order another one or a complete different one.

I got probably 7 of them, never had a bad one. That sucks!

No, i only have this one. It seems you are right.
I also think it is a bad sensor, as no other similar topics are found about this sensor.
Maybe i will order another one or a complete different one.

No, it’s not only you I got two of these P1 Aqara sensors. I already use ZHA and tested them under it (so it’s not a Z2M issue) and can confirm that occupancy state stay on forever (about ten minutes actually) instead trigger goes off in set number of seconds. Any ideas or help?

My Aqara P1 sensor arrived today and it also stays “occupied” no matter what I do. Did you just assume yours was malfunctioning and returned it or did you find some sort of solution to this?

Pull the batteries and reinsert.

I bought five of these and I’ve only paired two so far, because my first two are having the same issue. Stays “Occupied” and wont’ clear on both ZHA and z2m

I am also looking to see if anyone found any fixes.

Tried this, absolutely no effect.

Leaving an update. I did a bit of experimentation where I removed the sensor, factory reset it, then re-added and re-configured it, then started with a detection interval of 30 seconds and increased it by 10 seconds at a time until it would no longer Detect & Clear successfully.

60 and 70 seconds sometimes work. 80 seconds causes the sensor not to clear at all until I turn the interval back down to 30; going back down to 70 didn’t. I didn’t bother to get more precise. This is surprising, considering the advertised maximum interval of 200 seconds.

I’ve decided to keep the sensor’s detection interval at 30 seconds where it’s happy, and set 180 seconds in the occupancy_timeout field. That’s giving me the results I want.

Not sure if that will help anyone else.

1 Like

@ShooterQ I’m not seeing an occupancy_timeout field, do you have it under the configuration section?

edit: I re-read ShooterQs post and yours and realized my response had nothing to do with the ‘occupancy_timeout’ field.
I’m leaving my screenshots for future reference and adding additional screenshots and info.

Did you enable it for the P1?
When I first set mine up, it was hidden and you need to “Enable” it.
My screenshots show it’s set for 180 but as discussed above, it doesn’t seem to work if you choose higher than about 80. I was hoping to find another interval that works so I’ll move mine back down .

this shows all items exposed

‘occupancy_timeout’ is set through the ’ Zigbee2MQTT’ UI

You can see it is set when you check the logs for ‘occupancy_timeout’

2 Likes

Any idea how to set this occupancy_timeout field in zha?