The point was that if the first ATO malfunctions (snail stuck in flotor for example) the task of the second ato is to disable/veto the first one, or rather stops the pump.
Does reef pi do that if I just point two separate ATO entities to the same equipment entity?
I guess what I mean is with sensors A and B is:
Pump runs iff NOT A AND NOT B
It will probably not work, since the second sensor (B) will always trigger the pump if the water is below sensor B, but above sensor A, basically overriding sensor A.
You could also run into strange behavior, where ATO B turns on the pump, but ATO A afterwards turns it off, since sensor A is already triggered. Rinse and repeat with the pump turning on and off all the time.
The only way I currently see (which is most likely not the only one) is the following setting, altough you will find that it doesn't work and creates bugs.
- create 3 inlets:
- two regulars on your 2 ATO signals (with the correct polarity, which you should know if you simply test one of them with an ATO)
- and one on the safety ATO, but with the opposite polarity
-
- Then create 2 ATOs that run off the 2 regular inlets that both trigger your top-off pump:
- One on Signal A:
-
- One on Signal B, but deactivated:
-
- Create a macro that disables ATO A, activates ATO B and deactivates your top-off pump:
- Now create a third ATO on the reversed Signal B that runs that Macro as a One Shot:
This should:
- run your standard ATO on Signal A
- as soon as Signal B triggers, your third ATO (in my example called "ATOSafety") runs the macro that should switch to the backup ATO on Signal B and deactivate your top-off pump to keep your tank from overflowing
Personally I set the ATO check frequency intentionally low (10s) so I can test this quickly, not sure what kind of value is best here. The
Adafruit guide used 120s, but I guess this very much depends on the speed at which your pump can refill water.
ATO A worked fine. When I switched my ATO_Dummy A signal to low, my doser started running within the next 10s. When I set the signal back to high it stopped.
As soon as I also triggered SignalB something worked ... the doser doesn't get trigger by ATO A anymore. But the macro also doesn't switch the ATOs:
Strange. I tested the same with switching a light. That also doesn't seem to work. If I tell a macro to switch off a light, the light stays enabled.
@Ranjib ? Is that supposed to happen ? Feels very strange to me that "Turn On" and "Turn Off" doesn't enable or disable the ATOs (or lights for that matter). I removed the "Turn off Doser 1" from the macro, but nothing happens, the doser doesn't turn on again. I also can't switch the ATOs manually, because that freezes my Pi Zero.
@Ranjib that's definitely not nice ^^