PLUGIN: HttpSwitch (for Cheap WiFi Switches like KK-SR3)

Thanks. I plan to use them to power cycle my WiFi Access Points when they need it. I’m not clear on the “hack”. I successfully installed the PlugIn from the App Store awaiting the units but what do I need to Hack?

you need to place a cgi script on the switch itself, for this you need to log on to it.
its not really a “hack” since this switches are not exactly “secured” :wink:

so you log on via ssh to the switch one time put the json.cgi in the cgi-bin folder and off you go …
take about 30 secounds to do this.

i added a “hacks.zip” in the first post it contains the cgi script to put there and a bad manual on how to actually do it

you need to place a cgi script on the switch itself, for this you need to log on to it.
its not really a “hack” since this switches are not exactly “secured” :wink:

so you log on via ssh to the switch one time put the json.cgi in the cgi-bin folder and off you go …
take about 30 secounds to do this.

i added a “hacks.zip” in the first post it contains the cgi script to put there and a bad manual on how to actually do it[/quote]

AH, now I understand. I was having a senior moment :slight_smile:

FYI, I installed and configured the Plug-In for rest purposes and it worked fine. I noticed that it is NOT recognized in ImperiHome so I gave submitted a support request, hopefully they will have something by the time my hardware arrives

That is strange!
You installed from the store? 1.2 or bigger ?

I changed the namespace to SwitchPower1 for exactly that reason

Homewave Mobile does list them as normal Switch since then.

[quote=“nullx8, post:25, topic:188358”]That is strange!
You installed from the store? 1.2 or bigger ?

I changed the namespace to SwitchPower1 for exactly that reason

Homewave Mobile does list them as normal Switch since then.[/quote]

Whatever version is on the app store Seems to me it showed “httpswitch1” but I’m not there right now to confirm

[quote=“clippermiami, post:26, topic:188358”][quote=“nullx8, post:25, topic:188358”]That is strange!
You installed from the store? 1.2 or bigger ?

I changed the namespace to SwitchPower1 for exactly that reason

Homewave Mobile does list them as normal Switch since then.[/quote]

Whatever version is on the app store. Seems to me it showed “httpswitch1” but I’m not there right now to confirm[/quote]

I just checked and ask the files show HttpSwich1

The app store version shows 1.13, August 14, 2015

Update: The version posted on the forum in Post 1 also says “HttpSwitch1”

nullx8, could you post your latest (ver 1.2 or greater)? The version on the App Store and in the first post on this thread is still 1.13 so it has the wrong device type “httpswitch1”

John

I just checked, the code has the Switchpower1 Namespace,

Could you try to go to plugins, open httpswitch and click “create another”

Save and reload, then open imperihome and check if the new created switch does show up.

You orobably created the device with 1.1 code (which did not had it yet)

[quote=“nullx8, post:30, topic:188358”]I just checked, the code has the Switchpower1 Namespace,

Could you try to go to plugins, open httpswitch and click “create another”

Save and reload, then open imperihome and check if the new created switch does show up.

You orobably created the device with 1.1 code (which did not had it yet)[/quote]

I used the version on the App Store, which is apparently 1.13. There is nothing newer there. I reinstalled an it reports in the Installed App List as 1.13. And I again tried ImperiHome, it does not see this version.

And there version in the ZIP attached to the first post of this thread shows “1.13 Aug 24 2015”

UPDATED
The reason for bringing this up is that in
http://forum.micasaverde.com/index.php/topic,33337.msg246019.html#msg246019

you said this was fixed in version 1.2 but there is nothing later than 1.13 available. As I said i’ve reinstalled the 1.3 version from the App Store and it creates the switches fine. But ImperiHome does not recognize them at all. I have sent the Vera Data to ImperiHome as they requested to see if they can/will incorporate it as it stands.

Do you know where to find the switch control Android app in English, my Chinese is non-existent

i just re-checked … the files on the store and the files in the thread here are current …

if you hover with the mouse over the “status” it should show SwitchPower1

see image

P.S: did you try to create another device to check ? (no need to enter any data … just to test if the namespace is correct on a new created device)

[quote=“nullx8, post:33, topic:188358”]i just re-checked … the files on the store and the files in the thread here are current …

if you hover with the mouse over the “status” it should show SwitchPower1

see image

P.S: did you try to create another device to check ? (no need to enter any data … just to test if the namespace is correct on a new created device)[/quote]

The first device created showed httpswitch1, the second and later devices show SwitchPower1. Perhaps this is causing ImperiHome a problem.

I’ll try removing the first device and just leave the second one to see if that resolves things for ImperiHome. As I said I sent the Vera Data to them in hopes they can get it working as is.

Thanks for persevering.

UPDATE
I created devices 2 and 3 and removed the initial device. Both 2 and 3 show SwitchPower1 but ImperiHome still can’t see them for some reason. Over to them now :slight_smile:

Further to this, EventWatcher tracks changes to device code “X”, SwitchPower1. My current configuration tracks all the switch state changes in my network but it does NOT catch manual changes to the state of the KK-SR3 Wi-Fi Switch Plugin.

Thanks for that, that is probably because i use a function to flip the switch and update the status variable according to the response of the switch itself
So failure to flip it would not change the status, thats also the reason it takes longer for the icon to change as the script cheks if the action has been executed, i have an idea to bypass that already

[quote=“nullx8, post:36, topic:188358”]Thanks for that, that is probably because i use a function to flip the switch and update the status variable according to the response of the switch itself
So failure to flip it would not change the status, thats also the reason it takes longer for the icon to change as the script cheks if the action has been executed, i have an idea to bypass that already[/quote]

Updating based on the actual result make sense, tracks with the ZWave handling. I don’t have my switches yet, they are in the country somewhere though :grinning: so I can’t confirm anything beyond that yet

I have three of the four units working. They all show as online, show the WiFi signal strength and properly switch ON and OFF and reflect the change of state. A before, they do NOT show up in ImperiHome and EventWatcher does NOT report the state change for a device “SwitchPower:1” which is type “X”.

I haven’t sorted out the fourth one, is apparently getting the correct advocates DHCP address for some reason.

Ill install eventwatcher and check on it, as for imperyhome, im clueless since the switches do act like any other zwave switch.

I’ve sent my data dump to ImperiHome at their request so they can see why it doesn’t and what they can do on their end. We may get a clue from that.

I got the fourth unit working but I had to allocate it a different IP address, it simply refused to work with the one I tried.