I have been trying to get this to work for a long time but never succeeded. I have some rooms with both pir-motion detectors and smart light bulbs.
Right now I have the lightbulb to turn on for 30 min when motion is detected. But that makes them turn off and then on again if I am still in the room after 30 mins.
I would like the bulbs timer to reset to turn of in like 10 minutes after every movement. So if movement has been detected and the lightbulb turns on, after 5 minutes movement is detected again the timer gets reset to turn of after 10 minutes.
Lightbulb, motiondetector reset turn off-timer on every movement
Moderator: leecollings
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Lightbulb, motiondetector reset turn off-timer on every movement
I made a 2nd virtual switch that is kept alive by a lua script for 30 minutes, every time the pir is de-activated.
I did this because the pir stays active when it detects motion again within the period that it was already active.
If you are interested, I can share the script.
I did this because the pir stays active when it detects motion again within the period that it was already active.
If you are interested, I can share the script.
-
- Posts: 376
- Joined: Sunday 29 November 2015 21:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: UK
- Contact:
Re: Lightbulb, motiondetector reset turn off-timer on every movement
You should be able to modify this to how you need it, I use a virtual switch created as a push on button with an off delay of 10 seconds and use the PIR to trigger the button which is called Garage Light PIR, each trigger of the button starts the blockly event again, if no trigger occurs then the lights go out after their set times. You could simply just use the PIR On/Off signal to start the event however the addition of the button provides a fail safe for me, my garage is at the top of the garden so in the unlikely event my RFXCOM missed the PIR off signal the lights would never go out, this way you are only using the PIR ON signal and you always have an OFF generated by Domoticz, hope it helps.
Dave
Dave
- Attachments
-
- 2019-01-01 09_27_27-Domoticz.jpg (31.48 KiB) Viewed 869 times
Who is online
Users browsing this forum: No registered users and 1 guest