As per Richard’s suggestion to my post [url=http://forum.micasaverde.com/index.php/topic,23314.0.html]http://forum.micasaverde.com/index.php/topic,23314.0.html[/url] to stick my PLEG logic on this board to get some feedback. So here goes.
I’ve cut and paste the logic below together with a summary of what I’m trying to acheive. I would be grateful of any feedback anyone could provide of how I could improve my logic, where I’ve made mistakes, how I could simplify it, how to solve my hotwater issue (see below) etc.
Hardware
My system consists of a Vera Lite, Secure Wall Thermostat and Secure Boiler Receiver (2 channel). I’ve also installed a number of Virtual Switches (VS) to allow manual overrides etc.
Brief
[ul][li]Heating and hot water turn on/off according to daily schedules[/li]
[li]Home/Away button so can override schedules for holidays, weekends away[/li]
[li]Frost protection - if temp in house (measured by thermostat) ever got to 5degC heating would come on irrespective of any schedule, VS positions etc.[/li]
[li]Manual override of central heating/hotwater to leave on in between schedules, say, weekend daytime if not out[/li][/ul]
Problems
[ul][li]Manual hotwater- whilst it turns the hotwater ‘heat’ on, this seems to turn off before the actual hot water cylinder thermostat (not connected to Vera) has been satisfied. I want it to stay on until I VS turns off.[/li][/ul]
Future Plans
[ul][li]Set a minimum house temp based on outside ambient temp e.g. if outside temp drops below 10degC turn on heating to maintain house at 15degC irrespective of schedule (to see if keeping house at set temp saves energy compared to letting cool down too much[/li]
[li][/li][/ul]
Logic output report:
Triggers
Name Description
Home VSHomeAway is turned on (Virtual Switch)
HotWaterOn _HotWater is set to heat
HeatingOn _Heating is set to heat
HeatingOverride VSManualHeating is turned on (Virtual Switch)
HotWaterOverride VSManualHW is turned on (Virtual Switch)
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay
WeekdayAM Weekly 06:30:00 1,2,3,4,5 None Weekly 08:00:00 1,2,3,4,5 None
WeekdayPM Weekly 16:45:00 1,2,3,4,5 None Weekly 22:00:00 1,2,3,4,5 None
WeekendAM Weekly 07:30:00 6,7 None Weekly 09:30:00 6,7 None
WeekendPM Weekly 17:00:00 6,7 None Weekly 22:00:00 6,7 None
WeekdayAMHW Weekly 06:30:00 1,2,3,4,5 None Weekly 07:30:00 1,2,3,4,5 None
WeekdayPMHW Weekly 17:00:00 1,2,3,4,5 None Weekly 18:00:00 1,2,3,4,5 None
WeekendAMHW Weekly 07:30:00 6,7 None Weekly 08:30:00 6,7 None
WeekendPMHW Weekly 17:00:00 6,7 None Weekly 18:00:00 6,7 None
Device Properties
Name Device Name Device Variable
HouseTemp Thermostat CurrentTemperature
SPCurrent Thermostat CurrentSetpoint
SPTarget Thermostat SetpointTarget
Conditions
Name Expression
Away Not Home
AtHome Home
AutoOnHW Home and !HotWaterOverride and (WeekdayAMHW or WeekdayPMHW or WeekendAMHW or WeekendPMHW)
AutoOffHW Home and !HotWaterOverride and (Not(WeekdayAMHW or WeekdayPMHW or WeekendAMHW or WeekendPMHW))
AutoOnHeating Home and !HeatingOverride and (WeekdayAM or WeekdayPM or WeekendAM or WeekendPM)
AutoOffHeating Home and !HeatingOverride and (Not (WeekdayAM or WeekdayPM or WeekendAM or WeekendPM))
MorningSP AutoOnHeating and (WeekdayAM or WeekendAM)
EveningSP AutoOnHeating and (WeekdayPM or WeekendPM)
NonHeatingSP AutoOffHeating and (Not (WeekdayAM or WeekdayPM or WeekendAM or WeekendPM))
SPAnalysis SPCurrent==SPTarget
TempAnalysis HouseTemp==SPCurrent
ManualHeating Home and HeatingOverride
ManualHotWater Home and HotWaterOverride
Actions
Actions for Condition: Away
Immediate
Device Action Arguments
_HotWater SetModeTarget NewModeTarget=Off
_Heating SetModeTarget NewModeTarget=Off
VSManualHeating SetTarget newTargetValue=0
VSManualHW SetTarget newTargetValue=0
Receiver SetModeTarget NewModeTarget=Off
Thermostat SetCurrentSetpoint NewCurrentSetpoint=5
Actions for Condition: AutoOnHW
Immediate
Device Action Arguments
_HotWater SetModeTarget NewModeTarget=HeatOn
Actions for Condition: AutoOffHW
Immediate
Device Action Arguments
_HotWater SetModeTarget NewModeTarget=Off
Actions for Condition: AutoOffHeating
Immediate
Device Action Arguments
_Heating SetModeTarget NewModeTarget=Off
Actions for Condition: MorningSP
Immediate
Device Action Arguments
Thermostat SetCurrentSetpoint NewCurrentSetpoint=18
Actions for Condition: EveningSP
Immediate
Device Action Arguments
Thermostat SetCurrentSetpoint NewCurrentSetpoint=21
Actions for Condition: NonHeatingSP
Immediate
Device Action Arguments
Thermostat SetCurrentSetpoint NewCurrentSetpoint=5
Actions for Condition: ManualHeating
Immediate
Device Action Arguments
Thermostat SetCurrentSetpoint NewCurrentSetpoint=21
Actions for Condition: ManualHotWater
Immediate
Device Action Arguments
_HotWater SetModeTarget NewModeTarget=HeatOn