OpenSprinkler Forums OpenSprinkler Unified Firmware Some issues and question Reply To: Some issues and question

#82003

Ray
Keymaster

I can explain why the way you wanted is much more difficult to implement than you may think. The scheduler in the firmware handle zone starting dynamically. The order of zones, overlapping programs, dynamic parameters, are only known at the time those programs start. If the controller reboots and it misses the start time, it’s actually very complicated to trace back in time to recreate the runtime variables. Additionally there is the question of how far it should trace back in time. If you lost power for 10 hours, does it need to step back in time minute by minute for 10 hours to find if any program may have lasted till the time of the reboot? Keep in mind the controller is a low performance microcontroller. Doing this computation all the time will consume all the computation power and prevent it from carrying out other tasks like responding to web requests.

The preview can be done quickly because that’s a client side program, which means it runs on your phone or computer as a JavaScript program, and it only runs it once when you click on the preview button. Your phone and computer are much more powerful processors and so computing the preview is quite easy.

The idea of computing the preview once at reboot and just keep using it doesn’t work. Programs can be changed and edited at any time. The watering percentage can change dynamically at any time. There are all sorts of dynamic events like zones stopped by rain sensors, manually stopped, paused etc. You may think your solution can fix one issue but likely it will result in multiple other issues that you may not have thought about.

Above all, if you have frequent power loss, couldn’t you address that issue directly by installing a UPS?