I have a small irrigation system from Irrigatia for the plants on my balcony. This depends on a solar panel (and batteries) for power and uses a water reservoir as its water source, and thus is completely off-grid. This is perfect for me as I do not have access to electricity or water on my balcony.
It does, however, have one point of improvement, namely in how it notifies me that its water reservoir is getting low: Whenever water drops below a certain level, a small buzzer inside the unit beeps for a few seconds, and that’s it. I have been working on piggy-backing a Photon inside the irrigation system to send me a push notification to my phone instead, but need to make this run as frugal as possible to maintain operations of the irrigation system itself.
My first test initially appeared to be working as it should, but after a short while it drained the batteries and never got up and running again. My theory is that the Photon kept trying to reboot as soon as a sliver of power was generated, which then caused an immediate drainage that shut everything down again.
I am currently working on a second version of the code which I think should solve the issue for the most part. However, in the case of complete drainage of the batteries again - say after many days of rain - I might end up with the same situation where the Photon will constantly try to reboot and thus preventing the batteries from ever gaining any power again.
So, after a lengthy intro, here’s what I’m wondering;
Is it possible to make the Photon do a voltage check on startup, and immediately go back to sleep (for a defined period of time) if this is below a certain level? The goal is to make sure conditions are right for the Photon to run its check and send its message to the cloud before it starts draining the power supply more than necessary, and allow some time for recharging if need be.