HouseControl: Media control

I have changed HouseControl to use a single MediaControl interface for all media devices. Previously I was using a MusicControl interface for Spotify and an InfraredControl interface for my TV, set top box and AV receiver.

The single interface is cleaner and lets me using the same chat and voice syntax for all devices.

I currently have interfaces for Spotify on a PC, XBMC on a Raspberry Pi, and the (UK cable) Virgin TiVo via, infrared, and am working on an interface for iTunes on the PC.

Each of these media servers has different capabilities, dictated either by the capabilities of the service itself, or by the interface I am using to control it.

As Spotify does not have an API, I control it via http links to my playlists, and sending keystrokes to the PC. I control the Virgin TiVO and my TV and AV receiver by infra-red remote. I control XBMC via the HTTP JsonRPC interface. XBMC is the only one with a roper API. I will use the COM API for iTunes.

Channels: Currently only the Virgin TiVo has broadcast channels. I can control channel by:

channel name
channel number
channel up | down

Volume: I can control the volume on all the devices, but not the same way. The TV, set top box and AV receiver have volume up and down controls. For Spotify I control the PC volume and I can set this as a percentage. XBMC lets me set and query the volume. So the different servers support different volume controls and is is not really practical to have a common scheme. The commands I am using are:

set volume-level
volume (get the volume)
volume up | down

Playlists: I mainly use Spotify to play playlists. It also supports search, apps and other stuff. XBMC has playlist. Virgin has playlists for music but they require navigating through lots of menus to get to. The commands I have are:

start playlist
playlist (return the current playlist)

I need to add commands to get the current track, artist and album.

Player control: I need basic control over the playing of an audio track or a video. For Spotify I have just implemented pause/play and skip to the next track. The Virgin TiVo has play, pause, fast-forward, fast-backwards, skip-forwards, skip-backwards, and slow motion. XBMC implements fast-forward etc. by letting you control the playback speed.

The commands I currently have are:

fast forwards
fast backwards
skip forwards
skip backwards

Services: I have implemented a service concept that works for at least XBMC and the Virgin TiVo. A service is a selectable application or menu. I have implemented XBMC add-ons as services. The TiVO has loads of service including on-demand, catch-up, program-guide, apps, games etc.

Some of the services I have are:

broadcast (broadcast TV)
guide (electronic programme guide)
catch-up (catch-up TV)
on-demand (on-demand menu)
movies (on-demand movies)
iplayer (BBC iplayer)
TED (TED videos)

There are a very large number of these and not much overlap between the media servers.

User interface navigation: Once a service is selected, the user interface needs to be navigated. The command I currently have are:

up | down | lft | right
ok (for selecting the current item)

Options: Some services have options, such as:


Recording: I can currently only record on the TiVo. XBMC has PVR capability, but I have no tuner for the Raspberry Pi. The only command I currently have is:


The TiVO has related services such as series links.

Libraries: XBMC has a library mode that lets you select select and play items by artist albums etc. Spotify has something similar. Virgin TiVO has collections, my shows and lots of other ways to organise media. I have not decided on what commands to use for this yet.

Files and directories: XBMC lets you play files or directories from a file system. I am thinking of supporting:

open item


The Virgin TiVo has lots of search applications and menus. Spotify using search. You need to be able to type into search boxes. This is tricky using a remote control. I current support:

type string

Text to speech:

I currently use text to speech to give alerts. I use the Spotify PC for this. I also plan to use wave files for some alerts and alarms. The current command is:

say text

Ratings: Virgin TiVO has a ratings system, that is used for recommendations, wishlist searches etc. I currently support:

thumbs up | down

It is all very difficult to get a consistent set of commands for controlling all these disparate features over incomplete interfaces (like IR or feeding keys to a PC window). However, it is very cool to be able to control all this via chat and voice interfaces, or by phone and tablet applications.

I have about 20 media devices of one sort or another if I count all the TVs, AV receivers and amplifiers, set top boxes, Raspberry Pis, phones, tablets, desktop and laptop computers, photo frames, game consoles, radios etc. My children and grandchildren bring lots more devices into the house, including iPods, iPhones, iPads, iPod touches, tablets, game consoles etc. I want to be able to control them all over all possible interfaces. I am not there yet, but I am getting there.

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