Set heatpoint X minutes before 4pm based on temperature (so it gets to y degrees by 4pm)


#23

Just thought I’d pop in to say that I’m pretty sure it’s working in the wild. Heat came on @ 2:24pm today, and @ 2:22pm yesterday based on temp differences between those two days. I know it’s not enough to make a difference as between today/yesterday, but it’s great that I’m not having to manually adjust day by day as the temperature changes. Thanks again!!!

PS: Will upload the final code in the next message (just to reduce the clutter).

3/8/2019, 2:23:59 PM +96ms
+1ms ╔Received event [Home].time = 1552083840000 with a delay of -904ms
+108ms ║RunTime Analysis CS > 19ms > PS > 62ms > PE > 26ms > CE
+111ms ║Runtime (40145 bytes) successfully initialized in 62ms (v0.3.10a.20190223) (109ms)
+113ms ║╔Execution stage started
+127ms ║║Cancelling statement #13's schedules...
+134ms ║║Requesting time schedule wake up at Sat, Mar 9 2019 @ 1:30:00 PM PST
+191ms ║║Comparison (decimal) 12.1 is_less_than (integer) 18 = true (3ms)
+194ms ║║Condition #8 evaluated true (17ms)
+195ms ║║Condition group #6 evaluated true (state did not change) (20ms)
+196ms ║║Cancelling statement #6's schedules...
+295ms ║║Executed physical command [Heater - Kitchen Nook And Front Door].setHeatingSetpoint([21.0]) (93ms)
+296ms ║║Executed [Heater - Kitchen Nook And Front Door].setHeatingSetpoint (96ms)
+312ms ║║Calculating (string) Set Heating point @ + (string) 2:23 P.M. >> (string) Set Heating point @ 2:23 P.M.
+318ms ║║Calculating (string) Set Heating point @ 2:23 P.M. + (string) ( >> (string) Set Heating point @ 2:23 P.M. (
+323ms ║║Calculating (string) Set Heating point @ 2:23 P.M. ( + (string) 4:00:00 PM PST >> (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST
+328ms ║║Calculating (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST + (string) - >> (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST -
+332ms ║║Calculating (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST - + (string) -89 >> (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST - -89
+335ms ║║Calculating (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST - -89 + (string) mins) >> (string) Set Heating point @ 2:23 P.M. (4:00:00 PM PST - -89 mins)
+340ms ║║Set Heating point @ 2:23 P.M. (4:00:00 PM PST - -89 mins)
+341ms ║║Executed virtual command [Heater - Kitchen Nook And Front Door].log (1ms)
+346ms ║╚Execution stage complete. (233ms)
+348ms ║Setting up scheduled job for Sat, Mar 9 2019 @ 1:30:00 PM PST (in 83160.557s), with 1 more job pending
+358ms ╚Event processed successfully (357ms)

3/8/2019, 1:29:59 PM +52ms
+1ms ╔Received event [Home].time = 1552080600000 with a delay of -948ms
+95ms ║RunTime Analysis CS > 19ms > PS > 55ms > PE > 20ms > CE
+98ms ║Runtime (40144 bytes) successfully initialized in 55ms (v0.3.10a.20190223) (94ms)
+99ms ║╔Execution stage started
+117ms ║║Comparison (time) 48599165 happens_daily_at (time) 48600000 = true (1ms)
+120ms ║║Time restriction check passed
+122ms ║║Condition #13 evaluated true (10ms)
+128ms ║║Cancelling statement #13's schedules...
+134ms ║║Requesting time schedule wake up at Sat, Mar 9 2019 @ 1:30:00 PM PST
+137ms ║║Condition group #12 evaluated true (state did not change) (26ms)
+141ms ║║Cancelling statement #2's schedules...
+154ms ║║Executed virtual command setVariable (4ms)
+164ms ║║Calculating (decimal) 12.1 - (decimal) 21.0 >> (decimal) -8.9
+170ms ║║Calculating (decimal) -8.9 * (decimal) 10.0 >> (decimal) -89.0
+177ms ║║Executed virtual command setVariable (4ms)
+183ms ║║Executed virtual command wait (1ms)
+188ms ║║Waiting for 1000ms
+1208ms ║║Calculating (string) ( + (string) 12.1 >> (string) (12.1
+1215ms ║║Calculating (string) (12.1 + (string) - 21) * 10 = >> (string) (12.1 - 21) * 10 =
+1220ms ║║Calculating (string) (12.1 - 21) * 10 = + (string) -89 >> (string) (12.1 - 21) * 10 = -89
+1231ms ║║(12.1 - 21) * 10 = -89
+1233ms ║║Executed virtual command log (3ms)
+1237ms ║║Executed virtual command cancelTasks (1ms)
+1434ms ║╚Execution stage complete. (1336ms)
+1439ms ║Setting up scheduled job for Fri, Mar 8 2019 @ 2:24:00 PM PST (in 3239.511s), with 1 more job pending
+1449ms ╚Event processed successfully (1449ms)
3/7/2019, 2:21:59 PM +78ms
+0ms ╔Received event [Home].time = 1551997320000 with a delay of -923ms
+113ms ║RunTime Analysis CS > 22ms > PS > 70ms > PE > 21ms > CE
+117ms ║Runtime (40147 bytes) successfully initialized in 70ms (v0.3.10a.20190223) (116ms)
+120ms ║╔Execution stage started
+136ms ║║Cancelling statement #13's schedules...
+145ms ║║Requesting time schedule wake up at Fri, Mar 8 2019 @ 

1:30:00 PM PST
+215ms ║║Comparison (decimal) 11.4 is_less_than (integer) 18 = true (3ms)
+218ms ║║Cancelling condition #8’s schedules…
+219ms ║║Condition #8 evaluated true (16ms)
+221ms ║║Cancelling condition #6’s schedules…
+222ms ║║Condition group #6 evaluated true (state changed) (20ms)
+224ms ║║Cancelling statement #6’s schedules…
+322ms ║║Executed physical command [Heater - Kitchen Nook And Front Door].setHeatingSetpoint([21.0]) (91ms)
+323ms ║║Executed [Heater - Kitchen Nook And Front Door].setHeatingSetpoint (95ms)
+344ms ║║Calculating (string) Set Heating point @ + (string) 2:21 P.M. >> (string) Set Heating point @ 2:21 P.M.
+351ms ║║Calculating (string) Set Heating point @ 2:21 P.M. + (string) ( >> (string) Set Heating point @ 2:21 P.M. (
+358ms ║║Calculating (string) Set Heating point @ 2:21 P.M. ( + (string) 4:00:00 PM PST >> (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST
+364ms ║║Calculating (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST + (string) - >> (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST -
+368ms ║║Calculating (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST - + (string) -96 >> (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST - -96
+373ms ║║Calculating (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST - -96 + (string) mins) >> (string) Set Heating point @ 2:21 P.M. (4:00:00 PM PST - -96 mins)
+379ms ║║Set Heating point @ 2:21 P.M. (4:00:00 PM PST - -96 mins)
+380ms ║║Executed virtual command [Heater - Kitchen Nook And Front Door].log (2ms)
+386ms ║╚Execution stage complete. (267ms)
+389ms ║Setting up scheduled job for Fri, Mar 8 2019 @ 1:30:00 PM PST (in 83280.534s), with 1 more job pending
+399ms ╚Event processed successfully (400ms)

3/7/2019, 1:29:59 PM +91ms
+0ms ╔Received event [Home].time = 1551994200000 with a delay of -910ms
+107ms ║RunTime Analysis CS > 19ms > PS > 63ms > PE > 25ms > CE
+110ms ║Runtime (40134 bytes) successfully initialized in 63ms (v0.3.10a.20190223) (108ms)
+111ms ║╔Execution stage started
+125ms ║║Comparison (time) 48599213 happens_daily_at (time) 48600000 = true (1ms)
+127ms ║║Time restriction check passed
+129ms ║║Cancelling condition #13's schedules...
+130ms ║║Condition #13 evaluated true (9ms)
+135ms ║║Cancelling statement #13's schedules...
+141ms ║║Requesting time schedule wake up at Fri, Mar 8 2019 @ 

1:30:00 PM PST
+144ms ║║Cancelling condition #12’s schedules…
+146ms ║║Condition group #12 evaluated true (state changed) (24ms)
+149ms ║║Cancelling statement #2’s schedules…
+163ms ║║Executed virtual command setVariable (4ms)
+173ms ║║Calculating (decimal) 11.4 - (decimal) 21.0 >> (decimal) -9.6
+180ms ║║Calculating (decimal) -9.6 * (decimal) 10.0 >> (decimal) -96.0
+187ms ║║Executed virtual command setVariable (3ms)
+192ms ║║Executed virtual command wait (1ms)
+193ms ║║Waiting for 1000ms
+1208ms ║║Calculating (string) ( + (string) 11.4 >> (string) (11.4
+1213ms ║║Calculating (string) (11.4 + (string) - 21) * 10 = >> (string) (11.4 - 21) * 10 =
+1218ms ║║Calculating (string) (11.4 - 21) * 10 = + (string) -96 >> (string) (11.4 - 21) * 10 = -96
+1224ms ║║(11.4 - 21) * 10 = -96
+1225ms ║║Executed virtual command log (2ms)
+1228ms ║║Executed virtual command cancelTasks (1ms)
+1449ms ║╚Execution stage complete. (1339ms)
+1452ms ║Setting up scheduled job for Thu, Mar 7 2019 @ 2:22:00 PM PST (in 3119.458s), with 1 more job pending
+1577ms ╚Event processed successfully (1578ms)


#24

I’m such a boob, I can’t even figure out how to get rid of the scrolling text from my post immediately above, so you can imagine the amount of hand-holding I needed to get to the point of having the functioning code below. I tried to change the name to WCmore_than_#1, but I couldn’t even figure out how to edit that section!! Anyway, thanks again WCmore!