o2bnme Posted May 6, 2015 Posted May 6, 2015 Hello. I am trying to utilize my Network Module for my ISY994i PRO for the first time. I am using Firmware 4.2.4 right now. The cgi I want to call requires a user name and password. I have no idea if I have everything correct, but testing it does not work. The test returns a 404 error (Network Module Rule 2:404). + I am using the HTTP GET {hostname} {port} /cgi-bin/admin/setvi?vi0=1 + I created an authorization entry to store the user name and password I am very new to this. Anyone have any helpful advice? Thanks, Bill
MWareman Posted May 6, 2015 Posted May 6, 2015 (edited) 404 means 'not found'. What does http://username:password@192.168.1.42/cgi-bin/admin/set?vi0=1 return when called from a browser? (Substitute the correct username and password - and the smiley is : p without the space....). Oh, you may want to change those as well. The base64 encoding is easily reversed - you have effectively published your username and password in your screenshot. Sent from my iPad using Tapatalk Edited May 6, 2015 by MWareman
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 (edited) It doesn't actually return anything in the browser window. It ends up flipping a switch on a webcam that manually triggers an event. The event sends me an email every minute until I send http://username:password@192.168.1.42:8042/cgi-bin/admin/set?vi0=0. The webcam webpage shows a change successfully as well. When I use the ISY994 to do the http://username:password@192.168.1.42:8042/cgi-bin/admin/set?vi0=1, I get no emails and the webcam webpage does not show the switch has been flipped. Thanks, Bill Edited May 7, 2015 by o2bnme
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 Oh, you may want to change those as well. The base64 encoding is easily reversed - you have effectively published your username and password in your screenshot. Ha. I thought about that after I did it. But it is a temporary userid, password. Also, it would require you find my house and log into my wifi. I'm banking on that being a little difficult to accomplish before I delete the temp UID.
LeeG Posted May 7, 2015 Posted May 7, 2015 Take a look at this topic for how to handle userid/password with Network module. http://forum.universal-devices.com/topic/13901-userid-and-password
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 (edited) Here's the firebug output I capture when I initiate the manual trigger using the webcam webpage. I added all this to my Network Resources entry and still get a 404. Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Authorization Basic asdfasdfasdf1234asdf Connection keep-alive Cookie activatedmode=digital; viewsizemode=100; 4x3=false Host 192.168.1.42:8042 If-Modified-Since 0 Referer http://192.168.1.42:8042/ User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 Edited May 7, 2015 by o2bnme
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 (edited) Take a look at this topic for how to handle userid/password with Network module. http://forum.universal-devices.com/topic/13901-userid-and-password Thanks Lee. That's what I have already done. The table I copy/pasted from Firebug didn't stick. I'll try to reformat to make it easier for people to read. Edited May 7, 2015 by o2bnme
Xathros Posted May 7, 2015 Posted May 7, 2015 (edited) Is encode URL checked? Also, this part doesn't look quite right to me: /set?vi0=1 and you show: /setvi?vi0=1 in a different post. -Xathros Edited May 7, 2015 by Xathros
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 Good eye. /cgi-bin/admin/setvi?vi0=1 That's what I have in the request. I copy/pasted what MWareman had in his post without checking its accuracy. I have tried with and without the encode URL checked. Both gave me a Rule 2:404 message.
Xathros Posted May 7, 2015 Posted May 7, 2015 (edited) I think I see the problem. This cam seems to require the ISY to support auth cookies per this from your firebug output: Cookie activatedmode=digital; viewsizemode=100; 4x3=false Host 192.168.1.42:8042 ISY does not support this. You may need a middleman to deal with this issue. Beats me why it errors with a 404 however. I would think this should be an auth failure instead. -Xathros Edited May 7, 2015 by Xathros
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 Cookie activatedmode=digital; viewsizemode=100; 4x3=false Host 192.168.1.42:8042 ISY does not support this. You may need a middleman to deal with this issue. Beats me why it errors with a 404 however. I would think this should be an auth failure instead. Thanks for you trying to help me with this. I removed the Cookie entry, but it still gives me the same error message. Bill
Xathros Posted May 7, 2015 Posted May 7, 2015 (edited) Because the cam is expecting the cookie and the ISY is not providing it. Try this to prove: Delete cookies and disable cookies in the browser then retest connecting to the cam from the browser. It should fail in the same way. -Xathros Edited May 7, 2015 by Xathros
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 I disabled all cookies and tested from both IE and "inprivate browsing." It worked in both. Any other thoughts? Thanks, Bill
Xathros Posted May 7, 2015 Posted May 7, 2015 I'm sorry. I'm out of ideas. Hopefully MWareman will spot something. -Xathros
o2bnme Posted May 7, 2015 Author Posted May 7, 2015 Thanks. I do appreciate you looking. I'm a lot farther along after using this forum.
Michel Kohanim Posted May 8, 2015 Posted May 8, 2015 Hi o2bnme, What are you using for the path? With kind regards, Michel
MWareman Posted May 8, 2015 Posted May 8, 2015 Good eye. /cgi-bin/admin/setvi?vi0=1 That's what I have in the request. I copy/pasted what MWareman had in his post without checking its accuracy. I have tried with and without the encode URL checked. Both gave me a Rule 2:404 message. Sorry! I was typing on my cell phone...
MWareman Posted May 8, 2015 Posted May 8, 2015 I'm out at a conference this week - so it's difficult to keep up.... Just to confirm: http://username:password@192.168.1.42:8042/cgi-bin/admin/setvi?vi0=0 and http://username:password@192.168.1.42:8042/cgi-bin/admin/setvi?vi0=1 (from the screenshot) works in the browser? Or does this work in the browser: http://username:password@192.168.1.42:8042/cgi-bin/admin/set?vi0=0 and http://username:password@192.168.1.42:8042/cgi-bin/admin/set?vi0=1 Michael.
o2bnme Posted May 8, 2015 Author Posted May 8, 2015 /cgi-bin/admin/setvi?vi0=1 and /cgi-bin/admin/setvi?vi0=0 Thanks
Michel Kohanim Posted May 8, 2015 Posted May 8, 2015 Hi o2bnme, If you have time right now for a remote session, please send an email to support@universal-devices.com. With kind regards, Michel
MWareman Posted May 9, 2015 Posted May 9, 2015 Sorry @02bnme, I'm mostly out of ideas. 404 is the error code returned by your camera - it's just being relayed to you by the ISY. It basically means that your server (the camera) cannot find the resource being requested (/cgi-bin/admin/setvi in this case). If it works from a browser but not the ISY then things like host header may come into play - but I don't see that issue here. Firebug seems to be reporting that the browser is making an HTTP/1.0 request (without a Host: header) - but your ISY network resource is sending a HTTP/1.1 request (with a Host: header as HTTP/1.1 requires). It might be just that simple - but I'm not sure how to change that on ISY's end. I wonder if you can craft a working command line with wget (so you can granularly play with the various options and headers) and experiment to find out what works..
o2bnme Posted May 11, 2015 Author Posted May 11, 2015 Hi Michel. Sorry. I wasn't available when you reached out. My email on your forum is very old and I don't recall my password. Thankfully Google remembers my password for me, so I can log in. But I do not have the ability to get forum notifications sent to my real email unless you help me change my profile behind the scenes. Do you have time tonight? Bill
xKing Posted May 11, 2015 Posted May 11, 2015 I'd try with curl and see what I get... As a last resort - try to collect a trace with Wireshark
o2bnme Posted May 11, 2015 Author Posted May 11, 2015 Thanks Michel. Here's the working request information... GET /cgi-bin/admin/setvi.cgi?vi0=1 HTTP/1.1 Host: 192.168.1.42:8042 User-Agent: Mozilla/4.0 Connection: Close Content-Type: application/x-www-form-urlencoded Authorization Basic asdfasdfasdf1234asdf
Recommended Posts