XBMC/KODI api command to go to directory

211 views
Skip to first unread message

PVD

unread,
Feb 25, 2015, 11:24:13 AM2/25/15
to comman...@googlegroups.com
Hi,

I'm writing part of a CF interface to control XBMC/KODI (running on a Raspberry PI).
Although just starting with this API, everything seems to go nicely; I am able to send HTTP-requests (using javascript) and Kodi is responding as expected. So far so good!

I'm not planning to write a complete interface to control everything within Kodi (will do most of the controlling with the TV remote (over CEC)); but I would just like to do a couple of things (from iViewer) to make life easier:

1. Start it up:
Controlling the power to the R.PI (using a switched output of my home-control-system), I can turn it on (the CEC even gets my Samsung LED-TV out of standby and selects the correct HDMI input, which is fine).
check!

2. Turn it off:
Send command to stop the player, send a System.Shutdown command and after a few seconds: turn the power back off (switched output).
check!

3. Show the contents of a directory in Videos >> this one is the problem I don't have an answer for at the moment
I would like to send a command so Kodi would show me the contents of a certain directory > not in iViewer, but on TV!
When Kodi is booted and is showing the main menu, most of the times I just want to go to Videos > SMB share > Folder > Subfolder > Subfolder and see the contents on TV (so I can choose the desired file with the TV remote).
Is there a command to do this at once?
If it isn't possible, I was thinking of doing it with a macro (set of commands with short intervals, like: left, down, select, down down down, select, etc...) but of course this is not very clean and if the menu changes (or some shortcuts are added), it won't work anymore.

Thanks in advance for any help!

Barry Gordon

unread,
Feb 25, 2015, 1:30:33 PM2/25/15
to comman...@googlegroups.com

I think this question might be best answered on the KODI forum as it does not sound like an CF issue but rather an issue in doing something in KODI.

--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PVD

unread,
Feb 25, 2015, 6:32:28 PM2/25/15
to
You're right Barry, I'm sorry.

Do you have a link??

Jarrod Bell

unread,
Feb 25, 2015, 6:49:02 PM2/25/15
to comman...@googlegroups.com
This thread will help:
http://forum.kodi.tv/showthread.php?tid=208060

Specifically:
{"jsonrpc":"2.0","method":"GUI.ActivateWindow","id":1,"params":{"window":"videos","parameters": ["\"smb://userid:password@servername/path-to-directory-with-comma-in-name/\""]}}

And another useful post with examples:
http://forum.kodi.tv/showthread.php?tid=210549&pid=1853574#pid1853574

Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


On 26/02/2015 10:32 am, PVD wrote:
You're right Barry, I'm sorry.

Do you have a link??


Op woensdag 25 februari 2015 19:30:33 UTC+1 schreef Barry Gordon:

Barry Gordon

unread,
Feb 25, 2015, 10:39:23 PM2/25/15
to comman...@googlegroups.com
Just google KODI forums

Sent from my iPad

On Feb 25, 2015, at 6:32 PM, PVD <google...@ipservices.be> wrote:

You're right Barry, I'm sorry.

Do you have a link??


Op woensdag 25 februari 2015 19:30:33 UTC+1 schreef Barry Gordon:

I think this question might be best answered on the KODI forum as it does not sound like an CF issue but rather an issue in doing something in KODI.

Barry Gordon

unread,
Feb 25, 2015, 11:39:24 PM2/25/15
to comman...@googlegroups.com
PVD,   No need to apologize, we all have to start somewhere.  Google is a great friend. XBMC has been renamed to KODI IIRC. Jarrod will generally provide a specific assist where I will generally point to where you should be able to find what is needed.

Sent from my iPad

PVD

unread,
Feb 27, 2015, 7:22:24 AM2/27/15
to comman...@googlegroups.com
Thank you so much, Jarrod!

Pointed me directly to where I had to be, works like a charm!


Barry, you're right. And yes, I'd like to find things myself (and Google certainly IS my friend), but sometimes I need that extra hint to get there :-)

Barry Gordon

unread,
Feb 27, 2015, 10:10:25 AM2/27/15
to comman...@googlegroups.com

The thing I learned in high school that has helped me the most in life was how to find things, to do research and look things up.  It allowed me to get through College without buying a textbook but using the library.  There was no internet back then.  If I know the answer off the top of my head I will provide it, but If I need to do research then . . .

 

Feed a man a fish, feed a man for a day. Teach a man to fish, feed a man for life.

 

 

I am running OpenElec Kodi on a raspberry Pi as a backup to my Dune player. I do not control the Pi or the Dune from the iPad, but rather have a small powerful PC in my theater that controls the entire room; lights, HVAC, shades, and each component. The PC gets its instructions from a user interface device (Pronto PRO or an iPad/iPhone running CF iViewer). The PC provides full feedback to whomever sent the command. I only use Kodi to render the video and audio in the same manner as the Dune is used.  The PC handles the Librarian function in a manner similar to the Kaleidescape product, showing all the information on the main screen so everyone in the room can see it. The PC handles CEC, IR, RS232, and TCP for control of things, and interfaces to the user interface device over TCP via Wi-Fi. My philosophy with the automation of things is that the basic devices must be able to run in the absence of any higher level controls.  Higher level controls are a convenience.  The house lighting must work even if every control system other than the bulb and the switch are down.  the same with HVAC, Pool, security, etc.

--

Reply all
Reply to author
Forward
0 new messages