more G-Labs products

Author Topic: webapi for security system?  (Read 1046 times)

December 10, 2015, 09:06:08 PM
Read 1046 times

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Trying to figure out the URL to ARM/DISARM security system via webapi.  I'd like to make a cellphone shortcut for this which would be quicker than loading HG site.  This doesn't seem to work, not sure what the Program.Module.Domain should be HomeGenie.SecuritySystem? Then Program.Module.Address ==PID==90?

http://<IP>/api/HomeGenie.SecuritySystem/90/Control.ArmHome

Thanks!

December 10, 2015, 09:41:34 PM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can look at the source code of the widget.

You can try :
http://<IP>/api/HomeGenie.HomeAutomation/90/Control.ArmHome
« Last Edit: December 10, 2015, 09:51:11 PM by dani »

December 11, 2015, 06:31:23 AM
Reply #2

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,
I use this one :
http://<your HG IP address>:<your HG port>/api/HomeAutomation.HomeGenie.Automation/90/Control.On/

http://<your HG IP address>:<your HG port>/api/HomeAutomation.HomeGenie.Automation/90/Control.Off/

December 11, 2015, 01:28:16 PM
Reply #3

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
In the code it looks like Control.On will do same as Control.ArmAway... and Off same as Disarm.

Thanks this works for me too:
http://<IP>/api/HomeAutomation.HomeGenie.Automation/90/Control.Disarm

From the code it looks like we need these fields, in this order to parse correctly:

    <domain>/<address>/<pid>/<command>

<domain>=HomeAutomation.HomeGenie.Automation  (how do you find this?)
<address>=????   (how does it parse correctly without this? adding it with a "1" fails)
<pid>=90
<command>=Control.Disarm

Thanks again!!!