I’m programming a sprinkler controller on a NodeMCU attached to a relay board. I want the schedule to reside on the NodeMCU, and not use Blynk commands to enact every On/Off command. I’m thinking of using two arrays to handle the schedule. One for day of the week, with a 0 or 1 in each position, corresponding to whether the program should run on that day or not. The second array would hold run times for each zone. So an array like [10,10,25,20] would run zone 1,2 for 10 minutes, zone 3 for 25 minutes, and zone 4 for 20 minutes. I think this is a simple enough way to handle it in my code, my curiosity is if there is a better way to save a “timetable” on the NodeMCU that is easily altered from the App.
edit: I should add how I am considering updating them now. I can use a switch in the app for each day, turning a day on/off in the app would override the hard-coded schedule in the array. For each zone, I’ll have a simple time input in minutes. When it’s entered in the app, it will update the zone time in the array. I still haven’t figured out the simple way to read back the current schedule into the app, so you can see when changes are made. Maybe use a table?
I see that the scheduler might offer more flexibility, but I’m looking for something with the least amount of daily interaction with the server, to make the system function even if it loses wifi or server connection.