Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTTP Commands for SIP
#1
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
Reply
#2
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
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#3
try [sip url]/api/status
look for "remaining:" it will give you the time remaining in seconds.
Reply
#4
Dan,

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

Thanks,
-Chris
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#5
Similarly, is there a way to get the status of the system such as enabled/disabled, manual mode, etc.?

Thanks,
-Chris
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#6
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
Reply
#7
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
Reply
#8
Thanks!  The mobile_app plugin hits the spot...

-Chris
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#9
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... ???
Reply
#10
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.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)