OpenSprinkler › Forums › OpenSprinkler Unified Firmware › API – Change Options Command › Reply To: API – Change Options Command
Ray
@DaveC: I apologize that the API document is missing the o36 option. For future reference, you can find the list of options in the source code, specifically in defined.h:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h
the index is the index of an option in the list (starting with OPTION_FW_VERSION which is o0).
The firmware handles the /co command in the following way:
– it loops through all option names in the form of o?? and searches the GET command to see if the option name exists. It doesn’t reject options that are not in that format. For example, if you send an option named ‘wl’, it won’t report an error and that options is just ignored.
– because o2 is the Use NTP option and it’s a binary option, you don’t need to specify a value — if the option name exists, it’s assumed the value is 1. If that option name doesn’t exist in /co command, it’s assume to be 0. This is explained in the API document, and is due to the way HTML forms process checkbox elements.