OpenSprinkler Forums OpenSprinkler Mobile and Web App Incorporating other information into station log Re: Re: Incorporating other information into station log



Thanks Samer, I’ll have a look at the API for the timeline component.

Just by way of an update (and a written plan for my own benefit), I have dug through the code and here is my plan:

  • add a radio button to the logs page for ‘Timeline’ option, in main.php
  • add code in main.js.php; a function called get_logs() to retrieve and parse logs into timeline component JSON format (partially done, plugs some HTML in saying ‘not implemented’).
  • add another function in main.js.php to perform the parsing of logs to this format, based on the existing get_preview() function. Perhaps call it get_logs_timeline()
  • a server side handler for this function, that does the lookup to the interval webapp, and possibly another webapp that serves pressure sensor data, in a similar manner to the existing functions get_preview() and process_programs() in main.php.
  • Slight changes in log JSON data for the Timeline widget to show average pressure on the coloured bars (like the way programme name is shown in preview).

Any thoughts on this? I will take a light-touch approach with existing code to make it easier to integrate back into yours. I have forked your code into my own repository at, and will send you a pull request when I am happy with it.