satwar Posted March 24, 2012 Posted March 24, 2012 I'm really happy with the automated functions programmed into isy, but I don't like having to manually intervene. For example I have a "vacation mode" variable that I change from a value of 0 to 1 to invoke automatic light timers throughout the house. What I'd really like to do is change this value by running a command from an external program such as mControl. I've made some progress with mControl and would like to explore the possibilities. I hope I am not offending the isy community by trying to use mControl as a GUI for isy.
LeeG Posted March 24, 2012 Posted March 24, 2012 Have you looked into REST. Should be able to use a REST command set the Variable.
satwar Posted March 24, 2012 Author Posted March 24, 2012 I was afraid someone would say that. Is there a good link on using rest in this forrum ?
LeeG Posted March 24, 2012 Posted March 24, 2012 Follow this link to document that covers REST .. http://www.universal-devices.com/develo ... Manual.pdf
satwar Posted March 24, 2012 Author Posted March 24, 2012 Okay I see the generic command line I need: /rest/vars/set/// In my case = 2, = Vacation.Mode, = 1 Now what is the syntax to send to the isy99i device = 192.168.0.xxx with user = admin and password = pass http://admin:pass@192.168.0.xxx ?
LeeG Posted March 24, 2012 Posted March 24, 2012 I can cover part of the question. http://92.168.2.2/rest/vars/set/2/1/16 Sets "State" Variable with ID "1" to a value of "16". The variable ID is displayed to the left of the variable name in the Variables tab.
satwar Posted March 24, 2012 Author Posted March 24, 2012 Well I gave it my best shot: http://admin:pass@192.168.0.xxx:90xx/re ... ion.Mode/1 and it found the isy but REST complaining about missing style information
LeeG Posted March 24, 2012 Posted March 24, 2012 Why does the call have the variable name rather than the varID?
satwar Posted March 24, 2012 Author Posted March 24, 2012 Sorry, I missed that point in your last post. http://admin:password@192.168.0.49:90xx ... /set/2/1/1 Seem to be two issues: 1. A dialog box pops up asking me to confirm user id & password, even though they are filled in. Must be switch to suppress that ? 2. rest complaining about missing style information
LeeG Posted March 24, 2012 Posted March 24, 2012 I’m not enough of a network guy to understand what affect the port number and userid are having. Can you try the simple forum I posted (with your local IP address) into a browser command line and confirm the basic REST part is working. Someone with more network savvy than I will have to pick up from there.
TJF1960 Posted March 24, 2012 Posted March 24, 2012 satwar, just a thought. What type of browser are you using...Windows IE9 will not allow user/password in the address.
satwar Posted March 24, 2012 Author Posted March 24, 2012 Sorry for the delay but the rest part is working. I must have made a typo. Unfortunately I am still getting the confirm userid & password dialog box. Yes I see the problem about ie9, but I'm using Firefox. Microsoft does offer a patch to allow userid:password in the http path.
TJF1960 Posted March 24, 2012 Posted March 24, 2012 Try it without the port in the ip address such as: http://user:pass@192.168.0.165/rest/vars/set/1/1/50 This would set variable Integer #1 to 50, I just checked to verify and it is working with firefox here.
satwar Posted March 24, 2012 Author Posted March 24, 2012 It's working, after I used the microsoft fix 50642. I'm stuck with ie because I'm issuing the commands from a whs v1. It's using ie7, which also has the problem of not accepting Userid:Password@IPaddress in the http:// path. Thanks all for the help. I didn't expect results so soon.
Recommended Posts