SIP
HTTP Commands for SIP - Printable Version

+- SIP (https://nosack.com/sipforum)
+-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1)
+--- Forum: Announcements (https://nosack.com/sipforum/forumdisplay.php?fid=10)
+--- Thread: HTTP Commands for SIP (/showthread.php?tid=58)

Pages: 1 2


HTTP Commands for SIP - dan - 2016 Oct 05

I have added a PDF file to the SIP wiki that lists the HTTP GET commands for controlling SIP.

The file can be downloaded at:
SIP HTTP GET Command Reference (download PDF)
[/url]
[url=https://github.com/Dan-in-CA/SIP/wiki/SIP_GET_commands.pdf]Dan



RE: HTTP Commands for SIP - gatomon - 2017 Jul 10

How can I get information about the state of sprinkler other than simply on/off.  In particular, how much time before the sprinkler will be turned off?
Thanks,
-Chris


RE: HTTP Commands for SIP - dan - 2017 Jul 11

try [sip url]/api/status
look for "remaining:" it will give you the time remaining in seconds.


RE: HTTP Commands for SIP - gatomon - 2017 Jul 12

Dan,

Just what I need.  Maybe you should add that to the SIP GET document...

Thanks,
-Chris


RE: HTTP Commands for SIP - gatomon - 2017 Jul 21

Similarly, is there a way to get the status of the system such as enabled/disabled, manual mode, etc.?

Thanks,
-Chris


RE: HTTP Commands for SIP - dan - 2017 Jul 21

Not via http.

you would need to access the Python code for most of the internal status.
See the file gv_reference.txt in the SIP directory for a full list.

Dan


RE: HTTP Commands for SIP - dan - 2017 Jul 21

Actually, after giving this a little more thought, you might be able to use the output from the mobile_app plugin. It outputs most of SIP's current status in json format. Or you might be able to modify the code and create a plugin that can provide whatever data you need.

Dan


RE: HTTP Commands for SIP - gatomon - 2017 Jul 22

Thanks!  The mobile_app plugin hits the spot...

-Chris


RE: HTTP Commands for SIP - danny_aka_rudy - 2019 May 20

When I try to run http://127.0.0.1/sn I get the status of the stations.  However when I try to run a python program that accesses the same url all I am getting back is what appears to be the page source from the login page... ???


RE: HTTP Commands for SIP - dan - 2019 May 20

It sounds like it is looking for the login password.

You can try adding the password to the query string (?pw=xxx) or disabling the password from the Options page under "Change password" check the "disable security" box. SIP's password is not very secure anyway.