OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Version 2.1.6 › Reply To: Version 2.1.6
I just updated firmware 2.1.6 API document, addressing most comments DaveC described. First of all, thanks to DaveC for sending detailed comments, very much appreciated. The updated API document can be found here:
There doesn’t seem to be a way to retain the attachment ID of the previous version, so the PDF link is different from the previous version.
Let me briefly go over the comments and provide some more background information:
* MD5 hash password: the firmware itself actually is not aware of the particular format of the password — it merely stores the data that’s passed to it, and compares a password with what it has stored. However, the app automatically computes the MD5 hash and when you type in a plaintext password in the app, it always converts that to MD5 hash and sends that to the controller. In that sense, if you only use the API to access the controller and never use the app, you can still store plaintext password (but this is now strongly discouraged).
* Location string: similar to the password, the firmware is not aware of the particular format of the location string. When you use the app to set the location, it always converts it to a GPS coords (because Wunderground API works most reliably with GPS coords and not city,state name or zip code). Except if it’s a PWS station ID, then the app preserves it. Again, if you only use the API to access the controller and never use the app, you can still pass a zip code to it and it won’t convert that to GPS coords on its own.
* Program index starting from 0 vs 1: I know this is confusing and you are right that most of it is inherited from legacy code. It’s hard to change them right away because the app is designed to be compatible with all versions of firmware, and it’s better to keep the old way to minimize the burden of customizing the app for every different version of firmware.
* Missing options: good catch on o36 — this is completely my fault for missing it, and it’s now added. The other missing option is o40, which is firmware minor version (read-only)
* Reboot: this will be partially addressed in the upcoming firmware 2.1.7, which has added support for IFTTT and can send push notifications on ‘reboot’ events. It doesn’t report the cause of the reboot yet, but that will be the next step.
Again, thanks for the comments. I apologize for my very slow response time, but please do not be discouraged by that.