Kevin Connolly Posted September 3, 2014 Posted September 3, 2014 I guess I just need to do more reading. So all I need is the starting point (for a Noon) to learn how to specify ALL the parameters needed to set an event trigger, such as a Geofence or an iBeacon. I tried Https:<username>:<password>@ipaddress:port/rest/nodes/<node>/cmd/<cmd>...or something like that. It worked fine in my web browser but not in the geofence app I want to use (the app supports GET and POST). I' m not exactly thrilled with the success of my web browser experiment either. Something just strikes as wrong to be sending the username and password as I was doing. I read something about encoding, but it wasn't written for a Noon so... Any help would be appreciated.
Kevin Connolly Posted September 3, 2014 Author Posted September 3, 2014 I found this simple code to turn on a SwitchLinc somewhere on the internet (don't ask me where). it utilizes admin:admin encoded for username and password. GET /rest/nodes/99999/cmd/DON HTTP/1.1\x0D\x0AHOST: 192.xxx.x.x\x0D \x0AAuthorization: Basic YWRtaW46YWRtaW4=\x0D\x0A\x0D\x0A So my questions than (assuming the above will work) is: Do I kick off the command with https://? and do I append the IP with the port number (ie. 192.XXX.X.X becomes 192,XXX,X.X:443?
Kevin Connolly Posted September 3, 2014 Author Posted September 3, 2014 So I tried my own suggestions above in a web browser only to be informed by Google search that it couldn't find a match to the string, soooo?
Michel Kohanim Posted September 4, 2014 Posted September 4, 2014 Hi Kevin, The following will not work: GET /rest/nodes/99999/cmd/DON HTTP/1.1\x0D\x0AHOST: 192.xxx.x.x\x0D \x0AAuthorization: Basic YWRtaW46YWRtaW4=\x0D\x0A\x0D\x0A What you need is \r\n after each line. \r = carriage return and \n is new line. I think you are sending the hex codes as string and that will not work. What's your application framework? With kind regards, Michel
Kevin Connolly Posted September 4, 2014 Author Posted September 4, 2014 The application I'm trying to use is Geohopper on an iPhone. Bear with me, because as far as coding and such goes, I'm pretty much on the Dr.Seuss level. Would the following work? GET /rest/nodes/99999/cmd/DON \r\n HTTP/1.1\x0D\x0AHOST: 192.xxx.x.x\x0D\x0AAuthorization: Basic YWRtaW46YWRtaW4=\r\n\x0D\x0A\x0D\x0A or do I place the (\r\n)'s somewhere else? and will this work for Https? ...and thank you, btw, for the help! You'd think that with the prevalence of mobile devices and such that the correct command would be easy to find where all a knucklehead like me had to do is switch out a few things.
Michel Kohanim Posted September 4, 2014 Posted September 4, 2014 Hi Kevin, Unfortunately I am not familiar with Geohopper. Is this a raw TCP socket to which you send data or is this an HTTP socket? Can you point me to their documentation that you used to arrive at the above? With kind regards, Michel
Kevin Connolly Posted September 5, 2014 Author Posted September 5, 2014 I took two screen shots on my phone, but there no way I can see to attach them here. If you have a direct email address I could send them to you. To answer your question...I don't know. Geohopper is a geofence application. it has a space to provide a URL and specify GET or POST. There's another similar application, geofancy, that does the same thing. I somewhat shied off geofancy because I couldn't pin down whether the developer was in the Netherlands or Australia.
Michel Kohanim Posted September 5, 2014 Posted September 5, 2014 Hi Kevin, Yes, please send them to support@universal-devices.com. With kind regards, Michel
Recommended Posts