Blind control of XBMC

When I control media players using HouseControl, if I am just listening to audio, I don’t want to have to look at the GUI. For XBMC, which I run on a Raspberry Pi, connected by HDMI to my AV receiver, which is then connected by HDMI to my TV, I want to be able to use it with the TV turned off. This saves electricity, and avoids an unnecessary visual distraction.

I also want to be able to do this with other media players such as iTunes and Spotify. For example, I might want to run these on a computer with the monitor switched off, or the lid down, or on a headless server.

This works fine when playing music playlist, or playing a specific artist, album, genres or song. I can use HouseControl commands to tell me what is playing, skip a track, change the volume, pause the music, etc. I can also display the whole playlist, but not in a very usable form at the moment: HouseControl is designed to return short responses, not long status displays.

However, I am struggling to play podcasts blind. For podcasts, I use the Apple iTunes Podcasts Addon. I can start this with a command such as “xbmc podcasts”. This shows the podcast Addon on the screen, with the Search option highlighted. I can then use “xbmc ok” to select the search option, and “xbmc type science” (say), to search for science podcasts. I can then find the set of podcasts I want using “xbmc left”, “xbmc right”, “xbmc up”, “xbmc down”, and when the desired one in selected, “xbmc ok”.

I can then select the required episode in the same way, and it plays fine.

The problem with doing this blind, is that it is impossible to predict the order of podcasts or which one will be selected. In general the podcast or episode that you listened to last seems to be selected.

The problem, here is inadequate separation of control actions in the API, from GUI actions. For blind control, you need reliable control actions, and not sending keystokes or GUI actions like left, right, ok, back, ok, etc.

The XBMC API does not seem to have a way to do this for addons. You can just execute the addon, with optional parameters, and then the only control is via the GUI. The XBMC API needs a way to send a command to a plugin, and then all plugins need to execute those commands.

It is possible that I am missing something here, so if anyone know a way to do blind control of plugins, please let me know.

I think other parts of the XBMC API are also not designed for blind control, but the plugin case is the one that is affecting me.

The iTunes API seems better for this, probably because it does not have plugins. Its API is mainly a control one. There are just a few API calls which explicitly change what is displayed on the screen. You do not use the API to simulate the keyboard, or to do GUI actions.

We could do with some commonly accepted design principles for controlling devices and programs that have optional GUIs. They should always allow blind control. As more and more devices get automation APIs, this will become more of an issue.

This entry was posted in Home automation and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s