- This topic is empty.
September 1, 2013 at 4:04 pm #22629
Can someone direct me to a list of the GET commands? I found one here: http://rayshobby.net/wordpress/wp-content/uploads/2011/10/Firmware1.8HTTPGETcommands.pdf but it is missing the “run program” command (rp). I’m curious to see what other commands exist. Specifically, I’m looking for a “stop program” or “close all valves” without going into manual mode and closing each station. I’d also be curious to see if I can get the status of the rain delay or next run-time.
So far I can vebally tell my phone to “water the (back, front, etc…)” or ask it “are the sprinklers running?”.September 1, 2013 at 4:49 pm #25518
That is the correct list for the OpenSprinkler. The OSPi interval program available on the Raspberry Pi has an additional option as you mentioned, rp. It also accepts custom commands set in ospi_addon.py.
This is a sample homepage result:
You can get the variables you are after using the following regex in PHP (the regex can of course be used in any PCRE programming language):
preg_match_all("/(ver|devt|nbrd|tz|en|rd|rs|mm|rdst|mas|urs|wl|ipas)=[w|d|."]+/", $data, $matches);
In this example, $data is a string holding the home page result as shown above.
Hope this helps.
Update: I don’t think there is an easy way to get the next run-time without cycling days in preview mode and finding matches. Probably not very difficult but could be slow assuming your next run time is days/weeks in the future.September 3, 2013 at 4:50 pm #25519
Thanks for the detailed response! I saw the rsn command, but wasn’t sure what “reset” meant (i.e. does it clear the station’s name name?) but I guess it re-sets the stations to be closed. Anyway, it’s working great in my script.
I’m going to look into building out the custom commands in ospi_addon.py so my other devices can interface with it at a deeper level. I’d rather have the OSPi do the computing than my phone/tablet.
- You must be logged in to reply to this topic.