OpenSprinkler › Forums › OpenSprinkler Unified Firmware › api question for disable/enable existing programs › Reply To: api question for disable/enable existing programs
August 25, 2016 at 12:21 pm #43910
I see what you mean. Unfortunately there is no API currently to only set the disable / enable bit of an existing program — you have to use /cp and pass the entire program data to enable / disable the program.
However, you can modify the firmware by adding an additional API command, say, call it ep to stand for ‘enable program’, and use this command to set the ‘enable / disable’ bit of an existing program. It’s pretty easy to follow the existing code (in server.cpp) to add an additional command.