hart2hart Posted February 17 Share Posted February 17 (edited) During the winter we get some long cold dark dreary and stormy days, but I have historically only turned outside lights on with sunset times. Decided to at least for academic exercise turn same lights on and off with Lux values coming from the WeatherFlow/Tempest plugin. The major issue that came to mind was when the illumination value changes (possible every 15 seconds as I've got WF set to Power Save mode for mind but by observation appears Lux update once a minute) to prevent repeatedly turning lights on or off. What do you think of the following couple programs as a starting point? My logic is they disable themselves and enable other to support on and off cycle. Also, feels like I need a startup program to get in them sync but would that naturally happen with first Lux value update from WF. On second thought probably need to enable both at startup in case of long power failure and wrong program is disabled -- thoughts? Lux Light Control:Lights On If 'WeatherFlow / Sky' Illumination <= '$Outside_Lighting_LUX_On_I Lux' Then Disable Program 'LUX Light Control:Lights On' Run Program 'Outside Lighting:Front Yard and Driveway' (Then Path) Enable Program 'LUX Light Control:Lights Off' Else - No Actions - (To add one, press 'Action') Lux Light Control:Lights Off [Not Enabled] as it was first run in full daylight If 'WeatherFlow / Sky' Illumination >= '$Outside_Lighting_LUX_Off_i Lux' Then Disable Program 'LUX Light Control:Lights Off' Run Program 'Outside Lighting:Front Yard and Driveway' (Else Path) Enable Program 'LUX Light Control:Lights On' Else - No Actions - (To add one, press 'Action') Variables initially set to: Outside_Lighting_LUX_Off_i = 100 Outside_Lighting_LUX_Off_i = 200 Edited February 17 by hart2hart Link to comment
ldb Posted February 17 Share Posted February 17 I use Tempest to control interior and exterior lighting using variables. I have a series of programs that set a variable ($Brightness) for a range of light level values ($Light_Level). The brightness variable changes only when the light level moves into a new range. I then use the brightness variable value to trigger lighting programs. For example: Brightness 03 - [ID 006C][Parent 0085] If $Light_Level >= 300 And $Light_Level < 500 Then $Brightness = 3 Else - No Actions - (To add one, press 'Action') Link to comment
hart2hart Posted February 17 Author Share Posted February 17 I use Tempest to control interior and exterior lighting using variables. I have a series of programs that set a variable ($Brightness) for a range of light level values ($Light_Level). The brightness variable changes only when the light level moves into a new range. I then use the brightness variable value to trigger lighting programs. For example: Brightness 03 - [iD 006C][Parent 0085] If $Light_Level >= 300 And $Light_Level < 500 Then $Brightness = 3 Else - No Actions - (To add one, press 'Action') Thanks for posting your variable method! Based on it, I updated to use variables thus avoiding any issues with enabled and disabled programs. The real lighting change programs are only executed when the State variable Outside_Lux_Level is changed. ----------------------------------------------------------------------------------- Lux Light Control:Level 1 - [iD 00EC][Parent 00E0] If 'WeatherFlow / Sky' Illumination < '$Outside_Lux_Step_A_I Lux' Then $Outside_Lux_Level = $Outside_Lux_Level_Dark_I Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- Lux Light Control:Level 2 - [iD 00EB][Parent 00E0] If 'WeatherFlow / Sky' Illumination >= '$Outside_Lux_Step_A_I Lux' And 'WeatherFlow / Sky' Illumination <= '$Outside_Lux_Step_B_I Lux' Then $Outside_Lux_Level = $Outside_Lux_Level_Dead_Band_1_I Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- Lux Light Control:Level 3 - [iD 00E8][Parent 00E0] If 'WeatherFlow / Sky' Illumination > '$Outside_Lux_Step_B_I Lux' Then $Outside_Lux_Level = $Outside_Lux_Level_Light_1_I Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- Lux Light Control:Lights Off - [iD 00E5][Parent 00E0] If $Outside_Lux_Level is $Outside_Lux_Level_Light_1_I Then Run Program 'Outside Lighting:Front Yard and Driveway' (Else Path) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- Lux Light Control:Lights On - [iD 00E6][Parent 00E0] If $Outside_Lux_Level is $Outside_Lux_Level_Dark_I Then Run Program 'Outside Lighting:Front Yard and Driveway' (Then Path) Else - No Actions - (To add one, press 'Action') Lux Step Variables initially set to below: Outside_Lux_Step_A_I = 100 Outside_Lux_Step_B_I = 200 Link to comment
GSpitale01 Posted February 29 Share Posted February 29 I poll Tempest every 5 minutes and keep a rolling average of last 5 polls. Most of my brightness routines I trigger on the rolling average, but some things I might trigger on the instant poll. The thought above about setting up "zones" is interesting and might be future evolution for me. Link to comment
dpmenzer Posted March 19 Share Posted March 19 The other way to prevent rapid on off cycles is to turn on at a value, turn off at a slightly different value, ie, on at 1000lux off at 1200 lux. Basically a hysterisis control. 1 Link to comment
GSpitale01 Posted March 22 Share Posted March 22 I chose a "rolling average" method + hysteresis for this application. For exterior lights I trigger them on when $s.avg5.lux drops below 400, and off when it rises above 550. I have two sets of interior stairwell lights that I trigger similarly but with different on/off values that I chose to minimize unwanted on/off cycling. Main program: Lux avg count - [ID 000A][Parent 0001][Run At Startup] If $s.lux.enable is 1 Then Repeat Every 2 minutes $i.count.lux += 1 Run Program 'Lux1' (If) Wait 5 seconds $i.avg5.lux.temp += $i.lux1 $i.avg5.lux.temp += $i.lux2 $i.avg5.lux.temp += $i.lux3 $i.avg5.lux.temp += $i.lux4 $i.avg5.lux.temp += $i.lux5 $i.avg5.lux.temp /= 6 $i.avg5.lux = $i.avg5.lux.temp $s.avg5.lux = $i.avg5.lux.temp Else - No Actions - (To add one, press 'Action') Then there are 5 Lux programs that assign the sequential values used to store the individual contributing parameters used to calculate rolling average: Lux1 - [ID 000C][Parent 0001][Not Enabled] If $i.count.lux is 1 Then $i.lux1 = 'WeatherFlow / ST-00124605' Illumination lux Else Run Program 'Lux2' (If) Lux2 - [ID 000D][Parent 0001][Not Enabled] If $i.count.lux is 2 Then $i.lux2 = 'WeatherFlow / ST-00124605' Illumination lux Else Run Program 'Lux3' (If) Lux3 - [ID 000E][Parent 0001][Not Enabled] If $i.count.lux is 3 Then $i.lux3 = 'WeatherFlow / ST-00124605' Illumination lux Else Run Program 'Lux4' (If) Lux4 - [ID 000F][Parent 0001][Not Enabled] If $i.count.lux is 4 Then $i.lux4 = 'WeatherFlow / ST-00124605' Illumination lux Else Run Program 'Lux5' (Then Path) Lux5 - [ID 0010][Parent 0001][Not Enabled] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $i.lux5 = 'WeatherFlow / ST-00124605' Illumination lux $i.count.lux = 0 Else - No Actions - (To add one, press 'Action') Link to comment
Recommended Posts