Author Topic: Voxwav - Capture sending client ip  (Read 3314 times)

0 Members and 1 Guest are viewing this topic.

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Voxwav - Capture sending client ip
« on: March 19, 2015, 04:18:35 PM »
Is there a way to capture the sending client IP for use in scripts? If tabletA requested weather send url to tabletA etc... I am using autoremote URLs to receive commands and would like some VC commands to return information to a particular device even if I am outside the house.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav - Capture sending client ip
« Reply #1 on: March 19, 2015, 04:35:34 PM »
If you are using VoxWav then it does generate events of the form: TcpMic.WavReady which include the client IP as a payload.

But it doesn't really sound like you are using VoxWav despite your subject line.  Are you?

If not, how are you communicating with VoxCommando.  There are many ways.

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Voxwav - Capture sending client ip
« Reply #2 on: March 19, 2015, 07:13:44 PM »
Thanks for the quick answer, Yeah I am using voxwav as the mic input for VC. Using a VPN I can still use voxwav from outside the house I just can't get the TTS responses back, but if I could get the IP or Client names I can craft a response back using autoremote to reach the phone regardless of location.

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Voxwav - Capture sending client ip
« Reply #3 on: March 19, 2015, 09:30:45 PM »
Isn't the payload for an event {1}, how can you capture that to use inside another command?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav - Capture sending client ip
« Reply #4 on: March 19, 2015, 10:32:35 PM »
You can use the event to trigger a command that puts the payload into a variable.  Then you can use that variable later on in any command.

example:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<commandGroup open="True" name="Store last VoxWav IP" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="265" name="store voxwav ip" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>VoxWavIP</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>TcpMic.WavReady</event>
  </command>
  <command id="299" name="show last voxwav ip" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{var.VoxWavIP}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>show last voxwav ip</phrase>
  </command>
</commandGroup>
« Last Edit: March 19, 2015, 10:43:19 PM by nime5ter »

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Voxwav - Capture sending client ip
« Reply #5 on: March 20, 2015, 02:39:16 PM »
Thank you very much good sir, This will help a lot in my home automation integration.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav - Capture sending client ip
« Reply #6 on: March 21, 2015, 11:23:21 AM »
Thanks for the quick answer, Yeah I am using voxwav as the mic input for VC. Using a VPN I can still use voxwav from outside the house I just can't get the TTS responses back, but if I could get the IP or Client names I can craft a response back using autoremote to reach the phone regardless of location.

I just tested VoxWav pro with a remote VPN and TTS works perfectly.  In fact I was pleased to see how easy it was to set up VoxWav and how  well it worked.  Everything works exactly the same as using it on my LAN except for a slight delay (less than 1 second) when issuing voice commands.

TTS is not a feature of VoxWav free.  You would need to use the pro version for that.

I think there may be a problem with TTS on some devcies running Android 5.  Google likes to break TTS (among other things) with every new release of their OS and it is hard to keep up, especially since their emulators don't really work (no support for microphones or networking so useful for VoxWav), and I can't afford to buy a new phone for testing every 6 months.
« Last Edit: March 21, 2015, 11:26:00 AM by jitterjames »

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Voxwav - Capture sending client ip
« Reply #7 on: March 21, 2015, 10:06:22 PM »
yeah i already purchased VC and VW pro as i will be using them a lot. I was using a VPN at work and had issues with TTS but have not created a direct VPN to my firewall which I will be trying soon. So far I am loving both softwares and find the accuracy rate pretty high but I am still learning and figuring out better and better ways of doing things every day. TTS works fine when I am home and my home network has full access to work but I am not sure how well the broadcasts work. UDP doesn't like to traverse subnets very well without some hackery. Were you using a PPTP or IPSEC VPN?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav - Capture sending client ip
« Reply #8 on: March 21, 2015, 10:11:14 PM »
PPTP

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav - Capture sending client ip
« Reply #9 on: March 21, 2015, 10:13:52 PM »
My brother's office has an Asus RT N66U router that I installed for them.  It supports VPN so all I did was enable the VPN feature on the router, connected to it with my S2 from home.  I installed VoxCommando on one of the machines at the office and voilĂ .  Everything worked as if I was there.
« Last Edit: March 21, 2015, 10:16:17 PM by jitterjames »

batfasturd

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Voxwav - Capture sending client ip
« Reply #10 on: March 21, 2015, 10:48:39 PM »
Ahh, yeah that would make more sense. I use ipsec at work which is routed vs pptp being point to point. Difference is your device will pull an ip usually inside the endpoints network. It would be nice if vc and vw used tcp but socket programming is another beast. I am using vw and vc as a replacement for privacy invading things like Google voice searches or other tts and stt engines so I would love an always accessible option for vw and vc. I use it to get the weather, Control my home automation and a few others.