Converting Aqara Door Sensor For Doorbell

I have a basic doorbell that I wanted to keep, but to somehow integrate with Hubitat to detect when it's pressed. Originally I was hoping to find a sensor that I could put inline to see if current was detected, but couldn't find anything. I ended up using an extra Aqara Door Sensor (without its magnet) and putting it next to the wire coil in the chime that drives a solenoid to strike its bell (the coil turns into an electric magnet).

For testing I had it toggle a light when the sensor was "opened" (the electromagnet was no longer detected). It worked but ended up creating a strobe light as that coil must be quickly turning on and off.

Is there a way I could customize a driver (the one I'm using is at: raw.githubusercontent dot com/veeceeoh/xiaomi-hubitat/master/devicedrivers/xiaomi-door-window-sensor-hubitat.src/xiaomi-door-window-sensor-hubitat.groovy ) so it only goes off once in a set time limit, like maybe 10 seconds. That way, regardless of how many times it was turned off or on in 10 seconds, it would only detect it as once.

I would keep it simple and add a time constraint to the ruling for toggling the light (or whatever your end goal is). In Rule Machine, you can do that by having 'private boolean = true' as a required expression. Then your action list would be.

Set private boolean to false
Do stuff like flash light etc.
Wait for 10 seconds
Set private boolean to true

The required expression will keep the rule from running more than once during whatever time period the wait is set to.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.