News:

Would you like to say "Thanks!" for extra support or new features that we provided? Donations are gratefully accepted.

Main Menu

Programming Help

Started by ddl, November 12, 2013, 12:21:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ddl

Got it! Worked like a charm.  Thanks again.

d

ddl

#16
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>

jitterjames

#17
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. :-)


ddl

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

#20
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


ddl

#21
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>

nime5ter

#22
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
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

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

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

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

Thank you... was able to get the commands into VC successfully.

ddl

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

#28
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