The behavior you noted is exactly what expected. The only thing I’ll add is a spst /latching switch is better way to simulate float sensor than momentary switches, since reef-pi polls for change at best 1s interval, which is not instantaneous, like a momentary switch (immediate on /off )All right - been testing this and I now have a better understanding of how this is working.
As a test, I have set up the following :
Working findings
- a momentary switch to imitate a float switch - set up as an input.
- a light set up on an outlet
- Created a macro that has one step - turn on light
- Create an ATO with one second check frequency
- Set the ATO to control the Macro described above
Now, I altered the Macro to add the steps to turn on, wait 1sec, turn off, wait 1 sec and turn on. Then activate the ATO on and the light turns on and off repeatedly (1 sec frequency) regardless of the state of the button / switch until I de-activate the ATO. When de-activating the ATO, the light finishes the Macro cycle. If the ATO is left on longer, it takes longer to "normalise" ie reef-pi is counting the activation cycles of the ATO and is trying to run the Macro that number of times.
- If I press and hold the button (simulating the float switch opening) the light comes on and stays on.
- When I release the button (simulating the float switch closing), the light goes off
- If I press the button for 1 second and release, the light comes on for one second and then goes off again.
- If I enable One Shot and press and release the button, the light comes on and stays on, but then the ATO is disabled afterwards
Next I tried to create a Macro that first de-activated ATO, then did the light steps and then re-activated the ATO. This just confused it completely and made the ATO uncontrollable. I had to delete the ATO because I couldn't change it's state to off despite a re-start on Reef-Pi.
But I can see how using the doser as described has worked.
I'm going to keep testing a few things, but as far as getting the status of an ATO to trigger a multi-step Macro - that's still a no.