Author Topic: Pushing button on remote control to turn on Vox  (Read 1608 times)

0 Members and 1 Guest are viewing this topic.

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Pushing button on remote control to turn on Vox
« on: December 05, 2017, 08:24:23 PM »
I've set up ducking to turn on Vox by saying a prefix and it works well in quiet environments. I use Kodi and will soft mute while listening for my command. I'd like to do that by pressing the green media center button on my remote. I've read here that using eventghost can accomplish this but no other details. Is there a way to do this? I'm not familiar with eventghost.

Also, I got an Echo dot a few weeks ago and Vox blows it out of the water.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Pushing button on remote control to turn on Vox
« Reply #1 on: December 05, 2017, 08:34:06 PM »
Also, I got an Echo dot a few weeks ago and Vox blows it out of the water.

Thanks for that.  I agree completely!

I've set up ducking to turn on Vox by saying a prefix and it works well in quiet environments. I use Kodi and will soft mute while listening for my command. I'd like to do that by pressing the green media center button on my remote. I've read here that using eventghost can accomplish this but no other details. Is there a way to do this? I'm not familiar with eventghost.

You don't necessarily need Evenghost for this, but you definitely do need some kind of receiver device for whatever button you want to press.  So if it's an IR remote you need an IR receiver and if it's an RF remote you need an RF receiver.  Depending on what kind of receiver you use, you then need software that can generate an event that VC understands.  From that point on it's easy.

One option for an IR remote is an UUIRT (Universal Usb Infra Red Transceiver) which can send or receive IR signals.  This can be used with EventGhost or with VoxCommando directly.

Another option (IR or RF) is a Beam.  This works with VoxCommando directly.  I'm not sure if Kalle is still selling these or not.  Search our forum for Beam to find out more information.

There are are other options.  The least expensive (for IR) would be some kind of generic USB MCE IR receiver.  Then you definitely need EventGhost because they don't work directly with VoxCommando.  I could never find a decent library or API to work from in order to build an MCE plugin for VoxCommando.
« Last Edit: December 06, 2017, 07:47:11 AM by nime5ter »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 43
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #2 on: December 06, 2017, 01:54:43 AM »
you say that you are using Kodi, there is another option, if you already have your remote setup to work with kodi you can try the following

you can use Keymap Editor Kodi Addon to see if kodi sees your green media center button and if it does then you can find the button code for your green media center button.

then make sure you have the Voxcommando tools installed in kodi, (download "repository.vc.zip" at the bottom of jitterjames post) and install it in kodi

then edit your keymap.xml file in your kodi folder (C:\Users\USERNAME\AppData\Roaming\Kodi\userdata\keymaps)

you then need to setup an entry under global to look like this:

Code: [Select]
<h>XBMC.RunScript(script.voxtools,type=vcevent,data=Mic On</h>you will need to change <h> and </h> to your button code
and you will need to change Mic On to the event you want to use

then save the file and restart kodi and now your green media center button should trigger an event in kodi VoxCommando.

NOTE:  Voxcommando must be connected to Kodi in order for this to work
« Last Edit: December 06, 2017, 08:43:33 AM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #3 on: December 06, 2017, 05:28:40 AM »
Yes, I still sell the BEAM in a lot of variations (IR only, with IR/RF, different designs of the housing, ...).
You can write me a PM to ask me for details.


I will upload new pictures from the design here: http://voxcommando.com/forum/index.php?topic=2615.0


Kalle
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Pushing button on remote control to turn on Vox
« Reply #4 on: December 06, 2017, 08:05:12 AM »
Another low-rent option is to download and enable VC's Hook plugin and then use a mouse event.

A regular mouse click event is probably not a great option, but I have previously used the mouse wheel event for a similar purpose.

For me, this generates an event if I turn the mouse wheel a notch, which is not something I regularly need to do on the HTPC. I use a small wireless mouse.
« Last Edit: December 06, 2017, 08:08:00 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Pushing button on remote control to turn on Vox
« Reply #5 on: December 06, 2017, 08:07:01 AM »
I will upload new pictures from the design here: http://voxcommando.com/forum/index.php?topic=2615.0

Cool! Look forward to seeing the latest Beam designs.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #6 on: December 08, 2017, 11:11:00 AM »
Thanks for everyone's input. I'm familiar Kodi and keymaps so I followed the steps by Peg. I have followed your directions and a gen.xml was added to the keymaps folder. Here is my edit to the gen.xml file:

Code: [Select]
<?xml version="1.0"?>
-<keymap>
-<global>
-<keyboard>
<key id="1110230">runaddon(script.voxtools,type=vcevent,data=VC.On)</key>
</keyboard>
</global>
</keymap>

No events are happening in Vox, however. I must be doing something wrong lol.

Thanks!
« Last Edit: December 08, 2017, 07:19:55 PM by nime5ter »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 43
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #7 on: December 08, 2017, 11:15:12 AM »
Do you have the vc tools addon installed, and voxcommando connected to kodi?

And did you restart kodi after making changes to the keyboard.xml

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #8 on: December 08, 2017, 11:22:06 AM »
Hi,

Yes. In fact I decided to delete the gen file and start over using the keymap editor. I chose addons, then the vox tool and mapped the green button. After saving I hit the green button just for testing and got a message from the vox tool:

No parameters
VoxTools addon is called from VC. Don't run it from Kodi.

I'm guessing it's seeing Vox now. Here is the default gen file out. I didn't change anything:

<?xml version="1.0"?>

-<keymap>


-<global>


-<keyboard>

<key id="1110230">runaddon(script.voxtools)</key>

</keyboard>

</global>

</keymap>

I'm guessing something here needs to be change for Vox to send the event.

Thanks!

« Last Edit: December 08, 2017, 07:19:39 PM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Pushing button on remote control to turn on Vox
« Reply #9 on: December 08, 2017, 11:30:14 AM »
Is VoxCommando receiving other events from Kodi, such as when media starts and stops playing?

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #10 on: December 08, 2017, 11:48:33 AM »
Yes, all commands are working normally. Here's an example:

Code: [Select]
12/8/2017 9:40:47 AM 966 Action INFO:
12/8/2017 9:40:47 AM 966 [plugin] KODI onAnnouncement strAtomicRead: {"jsonrpc":"2.0","method":"Application.OnVolumeChanged","params":{"data":{"muted":false,"volume":66},"sender":"xbmc"}}
12/8/2017 9:40:47 AM 967 guessed text:Set ?? (Set Windows default audio output device)
12/8/2017 9:40:47 AM 968 guessed text:stop ?? (Vox Commands)
12/8/2017 9:40:47 AM 968 Something was recognized
12/8/2017 9:40:47 AM 968 Rulename: root # Semantics: 1
12/8/2017 9:40:47 AM 968 Group: Kodi Simple actions Speech: stop
12/8/2017 9:40:47 AM 968 semanticID: 338
12/8/2017 9:40:47 AM 968 kvp: command | 338
12/8/2017 9:40:47 AM 969 idle timer set for 5 seconds.
12/8/2017 9:40:47 AM 969 addHistoryItem [info] Timeout set for: 5(s)

12/8/2017 9:40:47 AM 971 semanticID: 338
12/8/2017 9:40:47 AM 971 kvp: command | 338
12/8/2017 9:40:47 AM 971 alternate:stop
12/8/2017 9:40:48 AM 6 doCommand:Stop playback
12/8/2017 9:40:48 AM 6 [plugin] Sending json request:
12/8/2017 9:40:48 AM 6 [plugin] {"jsonrpc": "2.0", "method": "GUI.ShowNotification", "params":{"title":"stop (90.3)","message":"(1 Stop playback) "},"id": "0"}
12/8/2017 9:40:48 AM 6 Action claims to be threadsafe.
12/8/2017 9:40:48 AM 6 action repeat set to: 1
12/8/2017 9:40:48 AM 6 Action:  XJson.Btn.KB
12/8/2017 9:40:48 AM 6 Param1:x
12/8/2017 9:40:48 AM 6 addHistoryItem [action] XJson.Btn.KB:x

12/8/2017 9:40:48 AM 7 Action from plugin: C:\Users\brian\Desktop\Vox\Plugins\XJson\XJson.dll
12/8/2017 9:40:48 AM 8 [plugin] {
  "id": "0",
  "jsonrpc": "2.0",
  "result": "OK"
« Last Edit: December 08, 2017, 12:52:33 PM by jitterjames »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 43
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #11 on: December 08, 2017, 11:56:07 AM »
Try using XBMC.RunScript instead of RunAddon, I'm not at my PC right now but I'll check when I get back to my PC

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Pushing button on remote control to turn on Vox
« Reply #12 on: December 08, 2017, 12:23:20 PM »
Try using XBMC.RunScript instead of RunAddon, I'm not at my PC right now but I'll check when I get back to my PC

That did the trick. Thanks so much!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Pushing button on remote control to turn on Vox
« Reply #13 on: December 08, 2017, 12:51:41 PM »
Yes, all commands are working normally. Here's an example:

Commands and events are two completely different things. Search the wiki for event.

http://voxcommando.com/mediawiki/index.php?title=Events
« Last Edit: December 08, 2017, 01:18:26 PM by jitterjames »