nfarina / homebridge-dummy

Dummy switches for Homebridge: https://github.com/nfarina/homebridge
267 stars 81 forks source link

Using dummy switch with motion sensor #29

Open Post404 opened 4 years ago

Post404 commented 4 years ago

I'm using a timed switch with a motion sensor. The expected behaviour is that when the motion sensor detect motion, it turns on the light and the dummy swith. After the set time the dummy switches off, which is automated to turn turns of the light. This works.

The only problem is that the timer doesn't reset once it detected new motion (turning the dummy switch on again while it is on). So if you stay in the room long enough the light briefly turns off after the timer and immediately turns back on by motion.

cioraneanu commented 3 years ago

Would love this option as well.

mikehhhhhhh commented 3 years ago

I've created a PR for this, linked above.

If you'd like to test it out in the mean time, you can with the following;

npm i --save https://github.com/mikehhhhhhh/homebridge-dummy.git\#resettable-timer 

and restarting homebridge.

5xPa commented 3 years ago

I use HOOBs being new to Homebridge. I'm trying to run as described, I have an automation set to switch of the timer if motion sensor has stopped detecting motion and back on if motion detected. Which works fine but the time period does not reset. For example if I set it to 5 minutes, motion not detected say 2.5 minutes on, the timer switches Off, but on restarting it appears the previous time expired is still held by the timer. Therefore on restart time is now 2.5 minutes. I am more than happy to test it out. Tried a Plugin search search, could not find it. Did try entering the command above in the terminal, nothing shows up on plugin config. Also I do not know how to use PR, can I use this to download your trial version.

5xPa commented 3 years ago

Hi I found the latest version with resettable on switch. Works great with motion sensor. I also changed to HomeBridge on Windows 10. Thanks for the great plugin

Jacksonbm1 commented 2 years ago

Can someone clarify, when the description says "The timer will reset each time the switch is turned on" does that mean that you have to turn it off and then on? Isn't that always the case? What does checking the box do? Like can you even push a "turn on" when it's already on?

5xPa commented 2 years ago

If you switch off before the timer has expired and switch on at a later time. The time elapsed from the first operation remains. If you tick the box then switching off clears the timer.

mkz212 commented 1 year ago

Solution to Your problem #84