larryllix Posted January 30, 2016 Posted January 30, 2016 I have just written this, after much trouble with the logic. This went to two programs and almost three when I had to stand back and take some brain time. I did manage to compress this to one program and some testing found some mods I had to do. Mostly rearranging lines and re-discovered v5's Repeat While construct. Crappy way to do an If in the middle of code but it works to eliminate multiple programs feeding into a driver program. I post this here to demo NodeLink, and also I know people in this area are interested in Thermostat logic and probably have a better sense of stat-logic. I would like to see some input on logical problems if anybody can foresee any. Suggestions welcome also. Maybe this will help users in the future to work from. This program relies on the T7900 to lock out any temperature changes when in Away mode. The program contains a poorly handled exit and restore, of the 0.5 C temporary setpoint increase, if one of the conditional modes are switched off, or Away is switched on. It tested OK here due to the stat not accepting changes while Away mode is on. Once the Away mode is turned off the program put the stat back into "high-wind" compensation mode and the program continued. Of course if the program timed out, all should have been forgotten and the stat should have resumed programmed temperature schedules. VenStat.wind.compensation - [ID 0100][Parent 00BD] If ( ( $sHouse.windSpeed >= 5.0 And $sHouse.outTemp <= -5.0 ) Or ( $sHouse.windSpeed >= 20.0 And $sHouse.outTemp <= 10.0 ) ) And $sHouse.occupied is $cTRUE <---permanently = 1 And 'Gathering Room / GathRm VenStat' Home / Away is Home And 'Gathering Room / GathRm VenStat' Schedule Mode is Running And 'Gathering Room / GathRm VenStat' Mode is Heat And $sHouse.vacation is $cFALSE <---permanently = 0 Then Wait 1 minute Repeat While $VenStat.HeatPoint.wind is 0 <---dual purpose var. Boolean and analogue usage. $VenStat.HeatPoint.wind = 'Gathering Room / GathRm VenStat' Heat Setpoint ° $VenStat.HeatPoint.wind += 0.5 <---wind chilling windows compensation in degrees $VenStat.HeatPoint.wind Init To $VenStat.HeatPoint.wind Set 'Gathering Room / GathRm VenStat' Heat Setpoint '$VenStat.HeatPoint.wind Degrees' Repeat 1 times Wait 45 minutes Run Program 'Venstat.setback.run' (Else Path) Else Wait 5 minutes Repeat While $VenStat.HeatPoint.wind is not 0 $VenStat.HeatPoint.wind -= 0.5 Set 'Gathering Room / GathRm VenStat' Heat Setpoint '$VenStat.HeatPoint.wind Degrees' $VenStat.HeatPoint.wind Init To 0 $VenStat.HeatPoint.wind = 0
larryllix Posted February 11, 2016 Author Posted February 11, 2016 After much sleuthing I have added some safety features and improvement to this algorithm. Now if the temperature does not match the compensated temperature no replacement of the original setpoint will occur. -This may be due to a manual override from the human. I have also added many zones of trigger parameters which can be adjusted to suit your house heating characteristics. (first program). Disabling the triggering program was also added to stop resetting timers and disrupting the program in process. The programs are also now inside a program folder with conditions that can stop the program in action tht looks like this. Heating at Home on Schedule - [ID 0104][Parent 00BD] Folder Conditions for 'Heating at Home on Schedule' If 'Gathering Room / GathRm VenStat' Mode is Heat And 'Gathering Room / GathRm VenStat' Schedule Mode is Running And 'Gathering Room / GathRm VenStat' Home / Away is not Away Then Allow the programs in this folder to run. Here are the triggering and run programs. VenStat.wind.compensate.initiate - [ID 0100][Parent 0104][Not Enabled] If ( ( $sHouse.outTemp <= 8 And $sHouse.windGust >= 50 ) Or ( $sHouse.outTemp <= 0 And $sHouse.windGust >= 30 ) Or ( $sHouse.outTemp <= -10 And $sHouse.windGust >= 15 ) Or ( $sHouse.outTemp <= -15 And $sHouse.windGust >= 5 ) Or ( $sHouse.outTemp <= -20 And $sHouse.windGust >= 0 ) And $sHouse.occupied is $cTRUE ) Then Wait 5 seconds Run Program 'VenStat.wind.compensate.run' (If) Else - No Actions - (To add one, press 'Action') VenStat.wind.compensate.run - [ID 0105][Parent 0104][Not Enabled][Run At Startup] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Repeat While $Venstat.HeatPoint.wind is 0 $Venstat.HeatPoint.wind = 'Gathering Room / GathRm VenStat' Heat Setpoint ° $Venstat.HeatPoint.wind += 0.5 $Venstat.HeatPoint.wind Init To $Venstat.HeatPoint.wind Set 'Gathering Room / GathRm VenStat' Heat Setpoint '$Venstat.HeatPoint.wind Degrees' Repeat 1 times Wait 14 minutes Run Program 'VenStat.wind.compensate.initiate' (If) Wait 1 minute Repeat While $sHouse.temp.setpoint is $Venstat.HeatPoint.wind $Venstat.HeatPoint.wind -= 0.5 Set 'Gathering Room / GathRm VenStat' Heat Setpoint '$Venstat.HeatPoint.wind Degrees' $Venstat.HeatPoint.wind Init To 0 $Venstat.HeatPoint.wind = 0 Repeat 1 times Else $Venstat.HeatPoint.wind Init To 0 $Venstat.HeatPoint.wind = 0 $VenStat.HeatPoint.wind is both boolean and stores temp heat setpoint. Weather may be static and not trigger so recall initiate filter recursively. Of course your amount of temperature compensation, as well as your stay warmer time, can be varied. I am starting with 0.5 deg C, the smallest possible stat increment and will see if multiple stages are required s the winter progresses. 0.5 deg C is usually enough to take the draughty, cold feet, feel out of my house without feeling like I am suffocating from overheating stuffiness. EDIT: Reset temperature loop corrected. Could run setpoint to the bottom. Moved Repeat 1 x terminator.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.