Turning off Pool or Spa Heat after a Certain Hour

Scenario:
Someone forgot to turn off the pool and / or spa heat
Action:
Turn of the pool and / or spa heat after a certain time.

Logic:
CONDITIONS: Pool Heat on after 6pm Spa Heat on after 1130pm
ACTION: Turn off Pool and Spa Heat (turning off both results in no harm because if one is on and the other is off the one that is off will just remain off)

From the Screen Grabs it looks like something isn’t set up quite right?

TIA

Judging by the current value of Pool Heat(#529) and Spa Heat(#530) which is off, I would imagine your ModeStatus should equal on instead of Heater. Also move these same device state conditions into their respective time limit groups.

1 Like

I’ll move them as that was not what I expected to see… All those activities seem wrong but maybe not?

The mode is correct though. It is off or heat in the pool control plugin.

Yeah, seems like there may be a few extra activities there. Not sure what is up with that.

I just changed the time to 13:30 and turned on both (not at the same time) to test. It works! Now I need to change the time back to when I want them to not run too long.

Patrick, you have made a great tool here! I never could work these things out in PLEG… Uninstalling PLEG.

1 Like

@sammy2 has 5 groups, so a true and false activity for each makes 10 activities. They add up quickly.

@sammy2, you need to make sure your activities are assigned to the right groups. I think your screen shots are a bit out of order timewise, so you may have already fixed that, but the activities as last shown aren’t sufficient.

Yeah, Looks like there are some activity groups with system generated names in Sammys second post. I am not sure where those match up to the condition groups. Most likely an old screenshot.

Also if he wants the Spa heat to always turn off at 11:30 PM he should put his scene for that under the time limit group for the spa otherwise it will turn off at 6:30 if the pool heat condition is met. Best to separate both scene actions into there respective Time Limit activity group.

The last two screen grabs posted above is how I have it set up but something’s up with the time triggering? (False as of 12:00.00 AM ?)

I can’t tell the actual time from screen shots, which is why I ask for a logic summary when you reach out for my help specifically. Logic summaries tell me way more.

An AND group with one condition likely does not need to exist. The conditions in your Pool Heat Is On and Spa Heat Is On can go directly into the respective parent groups next to their time conditions. That’s just cleanup, though. No change to logical result in this case.

Edit: oh, and It’s always a good idea to try to restart a sensor when it looks confused after You’ve done a bunch of config changes.

I restarted the sensor with no change in the status page. Here’s the Logic Summary:

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.2 config 301 cdata 19082 ui 19143 pluginDevice 558
    System: Vera version 1.7.4453 on Sercomm G450; loadtime 1561026562; systemReady 1561026607; Lua 5.1
Local time: 2019-06-20T07:55:53-0700; DST=1
House mode: plugin 2; system 2; tracking on
  Sun data: { "stamp": 2019169, "civdawn": 1560859750, "nautdawn": 1560857594, "sunset": 1560913382, "nautdusk": 1560917290, "latitude": 33.9469, "astrodusk": 1560919652, "longitude": -117.396, "civdusk": 1560915134, "astrodawn": 1560855231, "sunrise": 1560861502 }
  Geofence: running in long mode, last update 06:56:00, data version 2
            User 1686711 ishome=0 inlist= since=06:56:00
            |1472309878 "address redacted" type="home" status="out" since=06:18:00
            User 1686611 ishome=0 inlist= since=06:56:00
            |    1 "address redacted" type="home" status="out" since=05:42:00
            User 2497352 ishome=0 inlist= since=06:56:00
            |1559003821 "address redacted" type="home" status="out" since=06:56:00
            Raw: { "updated": 1561042500, "users_settings": [ { "id": 1686611, "ishome": 0 }, { "id": 1686711, "ishome": 0 }, { "id": 2497352, "ishome": 0 } ], "mode": -1, "users": [ { "id": 1686711, "Level": 1, "Name": "Meritage1", "IsGuest": 0 }, { "id": 1686611, "Level": 1, "Name": "Meritage10", "IsGuest": 0 }, { "id": 2497352, "Level": 1, "Name": "TaylorS", "IsGuest": 0 } ], "usergeofences": [ { "geotags": [ { "radius": 250, "PK_User": 1686611, "id": 1, "status": "Exit", "accuracy": 0, "ishome": 1, "name": "address redacted", "address": "address redacted", "longitude": "address redacted", "latitude": "address redacted", "color": "006e45", "notify": 1 } ], "iduser": 1686611 }, { "geotags": [ { "radius": 100, "PK_User": 1686711, "id": 1472309878, "status": "Exit", "accuracy": 0, "ishome": 1, "name": "address redacted", "address": "address redacted", "longitude": "address redacted", "latitude": "address redacted", "color": "#ff0000", "notify": 1 } ], "iduser": 1686711 }, { "geotags": [ { "radius": 250, "notify": 1, "id": 1559003821, "status": "Exit", "color": "ff0000", "ishome": 1, "name": "address redacted", "address": "address redacted", "longitude": "address redacted", "latitude": "address redacted", "accuracy": 0, "PK_User": 2497352 } ], "iduser": 2497352 } ] }
====================================================================================================================================
Pool Spa Heat Off (#575)
    Version 19082.16 06/19/19 14:16:35
    Message/status: Not tripped
    Condition group "Pool Spa Heat Off" (OR) false as of 14:12:41 <root>
      |-F-group "Time Limits" (AND) false as of 14:12:41 <grpejs6xbl>
      |     &-F-trange after ,,,19,0,,,,, [1561026599 => 1561042497 at 07:54:57; F/F as of 00:00:00/00:00:00] <condejs74mp>
      |     &-F-group "Pool Heat is On" (AND) false as of 14:12:41 <grpejx8u6y>
      |     |     &-F-service Pool Heat (529) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus = Heater [heater => off at 14:12:41; F/F as of 14:12:41/14:12:41] <condejx922y>
      |-F-group "Time Limits" (AND) false as of 14:07:16 <grpejsekwh>
      |     &-F-trange after ,,,23,30,,,,, [1561026599 => 1561042497 at 07:54:57; F/F as of 00:00:00/00:00:00] <condejsexg0>
      |     &-F-group "Spa Heat is On" (AND) false as of 14:07:16 <grpejxadsb>
      |     |     &-F-service Spa Heat (530) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus = Heater [heater => off at 14:07:16; F/F as of 14:07:16/14:07:16] <condejxafar>
    Activity root.true
        Run scene 84 Pool Heat Off
        Run scene 28 No Spa
    Events
        06/20/19 03:29:58 start: 
        06/20/19 03:51:19 action: action=Reset
        06/20/19 03:51:19 sensorstate: state=false
        06/20/19 07:54:55 action: action=Restart
        06/20/19 07:54:56 start: 
====================================================================================================================================
Scene #28 No Spa
    Group 1
        Device 91 (Spa) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 93 (Spa Booster) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
    Group 2 delay 30
        Device 530 (Spa Heat) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/SetModeTarget ( NewModeTarget="Off" )
    Group 3 delay 600
        Device 216 (Pump4 3450 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
Scene #84 Pool Heat Off
    Group 1
        Device 90 (Pump0 Main) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="1" )
        Device 216 (Pump4 3450 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 217 (Pump2 2200 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 223 (Pump1 1400 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 529 (Pool Heat) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/SetModeTarget ( NewModeTarget="Off" )
    Group 2 delay 600
        Device 90 (Pump0 Main) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="1" )
        Device 222 (Pump3 3000 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
```

Okay. I made some changes so here they are…

First, the Logic Summary Report:


*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.2 config 301 cdata 19082 ui 19143 pluginDevice 558
    System: Vera version 1.7.4453 on Sercomm G450; loadtime 1561026562; systemReady 1561026607; Lua 5.1
Local time: 2019-06-20T08:12:33-0700; DST=1
House mode: plugin 2; system 2; tracking on
  Sun data: { "stamp": 2019169, "civdawn": 1560859750, "nautdawn": 1560857594, "sunset": 1560913382, "nautdusk": 1560917290, "latitude": Redacted, "astrodusk": 1560919652, "longitude": Redacted, "civdusk": 1560915134, "astrodawn": 1560855231, "sunrise": 1560861502 }
  Geofence: running in long mode, last update 06:56:00, data version 2
            User 1686711 ishome=0 inlist= since=06:56:00
            |1472309878 "Redacted" type="home" status="out" since=06:18:00
            User 1686611 ishome=0 inlist= since=06:56:00
            |    1 "Redacted" type="home" status="out" since=05:42:00
            User 2497352 ishome=0 inlist= since=06:56:00
            |1559003821 "Redacted" type="home" status="out" since=06:56:00
            Raw: { "updated": 1561043520, "users_settings": [ { "id": 1686611, "ishome": 0 }, { "id": 1686711, "ishome": 0 }, { "id": 2497352, "ishome": 0 } ], "mode": -1, "users": [ { "id": 1686711, "Level": 1, "Name": "Meritage1", "IsGuest": 0 }, { "id": 1686611, "Level": 1, "Name": "Meritage10", "IsGuest": 0 }, { "id": 2497352, "Level": 1, "Name": "TaylorS", "IsGuest": 0 } ], "usergeofences": [ { "geotags": [ { "radius": 250, "PK_User": 1686611, "id": 1, "status": "Exit", "accuracy": 0, "ishome": 1, "name": "Redacted", "address": "Redacted", "longitude": "Redacted", "latitude": "Redacted", "color": "006e45", "notify": 1 } ], "iduser": 1686611 }, { "geotags": [ { "radius": 100, "PK_User": 1686711, "id": 1472309878, "status": "Exit", "accuracy": 0, "ishome": 1, "name": "![Pool%20Status%203|690x365](upload://n3wKj87WhivbH2BNZ8nMsnWZAD0.jpeg) ", "address": "Redacted", "longitude": "Redacted", "latitude": "Redacted", "color": "#ff0000", "notify": 1 } ], "iduser": 1686711 }, { "geotags": [ { "radius": 250, "notify": 1, "id": 1559003821, "status": "Exit", "color": "ff0000", "ishome": 1, "name": "![Pool%20Status%203|690x365](upload://n3wKj87WhivbH2BNZ8nMsnWZAD0.jpeg) ", "address": "Redacted", "longitude": "Redacted", "latitude": "Redacted", "accuracy": 0, "PK_User": 2497352 } ], "iduser": 2497352 } ] }
====================================================================================================================================
Pool Spa Heat Off (#575)
    Version 19082.17 06/20/19 08:09:34
    Message/status: Not tripped
    Condition group "Pool Spa Heat Off" (OR) false as of 14:12:41 <root>
      |-F-group "Time Limits" (AND) false as of 14:12:41 <grpejs6xbl>
      |     &-F-trange after ,,,19,0,,,,, [1561043375 => 1561043412 at 08:10:12; F/F as of 00:00:00/00:00:00] <condejs74mp>
      |     &-F-service Pool Heat (529) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus = Heater [off at 08:09:35; F/F as of 08:09:35/08:09:35] <condel0bjl7>
      |-F-group "Time Limits" (AND) false as of 14:07:16 <grpejsekwh>
      |     &-F-trange after ,,,23,30,,,,, [1561043375 => 1561043412 at 08:10:12; F/F as of 00:00:00/00:00:00] <condejsexg0>
      |     &-F-service Spa Heat (530) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus = Heater [off at 08:09:35; F/F as of 08:09:35/08:09:35] <condel0d017>
    Activity root.true
        Run scene 84 Pool Heat Off
        Run scene 28 No Spa
    Events
        06/20/19 03:29:58 start: 
        06/20/19 03:51:19 action: action=Reset
        06/20/19 03:51:19 sensorstate: state=false
        06/20/19 07:54:55 action: action=Restart
        06/20/19 07:54:56 start: 
        06/20/19 08:09:34 configchange: 
        06/20/19 08:09:34 configchange: 
        06/20/19 08:09:35 condchange: newState=false, cond=condel0bjl7
        06/20/19 08:09:35 evalchange: newState=false, cond=condel0bjl7
        06/20/19 08:09:35 condchange: newState=false, cond=condel0d017
        06/20/19 08:09:35 evalchange: newState=false, cond=condel0d017
        06/20/19 08:10:11 action: action=Restart
        06/20/19 08:10:11 start: 
====================================================================================================================================
Scene #28 No Spa
    Group 1
        Device 91 (Spa) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 93 (Spa Booster) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
    Group 2 delay 30
        Device 530 (Spa Heat) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/SetModeTarget ( NewModeTarget="Off" )
    Group 3 delay 600
        Device 216 (Pump4 3450 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
Scene #84 Pool Heat Off
    Group 1
        Device 90 (Pump0 Main) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="1" )
        Device 216 (Pump4 3450 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 217 (Pump2 2200 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 223 (Pump1 1400 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
        Device 529 (Pool Heat) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/SetModeTarget ( NewModeTarget="Off" )
    Group 2 delay 600
        Device 90 (Pump0 Main) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="1" )
        Device 222 (Pump3 3000 RPM) urn:upnp-org:serviceId:SwitchPower1/SetTarget ( newTargetValue="0" )
```

And some screen grabs…

I see what you’re talking about… More changes to make.

The way I have it if either condition is true both the pool heat and spa mode will turn off. This can turn the spa off at 7pm if the pool heater is on… Another way to address this is to make sure when the spa is on the pool heater is not on as they are two separate and distinct devices in Pool Control and not on at the same time by the scenes that heat the pool or run the spa.

This looks better. Be careful with the coordination between your scenes. Since you are starting both scenes in the same activity and both contain delayed groups with identical delays, the order of execution of the delayed groups is not guaranteed. But the logic part is looking good.

Good points on the scenes. I can change the delays by 30 seconds plus or minus with no real problem. The delays are to turn off the heater but let the pump remain running afterwards to cool down the heater before water circulation stops. It probably doesn’t matter which scene triggers it to go off because in either case it will have cooled down the heater unit.

I’m going to re-do all my scenes to use reactor more because I have daily scenes that filter the pool and also, run the slow speed pump with soft cascade on the front of the spa each morning and evening. Running the scenes to heat the pool or run spa mode (heats the spa, turns on the booster pump and changes the flow to the spa rather than the pool) disrupts the daily scenes.

I want it such that after I run the pool heat or spa mode and turn them off that it returns to whatever daily scene it was running before. Of course I’ll need to possibly reconfigure Alexa too so that she still responds to, “Alexa, turn on the spa”, etc…

Also, I’m still perplexed as to the “12:00” time in the status. Seems off.

“After 19:00” will be true until midnight, when the day changes. At that time, it is no longer after 1900, it’s before.

Well, Duh!