Author Topic: Coming Home - computer offers music, then offers movies (XBMC)  (Read 15041 times)

0 Members and 2 Guests are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Here is code for something similar to what I have done in my Youtube "scenario" video where I am coming home from work:

video:


Here is the XML code which you can try yourself.  Select all the text in the code box, copy it (ctrl-c), open your VC tree editor, right click, and select paste to put this group into the tree.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Come home offer music then movies" enabled="True" prefix="" priority="3" requiredProcess="" description="">
  <command id="218" name="Welcome Home 1 offer music" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>Welcome back puny human, The time is {ShortTime}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>Would you like to listen to some music?</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <cmdString>confirm play music</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>honey I'm home</phrase>
    <event>some event that is triggered when you get home</event>
  </command>
  <command id="233" name="++ Welcome Home 2 offer movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.Pause</cmdType>
      <cmdString>200</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>In that case, how about a movie?</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <cmdString>confirm watch movie</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Confirm.Cancel.confirm play music</event>
  </command>
  <command id="819" name="confirm play music" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="LMD0C = all channel stereo">
    <action>
      <cmdType>XJson.Btn.KB</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>OKAY, Let's get this party started</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.ExecBuiltin</cmdType>
      <cmdString>PlayerControl(PartyMode(music))</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>confirm play music</phrase>
  </command>
  <command id="825" name="confirm watch movie" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="LMD0C = all channel stereo">
    <action>
      <cmdType>XJson.Btn.KB</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>Good idea.  I'll select 10.  If you don't like the first one just skip ahead.</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Player.Open&amp;&amp;"item": {"file": "special://profile/playlists/video/RandomMovie.xsp"}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>confirm watch movie</phrase>
  </command>
  <command id="745" name="do confirm (always on)" enabled="true" alwaysOn="True" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.ConfirmYes</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Go ahead, Yes please, sounds good, that would be lovely</phrase>
    <phrase optional="true">Bella</phrase>
  </command>
</commandGroup>
« Last Edit: February 28, 2014, 04:23:32 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #1 on: June 19, 2013, 12:24:24 PM »
How it works:

Please see the attached image below (click to enlarge the image).

1) This starts the sequence.
- You can use a voice command  like "honey I'm home", and/or use an external event like a motion sensor to get the ball rolling...
- This command will play the TTS asking if you want to listen to music and then will use tellvox to start the command (2) "confirm play music"
Note: we can't use an event to trigger command #2 because an event does not enforce the requirement to "confirm" a command.  So we must use tellvox to emulate giving a voice command.

2) This command will start playing music (XBMC party mode), but only if "confirmed".
-  Depending on your option settings, it will wait for a while to see if you confirm or not.
-  If you specifically say "no thanks" the following event will be fired: Confirm.Cancel.confirm play music
- That event starts command 3 "++ Welcome Home 2 offer movie"
- I found that I needed to use the ++ which runs the command in a new thread in order for this to work... I won't go into it, just leave the ++ at the beginning of the command name!

3) Same idea as command 1, but this time offers to play random movies and uses VC.TellVox to initiate command 4.

4) Waits for confirmation
- if confirmed it will open the smart playlist in XBMC called "RandomMovie.xsp"
« Last Edit: June 19, 2013, 12:52:39 PM by jitterjames »

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #2 on: June 19, 2013, 07:01:21 PM »
Awesome!
I love it, great demo.

lol even the dog gets a mention in the credits.


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #3 on: June 19, 2013, 07:16:31 PM »
Perfect explanation! Easy to follow and recreate.  ::bow :clap
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #4 on: June 20, 2013, 06:21:25 PM »
lol even the dog gets a mention in the credits.

Yep, "even the dog." But how about the subtle artistry of that uncredited camera operator -- pretty impressive, eh?
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)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #5 on: June 20, 2013, 06:22:43 PM »
What camera operator?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #6 on: June 20, 2013, 07:12:36 PM »
Quote
Yep, "even the dog." But how about the subtle artistry of that uncredited camera operator -- pretty impressive, eh?

  ::yikes ::console

Quote
lol even the dog gets a mention in the credits.

 ::club
***********  get excited and make things  **********

maxwel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 1
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #7 on: February 12, 2014, 04:12:02 PM »
Hey James, I was watching your youtube demo about VoxCommando - Scenario: Coming Home from Work! i realy like your command and phrases! could you share your full command plz?

Grtz

Max
« Last Edit: February 12, 2014, 04:42:56 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #8 on: February 12, 2014, 04:42:34 PM »
I'm afraid not.  For one thing I no longer have the commands that I used in that demo, although I may have bits and variations that still worked for me in my real life.  For another thing my complete command tree is huge and I would need to pick through it very carefully to make sure I wan't uploading something private.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #9 on: February 12, 2014, 10:39:23 PM »
Apart from the xml James posted at the start of this thread, if you search the forum you will find a lot of the other commands as well.

For example, the Our Groceries commands in the video are very similar to those posted on the RoboB (Robo Browser) plugin thread.

The "remind me to walk the dog" command is also on the forum: http://voxcommando.com/forum/index.php?topic=1123.msg9446#msg9446
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)

outlaw

  • Jr. Member
  • **
  • Posts: 21
  • Karma: -1
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #10 on: April 03, 2014, 04:44:02 PM »
hi james , this is james as well , great job btw:) I did your comeing home from work xml and it wont play my music or movies ive done
all I can think of, any advice would be great:)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #11 on: April 03, 2014, 05:52:33 PM »
Hi outlaw, welcome to the forum.

You may want to start by reviewing the forum support guidelines: http://voxcommando.com/forum/index.php?topic=1248.msg12801

Unfortunately, while you know what "I've done all I can think of" entails, we don't, which makes it difficult to suggest solutions. Also we don't know what version of VC you have installed, whether you already have VC working properly with XBMC, etc.

Please let us know more about your setup and exactly what you've tried, and then perhaps we can be of more use to you.
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)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando

outlaw

  • Jr. Member
  • **
  • Posts: 21
  • Karma: -1
    • View Profile
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #13 on: April 04, 2014, 12:07:08 PM »
thanks nime5ter for the welcome.....i have vc version 1.1.9.1 .......i do xbmc working with vc to open and play my movies.....however it will not browse or
play my music.i thought there was a media monkey plugin for vc but theres not. ive watched jitters videos and tut but still cant get it to
do what i want.im even an i-t and still vc has me whooopt :bonk ....haha i just want to build commands to say something like...its work out time and the tts will
answer back and play music... just stuff like that... im sorry if i didnt explain this right

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Coming Home - computer offers music, then offers movies (XBMC)
« Reply #14 on: April 04, 2014, 12:35:58 PM »
thanks nime5ter for the welcome.....i have vc version 1.1.9.1 .......i do xbmc working with vc to open and play my movies.....however it will not browse or play my music.
There are installation videos and wiki articles that tell you exactly how to set up VC for use with XBMC.  Read / follow them.  If VC works with your movies and not your music then you may not have XBMC set up correctly.  You will need to provide us with more information in order for us to help you.

i thought there was a media monkey plugin for vc but theres not.
This is incorrect.  Yes, VC can be used with mediamonkey, there is even a default configuration that is offered to you when you first install VC. MM is directly supported in VC1 as core actions, and there is a preset configuration that you can select when you install VoxCommando.  It is incredibly easy to set up.  VC2 supports MM as well but MM actions have been moved to a plugin instead of having the MM actions as part of the core program.

ive watched jitters videos and tut but still cant get it to do what i want.im even an i-t and still vc has me whooopt :bonk ....haha i just want to build commands to say something like...its work out time and the tts will answer back and play music... just stuff like that... im sorry if i didnt explain this right

It is highly unlikely that you've watched ALL the videos.  You may have watched some of them, but only you know which ones.  Have you looked at the wiki at all?  There is a huge amount of information on it, and there is a huge amount of information on the forum, and there is a huge amount of information in our videos.  We can't read it or watch it for you.  A massive amount of effort has gone into providing all this information.  But you have to make some effort to take advantage of it.  VoxCommando is not a little app for telling your friends where you will be having your coffee today.  It is a powerful, complex and extremely flexible program.  As such, there is going to be a learning curve.  That is just how it is.

Check out our youtube tutorials:


If you want to create your own commands I recommend that you watch tutorial "VoxCommando 1A Editing and Building Commands" and 1B

There is an area of the wiki dedicated to different types of installations including XBMC and MediaMonkey:
http://voxcommando.com/mediawiki/index.php?title=Installation