Jump to content

Web Power Switch 7


khargy

Recommended Posts

Posted

Can't really get it to do anything... I just want basic controls... not sure if the Rest API is the right approach or not...

 

Can't figure out how to authenticate myself? I try:

http://admin:XX@192.168.1.xxx

in a browser and it just redirects me to the login page.

 

I tried the curl example from the documentation:

curl -H "Range: dli-depth=1" -H "Accept: application/json" --digest 'http://admin:xxx@192.168.1.xxx/restapi/'

and I just get back:

<HTML><HEAD>


<META HTTP-EQUIV="refresh" content="0; URL=/">


</HEAD><BODY></BODY>
Posted (edited)

You do a GET request for

 

/outlet?7=ON

/outlet?7=OFF

/outlet?7=CCL

 

You have to put 

 

Authorization: Basic [token]

 

in the header where [token] is the Base64 of the USERNAME:PASSWORD

 

You can't do username:password in modern browsers as that feature was removed a log time ago.

 

Also, the Power Switch 7 does not support the restapi.

Edited by Gary Funk
Posted

Ah perfect that worked! Also it didn't help matters that the outlet I was testing and I thought was empty was actually controlling my ISY :)

Posted

Ah perfect that worked! Also it didn't help matters that the outlet I was testing and I thought was empty was actually controlling my ISY :)

Lol oops! Glad Gary got you sorted out. Also look at "auto ping"

Posted

Thanks, I've used the "auto ping" feature when I used to have some web cam that's would get stuck and then I would power cycle them as needed.

 

I wanted to set this up in the ISY to I can use the Echo for control over the switches.

  • Like 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...