Good afternoon everyone,
I have an existing PLEG that I created with the help of other Forum members. Anyways I now would like to turn on a light using PLEG when wattage above 0 is detected from another lamp module that reports energy usage. Could someone steer me in the right direction?
Here is what I have so far:
Input Device Condition:
Name Device Name Device Variable Current Value
FloodLights_Watts Flood_Lights Watts 0
Condition:
Name Expression
GarageFlood_On Night and FloodLights_Watts>10
Thanks.
That is a good start. don’t forget that you will also need a Condition to turn the light off when the Flood_Lights consumption drops. The you just need to specify the Actions for the two Conditions.
RexBeckett Thanks for the confirmation, it appears to be working correctly. I am not sure if I setup the Flood light off syntax as nicely as other would but it works, I have attached the Status page for everyone to see!
House Lighting
Device ID: 512014-08-20 22:42:07.076 PLC Version: 6.9
Registration
You have 1 licenses, which allows for 4 PLEG and/or PLTS plugins.
Your license key is:
Triggers
Name Description State Last True Last False
BackDoorLock Back Door: Lock button is pressed true 2014-08-20 05:35:19.020 0
BackDoorUnlock PIN Code #* is entered on Back Door true 2014-08-20 14:33:57.119 0
KitchenLightOn Kitchen Lights is turned on false 2014-08-20 22:31:03.640 2014-08-20 22:34:20.043
KitchenMotion Kitchen Motion is tripped false 2014-08-20 22:34:18.869 2014-08-20 22:34:20.850
Night Day or Night indicates Night time. true 2014-08-20 19:57:16.119 2014-08-20 06:24:39.110
Schedules
Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
KitchenTimer Self ReTrigger None Interval 05:00 None false 2014-08-20 22:34:18.934 2014-08-20 22:39:19.100
LightOffSched Weekly 23:30:00 1,2,3,4,5,6,7 None None None false 2014-08-19 23:30:00.101 0
Device Properties
Name Device Name Device Variable Value Last Change Previous Change
FloodLights_Watts Flood_Lights Watts 0 2014-08-20 22:41:50.112 2014-08-20 22:41:48.231
Conditions
Name Repeat Expression State Last True Last False
FloodOn No Night true 2014-08-20 19:57:16.120 2014-08-20 06:24:39.111
FloodOff No not Night or LightOffSched false 2014-08-19 23:30:00.121 2014-08-20 19:57:16.125
_KitchenOn Yes BackDoorUnlock AND Night AND (Night;BackDoorUnlock) false 2014-08-19 20:23:15.141 2014-08-20 19:57:16.145
_KitchenOff Yes Night and BackdoorLock and (BackdoorLock; NOW < 10) false 2014-05-14 05:41:04.106 2014-08-20 22:41:47.107
KitchenAutoOn No !KitchenLightOn and Night and KitchenMotion and (!KitchenLightOn; KitchenMotion > 30) false 2014-08-20 22:31:01.807 2014-08-20 22:31:03.650
KitchenAutoOff No KitchenLightOn and !KitchenTimer and (KitchenLightOn; !KitchenTimer) and (!KitchenLightON; KitchenLightOn > 10) false 2014-08-20 15:41:27.113 2014-08-20 15:41:28.931
KeepKitchenOn No (KitchenLightOn and KitchenMotion and (KitchenLightOn; KitchenMotion)) or KitchenAutoOn false 2014-08-20 22:34:18.887 2014-08-20 22:34:20.110
Garage_FloodOn No Night and FloodLights_Watts>10 false 2014-08-20 22:41:23.888 2014-08-20 22:41:50.129
Garage_FloodOff No FloodLights_Watts<10 true 2014-08-20 22:41:50.130 2014-08-20 22:41:23.893
Actions
Actions for Condition: _KitchenOff
Device Actions:
Immediate
Device Action Arguments
Kitchen Lights SetTarget newTargetValue=0
Actions for Condition: _KitchenOn
Device Actions:
Immediate
Device Action Arguments
Kitchen Lights SetTarget newTargetValue=1
Actions for Condition: FloodOff
Device Actions:
Immediate
Device Action Arguments
Flood_Lights SetTarget newTargetValue=0
Actions for Condition: FloodOn
Device Actions:
Immediate
Device Action Arguments
Flood_Lights SetTarget newTargetValue=1
Actions for Condition: Garage_FloodOff
Device Actions:
Immediate
Device Action Arguments
G_Flood Lights SetTarget newTargetValue=0
Actions for Condition: Garage_FloodOn
Device Actions:
Immediate
Device Action Arguments
G_Flood Lights SetTarget newTargetValue=1
Actions for Condition: KeepKitchenOn
Device Actions:
Immediate
Device Action Arguments
House Lighting StartTimer timerName=KitchenTimer intervalTime=
Actions for Condition: KitchenAutoOff
Device Actions:
Immediate
Device Action Arguments
Kitchen Lights SetTarget newTargetValue=0
Actions for Condition: KitchenAutoOn
Device Actions:
Immediate
Device Action Arguments
Kitchen Lights SetTarget newTargetValue=1
It looks good, @cleight. I would add a Stop to your LightOffSched though. Just use an interval of 1:00. Without this, once it turns true it will stay that way.
And do not worry about editing out the license key … it will only work on your Vera.
If it was confidential I would not have put it in the report !