OpenSprinkler Forums OpenSprinkler Unified Firmware Issue: Change Station Settings via HTTP API Reply To: Issue: Change Station Settings via HTTP API



Please, take a look at the API document:
page 5, section 10, where it explains the /cs command. It clearly says there are parameters such as q? (i.e. q0, q1, q2…). And it gave a few examples such as setting m0 (the bit fields for the first 8 zones). I don’t know how to continue explain this if you don’t read that section carefully.

xx in my post just means a placeholder — it’s an integer, it could be anywhere from 0 to 3 digits long (0 to 255). It doesn’t mean two bytes.

As the API document clearly shows, the JSON variable names returned by /jn and the parameters you set through /cs do NOT have the same names. For example, the master operation bit fields returned by /jn is named “masop”, but to set this through /cs, you use m? (e.g. m0, m1, m2…). The reason they are not the same is due to backward compatibility reasons — the names were like this from several firmwares ago and we didn’t want to change them completely to break the previous versions of hardware and firmware.

In your example, the result of settings m0=1 is to set the first zone’s master operation bit to 1 (enabled), and the other 7 zones to 0. Similarly, if you do m0=255, it will sets the master operation bits for all first 8 zones to 1.