Temperature Threshold Pisto


#1

1) Give a description of the problem
I’m using a double tap function which fires another piston to turn on or off a fan via bond. I expected the piston to keep the fan on unless temps fall below 66.

2) What is the expected behaviour?
(see above)

3) What is happening/not happening?
Because the bond is a toggle power function (doesn’t have on/off), it turns on an off after each degree change.

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


#2

Suggest you change to ‘falls below’ and ‘rises above’ for your temperature thresholds. Those should only go off once each time you cross the temperature value you set. You also might want to broaden your threshold range. You have the fans turning on/off at the same temperature. This is fraught with issues if the temperature is right at the threshold.


#3

I agree with @guxdude… I always recommend a little space in between where neither condition is true.

For example, notice the approx 1° gap (65.9° - 67.1°):

IF Sensor 6's temperature drops below 66
    Then do stuff with Keypad1
END IF

IF Sensor 6's temperature rises above 67
    Then do stuff with Keypad2
END IF

If you skip that minimal 1 degree of separation, you may find the temperature kind of “riding on the fence” between two degrees. When this happens, you may find your fan turning on and off too frequently. Increasing the separation furthur will make the fan cycle slower, but I would never recommend setting the two conditions bumper to bumper. (potentially way too fast)

Edit:

Perhaps an exception to this would be if I was simply logging data.
I might allow for a bit more spam if no devices were being controlled.


On a totally different topic, you may want to change line 31 to point to the correct Keypad…

pic