-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
What happened?
If a movement is initiated while the PIR is in its idle state, the movement will be detected. However, if continuous movement occurs, the movement indicator will switch to "clear" after 125 seconds.
What did you expect to happen?
The movement will continue to be indicated.
How to reproduce it (minimal and precise)
- Pair device
- Go to device -> exposes
- Start moving
- Monitor occupancy entry
Zigbee2MQTT version
2.7.2
Adapter firmware version
20210708
Adapter
ZStack3x0
Setup
Plain on Docker Container.
Device database.db entry
{"id":51,"type":"EndDevice","ieeeAddr":"0xa4c138194c7c2b9a","nwkAddr":15587,"manufId":4742,"manufName":"HOBEIAN","powerSource":"Battery","modelId":"ZG-204Z","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280,61184,1],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"ZG-204Z","manufacturerName":"HOBEIAN","powerSource":3,"zclVersion":3,"appVersion":147,"stackVersion":2,"hwVersion":1,"dateCode":"16092025","swBuildId":"0116092025"}},"ssIasZone":{"attributes":{"61441":0,"iasCieAddr":"0x00124b002f89f942","zoneState":1,"currentZoneSensitivityLevel":2}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":30}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b002f89f942","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":0},{"cluster":1,"attrId":32,"minRepIntval":3600,"maxRepIntval":65000,"repChange":0}],"meta":{}}},"appVersion":147,"stackVersion":2,"hwVersion":1,"dateCode":"16092025","swBuildId":"0116092025","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":332242049},"lastSeen":1768598762606,"checkinInterval":15000}
Debug log
No response
Notes
It appears that the problem is caused by a timeout in the converter (/src/devices/tuya.ts, line 3335). This issue does not occur in ZHA.
// Occupancy reporting interval is 60s, so allow for one dropped update plus a small safety margin of 5s
m.iasZoneAlarm({
zoneType: "occupancy",
zoneAttributes: ["alarm_1", "battery_low"],
keepAliveTimeout: 125,
}),