Do While Piston Help

Attempting my first do while piston and it isn't quite working.
Goal: have a heater cycle on and off while the temp is below a certain measurement. Have the heater turned off once the temp climbs above a certain measurement.

What IS working:

  • After I get it going it is cycling as desired

What is NOT working:

  • Once created (while the temp was below the trigger) I had to hit 'test' on the piston to get it to start cycling.
  • Once the temp went above the threshold for the cycle, it continued to cycle
  • Once the temp went above the threshold to turn off, it did not appear to execute the action

Any help appreciated!

Just my 2 cents here, but I do not ever control a heater with an unreliable on/off. Webcore functions well, but not 100%. I do not trust webcore to turn off a heater. Are you using a smart switch with a dumb heater? Another step that can fail. JMHO

Yup, smart outlet with a dumb heater. It's not hyper critical either way (diesel truck block heater). Appreciate the thoughts though, thank you.

I think about this a little differently. Here is one I copied and adapted from my hot water recirculator. I don't use a loop. Instead, it only goes on if it's been off for set time.

I would also add presence/mode conditions to this. Like, only turn it on if the mode is not Away.

I usually add everything at the top as variables to make testing and changes quicker. :laughing: You should be able to test this by importing it and changing your two devices at the top.

This is a bit wording but you can cut it down.
I use these a lot for temp control.
@Pantheon is right about trust. I have a piston that is a Heater Watchdog to kill/notify me of errant heating. I also use a heater with a temp dial so that is physically set to just above my max limits and taped off.

Well...tried this, didn't work at all. Bizarre. Guess I'll look into some of the suggestions above.

"Wait" statements and loops have notoriously been troublesome for me. Have you tried the "Never cancel tasks" under the Task Cancellation Policy?

I have not, will give that a shot

Reconfigured the logic a bit:

  • There are two situations in which you want the heater to turn on (cooled down or has been off for a set time while cool.
  • There are two situations in which you want the heater to turn off (warmed up or has been on for a set time).

The example below is not tested. I just created trigger conditions to match the above description. The variables might be overkill but it helps to follow what is happening in the anonymized snapshot.

Example Piston

1 Like

I FAR prefer loop-less pistons in my environment.

2 Likes