Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - monkee

Pages: 1 [2] 3
16
Well, whatever works works, but going forward you may find it easier to maintain your configuration if you are consistent.  It's up to you.  When the next release is out you may want to switch all your commands over to using EventGhost.SendNP, otherwise I would suggest using the TCP plugin.

Thanks for the info and I was able to get everything working even better than my original goal.  Thank you so much!

17
You are just sending the recognized text.  VC does not know what to do when it receives just words.

You should be sending an action to tell it what to do just like you were apparently doing before.

Yep, that's what I meant by VC needing to be "spoken to", haha.  I didn't realize I could still use VC.TellVox along with TCP.UDP.SendMixed but your solution worked great, thank you so much!! 

Would you suggest I change my other actions, even thought they are working, to use this method instead of the EventGhost... method I was using?  I only had a problem with the ones with payloads.

Thanks again!

Quote
We must use /x26/x26 instead of && because you can't put && in a parameter.

18
Thanks for the responses and also for adding a new feature in the future!  Do you have an approximate timeline for that release?

And OK I will start posting the code in the future too.  I didn't realize you could copy it right from the tree without digging out the xml file.  Thanks for the tip!

I tried using TCP.UDP.SendMixed instead of the Eventghost.Xxx commands and it arrives but shows a yellow bar in the history and does not trigger anything.  I think VC may need the phrase "spoken" to it in this case instead of sent as a pre-formed phrase, if that makes sense?

In any case, the code is below and I think I got the timer code from a post here but it's been a while.

Thanks!

Here is the code from the main computer:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.9-->
<command id="712" name="timer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{2}&amp;&amp;seconds</ifParams>
    <then>
      <action>
        <cmdType>VC.SetEventTimer</cmdType>
        <params>
          <param>{1}s</param>
          <param>alarmsound</param>
          <param>{1}</param>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{2}&amp;&amp;minutes</ifParams>
    <then>
      <action>
        <cmdType>VC.SetEventTimer</cmdType>
        <params>
          <param>{1}m</param>
          <param>alarmsound</param>
          <param>{1}</param>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{2}&amp;&amp;hours</ifParams>
    <then>
      <action>
        <cmdType>VC.SetEventTimer</cmdType>
        <params>
          <param>{1}h</param>
          <param>alarmsound</param>
          <param>{1}</param>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>Sound.PartialMute</cmdType>
    <params>
      <param>60</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>300</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>Reminder set for {1} {2}.</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>Tea minus {1} {2} and counting. | Reminder set for {1} {2}.</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Sound.PartialUnMute</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>set an alarm, set a timer, set a reminder, remind me</phrase>
  <phrase>in, for</phrase>
  <payloadRange>1,120</payloadRange>
  <payloadList>seconds, minutes, hour, hours</payloadList>
</command>

And from the secondary computer:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.9-->
<command id="418" name="timer test send" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>EventGhost.SetIP</cmdType>
    <params>
      <param>192.168.1.12</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>EventGhost.SetPort</cmdType>
    <params>
      <param>33000</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>EventGhost.Send</cmdType>
    <params>
      <param>VC.TellVox</param>
      <param>{LastSpoken}</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>TCP.UDP.SendMixed</cmdType>
    <params>
      <param>{LastSpoken}</param>
      <param>33000</param>
      <param>192.168.1.12</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase optional="true">Computer</phrase>
  <phrase>set an alarm, set a timer, set a reminder, remind me</phrase>
  <phrase>in, for</phrase>
  <payloadRange>1,120</payloadRange>
  <payloadList>seconds, minutes, hour, hours</payloadList>
</command>

19
RegEx (Regular Expressions) / Re: Working with two Match.1.1's
« on: December 30, 2016, 03:16:54 PM »
I guess instead of {LastResult} you could just insert your formula. Did you try that? E.G.:

Code: [Select]
PY.ExecString  result=round({var.Name1}*{var.Name2}, 2)

Wow! Thank you both! 

The above technique worked perfectly.  I didn't even think of rounding in the math section I already had, duh!  In fairness, I only figured out you could do math in VC 2 days ago :)  This was a very clean solution (unlike most of what my commands look like, haha).  I should be able to apply this to several other commands that involve numbers too.  I can't wait to try.

This stuff is very fun to learn so thank you for the help when I get stuck :)

20
Hi, I'm doing something wrong and would love some help figuring out how to fix it.  Thanks in advance for taking a look!

I'm attempting to use VoxCommando on two different PCs and using this technique: http://voxcommando.com/forum/index.php?topic=1050.msg8790#msg8790

EventGhost.SetIP   - 192.x.x.x
EventGhost.SetPort - 33000
EventGhost.Send    - VC.TellVox - xyz

(sends to VC not EventGhost)

It is working fine for all of my commands EXCEPT for the ones which contain Payloads.  On those, I cannot replace xyz above with their exact phrase because there are variables (payloads) in the phrase. 

I've tried a few things and when using "VC.Tellvox - {lastspoken}", the payloads are being correctly added to the message sent to the other PC but they are being duplicated and appended to the end of the command so the receiving PC's VoxCommando sees the payloads twice, like below.

Example (window of receiving VoxCommando):
emulate: Set a timer for 2 minutes&&2&&minutes

This will not allow the receiving PC to recognize the phrase :(

Is there a way to strip that appended payload (&&2&&minutes) from the command before it is sent?

Thanks so much for taking a look at this :)

21
RegEx (Regular Expressions) / Re: Working with two Match.1.1's
« on: December 29, 2016, 09:33:34 PM »
Thank you SO much!  I knew i was doing it incorrectly and thanks to your post I got it working!  My python math is working too :)  The only issue I am seeing is that there are many decimal places after doing the math.  Do you know how I can limit my result to only two decimal places (99999.99 instead of 99999.99999)?  I don't care about rounding, I'm happy to just cut the extras off :)

Thanks again, this is a great forum :)

22
RegEx (Regular Expressions) / Working with two Match.1.1's
« on: December 29, 2016, 07:31:11 PM »
Hi, I'm having an issue getting RegEx to do what I want and would love some advice.

I'm basically trying to scrape numbers from two different websites and add them together.  The issue I'm having is that when I scrape the second site, the results in Match.1.1 are replaced when RegEX scrapes the second site.  I need to be able to use both matches from both scrapes at the same time.  How do I rename or set the first Match.1.1 as a variable?  I've tried MANY different things but obviously not the right one yet!  My problem when trying to set the result as a variable using {lastresult} is that lastresult is the full scrape and not the RegEX'd Match.1.1.

Thanks in advance!

23
Other Plugins / Re: Audio.Play parameter not working for me
« on: December 28, 2016, 07:56:55 PM »
It works.  It was apparently user error :)

I used Audio.Play with the copy/pasted name and we're all good!  Thank you or your time and help!!

24
Other Plugins / Re: Audio.Play parameter not working for me
« on: December 28, 2016, 07:47:23 PM »
Thanks for the fast response :)

I'm using v. 2.2.2.9 and it's a USB speaker, not bluetooth actally.  I tried both by number (had to guess the numbers) and by name but the name (when I copy it from the Audio Plugin preferences drop-down) contains a lot of extra spaces, including trailing ones, so I thought that may have been the problem.  The USB speaker, however, does not have a number assigned to it in the Audio Plugin's preferences or in Windows 7's "Playback Devices" details.  Some audio outputs do (like my receiver) but the USB Speaker (and others) have no number next to it.  So that may be an issue too?

No matter what I set it to (name or number), the audio goes to my receiver over HDMI.  If the output name/number specified is wrong, is the audio supposed to revert back to the default windows output device (or the one specified in the Audio Plugin's dialogue)?

Another thing I noticed was that in the Audio Plugin's drop down, if I select the USB speaker as the default, all sounds still only go out over HDMI to my receiver.  I believe that should force streaming audio through Vox to also use the USB speaker, not my HDMI.  Am I correct? 

Edit:  this was using PlayWav.  I'm trying Audio.Play now but getting no sound at all as of yet using that.  It is a WAV file, by the way

25
Other Plugins / Re: Audio.Play parameter not working for me
« on: December 28, 2016, 04:57:06 PM »
Hi, sorry to revive an old thread but I didn't see the notification and I just encountered the same problem again (still). 

I read in another thread that the audio plugin was broken.  Is that still the case with 2.2.2.9?  Is it possibly fixed in the beta?

Thanks!

Edit: Windows 7

26
Other Plugins / Re: TTS.Speak pronunciation issue in VC (Ivona voice)
« on: June 19, 2016, 11:01:19 PM »
Thanks, I'll give that a shot and let you know!

27
Other Plugins / Audio.Play parameter not working for me
« on: June 19, 2016, 10:59:21 PM »
Hi, I'm having an issue using either Audio.Play or Audio.SetOutputNum to play a .WAV file over a non default USB speaker.  I do have the Audio plugin installed and it is set to use my system default audio device (HDMI). 

The name of the audio device I put in the Audio.Play parameter is "Speaker (USB Audio  )" I also tried just "Speaker".  With Audio.SetOutputNum I tried numbers 1-5 and tried using Sound.PlayWav or Audio.Play just below it.  I get no audio from the USB speaker but no matter what number I put I get the audio from the default device. 

Any ideas what I might be doing wrong??

28
Ok, variables are pretty useful.  They'll come in handy for other things in my setup too.  Thanks for pointing me in the right direction! 

Now I'm using variables instead of disabling the folders and it's a bit cleaner.  I added a command to set the variable to enable autolocking when VC loads and also start the 20 min timer, so on reboot/crash it'll default back to enabled and then lock in 20 minutes if unlocked.  I'll look into the better timer options but this should do for now.  The map DB sounds useful too... another thing for me to learn about when I have some time!

Here is the new version:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands version="2.2.2.0" space="preserve" date="6/19/2016 12:00:00 AM">
    <groupCollection open="True" name="mine">
        <commandGroup open="True" name="vera" enabled="True" prefix="" priority="0" requiredProcess="" description="">
            <command id="505" name="disable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <if ifBlockDisabled="False" ifNot="False">
                    <ifType>(A)==(B)</ifType>
                    <ifParams>{var.autolock}&amp;&amp;disabled</ifParams>
                    <then>
                        <action>
                            <cmdType>TTS.Speak</cmdType>
                            <params>
                                <param>Autolocking is already disabled.</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </then>
                    <else>
                        <action>
                            <cmdType>Results.SetVar</cmdType>
                            <params>
                                <param>autolock</param>
                                <param>disabled</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                        <action>
                            <cmdType>TTS.Speak</cmdType>
                            <params>
                                <param>Auto door locking has been disabled.</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                        <action>
                            <cmdType>VC.SetEventTimer</cmdType>
                            <params>
                                <param>24h</param>
                                <param>24hrrestart</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </else>
                </if>
                <phrase>disable autolock, disable auto door lock</phrase>
            </command>
            <command id="528" name="enable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <if ifBlockDisabled="False" ifNot="False">
                    <ifType>(A)==(B)</ifType>
                    <ifParams>{var.autolock}&amp;&amp;enabled</ifParams>
                    <then>
                        <action>
                            <cmdType>TTS.Speak</cmdType>
                            <params>
                                <param>Autolocking is already enabled.</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </then>
                    <else>
                        <action>
                            <cmdType>Results.SetVar</cmdType>
                            <params>
                                <param>autolock</param>
                                <param>enabled</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                        <action>
                            <cmdType>TTS.SpeakSync</cmdType>
                            <params>
                                <param>Auto door locking has been enabled.</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                        <action>
                            <cmdType>VC.TriggerEvent</cmdType>
                            <params>
                                <param>start timer</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </else>
                </if>
                <phrase>enable autolock, enable auto door locking</phrase>
            </command>
            <command id="596" name="enable autolock no voice 24hr" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>VC.TriggerEvent</cmdType>
                    <params>
                        <param>lockdoor</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>Results.SetVar</cmdType>
                    <params>
                        <param>autolock</param>
                        <param>enabled</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <event>24hrrestart</event>
            </command>
            <command id="536" name="lock the door" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Vera.Get.LockStatus</cmdType>
                    <params>
                        <param>9</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <if ifBlockDisabled="False" ifNot="False">
                    <ifType>(A)==(B)</ifType>
                    <ifParams>{LastResult}&amp;&amp;1</ifParams>
                    <then />
                    <else>
                        <action>
                            <cmdType>Vera.Toggle</cmdType>
                            <params>
                                <param>9</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </else>
                </if>
                <event>lockdoor</event>
            </command>
            <command id="591" name="start timer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <if ifBlockDisabled="False" ifNot="False">
                    <ifType>(A)==(B)</ifType>
                    <ifParams>{var.autolock}&amp;&amp;enabled</ifParams>
                    <then>
                        <action>
                            <cmdType>VC.SetEventTimer</cmdType>
                            <params>
                                <param>20m</param>
                                <param>lockdoor</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </then>
                    <else />
                </if>
                <event>Vera1.DoorLock.9.Open</event>
                <event>start timer</event>
            </command>
            <command id="592" name="enable 20 min autolock on boot" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Results.SetVar</cmdType>
                    <params>
                        <param>autolock</param>
                        <param>enabled</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>VC.TriggerEvent</cmdType>
                    <params>
                        <param>start timer</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <event>VC.Loaded</event>
            </command>
        </commandGroup>
    </groupCollection>
</VoiceCommands>

And thank you all!

29
Thanks to both of you.  I'll check out variables now and let you know how it turns out.  As jitterjames said, I do use disable groups/enable exclusive in eventghost so that my "pause" button will pause VLC, SageTV, etc. depending on what is active.  And yes, SageTV is still awesome, now open sourced and free too :)  I know Kodi has much better VC integration but I just always go back to SageTV.

I was already planning to look up what would happen with my timer if I restarted the PC so you saved me some time.  I figured I may have to use the task scheduler but will also check out your solution, PegLegTV.

Thanks!

30
Well, that would explain why I couldn't figure out how to do it, haha.  This will be difficult to explain clearly but I'll try!  There are likely better ways to do what I'm trying to do too but here goes.

My smart door lock has an autolock feature but the built in time delay is not long enough and also I want the ability to easily (by voice) to disable or re-enable the autolocking feature (think repairmen going in/out on a certain day).  I disabled the integrated autolocking and decided to have VC do the autolocking instead.

The lock sends VC a code every time it is unlocked (manually,by voice, by timer, etc.).  I'm using that code to trigger a 20 minute timer, a the end of which, the lock is polled and, if still unlocked, it will be locked. 

In order to disable auto-locking, I put the command that detects the code the door sends when unlocked (and starts the timer) in a folder that is disabled when I say "disable autolocking".  [I also have the "disable autolocking" command set to lock the door and re-enable that folder (and thus autolocking) after 24 hours in case I forget to re-enable it by voice but that shouldn't matter in this discussion.]

This is all working flawlessly BUT, to be perfect, I also want to be able to detect if autolocking is currently disabled or enabled.  As it is now, if I say "disable autolocking" VC responds with "disabling autolocking", however, if I say "disable autolocking" again a minute later, VC will again respond with "disabling autolocking" even though it is already disabled.  I was planning to just detect if that folder was enabled or disabled to use in IF/THEN logic to have VC respond "autolocking is already disabled" if the folder is disabled.

I hope that makes sense and I can probably figure out another way to do it but I was assuming I could just detect the enabled/disabled status of the folder. 

I've include the relevant working (but unfinished) code in case it helps.

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands version="2.2.2.0" space="preserve" date="6/19/2016 12:00:00 AM">
    <groupCollection open="True" name="mine">
        <commandGroup open="True" name="vera" enabled="True" prefix="" priority="0" requiredProcess="" description="">
            <command id="505" name="disable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Group.Disable</cmdType>
                    <params>
                        <param>auto door lock</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>TTS.Speak</cmdType>
                    <params>
                        <param>Auto door locking has been disabled.</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>VC.SetEventTimer</cmdType>
                    <params>
                        <param>24h</param>
                        <param>24hrrestart</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <phrase>disable autolock, disable auto door lock</phrase>
            </command>
            <command id="528" name="enable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Group.Enable</cmdType>
                    <params>
                        <param>auto door lock</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>TTS.SpeakSync</cmdType>
                    <params>
                        <param>Auto door locking has been enabled.</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>VC.TriggerEvent</cmdType>
                    <params>
                        <param>lockdoor</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <phrase>enable autolock, enable auto door locking</phrase>
            </command>
            <command id="596" name="enable autolock no voice 24hr" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Group.Enable</cmdType>
                    <params>
                        <param>auto door lock</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>VC.TriggerEvent</cmdType>
                    <params>
                        <param>lockdoor</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <event>24hrrestart</event>
            </command>
        </commandGroup>
        <commandGroup open="True" name="auto door lock" enabled="True" prefix="" priority="0" requiredProcess="" description="">
            <command id="534" name="lock the door" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Vera.Get.LockStatus</cmdType>
                    <params>
                        <param>9</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <if ifBlockDisabled="False" ifNot="False">
                    <ifType>(A)==(B)</ifType>
                    <ifParams>{LastResult}&amp;&amp;1</ifParams>
                    <then />
                    <else>
                        <action>
                            <cmdType>Vera.Toggle</cmdType>
                            <params>
                                <param>9</param>
                            </params>
                            <cmdRepeat>1</cmdRepeat>
                        </action>
                    </else>
                </if>
                <event>lockdoor</event>
            </command>
            <command id="580" name="start timer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>VC.SetEventTimer</cmdType>
                    <params>
                        <param>20m</param>
                        <param>lockdoor</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <event>Vera1.DoorLock.9.Open</event>
            </command>
        </commandGroup>
    </groupCollection>
</VoiceCommands>

Thanks!

Pages: 1 [2] 3