News:

HOT TIP! Exploring the commands packaged in VC's standard configurations is a great way to learn how to build your own. You can also clone a command as a starting point: just right-click and select "Clone" (or type Alt-C).

Main Menu

Mce PVR functionality versus XBMC PVR. A quick tutorial to get the best of both

Started by MrWolf, November 30, 2013, 05:20:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrWolf

http://www.youtube.com/watch?v=BJzZeQam9Ns&feature=em-upload_owner

A quick guide on how to flit between xbmc and mce for live TV in a magical seamless and delicious way.

Definitely delicious.

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

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

jitterjames

Thanks Paul,

Took you long enough... ;)

Can you please copy and paste your relevant EventGhost macro(s) to this forum, so as to give users a running start?  You can copy/paste eventGhost macros via xml on the clipboard in more or less the same way as you can with VC command.

jitterjames


MrWolf

Haha. Yummy yummy code.  Eat this...

MCE XBMC and Desktop Exclusives list:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1582">
   <Folder Name="Exclusives list" Expanded="True">
       <Macro Name="XBMC launched via remote change context to XBMC">
           <Event Name="MceRemote.Mce.Star" />
           <Event Name="TCP.Start xbmc" />
           <Event Name="Broadcast.vocally launch XBMC" />
           <Event Name="Broadcast.Launch XBMC" />
           <Action>
               MCE.Stop()
           </Action>
           <Action>
               MCE.Stop()
           </Action>
           <Action>
               EventGhost.TriggerEvent(u'LaunchXBMC', 0.0)
           </Action>
           <Action>
               Window.FindWindow(u'chrome.exe', u'', u'Chrome_RenderWidgetHostHWND', None, None, None, False, 0.0, 0)
           </Action>
           <Action>
               Window.Close()
           </Action>
           <Action>
               EventGhost.Wait(2.0)
           </Action>
           <Action>
               RadioSure.Close()
           </Action>
           <Action>
               EventGhost.EnableExclusive(XmlIdLink(-1))
           </Action>
       </Macro>
       <Macro Name="Start Program: XBMC.exe">
           <Event Name="Main.LaunchXBMC" />
           <Action>
               RadioSure.Close()
           </Action>
           <Action>
               System.Execute(u'C:\\Program Files (x86)\\XBMC\\XBMC.exe', u'', 0, False, 2, u'', False)
           </Action>
           <Action>
               Window.FindWindow(u'XBMC.exe', None, None, None, None, None, False, 0.0, 0)
           </Action>
           <Action>
               Window.BringToFront()
           </Action>
       </Macro>
       <Macro Name="XBMC launched via mouse change context to XBMC">
           <Event Name="Task.Activated.XBMC" />
           <Action>
               EventGhost.EnableExclusive(XmlIdLink(378))
           </Action>
       </Macro>
       <Macro Name="MCE launched via remote change context to MCE">
           <Event Name="MceRemote.Mce.LiveTV" />
           <Event Name="Broadcast.vocally launch" />
           <Action>
               XBMC2.RemoteStop()
           </Action>
           <Action>
               System.Execute(u'C:\\Windows\\ehome\\ehshell.exe', u'%windir%\\ehome\\ehshell.exe /mcesuperbar://tv?live=true /no startupanimation', 0, False, 4, u'', False)
           </Action>
           <Action>
               EventGhost.Wait(5.0)
           </Action>
           <Action>
               Window.FindWindow(u'ehshell.exe', u'Windows Media Center', u'eHome Render Window', None, None, None, False, 0.0, 0)
           </Action>
           <Action>
               Window.BringToFront()
           </Action>
           <Action>
               EventGhost.Wait(2.0)
           </Action>
           <Action>
               Window.Maximize()
           </Action>
           <Action>
               EventGhost.EnableExclusive(XmlIdLink(-1))
           </Action>
       </Macro>
       <Macro Name="MCE launched via mouse change context to MCE">
           <Event Name="Task.Activated.ehshell" />
           <Action>
               EventGhost.EnableExclusive(XmlIdLink(312))
           </Action>
       </Macro>
       <Macro Name="Desktop on display change context to Desktop">
           <Event Name="Task.Deactivated.XBMC" />
           <Action>
               EventGhost.Wait(0.0)
           </Action>
           <Action>
               EventGhost.EnableExclusive(XmlIdLink(272))
           </Action>
       </Macro>
   </Folder>
</EventGhost>


Vox commando MCE XML:
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="False" name="WMC Common Buttons" enabled="False" prefix="" priority="0" requiredProcess="" description="">
 <command id="210" name="jump,move,go &lt;direction&gt; &lt;#&gt;" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>{1}</cmdString>
     <cmdRepeat>{2}</cmdRepeat>
   </action>
   <phrase>jump,move,go</phrase>
   <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\4directionsMCE.xml</payloadFromXML>
   <payloadRange>1,20</payloadRange>
 </command>
 <command id="323" name="button-play" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-play</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>VC.TriggerEvent</cmdType>
     <cmdString>vc.idletimeout</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>play, resume</phrase>
 </command>
 <command id="334" name="button-pause" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-pause</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>VC.TriggerEvent</cmdType>
     <cmdString>vc.idletimeout</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>pause</phrase>
 </command>
 <command id="339" name="button-stop" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-stop</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>stop playback</phrase>
 </command>
 <command id="356" name="button-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-up</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>go up</phrase>
 </command>
 <command id="375" name="button-down" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-down</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>go down</phrase>
 </command>
 <command id="377" name="button-left" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-left</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>go left</phrase>
 </command>
 <command id="395" name="button-right" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-right</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>go right</phrase>
 </command>
 <command id="418" name="button-ok" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-ok</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>press ok, select</phrase>
 </command>
 <command id="415" name="button-back" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-back</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>go back</phrase>
 </command>
 <command id="419" name="button-fwd" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-fwd</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>fast forward</phrase>
 </command>
 <command id="438" name="button-rew" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-rew</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>rewind</phrase>
 </command>
 <command id="455" name="button-skipback" enabled="true" alwaysOn="True" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-skipback</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>bounce backwards</phrase>
 </command>
 <command id="462" name="button-skipfwd" enabled="true" alwaysOn="True" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-skipfwd</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>bounce forwards</phrase>
 </command>
 <command id="489" name="button-ch-plus" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-ch-plus</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>channel up</phrase>
 </command>
 <command id="501" name="button-ch-minus" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>button-ch-minus</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>channel down</phrase>
 </command>
 <command id="502" name="TV guide" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>WMC</cmdType>
     <cmdString>goto TVGuide</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>TV guide, open TV guide, Launch TV guide, show TV guide, Show Guide, Guide</phrase>
 </command>
</commandGroup>


Vox commando Watch Live TV Macro:
<?xml version="1.0" encoding="utf-16"?>
<command id="988" name="Watch live TV" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
 <action>
   <cmdType>EventGhost.Send</cmdType>
   <cmdString>vocally launch&amp;&amp;MCE</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>TTS.Speak</cmdType>
   <cmdString>Preparing the Television|Launching Media Center|Tuning in now</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Sound.PlayWav</cmdType>
   <cmdString>\VOX\Sounds\Acknowledge.wav</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.TriggerEvent</cmdType>
   <cmdString>Normal volume level</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.Standby</cmdType>
   <cmdString />
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.DisableGroup</cmdType>
   <cmdString>XBMC Simple actions</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.DisableGroup</cmdType>
   <cmdString>XBMC plugins</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.DisableGroup</cmdType>
   <cmdString>XBMC TV</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.DisableGroup</cmdType>
   <cmdString>XBMC Movies</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>VC.EnableGroup</cmdType>
   <cmdString>WMC Common Buttons</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <phrase>Watch live TV, I want to watch live TV, I want to watch lyve TV, watch lyve TV</phrase>
</command>


I think most of that will work right off the bat for people as long as they have installed the following Macros into Eventghost:
MCE
XBMC2

Thanks,

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

MrWolf

I can't post the contexts folder unfortunately as it exceed the forums 20000 character limit.  :bonk

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb


jitterjames


MrWolf

Oops, not any more!  :bonk

I'd left some stuff in the Eventghost tree I'd forgotten about but it's been replaced now.

Thanks mate!

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb