Take a look at this Spa Control Piston


#1

1) Give a description of the problem
I’m not an elegant designer, I think I’ve got everything working, but this first webcore piston is taking 23% of my memory.

2) What is the expected behavior?
In the description

3) What is happening/not happening?
I think it’s all working well

**4) Post a Green Snapshot of the piston!

What do you think? I do LOTS of nested ifs when I don’t know how to independently call different parts of a piston, and I’m not sure if it’s okay for me to activate my piston from inside my piston… Does my hourly timer always run the way I have this set up? even when there’s a 10min timer? My trace didn’t display a countdown for it. Anyways, thanks for taking a look!


#2

I think it is fine. Why do you think it is taking up 23% of your memory? Do you mean the memory used info that you see below? If so, don’t worry about it. Each app has up to 100,000 bytes. It is cleaned up by ST. So some time it will say 4%, sometimes 50%…

To be more clear, it is not 23% of all ST memory, it is 23% of the particular pistons memory space. I have some larger pistons than yours, no issues.

image


#3

Ok, Thanks, I’m pretty excited by it. It’s been working well. Sometimes there’s double firing of ‘quickgetwatertemp’ or on/off when the temp changes but that’s about it. Used it yesterday to warm up the tub on my way home from work!


#4

You might be able to prevent double firings by adding this to the main restriction…

if(
    ($currentEventDevice != $previousEventDevice) OR ( ($currentEventDate - $previousEventDate) >= 5000)
)

Do you understand what I mean by this?


#5

Thanks! Looks like spam limiter. Would that stop it from flipping itself on when it detects the temperature change?


#6

What it does is filters out events from the same device within 5 seconds of each other.