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 - yokel

Pages: [1] 2
1
XML Exchange / Re: InControl HA Command Collection
« on: June 25, 2016, 07:51:20 PM »
Good, I'm glad the setup was painless. 

2
Other Plugins / Re: TTS Windows 10 Eva voice [SOLVED]
« on: August 18, 2015, 11:07:32 AM »
Im probably wrong then.  Just thought it was the cortana voice.

3
Other Plugins / Re: TTS Windows 10 Eva voice [SOLVED]
« on: August 18, 2015, 12:24:33 AM »
I've never actually tried TTSMS.  Didn't really know what the difference was between the two.  Now that i try to load the TTSMS plugin it throws errors on load & can't get it loaded into commands.  Both win 8.1 & 10.  So, I can't say if it sounds better.  It's the new Cortana voice, just thought i'd try something new.  It sounds better to my ear than David or Zira do.  There's also a new Mark voice that i'm working on unlocking. 

4
Other Plugins / TTS Windows 10 Eva voice [SOLVED]
« on: August 17, 2015, 07:44:34 PM »
I came across this reg tweak to unlock the Eva voice within windows 10: http://wind8apps.com/unlock-new-text-to-speech-voice-windows-10/.  Only problem is it shows up as a mobile name & not accessible to VC.  Screenshot attached shows how it shows up in Win 10 tts settings.  I was wondering if it would be possible to work it into VC somehow?


Okay, so i played around with the registry & was able to get it working with VC.  Here's a link to the tweak if anyone wants to try it. 

Warning: This is a registry tweak.  It works for me but i take no reponsibility if it borks something up for you.

Tweak:
https://www.dropbox.com/s/iwodppgx4hvz6nk/Microsoft%20Eva%20Desktop.reg?raw=1


5
Google seems to have killed this with a captcha.

6
XML Exchange / Re: InControl HA Command Collection
« on: August 13, 2015, 01:47:44 AM »
I've never used a vera, so can't really comment.  I know there are several people who have tried various controllers over on the InControl forums.  I would pose that question there.  I've been happy with IC though.  It works well with VC.  I went the windows route mainly because my server controls everything in my house.  I like having one box in a closet apposed to fifteen appliances scattered around the house.  Your not going to save a lot of money going with IC over the Veralite.  I believe an IC license is $70 US. 

7
I know a dev that recently got accepted to the echo program.  This is how third party developers have to phrase things.  Hey Alexa, tell X app to do X command to X device name.  I don't have high hopes of them ever allowing this device to becoming anything more than a glorified egg timer. 

8
XML Exchange / Re: InControl HA Command Collection
« on: June 24, 2015, 06:59:54 PM »
True that.  I just meant if you were looking to give a windows based controller a whirl.

9
XML Exchange / Denon Receiver Command Collection
« on: June 24, 2015, 05:54:02 AM »
Another Sorta Plugin.  This should control any lan/wifi Denon(maybe even marantz) receiver.  I've only tested on a Denon AVRS700W's though.  Most of these receivers have multiple inputs, so the voice commands are kinda geared with that in mind.  Another note, when selecting inputs in Zone 2+ Some inputs won't register.  This is because Zone 2 is allowed a smaller pool of inputs to choose from by design.  The raise volume command is currently only setup for zone 1, i'm working on figuring out the best practice for the logic on that. 

Install:

  • Copy/paste the code here into VC:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<groupCollection open="False" name="Denon Receiver">
  <commandGroup open="False" name="Denon Setup" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="679" name="Denon Setup (input your ip:port &amp; run once)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>File.MakeDir</cmdType>
        <params>
          <param>{Path.VC}\Denon payloads</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Map.Set</cmdType>
        <params>
          <param>DenonSetup</param>
          <param>Denon</param>
          <param>http://yourIP:YourPort(typically port 80)</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Map.ExportPayloadXML</cmdType>
        <params>
          <param>{Path.VC}\Denon payloads\Denon.xml</param>
          <param>Denon_Receiver</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Map.ExportPayloadXML</cmdType>
        <params>
          <param>{Path.VC}\Denon payloads\Denon_Inputs.xml</param>
          <param>Denon_Receiver_Inputs</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </command>
    <command id="502" name="Get Zone 2" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>Scrape.XML</cmdType>
        <params>
          <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Zone 2}</param>
          <param>ZonePower</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>power</param>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape.XML</cmdType>
        <params>
          <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Zone 2}</param>
          <param>MasterVolume</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>mastervolume</param>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape.XML</cmdType>
        <params>
          <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Zone 2}</param>
          <param>InputFuncSelect</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>input</param>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape.XML</cmdType>
        <params>
          <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Zone 2}</param>
          <param>FriendlyName</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>DenonName</param>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{var.DenonName} is Currently {var.power} the volume level is {var.mastervolume} the input is set to {var.input}.  </param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{var.DenonName} Zone 2{CR} Power: {var.power}{CR}Volume: {var.mastervolume}{CR}Input: {var.input}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <event>GetZone2</event>
    </command>
  </commandGroup>
  <commandGroup open="False" name="Denon" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="454" name="Get Zone 1 or 2  States" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)Contains(B)</ifType>
        <ifParams>{1}&amp;&amp;1</ifParams>
        <then>
          <action>
            <cmdType>Scrape.XML</cmdType>
            <params>
              <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Main Zone}</param>
              <param>ZonePower</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>power</param>
              <param>{Match.1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Scrape.XML</cmdType>
            <params>
              <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Main Zone}</param>
              <param>MasterVolume</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>mastervolume</param>
              <param>{Match.1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Scrape.XML</cmdType>
            <params>
              <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Main Zone}</param>
              <param>InputFuncSelect</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>input</param>
              <param>{Match.1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Scrape.XML</cmdType>
            <params>
              <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Main Zone}</param>
              <param>FriendlyName</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>DenonName</param>
              <param>{Match.1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>TTS.Speak</cmdType>
            <params>
              <param>{var.DenonName} Zone 1 is Currently {var.power} the volume level is {var.mastervolume} the input is set to {var.input}.</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>OSD.ShowText</cmdType>
            <params>
              <param>{var.DenonName} Zone 1{CR} Power: {var.power}{CR}Volume: {var.mastervolume}{CR}Input: {var.input}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>VC.TriggerEvent</cmdType>
            <params>
              <param>GetZone2</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <phrase>What is</phrase>
      <phrase optional="true">the</phrase>
      <phrase>Receiver's,Denon's</phrase>
      <payloadList>Zone 1,Zone 2</payloadList>
      <phrase optional="true">Current</phrase>
      <phrase>state,settings</phrase>
    </command>
    <command id="494" name="Power {1} to {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)Contains(B)</ifType>
        <ifParams>{1}&amp;&amp;2</ifParams>
        <then>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>currentZone</param>
              <param>{M:Denon_Receiver.Zone 2}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>currentZone</param>
              <param>{M:Denon_Receiver.???}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)==(B)</ifType>
        <ifParams>{2}&amp;&amp;On</ifParams>
        <then>
          <action>
            <cmdType>Scrape</cmdType>
            <params>
              <param>{M:DenonSetup.Denon}{M:Denon_Receiver.On}{var.currentZone}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>Scrape</cmdType>
            <params>
              <param>{M:DenonSetup.Denon}{M:Denon_Receiver.Off}{var.currentZone}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <phrase>Turn</phrase>
      <phrase>Receiver,Denon,Amp</phrase>
      <payloadList>Zone 1,Zone 2</payloadList>
      <payloadList>On,Off</payloadList>
    </command>
    <command id="508" name="Set {1} Input to {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)Contains(B)</ifType>
        <ifParams>{1}&amp;&amp;2</ifParams>
        <then>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>currentZone</param>
              <param>{M:Denon_Receiver.Zone 2}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>currentZone</param>
              <param>{M:Denon_Receiver.???}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <action>
        <cmdType>Scrape</cmdType>
        <params>
          <param>{M:DenonSetup.Denon}{2}{var.currentZone}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>Set,Change</phrase>
      <phrase>Receiver,Denon,Amp</phrase>
      <payloadList>Zone 1,Zone 2</payloadList>
      <phrase>Input,source</phrase>
      <phrase optional="true">to</phrase>
      <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">Denon payloads\Denon_Inputs.xml</payloadFromXML>
    </command>
    <command id="92" name="raise/lower Volume % from current level" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>Scrape.XML</cmdType>
        <params>
          <param>{M:DenonSetup.Denon Scrape}{M:Denon_Receiver.Scrape Main Zone}</param>
          <param>MasterVolume</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>DenonCurrentVol1</param>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result=80{Var.DenonCurrentVol1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>DenonCurrentVol1</param>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result={Var.DenonCurrentVol1}*{1}/100</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)==(B)</ifType>
        <ifParams>{LastResult}&amp;&amp;1</ifParams>
        <then>
          <action>
            <cmdType>Results.SetLastResult</cmdType>
            <params>
              <param>1</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType />
            <params />
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)Contains(B)</ifType>
        <ifParams>{LastSpoken}&amp;&amp;lower</ifParams>
        <then>
          <action>
            <cmdType>PY.ExecString</cmdType>
            <params>
              <param>result={Var.DenonCurrentVol1}-{1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>PY.ExecString</cmdType>
            <params>
              <param>result={Var.DenonCurrentVol1}+{1}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>(A)&lt;(B)</ifType>
        <ifParams>80&amp;&amp;{LastResult}</ifParams>
        <then>
          <action>
            <cmdType>Results.SetLastResult</cmdType>
            <params>
              <param>80</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>OSD.ShowText</cmdType>
            <params>
              <param>Volume has reached the highest level.</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else />
      </if>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>DenonCurrentVol1</param>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result={Var.DenonCurrentVol1}-80</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>DenonCurrentVol1</param>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape</cmdType>
        <params>
          <param>{M:DenonSetup.Denon}{M:Denon_Receiver.Set Volume}{var.DenonCurrentVol1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>raise, lower</phrase>
      <phrase>Receiver,Denon,Amp</phrase>
      <phrase>volume</phrase>
      <payloadList>0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100</payloadList>
      <phrase optional="true">percent</phrase>
    </command>
  </commandGroup>
</groupCollection>
  • Convert the two attached xml databases to Maps(open the map editor, then import the xml's)
  • Open the Denon Setup Command.  Replace this string "http://yourIP:YourPort(typically port 80) with your Receiver's ip:port. Run the command once

Commands should then work. 

Currently commands:
Get Zone States
Set Zone {1} to {2}
Set Zone {1} Input to {2}
Raise/lower volume {1} percent(Zone1 only right now)

10
XML Exchange / Re: InContral HA Plugin (Sorta)
« on: June 23, 2015, 11:10:03 PM »
James, you don't.  You can setup as many virtual devices & types as you'd like.  The VC parts wil run just fine with only virtual devices & scenes.  There are IC plugins for Hue,Sonos,Wemo,Nest As well you could use.  However; none of the plugins have free trials. 

11
This collection is basically a plugin for InContol Home Automation sotware(similar to Veralite). IDK if anyone here uses it but, it runs on Windows & has a free trial http://incontrolha.com.  It uses Aoenlabs Zstick for it's zwave controller http://www.amazon.com/Aeon-Labs-DSA02203-ZWUS-Z-Wave-Z-Stick/dp/B003MWQ30E

Initial setup:
  • Open the InControl setup folder & open the Set User .Variable Macro.  Replace the "yourip" ("in this string" {http://yourIP:1178)} with your InControl host ip adress
  • Replace "yourPassword" with your InControl password
  • Run the command once

Current commands available:

Generate Device List
Generate Scene list
Set Device {1} to {2}
Set Device {1} level to {2}
Set thermostat Setpoint to (1)
Activate Scene {1}
What Is device {1} current state

I updated this quite a bit:
Generates these payload xml's on setup now.
Battery Status.xml
Rooms.xml
Rooms associated devices.xml
ThermostatMode.xml

The Main devices are now split off into two categories:
True Devices(Actual Switches,Outlets) &
Virtual Devices(Virtual weather & other devices)

There are also a couple of Device type.xml's.  Those don't do anything right now, i plan on using them to cross match with the Device ID & Room ID xml's.  That way I can separate devices based on type & room.  If anyone knows a good way to cross match xml's within VC, speak up. 

Added Commands:
Activate Scene by ID (This is more reliable as it's not affected by scene name changes)
What's the battery status of {1}
Thermostat Set {1} to Mode {2}
Thermostat Set {1} to Fan Mode {2}

Another note: you may have to flip some of your phrase/values around on some of the xml's.  When i tried setting the regex command to do it, it would stop returning results after 15 or so.  Even though the regextool was returning 64.  Not really sure what is going on there. It may work fine for you.






12
iTunes / Re: iTunes get/set volume?
« on: June 15, 2015, 09:56:31 AM »
That's exactly what i did.  It's posted here now.  http://voxcommando.com/forum/index.php?topic=2216.msg19164#msg19164

13
XML Exchange / iTunes mini web player
« on: June 15, 2015, 09:51:29 AM »
I know there probably aren't a lot of iTunes users here but it's easily adaptable to your preferred software.  Only caveat here is the file structure of you media library.  It's pulling the jpegs directly from the album folder where your music resides.  My folder structure is as follows, if yours is different you'll need to change the regex a little to get the album art pulling correctly.  Music\Mp3 Official Release\{Genre}\{Artist}\{Artist} - {Album}\{Artist} - {Album}.jpg .  If your music is tagged well, Mp3tag works quite quickly at pulling cover art out to the appropriate filename.  http://download.mp3tag.de/mp3tagv270setup.exe .

Thanks to Kalle for helping me out with the volume controls. 

Necessary plugings: TCP(with webserver on), Robo Browser, Python

Unzip the attached html.zip to your VC\plugins\TCP folder(it's okay to overwrite, all original files are included)

Update: In my haste I forgot to mention that you'll need to change the html references to your ip:port in iTunes.html.  There is one regEx reference to your ip:port in the iTunes is paused macro to change also.  I'm setting up a variable for ip:port now, so in the future you'll just have to enter it once.  I cleaned up some junk i left behind too.  Right now i'm adding zone controls & a volume visualizer.  I added a screenshot of that. 

Paste this into VC:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<commandGroup open="False" name="iTunes Mini Player" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="521" name="Get iTunes currently playing info" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.GetArtist</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>Artist</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>iTunes.GetAlbum</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>Album</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>iTunes.GetSongTitle</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>Title</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>iTunes.GetYear</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>year</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>iTunes.GetGenre</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>genre</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>iTunes.playing</param>
        <param>{var.Artist}</param>
        <param>{var.Album}</param>
        <param>{var.Title}</param>
        <param>{var.year}</param>
        <param>{var.genre}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes.Play</event>
  </command>
  <command id="559" name="iTunes Now Playing Pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Enable last action if you want the forecast read aloud as well.&#xD;&#xA;">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>ip</param>
        <param>192.168.1.11:1313</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>iTunes</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Read</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes.html</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(&lt;span id="Name"&gt;)Artist(&lt;/span&gt;)</param>
        <param>&lt;span id="Name"&gt;{var.Artist}&lt;/span&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(&lt;img src=)"kw.gif" (name="CD")</param>
        <param>&lt;img src="F:\Music\Mp3 Official Release\{var.genre}\{var.Artist}\{var.Artist} - {var.Album}\{var.Artist} - {var.Album}.jpg" name="CD"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(id="Track"&gt;)Song title(&lt;/div&gt;)</param>
        <param>id="Track"&gt;{var.Title}&lt;/div&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(vc.triggerevent&amp;amp;&amp;amp;iTunes_)Pause(" onMouseOut=")</param>
        <param>vc.triggerevent&amp;amp;&amp;amp;iTunes_Pause" onMouseOut="</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>ip:port</param>
        <param>{var.ip}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Write</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes2.html</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes2.html</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ShowFrame</cmdType>
      <params>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetWinSize</cmdType>
      <params>
        <param>300</param>
        <param>360</param>
        <param>0</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{F5}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes.playing</event>
  </command>
  <command id="575" name="iTunes Now Paused Pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Enable last action if you want the forecast read aloud as well.&#xD;&#xA;">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>iTunes_pause</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Read</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes.html</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(&lt;span id="Name"&gt;)Artist(&lt;/span&gt;)</param>
        <param>&lt;span id="Name"&gt;{var.Artist}&lt;/span&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(&lt;img src=)"kw.gif" (name="CD")</param>
        <param>&lt;img src="F:\Music\Mp3 Official Release\{var.genre}\{var.Artist}\{var.Artist} - {var.Album}\{var.Artist} - {var.Album}.jpg" name="CD"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(&lt;img src=)"Play.png" alt="Pause" (name="Pause")</param>
        <param>&lt;img src="Pause.png" alt="Play" name="Pause"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(id="Track"&gt;)Song title(&lt;/div&gt;)</param>
        <param>id="Track"&gt;{var.Title}&lt;/div&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>(id="a3"&gt;&lt;a href="ip:port/api/vc.triggerevent&amp;amp;&amp;amp;iTunes_)Pause" (onMouseOut="MM_swapIm)</param>
        <param>id="a3"&gt;&lt;a href="ip:port/api/vc.triggerevent&amp;amp;&amp;amp;iTunes_Play "onMouseOut="MM_swapIm</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>('Pause','',')pause(_roll.png')</param>
        <param>'Pause','','play_roll.png'</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>ip:port</param>
        <param>{var.ip}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Write</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes2.html</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>{Path.VC}\Plugins\TCP\html\iTunes2.html</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ShowFrame</cmdType>
      <params>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetWinSize</cmdType>
      <params>
        <param>300</param>
        <param>360</param>
        <param>0</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{F5}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes.Stop</event>
  </command>
  <command id="48" name="raise/lower Volume in 10% steps from current level" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.GetVolume</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>iTunesCurrentVol1</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={Var.iTunesCurrentVol1}*{1}/100</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)&lt;(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;1</ifParams>
      <then>
        <action>
          <cmdType>Results.SetLastResult</cmdType>
          <params>
            <param>1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType />
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{1}&amp;&amp;minus</ifParams>
      <then>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result={Var.iTunesCurrentVol1}-10</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result={Var.iTunesCurrentVol1}+10</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)&lt;(B)</ifType>
      <ifParams>100&amp;&amp;{LastResult}</ifParams>
      <then>
        <action>
          <cmdType>Results.SetLastResult</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Volume has reached the highest level.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>iTunes.SetVolume</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>iTunes.playing</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes_vol</event>
  </command>
  <command id="478" name="Play" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.Play</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes_Play</event>
  </command>
  <command id="495" name="Pause" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.Pause</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes_Pause</event>
  </command>
  <command id="459" name="Next track" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.Next</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes_Next</event>
  </command>
  <command id="471" name="Last track" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>iTunes.Previous</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>iTunes_Last</event>
  </command>
</commandGroup>

Screenshot:

In Progress:

14
iTunes / Re: iTunes get/set volume?
« on: June 15, 2015, 08:10:45 AM »
Thank you, that was precisely what i was looking for.  Python seemed like the logical choice, just wasn't sure if there was an easier way i was missing(i'm kinda new to VC).  The screenshot below is the mini player for better explanation.  I don't have a volume slider setup.  So I wan't it to step up the volume by 10% with each click.  Again, thank you.


15
iTunes / iTunes get/set volume?
« on: June 15, 2015, 02:59:38 AM »
I'm having a tough time wrapping my head around the best practices of how to use these commands to trigger a volume change.  I'm building a mini webplayer with roboB & webserver plugins.  Right now i have the vol buttons mapped to forward the commands to EventGhost.  Using the raise vol by percentage macro.  Ideally that's what i'd like to do in VC.  Could someone post an example of how you use the iTunes get/set vol actions?

Pages: [1] 2