Is this built-in UI7 logic right for motion control light?

I have UI7 on my Vera Light and I’m using the “built-in” logic to create a scene. I say built-in because I just put together the scenes in the interface, without coding anything.

Devices: I have the Ecolink PIR motion sensors on my network, in TEST jumper mode, and they seem to work just fine. I have dimmable lamp plug in modules with standard lamps. Those also work just fine.

Scenario: Between sunset and sunrise, if any motion is detected, turn on the lamp. After 2 minutes, if there is no motion, turn off the lamp. The desired result is that if motion is detected, the light stays on for a minimum of 2 minutes. If motion continues in the room, the light stays on. That’s it.

Scenes:

[ol][li]At Sunset, Arm the motion sensor[/li]
[li]At Sunrise, Disarm the motion sensor[/li]
[li]If Motion Sensor is Armed and Detects Motion: Turn on the Light. Wait 2 minutes. Turn off Light.[/li][/ol]

It seems very simple, and while testing, it seems to work just fine. Is there a drawback to this method that I’m not seeing yet? Most of the posts I see about creating motion control lighting involve using PLEG or writing code, or using a Countdown Timer Device, so I wanted to sanity check this approach. Is there any reason not to do it this way?

[quote=“snocrash, post:1, topic:190822”]I have UI7 on my Vera Light and I’m using the “built-in” logic to create a scene. I say built-in because I just put together the scenes in the interface, without coding anything.

Devices: I have the Ecolink PIR motion sensors on my network, in TEST jumper mode, and they seem to work just fine. I have dimmable lamp plug in modules with standard lamps. Those also work just fine.

Scenario: Between sunset and sunrise, if any motion is detected, turn on the lamp. After 2 minutes, if there is no motion, turn off the lamp. The desired result is that if motion is detected, the light stays on for a minimum of 2 minutes. If motion continues in the room, the light stays on. That’s it.

Scenes:

[ol][li]At Sunset, Arm the motion sensor[/li]
[li]At Sunrise, Disarm the motion sensor[/li]
[li]If Motion Sensor is Armed and Detects Motion: Turn on the Light. Wait 2 minutes. Turn off Light.[/li][/ol]

It seems very simple, and while testing, it seems to work just fine. Is there a drawback to this method that I’m not seeing yet? Most of the posts I see about creating motion control lighting involve using PLEG or writing code, or using a Countdown Timer Device, so I wanted to sanity check this approach. Is there any reason not to do it this way?[/quote]

No seem to be just fine using that.

PLEG is just much easier to write it all into one. And PLEG give you if and or. This logic you have isn’t very complicated so it’s able to be handled with stock scenes, when you get into more complex logic, then stock scenes can;t handle it and you need to find other alternatives like PLEG.

No seem to be just fine using that.

PLEG is just much easier to write it all into one. And PLEG give you if and or. This logic you have isn’t very complicated so it’s able to be handled with stock scenes, when you get into more complex logic, then stock scenes can;t handle it and you need to find other alternatives like PLEG.

Part of this questioning comes from the fact that I don’t understand how this Scene logic is working in my scenario. I’ve told the motion detecting Scene to shut off the light after 2 minutes. If I stay in the room for 10 minutes, moving around, the light never shuts off. As soon as I leave, it shuts off after 2 (roughly) minutes. So during that time I’m in the room, I’ve triggered the Scene multiple times. Shouldn’t the light blink on and off?

So digging a little deeper: Is there any risk or problem with Scenes “stacking” up or overloading the system if they aren’t designed efficiently? I’m not sure how to describe it, but I’m trying to think like a programmer. Would this eventually cause some kind of overflow or a crash? Or, does each successive “run” of a Scene close off the last one?

[quote=“snocrash, post:3, topic:190822”]Part of this questioning comes from the fact that I don’t understand how this Scene logic is working in my scenario. I’ve told the motion detecting Scene to shut off the light after 2 minutes. If I stay in the room for 10 minutes, moving around, the light never shuts off. As soon as I leave, it shuts off after 2 (roughly) minutes. So during that time I’m in the room, I’ve triggered the Scene multiple times. Shouldn’t the light blink on and off?

So digging a little deeper: Is there any risk or problem with Scenes “stacking” up or overloading the system if they aren’t designed efficiently? I’m not sure how to describe it, but I’m trying to think like a programmer. Would this eventually cause some kind of overflow or a crash? Or, does each successive “run” of a Scene close off the last one?[/quote]

Your over thinking it. The scene should be working like it is. If you keep re-triggering it by moving around then it will continue to stay on like you have asked it to. I don’t see anything wrong with this unless you want it off no matter if your still moving around. Your re-triggering and starting the 2 min timer over until there is no motion.