This object is in archive! 
motion sensor activation between 19:00 to 07:00
Need Answer
I need help with creating a rule for a wall plug I have a motion sensor and a wall plug connected to a lamp, I want to have it so when something moves and activate the sensor it sends a command to wall plug to turn on, and after 200sec if nothing have moved a front of the sensor it turns off, but if something have moved affront of the sensor it starts the timer from 0 agent and starts from the beginning agen, and this rule should only be activated between 19:00 and 07:00 can somebody help me? This should run every day
### Sorry about my Spelling I'm Dyslexic ###
No connection
Real-time notifications may not work
@Mikael,
You need two rules for this. First of all, you need a CountDownTimer which will turn OFF the lamp when the timer reaches Zero. For this, you can use a WHEN with a Schedule which runs once every minute, always.
Inside this, you will need to check if CountDownTimer = 1, then you switch OFF and set CountDownTimer to 0. If CountDownTimer is greater than 1 you Decrement this variable. (During DEBUG you PUSH a message to yourself)
In your second rule, you will trigger when MOTION is ACTIVE.
Inside this you will check that Hour of NOW > 19 or Hour of NOW < 7. If so, you will check if MotionTimer < 1. If so you will switch ON the light. (there's no need to switch on again at every motion).
In any case, you will set the MotionTimer to 3 (minutes).
Hope this helps (this was quick and dirty and may contain errors; I have something similar working in an office environment).
Best regards,
Robert
@Mikael,
You need two rules for this. First of all, you need a CountDownTimer which will turn OFF the lamp when the timer reaches Zero. For this, you can use a WHEN with a Schedule which runs once every minute, always.
Inside this, you will need to check if CountDownTimer = 1, then you switch OFF and set CountDownTimer to 0. If CountDownTimer is greater than 1 you Decrement this variable. (During DEBUG you PUSH a message to yourself)
In your second rule, you will trigger when MOTION is ACTIVE.
Inside this you will check that Hour of NOW > 19 or Hour of NOW < 7. If so, you will check if MotionTimer < 1. If so you will switch ON the light. (there's no need to switch on again at every motion).
In any case, you will set the MotionTimer to 3 (minutes).
Hope this helps (this was quick and dirty and may contain errors; I have something similar working in an office environment).
Best regards,
Robert
Hi Mikael,
Find attached a similar rule to your needs. In the rule I use an Aeotec multisensor to detect motion and measure luminance (Instead of schedule) and a fibaro RGBW module. If your motion sensor is also a luminance sensor you can use the same rule. If not, then you will have to remove the luminance check and change it to something like the second attachment.
Hi Mikael,
Find attached a similar rule to your needs. In the rule I use an Aeotec multisensor to detect motion and measure luminance (Instead of schedule) and a fibaro RGBW module. If your motion sensor is also a luminance sensor you can use the same rule. If not, then you will have to remove the luminance check and change it to something like the second attachment.
Mikael,
I have enclosed the rules I have for a location: Whenever the door is opened, light turns ON and a timer is set for 3 minutes. If motion is detected while light is ON, the timer resets to 20 minutes. If the timer reaches 1, light is switched off. This means that the light turns OFF 3 minutes after the last person leaves the area, but that the light stays ON as long as there is movement within 20 minutes of the last movement.
Mikael,
I have enclosed the rules I have for a location: Whenever the door is opened, light turns ON and a timer is set for 3 minutes. If motion is detected while light is ON, the timer resets to 20 minutes. If the timer reaches 1, light is switched off. This means that the light turns OFF 3 minutes after the last person leaves the area, but that the light stays ON as long as there is movement within 20 minutes of the last movement.
I would try it this way in one rule with only one join (see attached file). Sorry that I couldn´t try it out for you but the system is far away.
I would try it this way in one rule with only one join (see attached file). Sorry that I couldn´t try it out for you but the system is far away.
Mikael,
You should definitely go with the suggestion from Klaus Gimme. It will solve your problems, and is very much simpler and straight forward than my (very much more complex) example. It is in fact a great example on how easily such situations can be dealt with.
Best regards,
Robert
Mikael,
You should definitely go with the suggestion from Klaus Gimme. It will solve your problems, and is very much simpler and straight forward than my (very much more complex) example. It is in fact a great example on how easily such situations can be dealt with.
Best regards,
Robert
Hi! Here is a simple rule for that. you can watch the zipato youtube chanel for an build example
Hi! Here is a simple rule for that. you can watch the zipato youtube chanel for an build example
how do you exclude weekend days (or other)? i have tried but no luck
how do you exclude weekend days (or other)? i have tried but no luck
That´s easy. Use a scheduler to set a variable. I use a similar rule to set a variable to "detect" daylight (I set it to "1" 30 min. after sunrise and back to "0" 30 min. before sunset.
That´s easy. Use a scheduler to set a variable. I use a similar rule to set a variable to "detect" daylight (I set it to "1" 30 min. after sunrise and back to "0" 30 min. before sunset.
can sombody explaine wwhat the building block in rules white the name join, what do it have fore functio?
can sombody explaine wwhat the building block in rules white the name join, what do it have fore functio?
Replies have been locked on this page!