HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: baptist on August 13, 2014, 12:56:07 PM
-
Hi I'm trying to control the Security system by a WebServiceCallReceived...
http://192.168.1.10/api/HomeAutomation.HomeGenie.Automation/Control.On (http://192.168.1.10/api/HomeAutomation.HomeGenie.Automation/Control.On)
But I receive an error
{ 'ResponseValue' : 'ERROR: Array index is out of range. at HomeGenie.Automation.Scripting.ScriptingInstance+<RunCode>c__AnonStorey0.<>m__2 (System.Object args) [0x00000] in <filename unknown>:0 ' }
I'm using tasker on my android, and by using the 'RESTask plugin' I was trying to create different actions based on GPS location.
-
The correct syntax for an api call is:
/api/<domain>/<address>/<command>/<option_1>/.../<option_n>
so the program **address** is actually missing in the url you specified.
The correct call would be:
http://192.168.1.10/api/HomeAutomation.HomeGenie.Automation/90/Control.On (http://192.168.1.10/api/HomeAutomation.HomeGenie.Automation/90/Control.On)
Cheers,
g.
-
Many Thanks Gene.. Brilliant :)
-
Hi,
I want to do something like this :
/api/HomeAutomation.HomeGenie.Automation/90/Control.Level/
To have the status of alarm : "On" or "Off".
But with this request HG don't answer anything like i do wrong command like this :
/api/HomeAutomation.HomeGenie.Automation/90/Control.aaa/
Perhaps all the "commands" are not available with API .... Is it ?
Or is there a way to do ?
Bye
-
No it doesn't have all API, you will have to go into the source code of the alarm system and edit the API call section, search for Control.On and add your own commands under it.
cheers :)
-
Can this be used to query status of security system as well (armed or triggered back to Android/Tasker)?