ISYhbsh01 Posted August 2, 2012 Posted August 2, 2012 Sorry for my ignorance. Can someone enlighten me how to use REST commands? Specifically when using . What do I put there, do I use the device name or address? And do I have to put it in those brackets? I got it to work when using the simple command like this: http://ipaddress/rest/nodes. But I have no clue how to work with specific nodes. Again sorry for my ignorance. I searched for a bit more info on REST commands on the wiki & forum and didn't find very much info for someone like me. Thanks Sent from my SPH-D710 using Tapatalk 2
Michel Kohanim Posted August 2, 2012 Posted August 2, 2012 Hello hbsh01, Please do be kind enough to peruse our WSDK documentation where everything is clearly explained/described: http://www.universal-devices.com/isy-developers With kind regards, Michel
ISYhbsh01 Posted August 2, 2012 Author Posted August 2, 2012 Hi Michel, I read the ISY-WS-SDK-Manual, however it is written for developers & rightfully assumes that the reader already has programming knowledge. I am far from being a programmer so I did not find there an answer to my specific question what to put in the . As I understand, the ISY can be controlled by sending it REST commands, which can be sent to the ISY simply by typing it into a web browser. That’s all I am trying to do here. Once I know how to do this I believe there are many things that can be done from there, Like integrating it with IFTTT.com’s DropBox channel which can send URL’s, and probably much more. So here is my question: I got the following to work: https://myipaddress/rest/status. That was simple. Now if I want to check the status of a specific device for example an ApplianceLinc named “Dehumidifier†with an Insteon address of 15.4E.0B, can you tell how I would do it? Here is where I get stuck: https://myipaddress/rest/status/ If in order to answer that question you will first need to give me a lesson or two in programming for dummies, then just let me know & I will sadly resign to my fate that this is not for me… Thank you
LeeG Posted August 2, 2012 Posted August 2, 2012 Sample with actual device address http://192.168.2.4/rest/nodes/18 F5 40 1/ http://192.168.2.4/rest/status/19 21 DA 1/
Michel Kohanim Posted August 2, 2012 Posted August 2, 2012 Hello hbsh01, Sections 6.3 and 6.5 in the document are precisely what you need. For your reference: 1. Do http://your.isy.ip.address/rest/nodes (section 6.3) ... each device has an the content of which is what you need in ALL your futher communications with ISY for this device. In the document, should be replaced with the address of the device2. To send a command: /rest/nodes//cmd////.../ e.g. /rest/nodes/15 4E 0B 1/cmd/DON/128 ... turn the device on to 50% 3. For a list of commands, do /rest/config Hope this helps with initial questions. Again, the document has all you need in section 6. With kind regards, Michel
ISYhbsh01 Posted August 2, 2012 Author Posted August 2, 2012 Thanks Lee & Michel, I learned a couple of things already now from you that I didn’t know before: 1. That I have to use the Insteon address & not the name of the device. 2. That I don’t actually type the <> brackets… (Did I mention that I have no clue about programming?) 3. That I have to add the 1 (or 2 as applicable) at the end of the address. 4. That while the admin console shows the address of the appliancelinc as 15.4E.0B the rest/nodes page showed the address as 15 4E B without the 0. (Though I don’t know if it makes a difference) 5. That I CAN and should use spaces to type the address, even though normally you don’t have spaces in a URL. Still I couldn’t get it to work. I tried both of the following for the appliancelinc, using http & https, with a forward slash at the end & without, with spaces & without, nothing worked. https://myipaddress/rest/status/15 4E 0B 1/ https://myipaddress/rest/status/15 4E B 1/ Thank you
LeeG Posted August 2, 2012 Posted August 2, 2012 Do not use leading zero. What error is occuring? How is the REST command being issued, your program or browser command line http://192.168.2.4/rest/status/F 50 91 1/
ISYhbsh01 Posted August 2, 2012 Author Posted August 2, 2012 I am using the browser & I am getting a http 404 error.
ISYhbsh01 Posted August 2, 2012 Author Posted August 2, 2012 Ok I got it! It seems that it's case sensitive! The Insteon address must be all upper case while the commands must be in lower case. Am I correct? Perhaps this is self understood ABC for a programmer, which I am not...
LeeG Posted August 2, 2012 Posted August 2, 2012 The Insteon address should be in upper case to match the way the address appears in the ISY. Not sure what you mean by commands. I use DON DOF etc in upper case http://192.168.2.2/rest/nodes/10334/cmd/DON
ISYhbsh01 Posted August 2, 2012 Author Posted August 2, 2012 You are right, DON has to be upper case. But cmd must be lower case. Thanks.
Recommended Posts