New user to Veralite, seeking help on automation

Hello all,

I’m a new user to the Vera lite and home automation in general. I’ve got a few switches, dimmers and sensors from a mix of vendors (Levitron, Linear, Enerwave and Aeon Labs).

So far, I have only been able to do the most basic scenes on the Vera - like turn on my outdoor light at dusk and off at dawn. This was quite easy in UI7, didn’t even have to read any docs to figure it out. The trouble started when I wanted to make more complex scenes that involved multiple conditions to be true before getting triggered.

I have an Aeon labs multisensor, and would like to switch on a light when motion is detected after dusk, and off when no more motion is detected. Seems simple enough, but all of the info I have found so far is specific to UI6 and lower. Most of them require use of LUUP, which is fine (I’m quite comfortable with programming, maybe not in Lua, but I can pick it up); but UI7 just doesn’t seem to have any options for adding LUUP to triggers. Maybe it does - I don’t know where. The docs are very skimpy, and none of the popular tutorials have been updated to deal with UI7.

I tried a couple of plugins too, like Smart Switch and PLEG - these too are only documented for UI6 and apparently don’t work too well under UI7. PLEG doesn’t let me save any input conditions, for example. The worst part is most forum posts simply say “don’t upgrade to UI7” - I didn’t, that’s what my Vera came with from the factory.

Having sunk some time and money on this project and product, I’m beginning to lose hope that I can even replicate basic stuff like motion sensing lights that only turn on after dark. I don’t really care for a glorified remote control system for lighting - I really want it to be automated. If someone could point me to a useful tutorial using UI7 that would be great. Thanks.

The LUUP code goes in the scene, not the trigger.

Create your scene with the motion as the trigger, then add this code return luup.is_night = true to the scene’s LUUP tab. Then motion will only run the scene between sunset and sunrise.

You could also have a scheduled scene toggle the Arm/Bypass state of the sensor.

For more information on multi condition scsnes, look at @RexBeckett’s excellent thread Conditional Scene Execution: Some Examples

@Z-Waver

Actually the LUUP can go into the scene or the trigger.
If you return false in the Trigger it will cancel the trigger and not try to run the scene.

I just released an updated version PLEG/PLTS for UI7. Should improve reliability.
There are some issues remaining … but this version should allow creating and editing PLEG devices.

@RichardTSchaefer thanks for the correction.

So is PLEG working for UI7 now? Not being able to save inputs can’t really count as working, for me.

Thanks, Z-waver and Richard.

It wasn’t clear to me that the Luup code goes in the scene and not the trigger. I must have been looking at older docs? In any event, UI7 doesn’t have the option to add code to a trigger, only to the scene. I must have made a syntax error before, since it refused to disable during the daytime.