OpenSprinkler Forums OpenSprinkler Unified Firmware Amazon Echo Alexa Skill for Open Sprinkler Reply To: Amazon Echo Alexa Skill for Open Sprinkler

#46707

Ray
Keymaster

Hi Bill, this is a bit complicated. First, because there may be dynamic events (such as rain sensor is activated, or watering percentage is nearly 0% when the program is about to run), the program might not run if these dynamic events are encountered.

Ignoring that, what you needed is very much like a simpler version of the program preview feature. That is, you just need to know whether there is a program that’s scheduled to run today or not (while the preview gives you the complete graphical view of how the programs are scheduled during the day). You are right that there is no API that exposes this simple yes or no answer. The preview feature is implemented using Javascript that runs a software simulation of the scheduler, using the program data (i.e. data from /jp). So to make this work, you will have to get JSON from /jp, and then have a short script that checks the program data and reports whether a program is scheduled to run today or not. If you want to proceed, I can point to you the relevant section of Javascript code in the OpenSprinkler app that implements the preview feature.

We will be away from Thursday July 17 to Monday July 21. Orders placed after 3pm EST July 17
will be shipped on Tuesday July 22. Thank you for your understanding!
This is default text for notification bar