VoxCommando Forum

Help and Support (Using VoxCommando) => VoxCommando Basics and Core Features => Topic started by: crawfofd on July 03, 2014, 09:37:45 AM

Title: voxCommando via http
Post by: crawfofd on July 03, 2014, 09:37:45 AM
James, it's been awhile since I have been able to mess around with voxcommando but am getting back into it. Looking forward to ver 2 final.  
I wanted to know if VC could be sent events or actions through http. I have a program on my android (terRemote) that can send http. It is a program that sends to eventghost. What I am trying to do is bypass the eventghost and go directly to VC. The advantage to terRemote is that you can design your own screen with the controls that you want to use. I need this for my wife because she does not like using the voice control and when it gets to loud in the house it would be nice for control.
Sorry for the long question. Any help would be appreciated. Again love the program and the forum.
Title: Re: voxCommando via http
Post by: nime5ter on July 03, 2014, 10:15:11 AM
Until James has time to respond, here's the VoxCommando API entry from our documentation to get you started:

http://voxcommando.com/mediawiki/index.php?title=API_Application_Programming_Interface
Title: Re: voxCommando via http
Post by: nime5ter on July 03, 2014, 11:31:40 AM
I've just updated the documentation on that page a bit, by the way. Hopefully that will help.
Title: Re: voxCommando via http
Post by: jitterjames on July 03, 2014, 11:40:00 AM
That's pretty much everything you need to know.  You want to use the TCP plugin's "simple web server"

Make sure you use a port that is not already being used on your system.  Something like 8889 is probably OK.  I think you need to restart Vox after saving your TCP plugin settings for the simple web server to start.  Or you can use an action to create a server.

Create a server called VoxCommando in ter remote.  Use manual settings to specify the local IP address of your machine running VoxCommando.  

Example: 192.168.1.105

Then you can edit an action in terRemote to look something like the attached image.

Refer to the api link that Nime5ter posted above.

In my tests it seemed that terRemote  would crash if I tried to use spaces in my URL so until they fix that I guess you need to manually URL encode your URL so for spaces write %20 as in my example.
Title: Re: voxCommando via http
Post by: nime5ter on July 03, 2014, 12:02:42 PM
So, if you want to emulate a voice command, rather than an individual action, you could use the action VC.TellVox.

e.g.
http://192.168.0.105:8889/api/VC.TellVox&&ignore%20me
Title: Re: voxCommando via http
Post by: crawfofd on July 03, 2014, 02:45:56 PM
Thanks everyone for the quick response. I am going to look at the info and see what I can do.  Thanks again for the great forum participation.
Title: Re: voxCommando via http
Post by: crawfofd on July 06, 2014, 07:01:24 AM
Thanks everyone for your help.  I did get the terRemote working with voxcommando. I followed James and nime5ter recommendations. In terRemote set
type -> network/HTTP
server -> voxCommando
url  -> /api/VC.TriggerEvent&&event2trigger
port -> 8889
method -> get
variable -> none.
This works perfectly controlling my samsung tv using usb-uirt and a itach flex. As always great responsed on this forum and thanks James for a great program.
Title: Re: voxCommando via http
Post by: jitterjames on July 06, 2014, 10:23:27 AM
Glad to hear it.  Thanks for the update. :)