Author Topic: Launch Pandora via VoxCommando  (Read 12099 times)

0 Members and 1 Guest are viewing this topic.

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Launch Pandora via VoxCommando
« on: May 05, 2014, 03:25:46 PM »
Hi James,

I've been stuck at it for hours and searched everywhere but no joy. A couple of results came up but they were scripts.

I'm tying to achieve this by the commands.

So far I've tried different versions of XJson.Raw>Addons.ExecuteAddon>script.xbmc.pandora

But nothing seems to work.
Just upgraded to Gotham (something tells me I shouldn't have because I probably lost some VOX functionality)?


Thanks for your great work
« Last Edit: May 05, 2014, 03:34:02 PM by sirs2k »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #1 on: May 05, 2014, 03:39:52 PM »
So far I've tried different versions of XJson.Raw>Addons.ExecuteAddon>script.xbmc.pandora

Just to clarify, are you saying that you already tried:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="388" name="launch pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.xbmc.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

? I ask because I'm not seeing the "addonid" part (I'm basing this on the VC XBMC Frodo config's "download subtitles" plugin example)

... and from where are you finding the "script.xbmc.pandora"? In the Pandora addon documentation, I'm seeing "script.audio.pandora". So maybe try that.
« Last Edit: May 05, 2014, 03:47:32 PM by nime5ter »
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: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #2 on: May 05, 2014, 03:48:54 PM »
If you still can't get it to work using the actual addon ID, please post the command xml that you are trying to use.  It speeds things up for us a lot to see the actual command.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #3 on: May 05, 2014, 04:00:00 PM »
The addon id usually matches the folder name as found in this directory:

C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\addons

But what I find is most helpful for figuring out how to call addons in XBMC (because there are different types of addons that must be called differently) is to create a favourite for it in XBMC and then go look at the favourites.xml that XBMC creates in C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\userdata

This won't tell give you the exact formatting per se because it isn't using JSON but you will see the correct addon ID and also see if it needs to be executed as a script, or opened using activatewindow.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #4 on: May 05, 2014, 04:51:07 PM »
I agree with James, but also I've had good luck just opening the addon.xml and the script/addon ID is usually in there.
In this case
I had Frodo install and just downloaded the Gotham install
addon id="script.audio.pandora"
Also Gotham literally just got released yesterday, and seems like playback had an issue on early release so you many want to reDL incase you have any other issue, per the main DL page:
Quote
NOTICE: In case you downloaded XBMC 13.0 release on Sunday morning May 4, please re-download and install it again.
Video playback may have been affected in that version.
The addon id usually matches the folder name as found in this directory:

C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\addons

But what I find is most helpful for figuring out how to call addons in XBMC (because there are different types of addons that must be called differently) is to create a favourite for it in XBMC and then go look at the favourites.xml that XBMC creates in C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\userdata

This won't tell give you the exact formatting per se because it isn't using JSON but you will see the correct addon ID and also see if it needs to be executed as a script, or opened using activatewindow.
« Last Edit: May 05, 2014, 05:27:42 PM by vulcanjedi »

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #5 on: May 05, 2014, 11:03:28 PM »
Appreciate the very prompt assistance guys,

I actually never tried to put any code simply because I had no idea how to do it. Now I do though (it goes into voicecommands.xml in root install directory)

I've always just been trialing in LCB (check out the attachments)
Surprisingly also "search youtube", "download subtitles" even "Exit XBMC" aren't working for me while the others are working.


Thanks Volcan will re-download another copy of gotham.

Looking at the voicecommands.xml file this is what it looks like

Code: [Select]
</commandGroup>
    <commandGroup open="True" name="Test" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="388" name="launch pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XJson.Raw</cmdType>
                <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.xbmc.pandora"</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>Let me see</phrase>
        </command>
    </commandGroup>

Downgraded to Frodo 12.3 still no joy.

Thanks guys
« Last Edit: May 06, 2014, 12:49:37 AM by sirs2k »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #6 on: May 06, 2014, 08:34:35 AM »
We are all happy to help.  ;D

Please read our answers a bit more carefully after you ask for help.  You are still using the wrong plugin ID after we specifically pointed that out to you.  That will probably solve your problem.

Please read the forum rules.  There you will see information about how to share xml (which is super easy), as well as other important guidelines that will help you to request support efficiently.  There is a link to the rules in my signature.  Some of these rules apply to troubleshooting VoxCommando specifically.

You don't need to go into your voicecommands.xml file manually, and it is not recommended to do it this way because you end up with improper xml that we can't use without manually editing.
« Last Edit: May 06, 2014, 08:56:12 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #7 on: May 06, 2014, 08:41:42 AM »
By the way,

I have not upgraded yet myself, but there are no known compatibility issues between VoxCommando and Gotham.  Gotham may have some of its own teething issues, but I don't think they changed anything in that will affect VoxCommando specifically.

I will be upgrading soon now that Gotham has been released.  It seems like it went from alpha to final release very quickly this time...

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #8 on: May 06, 2014, 10:50:32 AM »
I've always just been trialing in LCB (check out the attachments)
Surprisingly also "search youtube", "download subtitles" even "Exit XBMC" aren't working for me while the others are working.

From your screen capture, there's no indication that the youtube and download subtitles commands didn't work. The only command indicating a problem is the orange line.

[Edit: I see the youtube line looks like it may be grey -- I didn't notice that before, but that's not an error per se.]

In general, if you roll over messages in the history panel, you'll get a popup message providing more details if there are problems. You can also enable logging and look at that file, as well as post the full log to provide more information. http://voxcommando.com/mediawiki/index.php?title=Log

Of course, you would need to have the XBMC subtitles addon and youtube addon already enabled in XBMC for those commands to work, so you may want to double-check that those are in fact enabled within XBMC.

The "Exit XBMC" command is not captured in your image. I'm not sure why that wouldn't work for you.

Can I ask, (a) what version of VC are you using, and (b) did you follow the video tutorial or wiki documentation for installing the XBMC (Frodo) configuration of VC? In particular, the part about installing the VoxTools addon within XBMC? http://voxcommando.com/mediawiki/index.php?title=Installation_XBMC_Frodo.

I have now enabled the Pandora addon in my XBMC Frodo installation and created a VC command per our suggestions above; it seems to be working. I can't really test it because I live in Canada.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="404" name="run Pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.audio.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>run Pandora</phrase>
</command>
« Last Edit: May 06, 2014, 03:16:44 PM by nime5ter »
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)

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #9 on: May 06, 2014, 09:10:46 PM »
I just tested an old Frodo instance on my Mac. Nime5ter's command works brilliantly. On a virgin run you'll be prompted to configure the addon (logon, and I set to auto play last station), if you didnt already after its installation.
closed / reopened XBMC. 'run pandora' instantly streams last station.
Upgraded to  Gotham. Again no issues, I'm on VC2, v1.9.3.1 atm.
I live in the States and audio played immediately so the addon/plugin works. VC works. Command works. Stream works.
This took about 3 mins, thanks I kind of like this command/addon combination :)

From your screen capture, there's no indication that the youtube and download subtitles commands didn't work. The only command indicating a problem is the orange line.

[Edit: I see the youtube line looks like it may be grey -- I didn't notice that before, but that's not an error per se.]

In general, if you roll over messages in the history panel, you'll get a popup message providing more details if there are problems. You can also enable logging and look at that file, as well as post the full log to provide more information. http://voxcommando.com/mediawiki/index.php?title=Log

Of course, you would need to have the XBMC subtitles addon and youtube addon already enabled in XBMC for those commands to work, so you may want to double-check that those are in fact enabled within XBMC.

The "Exit XBMC" command is not captured in your image. I'm not sure why that wouldn't work for you.

Can I ask, (a) what version of VC are you using, and (b) did you follow the video tutorial or wiki documentation for installing the XBMC (Frodo) configuration of VC? In particular, the part about installing the VoxTools addon within XBMC? http://voxcommando.com/mediawiki/index.php?title=Installation_XBMC_Frodo.

I have now enabled the Pandora addon in my XBMC Frodo installation and created a VC command per our suggestions above; it seems to be working. I can't really test it because I live in Canada.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="404" name="run Pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.audio.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>run Pandora</phrase>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #10 on: May 06, 2014, 10:29:28 PM »
I tested this on Gotham and it works too.  At least it opens Pandora, but I can't actually go beyond that in Canada.

I did notice that Gotham has changed how the "download subtitles" addon works.  I will post an alternate command soon that works with Gotham.

I did not test youtube yet.

I should also mention that Gotham has changed the filenames for the databases, so if you are using the xSQL plugin to generate your payloadXML on Gotham, you will need to adjust the plugin settings to point to the newer files.  Usually you can just browse to the same folder and select the one with the highest number.  I believe this is mentioned in the installation video for Frodo, but for most people the defaults would have worked for Frodo without any modifications, so if you are upgrading it would be an easy thing to miss, especially since XBMC will leave the old files in place and your genXML will seem to work, but it will be using old data!

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #11 on: May 10, 2014, 08:28:24 AM »
Hey guys,

Sorry I haven't replied, just wanted to let you know that code worked a treat! Thanks Vulcan!

James, I admit I didn't read the all the info I could, sorry mate.

HomieTheClown

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #12 on: July 27, 2014, 12:27:16 PM »
Hi,

Just joined the community yesterday. Love the program but it's been tough to program so far.  I spent 8 hours yesterday trying to figure out a few things. Only got thing to work.  I have many questions but I want to work on one problem at a time.  

I'm an XBMC user and want to see how what all I can do with the program.  I'm using VC version 2.   I downloaded the MSP 11 program and a few TTS voices.  Oh I run the VoxCommanderSP.exe version.  

So I can't seem to run my pandora add-on in XBMC.  I took a screenshot of the error message I got.  You can also see the exact line that I have in the program's history view.  I also attached two different xml pics.  Now here's one of the MANY things that's got me stumped.  When I try to make a new command in the command builder program(edit button), I pick XJson.Raw and then enter the parameters in.  What I've noticed is, when I open it up to see code, it has <param>Code</param> instead of <cmdString>code</cmdString> which is what I use guys using as an example when you were trying to help the OP out.  

So I don't know what I'm doing wrong. Is he using an older version.  His original post was in May of this year so I figured he's using the newest program.  Does this make any sense lol.  It's driving me crazy.  There's so much more I wanna do but I'm trying to do one thing at a time.   Oh for the record. I edited the xml file and deleted the <param></param> boxes and changed them to the cmdString boxes. (See pics below).  Still gave me the same message.  Or it might have given me the error message "method not found" which I don't understand either. I'll be around working on the program if you have questions.  I hope you can help. :bonk

OH PS.  I checked the addon.xml folder for my pandora app and the id according to what I saw is what I have in my xml (script.xbmc.pandora).  No as far as the last section.  I've tried both script.xbmc.pandora & script.audio.pandora. Both don't seem to work.   Oh one last thing...I hope... I don't under what a payload is yet. I don't know if that matters for this problem.I haven't researched anything about it at this time. 
« Last Edit: July 27, 2014, 12:37:04 PM by HomieTheClown »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #13 on: July 27, 2014, 01:22:57 PM »
Welcome Homie,

Thanks for the screenshots, that's helpful.

1) The First Rule of VoxCommando: Do not edit the voicecommands.xml file directly. Edit all commands in the command tree editor.

2) Yes! You're right, and very observant. My xml above is from an earlier version of VC, which is why it looks different, but it doesn't matter. VC2 is backwards compatible, which means you can import older xml and it will work (and be updated to the new format when you save your tree).

3) To use commands that you find on the forum, you can simply select the text in the code box, copy it, and then paste it directly into a group in your command tree. You don't need to re-create the command yourself. See: http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

4) It looks like you are not getting the syntax right when you are trying to re-create the command. Instead, try copying the xml above (http://voxcommando.com/forum/index.php?topic=1559.msg13599#msg13599) as per the instructions in #3 and let us know if that works.
« Last Edit: July 27, 2014, 01:35:23 PM by nime5ter »
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: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #14 on: July 27, 2014, 01:34:16 PM »
You haven't told us what version of XBMC you are using but I'm using Gotham 13.1 and the correct addon id is not

script.xbmc.pandora

it is script.audio.pandora which is what we use in the xml posted above.

Even if you were using the correct addon id which I doubt, you have written the second parameter as

Code: [Select]
"script.xbmc.pandora":"script.xbmc.pandora"
when it should actually be

Code: [Select]
"addonid":"script.xbmc.pandora"
or more likely using our addon id:

Code: [Select]
"addonid":"script.audio.pandora"
Who knows, maybe you are using XBMC Frodo, or some older version of pandora and you are correct about the addon id, but if it does not work then be sure to try the one we have suggested.