OpenSprinkler Forums Comments, Suggestions, Requests Show next start time for sprinklers in main display Reply To: Show next start time for sprinklers in main display



I verified it a few days and it seems to work. My code will definitely not please structured oo programmers but it works and sometimes it’s easier to optimize things than create them in the first place. I also commented it so it should be readable somehow. This sprinkler status display is part of my infoscreen which runs on an iPad 1 in our house.

sprinkler.php creates the display and loads sprinkler_content.php periodically.
Due to my personal usage the script only shows three stations on two programs which run in the morning and evening. My stations run 1,2,3 in the morning and 1,2,3 in the evening. If you have more stations, you’ve got to add them to the code or query the api for the max number of stations and loop through. The same happens for the programs. If you have more than two programs you have to adapt the script.

I have setup a rain delay when the weather report indicates rain. The script queries the rain delay bit and changes the big image to one that shows a closed sprinkler with rain above. While running the small water drops in front of each station are animated and the remaining watering time is shown.

Of course you have to change the URL and the OpenSprinkler password in the beginning to reflect your home setup.

Have fun!