From 51ddd3ebd63c50a33277af955b015d5d08d88f8a Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 13 May 2024 10:56:33 +0100 Subject: [PATCH] Force bypass valve open before timed pump switch-on at 10am No point doing this at 6:59 now, as the pump doesn't come on unconditionally at 7am any more. --- pool.yaml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pool.yaml b/pool.yaml index 8a4f8c2..1557a38 100644 --- a/pool.yaml +++ b/pool.yaml @@ -245,7 +245,7 @@ time: # Turn them off and on again. script.execute: bounce_1w_power - # Turn pool pump on at 7am and off at 7pm + # Ensure the pool pump is on by 10am and off by 7pm - seconds: 0 minutes: 0 hours: 10,19 @@ -254,25 +254,31 @@ time: id: pump_default force: true - # Before turning the pump on in the morning, both 'solar in' - # both 'solar in' and 'solar out' sensors will be reading the - # ambient temperature, as no water is flowing. So open the - # bypass valve (pump directly back to pool) and set the - # control_valve_last_change time so that the temperature logic - # in the control_valve script won't close it again for at - # least five minutes. By which time the 'solar in' sensor - # should be giving *water* temperature, so we won't close the - # valve until the roof genuinely is warmer than the + # Before turning the pump on in the morning, both 'solar in' and + # 'solar out' sensors will be reading their respective ambient + # temperatures, as no water is flowing. So open the bypass valve + # (pump directly back to pool) and set the control_valve_last_change + # time so that the temperature logic in the control_valve script + # won't close it again for at least five minutes. By which time the + # 'solar in' sensor should be giving *water* temperature, so we + # won't close the valve until the roof genuinely is warmer than the # water. This means we don't use the pool water to heat up the - # rubber and plastic sitting on the roof; let the *sun* do - # that first! + # rubber and plastic sitting on the roof; let the *sun* do that + # first! + # + # This was most important when the pump was just coming on at 7am + # unconditionally. Now it doesn't come on until the roof gets to + # 20°C and only turns on unconditionally (for filtering purposes) at + # 10am. So do it at 09:59 *if* the pump isn't already running. - seconds: 0 minutes: 59 - hours: 6 + hours: 9 then: lambda: |- - id(control_valve_last_change) = ::time(NULL); - id(valve_output).turn_off(); + if (!id(pool_pump).state) { + id(control_valve_last_change) = ::time(NULL); + id(valve_output).turn_off(); + } on_time_sync: then: -- 2.49.0