This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[Solved] Turning lights off automatically (but not on)
k1s
Member
Hi
I've got Aeotec multisensor PIRs and Fibaro relays and dimmers which I understand Homey can talk to to switch lights on and off based on whether movement is detected. What I'm not sure about is whether is rule can be constructed in Homey to only turn lights off if no movement is detected without first having turned them on with motion, as follows:
EDIT:
The solution is in post https://forum.athom.com/discussion/comment/70978/#Comment_70978, and then we can set the duration after the last motion is detected as shown at the bottom of this post: https://forum.athom.com/discussion/comment/71027/#Comment_71027
I've got Aeotec multisensor PIRs and Fibaro relays and dimmers which I understand Homey can talk to to switch lights on and off based on whether movement is detected. What I'm not sure about is whether is rule can be constructed in Homey to only turn lights off if no movement is detected without first having turned them on with motion, as follows:
1- Somebody goes into a room and manually turns on the light
2- After e.g. 30 minutes nobody is detected in the room, the lights go out
3- If after 30 minutes there is somebody in the room, the lights stay on (not switch back on manually or by waving)
4- If having turned on the light manually, the user turns them off again, they stay off until manually turned on again
So for example, if somebody goes in to a room, switches the light on manually and then off again to e..g. watch a film, they stay off. Whereas if they go into the room, turn the light on but then leave the room, after 30 minutes the lights go off.
Can it be done?
So for example, if somebody goes in to a room, switches the light on manually and then off again to e..g. watch a film, they stay off. Whereas if they go into the room, turn the light on but then leave the room, after 30 minutes the lights go off.
Can it be done?
EDIT:
The solution is in post https://forum.athom.com/discussion/comment/70978/#Comment_70978, and then we can set the duration after the last motion is detected as shown at the bottom of this post: https://forum.athom.com/discussion/comment/71027/#Comment_71027
Comments
The way i like to do it it with Countdown app.
Make a timer in settings/countdown and call it "U-name-it" , so whatever u like.
Then make 3 flows:
First is to stop the timer when there is movement.
Next will be to start the timer.
Last will be to turn of the lights when hourglass in empty. This is 30 minutes after last movement!
I made a timer called Storage Room Lights off. First question: do I need a uniquely named timer for each light/room?
I assume the thing on the left under 'when' in your first picture a motion sensor?
Google translate says "de bewegingsmelder gaat aan" means "the motion detector goes on". I have Aeotec MultiSensor 6, so assuming the correct option/card "The motion alarm turned on".
Assuming "zandloper leeg" => "hourglass empty" is the same as "Timer reaches zero (0)" in the English version of the Countdown app, so my 3 Flows look like this:
My sensor is set to cancel the motion alarm after 120 seconds, so presumably the logic here is to wait 2 minutes after the last motion is detected, then start a countdown (in may case another 3 minutes), then in that period if the motion is detected start (or should it be reset) the timer, then turn the lights off after the 3 minutes with no motion? I don't have a reset option so, would it be the 'Adjust' option like this:
Another question: if the lights aren't already on, is the last step (turning off) just ignored, or should a condition be put on the first one (e.g. something like "when...the Storage Room light is on and the Motion alarm is turned off"?
Correct!
Also correct
Very nice. Only missing the "Turn the lights on"
Also correct.
Last flow is not needed. Timer is running in ur first card so no need to adjust it or reset it.
or should a condition be put on the first one (e.g. something like "when...the Storage Room light is on and the Motion alarm is turned off"?
Another question [sorry]. Is the countdown timer necessary only because there is a limitation to the 'Motion alarm cancellation' setting for the motion sensor?
IN my MultiSensor 6 settings, against this option, the info says: "Time before motion alarm is turned off since last motion detected event. Range: 10 - 255 =seconds 256 - 3600 = minutes when divided by 60" I've no idea what the means for the maximum & minimum range, but presumably I could just set that to the time delay after the last motion and not have to use a countdown timer - is that right?
It doesn't work, but why not?
Ore maybe one of the other flows are in conflict.
...but I'm not 100% sure whether the motion (and 120 seconds) are reset during the cancellation period if new motion is detected
EDIT: According to my tests the "Motion Alarm Cancellation period" for Aeotec Multisensor 6 does indeed seem to reset if it detects new movement after the first motion alarm is triggered, so this flow seems to do the trick by itself.
So if motion is detected while still being active, the internal timer resets.
A card in the when column acts as a trigger (a change like going on or going off).
When used in the and/or column, it acts as a state (activity is on or activity is off)
...but it doesn't....not always
This room is a WC with the switch on the outside.
If I turn on the light using switch, with the door closed, it turns the light off straight away. Because the the motion alarm is on the off state, I suppose.
If I turn the light on and enter the room, the motion alarm is on, and then goes off after I leave, but the light doesn't turn off when the motion alarm return to the off state. So it looks like the "And" isn't monitoring the state, but is simply looking at the state when the 'When.." happens.
But when I turned the flow the other way round like this:
, this time the 'And' does seem to be a monitoring the state. With flow like this. I turn on the light at the switch outside, enter the room and the motion alarm is triggered, and begins is cancellation period (30 seconds in my test). I leave the room at 20 seconds and ten seconds later the lights go off. I repeat the test but this time stay in the room for 3 minutes. The lights stay on all the time, until 30s after I leave the room. This is the behaviour I was looking for, but I wish the flow conditions were easier to understand/more consistent.
So it seems, at least with this equipment (Aeotec Multisensor 6 + Fibaro Double Switch 2), all we need is a single flow like the one in my earlier post, above: https://forum.athom.com/discussion/comment/70978/#Comment_70978, and then we can set the duration after the last motion is detected using the "Motion Alarm Cancellation" setting in the Aeotec Multisensor settings, here:
...or set a delay before turning the light off in the 'then' section of the flow: