more G-Labs products

Author Topic: Control HG from command line or from other program  (Read 1514 times)

June 24, 2015, 03:36:27 PM
Read 1514 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
It is possible to control HG switches from the other program, or command line?
for example: https://packetsender.com/

I'd like to use Jarvis Mark II voice control software (http://jarvis.ai-dot.net/) to control my switches.

June 24, 2015, 04:34:04 PM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Yes, you have to look at the Api documentation : http://www.homegenie.it/docs/api/overview.html

Sample for switch on the ZWave switch Node 3 : 192.168.1.xxx/api/HomeAutomation.ZWave/3/Control.On

Cheers
Dani

June 24, 2015, 05:23:26 PM
Reply #2

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Can these web apis be added freely in our program code or are they limited to specific commands such as Control.On?  When I try to create my own in programs they don't seem to work.  The default ones I used as templates do seem to work correctly in the original program.

June 24, 2015, 09:32:21 PM
Reply #3

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
In browser running, but prompt asking for a username and password.
How can I enter a user name and password on the command line?


June 25, 2015, 07:06:01 AM
Reply #4

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
You'll need to send it as an HTTP request (from a browser):

http://10.1.1.205/api/...


June 25, 2015, 08:39:16 AM
Reply #5

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
With browser, works perfectly. This way I can control everything with my voice. (switches, lights, alarm, etc... without any controller)

Thank you for your help!

June 25, 2015, 01:37:36 PM
Reply #6

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Dani suggested this way of adding username/password to URL in another thread, maybe it will work from command line too:

http://admin:password@192.168.xxx.xxx/api/HomeAutomation.ZWave/3/Control.On

If that doesn't work directly you could try accessing it via a command line browser such as curl or wget http://wget.addictivecode.org/FrequentlyAskedQuestions?action=show&redirect=Faq#download.
« Last Edit: June 25, 2015, 01:44:41 PM by kevin1 »

June 25, 2015, 02:13:53 PM
Reply #7

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
I try...Unfortunately, this command is not working. (http://admin:[email protected]/api/HomeAutomation.ZWave/3/Control.On)
But with wget, works perfectly.

Thanks for the suggestion.