HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: KaZe on June 24, 2015, 03:36:27 PM
-
It is possible to control HG switches from the other program, or command line?
for example: https://packetsender.com/ (https://packetsender.com/)
I'd like to use Jarvis Mark II voice control software (http://jarvis.ai-dot.net/ (http://jarvis.ai-dot.net/)) to control my switches.
-
Yes, you have to look at the Api documentation : http://www.homegenie.it/docs/api/overview.html (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
-
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.
-
In browser running, but prompt asking for a username and password.
How can I enter a user name and password on the command line?
-
You'll need to send it as an HTTP request (from a browser):
http://10.1.1.205/api/... (http://10.1.1.205/api/...)
-
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!
-
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 (http://wget.addictivecode.org/FrequentlyAskedQuestions?action=show&redirect=Faq#download).
-
I try...Unfortunately, this command is not working. (http://admin:[email protected]/api/HomeAutomation.ZWave/3/Control.On (http://admin:[email protected]/api/HomeAutomation.ZWave/3/Control.On))
But with wget, works perfectly.
Thanks for the suggestion.