Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disarm Zigbee timer for Occupancy:0 #8202

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

s-hadinger
Copy link
Collaborator

Description:

By default Z2T arms a timer of 90 seconds after receiving "Occupancy":1 and generates a synthetic event "Occupancy":0. This is required for Aqara presence sensor.

Philips Hue Motion Sensor does send "Occupancy":0. This PR disarms the timer when "Occupancy":0 is received within 90 seconds.

Related issue (if applicable): fixes #8192

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@arendst arendst merged commit 2a471c2 into arendst:development Apr 17, 2020
@flummy1978
Copy link

Does it work, to change the occupancy_timeout in some way ?

Ive modified my Sensors and its possible now to decrease the occupancy_timeout down to 5 seconds. It works already fine with the zigbee2mqtt way.

I've tried to set the occupancy_timeout:
15:11:45 CMD: ZbSend {"Device":"0x0707","Send":{"occupancy_timeout":25}}
but got the message:
15:11:45 MQT: stat/ZigbeeBridge1/RESULT = Unrecognized zigbee command: occupancy_timeout

@s-hadinger
Copy link
Collaborator Author

Do you want to change the 90s timer that generates a synthetic message?
Or do you want to configure the sensor to have a lower timeout?

@flummy1978
Copy link

Or do you want to configure the sensor to have a lower timeout?

I would like to configure the sensor (or zigbee on tasmot) to have a lower timeout. With an hardware modification, it's possible to decrease the time between 2 message lower than 60 seconds..

@s-hadinger s-hadinger deleted the zigbee_disarm_occupancy branch August 1, 2020 17:15
@s-hadinger
Copy link
Collaborator Author

What sensor are you using?

@s-hadinger
Copy link
Collaborator Author

The 90s timer is currently hard-coded in the source. I need to think how you could change this on a per-device basis.

@flummy1978
Copy link

I'm using the Xiaomi RTCGQ11LM

This is the hardware modification:
https://community.smartthings.com/t/making-xiaomi-motion-sensor-a-super-motion-sensor/139806

Ive found this already

static const uint32_t OCCUPANCY_TIMEOUT = 90 * 1000; // 90 s

The 90 nedd to be changed with a var like occupancy_timeout in the zigbee2mqtt configuration :)

@s-hadinger
Copy link
Collaborator Author

@flummy1978 You can now customize the occupancy time-out with ZbOccupancy since #9689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zigbee2tasmota - Philips Hue Motion Sensor support
3 participants