Hi guys.
I am new to Homey Bridge, and have a problem. I want to be able to turn on one lamp in the bedroom when I need to go to the bathroom, should be working after 11PM and until sunrise, and then turn off again after there is no motion on the sensor.
I am able to turn on the light with a flow, but when I add some extra conditions like the timing (11-sunrise), and turn off the light after no motion, nothing is working.
Is there a clever one that can help me with making a flow for the Homey Bridge, please?
Thank you very much in advance.
Hi,
please share your flow(s), maybe there is only a small mistake.
This time in english language.
Try it after you removed the else.
What is turned on?
Only a bulb at first - normally just one lamp.
As @Ria_Banis already suggested, remove the else part and create a second flow:
WhenâŚ
â The motion alarm turned off
AndâŚ
â The bulb is turned on
â The time is between 23:00 and 05:00
ThenâŚ
â Turn off
You may run into another problem, and that is that the lamp keeps turning on and off. However, this depends on how the motion sensor works and/or is set up, as well as on the use case. If you run into this problem, let us know. Then we will find a better solution.
I tried that, and nothing is working. The motion sensor is Aqara Motion Sensor thru homey Aqara app, the lamp is Philips Hue thru Hue app on Homey.
So what is going wrong in this setup?
Try
â Time is not between 05:00 and 23:00
(Time from the original post)
I was happy .- for a minute It worked when I reversed the time for both flows to be the reverse - but after it worked one time, it then stopped working again the 2nd time, I tried it.
I put on another new Aqara M S to see if it was the sensor, but it is still the same: nothing happens.
I tested and tested, and came to this: When I press Test to test the first part, the lamp goes on, no matter if motion or not, and when I activate the M S, the 2nd part of it - flow 2, turns off the light when the sensor goes to idle - so - the last part seems to work, but not the first part.
When you test a flow, you emulate the trigger, in this case the motion trigger. So it doesnât matter if thereâs no motion.
It just tests the conditions and the actions of a flow.
I suggest to add timeline notifications to each Then and Else parts of the flows, then you can review whatâs happening, and whatâs not.
2nd flow:
Why do you have a timeframe as condition to turn a light OFF? Now the light is never switched off when the motion alarm turns off between 13:00h and 5:00h⌠But maybe thatâs what you want?
Also, Iâd remove the âand if light is turned onâ condition.
To me, it doesn´t matter to turn off a light which is off already.
And when it works, then you can always add conditions, one by one.
Peter, the timeframe in 2nd flow was suggested earlier in the replies, thats why it was put in, to test it
I decided to start all over again, removed everything, including the sensors, and restarted the Homey Bridge. Then I only added the sensor, and the lamp in the flow, and it worked. Then I added the time condition to the 1st flow, and now it works like a charm.
Thank you for your suggestion about the timeline notifications, it was a perfect idea, that I didnt think of.
Thanks to everyone being involved into this frustration
Right, it depends on what he wants to realize. And because he asked for flow during the night, I added the time flow-card also for turning off the light. Now, without the time flow-card, the flow runs always completely through including switching off the lamp, also between 05:00 and 23:00 when there is possible no need for that.
And this is the straight way to the second point:
The flow-card âThe bulb is turned onâ prevents Homey to run the complete flow if the lamp isnât switched on, or if the lamp was switched off manually in the meantime. I guess and hope, but this is my personally assumption, that this option saves Homeyâs resources and saves unnecessary traffic.
Hi Dirk,
No worries, I just quickly looked at the two last shared flows and gave my thoughts on what could be the issue. I did not read everything written earlier.
I did not know you suggested the timeframe in the âoffâ flow, so nothing personal I think otherwise I would have tagged you.
The second point is indeed how one looks at things, or how our Homey is running (white or redhot )
Thatâs why I wrote, âto me it doesnât matter to turn off a light which is off alreadyâ, but I meant of course:
âto me it doesnât matter to turn off a light which is off already for this situationâ
Why?
A motion sensor is in general not sending alarm-OFF signals every 1 or 3 seconds, and does not cause a big load on Homey or the used protocol (in my eyes).
When an âevery 1 or 3 second triggerâ is the case, I would also add a condition like âand light is offâ.
Also, when troubleshooting, I think itâs a good idea to (temporary) remove anything I donât need for the basic function of the flow.