Piston logic using sensor information after execution


#1

1) Give a description of the problem
So I have a commercial pour-over Bunn Coffee Maker, I have it setup on the timer to turn on and heat up the tank. That works great, however sometimes I leave the pot warmer on, this causes problems because if it’s low or empty from the day before it burns, which is bad.

I am using an energy monitoring outlet on the coffee maker

2) What is the expected behavior?

The expected behavior is for it to first determine if either myself or wife is home. I got that. Then determine the schedule that I have set for it to run. That is good to go as well. If both of those pass, turn the coffee maker on.

Once the coffee maker is on, I want to see check the energy (wattage) Normal tank usage is approx 1300-1350 watts while heating the tank. However if the warmer is on, that wattage will be 1400-1450.

So I want it at that point to see that the warmer is on, and shut it back off.

3) What is happening/not happening?
I can’t figure out how to get this in a single piston. I could make a second, but i fear there will be conflicts especially if I run it out of schedule etc…

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

No logs, as I don’t feel I have gotten close enough yet.

Thank you in advance for any and all help! It’s much appreciated.


#2

I think I may have figured it out… did a couple of test runs in 5 minute intervals, I guess only the test of time will show if it’s behavior is exactly what I am looking for.

The memory usage is 11% which seems a bit high compared to my other pistons thought.


#3

This version looks like it will work nicely. You can remove the restriction on line 27. Command optimization will not send a command if it will not cause a change.

Memory usage is nothing to worry about. This covers all the logs, undo/redo actions and other various tid bits of your piston. Each piston gets 100,000 bytes allocated to it. When it gets full then old logs get purged so you shouldn’t run out of room.