CCline Posted May 9, 2014 Posted May 9, 2014 I'm trying to control relays on my Stargate with network resources. This URL encoded command works in a web browser to turn off relay 7: "http://192.168.1.11/sendcommand2.cgi?var1=%23%23%253300194000&var2=str&var3=%23%230&var4=UserName&var5=Password" How do I set that up in network resources?
Michel Kohanim Posted May 10, 2014 Posted May 10, 2014 Hi cBc, Protocol: http: Method: GET Host: 192.168.1.11 Port: 80 Path: /sendcommand2.cgi?var1=##253300194000&var2=str&var3=##0&var4=UserName&var5=Password Check: URL Encoded (%23 = #) With kind regards, Michel
CCline Posted May 10, 2014 Author Posted May 10, 2014 When I run Test I get error "Request Failed" and "N/A" in Resource Response. I'm not sure if you meant to leave the % out shown in red below, I tried both ways. /sendcommand2.cgi?var1=##%3300194000&var2=str&var3=##0&var4=UserName&var5=Password "var3" is the string returned by Stargate when successful.
Michel Kohanim Posted May 11, 2014 Posted May 11, 2014 Hi cBc, What's the % in your path? Did you get any status codes as well? If you only got request failed then two possibilities: 1. ISY cannot connect to Stargate 2. Stargate does NOT respond to the command (you might want to increase the timeout) With kind regards, Michel
CCline Posted May 11, 2014 Author Posted May 11, 2014 The % is part of the string being sent (##%3300190101) I notice when I check Encode URL, it replaces the % with %25 but doesn't replace the # with %23 as shown in the "Resource Editor.jpeg". I've tried entering them myself without checking and changed timeout to 5 seconds. The "Browser.jpg" shows the command returns "##0"
Michel Kohanim Posted May 12, 2014 Posted May 12, 2014 Hi cBc, Please copy the path as you have on the browser and UNCHECK encode URL. Let me know what error you get from ISY. With kind regards, Michel
CCline Posted May 12, 2014 Author Posted May 12, 2014 The first time I ran it I got "Subscriber didn't replay to event:1 [69]" and "TCP client request failed [Net Module Rule: 7404]" Sometimes I just get "N/A"
Michel Kohanim Posted May 12, 2014 Posted May 12, 2014 Hello cBc, 404 means "not found". Can you paste the Path you are using in your network resource here. Again, please use the latter part of the URL that you see in Safari starting with sendCommand.cgi AS IS. And, make sure you do NOT check Encode URL. With kind regards, Michel
CCline Posted May 13, 2014 Author Posted May 13, 2014 Path: /sendcommand2.cgi?var1=%23%23%253300190101&var2=str&var3=%23%230&var4=UserName&var5=Password Actual: GET /sendcommand2.cgi?var1=%23%23%253300190101&var2=str&var3=%23%230&var4=UserName&var5=Password HTTP/1.1 Host: 192.168.1.11:8083 User-Agent: Mozilla/4.0 Connection: Close Content-Type: application/x-www-form-urlencoded
Michel Kohanim Posted May 13, 2014 Posted May 13, 2014 Hi cBc, Do you still get a 404 with this resource? Is it at all possible to put your stargate on the internet so that we can test it remotely? If so, please reset the userid/password for your stargate and send the URL to support@universal-devices.com and we'll try to figure out the root cause. With kind regards, Michel
Recommended Posts