Help me understand homey's thinking

Hi all! I’m new to Homey, but love trying things out untill it works. Find it interesting to try understand the logic of homey. The way I need to think to get flows working. But really could use your help…

In my kitchen i have a Sensor (aqara P1) and 2 :bulb:(yeelight).
Now I want the lights to turn on when i walk in the kitchen, and turn off when i leave the room.

Ive tried many different flows, but the one working for me is with a timer, but its with 3 flows… I think it works, tried it once, and worked. But didnt try it for being in the kitchen for more than 5 minutes…
I’ve copied it from this forum.
But i don’t understand why i need to switch the timer off in step one… because there was no timer set upfront…

Can anybode explain this to me so in the future i know how to think with homey…

My sensor is set to 29 seconds of blind time.

I have:
Flow 1
If
Sensor is ON
And
Brightness is lower than 40lx
Than
Turn on lights
Stop timer Kitchen

Flow 2
If
Sensor is Off
Than
Start kitchen timer for 30 sec

Flow 3
If
Timer is empty
And
Sensor is on
Than
Set kitchen timer for 30 seconds
Otherwise
Turn of lights

Anybody have a improvement for me?
And why do i start with turning timer off?

With standard flow (not advanced flow) you should not think about ‘too much flows’. It is what it is, while multiple triggers are impossible. i’ve seen figures like 900 flows on a Homey

So you have at least one ‘On’ flow and one ‘Off’ flow for switching a device, unless you switch it off after a fixed delay in one flow.

Correct. It is used for when the zone is inactive and the timer, which turns of the light, has started, but the zone gets active again while you move, or came back in a short while. This way the light doesn’t turn off and the timer is restarted again when the zone gets inactive.
I use zone activity mostly, while it is independent from the used sensors. You can add one, or replace one, without having to repair all related flows.

There’s a brand new flowcard introduced the other day, which makes the use of timers and 3rd flow unnecessary (it is available per Device Capabilities app)

It is for devices, not for zones (yet):
It means, in the example flow:
when a motion alarm is off (=false) for x sec/min/hr → trigger the flow. (Execute “Every time” is obvious for a sensor, but for other purposes it can be set to “Only once”.)

1 Like

Well, not abvious i guess Peter :wink:
Trigger Every time means it will keep triggering continueantly each 2 minutes, as long as the motion_alarm is false.
And there is no use for that in those cases.
execute One time means it will execute once everytime the motion is switched from on to off, but will then only fire once, and not continueantly.

I guess i need to work on my flowcard description :wink:

1 Like

Thank you for expaining!
This mornigs (set lux to 1000 to try out if lights go off) the lights went on, but after about 10 minutes they’ve gone off. Few seconds later it went on again (i was still in the kitchen, didn’t leave).
So something is still not working as it should / as i want it to work.
Did i do something wrong in the flow?

When i use zone activity (i did before) and only grab a drink, the lights are on for quite some time… so thats why im trying things out. I want the lights to turn of after leaving in 30 seconds.

But im trying different flows for 5 days now and i dont get it to work properly…

Please share you flows share function?

And, are you sure you don’t have double flows still active or anything like that?

And did you check the insights/log-tab for the sensor? You sure a cat didn’t activate it for instance?

Flow 1

Flow 2

Flow 3

(How do i share it here as a picture instead of weblink to the flow?)

No pets or kids at home. But still, light goes off after approximately 10 minutes. Im busy, so not standing still.

No other kitchen flows active.

Sensor settings:

Sensor log

Well, about Flow3: I would remove the And part.
Because that should never be true. I understandthe feeling of “backup” in it, but because you cancel the timer when the Sensor is ON, that And part of the flow should never be true.

However, i indeed don’t see anything wrong with these flows.
Could you goto the Kichten Light (one is enough) and show the tabs for Flows and the Log?

That is strage :thinking::face_with_raised_eyebrow:


Ive deleted the and part in flow 3, thank you.

Must say: ive been in the kitchen for 45 minutes now, and the light stayed on all the time.

Could this have anything to do with the LX wich is normally set to 40LX?
Now ive set it to 1000 to try the lights during the day, didnt want to wait till evening falls.

The thing is:
Lets say the sensor turned to Off, timer start running and the timer goes to Done.
If you would have moved within the 30 seconds and the LUX was to high, the timer is not cancelled.
So the Timer-Finished (Flow3) would be triggered.
If the Sensor was On than, it just reset’s the timer to 30 seconds, not cancel it.
So, if the Sensor is turned to Off for just one second, precicly when Flow3 triggers, it would turn of the lamps, just because you might have been moving away for a very short while.

Okay, thank you!
Extra question, cause im still trying different things. My lights in hallway up and below ive got different flows. Because i usually walk trough the hall and not stay in there for a longer period of time (most of the time).

Flow 1 hall downstairs:
https://homey.app/f/S_OZhx

Flow 2:
https://homey.app/f/Ig6_hx

Or upstairs
Flow 1:
https://homey.app/f/_if_hx

Flow 2:
https://homey.app/f/uEm_hx

Which one should work best?
Sensor on/off
Zone on/off
Or flow with timer?

If i sit down to eat, the lights turn off. I’m using Aqara movement sensor P1.
Should i add (buy) a presence sensor that can define that I’m still in the room, so the lights stay on? For instance aqara presence sensor FP2

It depends on the sensor and the settings of the sensor (Blind time and Cancellation delay). The blind time must be smaller than the cancellation delay. These two parameter work like a build in timer if they are well configured. But not every motion sensor can be configured like this.

The behavior of the (pure) zone on/off is dependent of the settings of the motion sensor (see post 1). The advantage of the zone function is, that it can react on more than one motion sensor. Door-/window sensors can be also to be added.
However, there is also other zone cards:
– This zone is active for x minutes
– This zone is inactive for x minutes
The second one has build in timer and it’s very easy to create flows:


(It’s an Advanced Flow, but it’s also simple with normal flows)
The disadvantage of this card is, that there are only fixed time periods available.

I think this is the most flexible option.

My personal summary: All variations can work. Ultimately, it depends on the hardware used, the user’s preference, and possibly the use case.
So it’s your decision…

That should be the solution. The problem is, that no presence sensor is supported by Homey yet (without any additional hubs, bridges and so on), also not the FP2 from Aqara.

1 Like

So i’ll keep the setup as it is (timer).
I do have advanced flow, so maybe try out other options if its disfuncional again.
And wait for somebody to create somethimg for the FP2 sensor. Do have the aqara app installed. But no Aqara hub.
Thanks for your help to all!

It’s off topic, but the FP2 uses WiFi instead of Zigbee. And the Homey Aqara app is developed for Zigbee devices only yet. However, the demand for the FP2 is so great that it may be supported soon. But there are no information about this so far.
The Aqara Hub is also not supported yet.

Ah check!

Hi Dirk and Marley,

Also offtopic but interesting: Adrian Rockall offered to build an app for the FP2 (there’s no Aqara wifi app yet if i’m right), but he won’t until he can get the sensor working properly.
So track this topic I would say:

1 Like

Additional, here’s some example flows

1 Like