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.

APP: Better logic / How to do simple math equation

SJSSJS Member
Hello everybody!

I have a small problem that I can't seem to solve.


Here is my situation and what I am trying to achieve:
I have 2 motion sensors in my kitchen. In the daytime when the Luminosity is <20 the lights come on. Excellent! 

BUT

After 21:00 I don't want all the lights coming on when someone walks into the kitchen to get something to drink. (There are 3 zones in the kitchen that are lights. I have it set up that one zone turns on at 20% for 2 minutes). This also works like a charm!

BUT

I would like homey to know when people are staying in the kitchen after 21:00 and turn on all three zones and keep them on. (I hope that was explained good enough)

The solution I have come up with:

Create a flow that kind of works like this:

when a motion detector in the kitchen is activated after 21:00 -> then have a counter go up each time the motion detector is activated.

when this counter = "10" -> Turn on ALL kitchen lights

Theoretically this should be possible. Anyone have a suggestion as how to implement it?

Cheers!

Comments

  • SytzeSytze Member
    Or use a countdown timer, that's a lot less complicated I think. When zone 1 is activated, reset and start countdown for x minutes. If motion detection turns off, stop timer. When timer runs out ( = people are in the kitchen for x minutes), start flow that turns on all zones.

    With your method it means the lights will go on the 10th time you have any motion in the kitchen. For example 10 times getting some drinks instead of staying there for x minutes. When determining the x for the minutes, do consider the cooling down period of the motion sensor.
  • BramBram Member
    edited June 2018
    Please post it in the official Better Logic discussion to keep the forum organized: https://forum.athom.com/discussion/840/app-better-logic-variable-management/p1
  • SJSSJS Member
    Sytze said:
    Or use a countdown timer, that's a lot less complicated I think. When zone 1 is activated, reset and start countdown for x minutes. If motion detection turns off, stop timer. When timer runs out ( = people are in the kitchen for x minutes), start flow that turns on all zones.

    With your method it means the lights will go on the 10th time you have any motion in the kitchen. For example 10 times getting some drinks instead of staying there for x minutes. When determining the x for the minutes, do consider the cooling down period of the motion sensor.
    Excellent idea! Have a suggestion how to turn off the lights when the room is empty?
Sign In or Register to comment.