OpenSprinkler Forums OpenSprinkler Unified Firmware aditional info at OSpi Website Reply To: aditional info at OSpi Website

#51515

Ray
Keymaster

Generally the way to start is to follow some existing variable as an example. There are many variables that you can use as example, such as the device time, the rain sensor status, or whatever is changing dynamically. You can take a look at the API document:
https://openthings.freshdesk.com/solution/articles/5000716363-os-api-documents
to find some relevant variables, and search in the source code to find where they appear, then start adding your additional variables close to these existing variables.

The UI changes are more tricky, since the UI code is fairly large. The easiest way is to bypass the app, and just add another url, such as /get_temperature or something like that, that is only used to display your additional information. This way it really only requires changing the firmware code and you don’t have to touch the UI code. The downside is that it won’t show up in the main app interface, instead you will have to type http://x.x.x.x/get_temperature to go to the page that displays your additional information.

I really think that this is a good motivation for you to learn programming — one of the main reasons I made all our projects open-source is to serve an educational purpose — no matter how full-featured a product is, it’s not going to fulfill everyone’s need. Learning to program and customize the product is really the best way to make it work for you.