Author Topic: Programming Help  (Read 9982 times)

0 Members and 2 Guests are viewing this topic.

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #15 on: November 12, 2013, 10:13:41 PM »
Got it! Worked like a charm.  Thanks again.

d

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #16 on: November 12, 2013, 11:05:02 PM »
Ok, I promise that this will be the last question of the night:)

I am struggling with the command to play a playlist in XBMC.  Here is what I have put together so far.  I read the thread about this issue and I am not sure that it applies to smart playlist with a .xsp extension.

<macro>
<action actiontype="XJson.Btn.KB" repeat="1" logic="False"><paramstring>x</paramstring></action>
<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>OKAY, I will play your jazz playlist. Enjoy</paramstring></action>
<action actiontype="XJson.ExecBuiltin" repeat="1" logic="False"><paramstring>PlayMedia(special://users/ddl/appdata/roaming/xbmc/userdata/playlists/music/gospel.xsp)</paramstring></action>
</macro>
« Last Edit: November 13, 2013, 12:18:28 PM by ddl »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Programming Help
« Reply #17 on: November 12, 2013, 11:16:11 PM »
I think your path is wrong. Check the XBMC wiki but I think you can delete

users/ddl/appdata/roaming/xbmc/userdata

Or something similar...  Past my bedtime. :-)
« Last Edit: November 13, 2013, 12:37:38 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Programming Help
« Reply #18 on: November 12, 2013, 11:18:15 PM »

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #19 on: November 12, 2013, 11:26:25 PM »
ok.

This is what the command looks like in another program.  Which action do I use in VC Raw or ???

/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/music/Gospel.xsp" } }, "id": 1

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Programming Help
« Reply #20 on: November 13, 2013, 08:41:40 AM »
If you choose to use xJson.Raw instead, then method is the first param, and params is the second.

method": "  Player.Open  ", "params": { "item": { "file": "special://profile/playlists/music/Gospel.xsp"}  }, "id": 1


Look here for some examples: http://voxcommando.com/forum/index.php?topic=1010.msg9898#msg9898

« Last Edit: November 13, 2013, 08:46:23 AM by jitterjames »

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #21 on: November 13, 2013, 09:29:15 PM »
Trying to implement an answer to the question in red not sure I understand how.  Can you direct me? Is there some special action I can use that will walk me through.

<macro>
<action actiontype="WUnder.Refresh" repeat="1" logic="False"><paramstring>District of Columbia&amp;&amp;US-en&amp;&amp;F</paramstring></action>
<action actiontype="WUnder.GetCustom" repeat="1" logic="False"><paramstring>{C.temp_f}</paramstring></action>
<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>Hey, d!  Welcome home! The time is {ShortTime}.</paramstring></action>
<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>The current temperature is {LastResult} degrees fahrenheit.</paramstring></action>
<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>I will adjust the thermostat to 77 degrees fahrenheit. I will also set the lighting to 100% in the Kitchen and TV Room.</paramstring></action>
<action actiontype="Scrape" repeat="1" logic="False"><paramstring>http://192.168.1.14/rest/nodes/C 7B 80 1/cmd/DON&amp;&amp;don</paramstring></action>
<action actiontype="Scrape" repeat="1" logic="False"><paramstring>http://192.168.1.14/rest/nodes/D 2B A6 1/cmd/DON&amp;&amp;don</paramstring></action>
<action actiontype="Scrape" repeat="1" logic="False"><paramstring>http://192.168.1.14/rest/programs/004D/runThen&amp;&amp;don</paramstring></action>

<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>How was your day today?</paramstring></action>
    I would like to answer the question but can't figure out how to format it.... please help.  What action should I use.

<action actiontype="TTS.SpeakSync" repeat="1" logic="False"><paramstring>Would you like to listen to music?</paramstring></action>
<action actiontype="VC.TellVox" repeat="1" logic="False"><paramstring>confirm play music</paramstring></action>
</macro>
 
« Last Edit: November 13, 2013, 09:35:10 PM by ddl »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Programming Help
« Reply #22 on: November 13, 2013, 10:00:33 PM »
It depends on what you mean by wanting to answer it, but possibly you're meaning something along the lines of Kalle's "human touch" commands: http://voxcommando.com/forum/index.php?topic=1147.0

See video, and then his code later in the thread.

By the way, to share code on the forum, it's best to put it within "insert code" tags, which you can do by using the number sign/hash tag button above the message field.

See also: http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum
« Last Edit: November 13, 2013, 10:07:43 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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Programming Help
« Reply #23 on: November 13, 2013, 10:32:12 PM »
This "2 way conversation thread" may also help meet your needs: http://voxcommando.com/forum/index.php?topic=1171.0

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)

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #24 on: November 13, 2013, 11:22:59 PM »
The puny humans xml to reference is perfect.  However, I am not a programmer and can't figure out how to get the xml into VC so I can edit to my liking. Can you help?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Programming Help
« Reply #25 on: November 14, 2013, 02:25:41 AM »
1 Save the  Punyhumans.xml file to your desktop
2 Open VC editor by clicking Edit on the main VC window
3 Click and drag the xml file from your desktop directly into the editor window

or for step 3 you can instead use File Open from the VC editor tree and then select the xml file.  This will create a second tree in another sub-window.  You can drag commands, or groups of commands from one window to another.

http://voxcommando.com/mediawiki/index.php?title=MDI_editor_interface

Just tested dragging the punyhumans.xml file into the editor and it works fine.

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #26 on: November 14, 2013, 10:33:25 AM »
Thank you... was able to get the commands into VC successfully.

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Programming Help
« Reply #27 on: November 14, 2013, 10:46:39 AM »
Fyi,

I think I am ready to take the plunge and purchase a license for VC.  However, I have a concern and I am hoping that its an easy fix.

Last night after installing VoxWav on my cell and trying to configure the folder on my pc.  I notice a considerable change in the response from commands issued through my mic. In some cases the VC did not respond and in some cases I got an error from VC indicating that the command was not in the dictionary.  I restarted VC and the computer and have gone through the mic setup several times but still no change.  This morning I tried again and I not no response at all from VC when trying to speak a command. 

I hope that this is something that can be fixed by just reinstalling the software and will try that this evening when I get home.  Any other suggestions would be appreciated.  I am also a home technology integrator and would love to be able to offer this product as an option to my clients.  However, I have to be sure that it will be stable. 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Programming Help
« Reply #28 on: November 14, 2013, 11:13:31 AM »
Well, obviously installing VoxWav on your phone won't affect your VC installation.

Without knowing anything about your setup, microphone, or what settings you might have changed, it is difficult to suggest a fix.

You can try to clear your cache and rebuild, verify that you have the correct microphone set as the default, and that the volume is not set too high etc.

VC is usually quite stable but there are many things a user can do to mess it up.  That is just the nature of the beast when something is so extremely customisable and interfaces with so many programs and devices, adapts to your media content and can work in different languages etc.

You may send me your entire VC folder zipped if you want me to test it.  Use the contact link from the main website to send me email with a zip attachment renamed to .jpg just in case
« Last Edit: November 14, 2013, 11:20:22 AM by jitterjames »

jitterjames

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