OpenSprinkler Forums OpenSprinkler Unified Firmware API – Change Station Names and Attributes Reply To: API – Change Station Names and Attributes

#40645

Ray
Keymaster

As explained in the API document of 2.1.5, section 8:
https://opensprinkler.freshdesk.com/solution/articles/5000632570
these parameters are all ‘bit fields’ — each value encodes the 8 bits of one board. For example, d0 corresponds to ‘disable’ flags of the 8 stations on the master controller, d1 corresponds to the next 8 stations and so on.

I should add that the reason it’s done this way is for legacy reasons: in the past names and attributes of all stations are edited on one single page and submitted together with one call to the /cs command. So encoding the data into bit fields significantly reduces the amount of parameters. Now that the UI allows editing one station at a time, in theory we don’t need to use bit fields any more, but we decided to still keep it the same way for backward compatibility reasons.