Countdown timer piston


#1

Hello all,
This is my first post here on webcore, and I have been playing with home automation now for several years at a basic level. I have experience in programming industrial air conditioning and lighting automation, however the programming language uses graphic blocks that performed set functions stringed together, not text. Any help with the piston described below would be greatly appreciated, and thank you all in advance for your help!

1) Give a description of the problem
I need a timer counter function that will be variable based upon a runtime of a specific input switching on and off throughout the day(24 hour period). I then need to roll that counted time over to the following day to be used as a runtime for another piece of equipment.

2) What is the expected behavior?
I do not know how to write the proper timer sequence, but believe it should look something like:
Equipment 1
start:time now (time 1)
end:time now (time 2)
time 2 - time1 = integer1
(this will switch on and off throughout the day a few times, time needs to accumulate by the end of the day)

Equipment 2
start:time=now(start time will be scheduled)
stop time=start time+integer1

3) What is happening/not happening?
I don’t know how to properly write the sequence, or if I’m even on the right track

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

In case anyone is curios, here’s the grand scheme of things. I have a pool that is heated by way of a refrigerant to water heat exchanger. When this is enabled, the runtime of the AC performs the filtering duty that I normally have scheduled, so I’m looking to offset the filtering schedule for only the remaining time required. I can do this manually right now, but I’m looking to fully automate it, and further down the road trim the filtering time based upon the lux and pool temperature.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

The piston below performs half of what you’re trying to do, I think. The logic for equipment 2 just needs to be added to use the totalOn.


#3

Thank you Rey, I’m going to run it and see what the results are.