Skip to main content
boxeeremotelib: python interface to the boxee remote api
==========================================================

Python library to use the [boxee remote api](http://developer.boxee.tv/Remote_Control_Interface). The library includes
functionality to discover servers via boxee's UDP-based discovery as well as an interface to the actual commands. The
intention of this project is to support a web interface to the remote and any other non-traditional uses.

It is currently tested against a single boxee box and only on linux, so please share any negative results that you
experience, but it should work more widely.

Scripts
--------

A couple of scripts are provided, *boxee_discover* and *boxee_command*.

```````````````````````````````````````````
$ boxee_discover
192.168.1.104:8800
```````````````````````````````````````````

All servers on the network should be listed. A bit more functionality can be found with *boxee_command*:

```````````````````````````````````````````
$ boxee_command back setstring:batman
$ boxee_command down select
```````````````````````````````````````````

From the main menu, the previous example should go back to the search screen, type 'batman', and select
the first result. It should be noted that the server is being auto-selected, but a specific server can be given

````````````````````````````````````````````````````````````
$ boxee_command --host=192.168.1.104 --port=8800 getvolume
100
````````````````````````````````````````````````````````````
In addition to the normal commands,

```````````````````````````````````````````````````````
$ boxee_command -l
back
backspace
down
getpercentage
getvolume
left
mute
pause
playnext
playprev
right
seekpercentage
seekpercentagerelative
select
setstring
setvolume
stop
up
````````````````````````````````````````````````````````

commands can be quickly repeated by adding '_n' on to the end of a command name, where 'n' is the number
of times to repeat the command. These repeat commands are available from the library as well.

```````````````````````````````````````````````````````
$ boxee_command backspace_6 setstring:misfits
```````````````````````````````````````````````````````

Discovery
----------

Discovery works by broadcasting an XML snippet on your local network. There are some validation mechanisms in place,
and this library attempts to follow them more closely than many other similar libaries, but any attempts by Boxee to
clean up this library seem to have fallen away. Queries are presented as the iphone remote, as boxee seems to only
respond to these.

This mechanism, particularly on my often overloaded boxee box, is somewhat unreliable. A wake up may be needed. Some
amount of reliability will likely be added in the future.

```````````````````````````````````````````````````````````````````````
>>> from boxeeremotelib import Discoverer
>>> d = Discoverer()
>>> d.get_servers() #failed attempt
{}
>>> d.get_servers()
{'192.168.1.104': {'application': 'boxee', 'http_port': 8800,
'name': 'boxeebox', 'version': '1.5.1', 'http_auth_required': False}}
```````````````````````````````````````````````````````````````````````

Command Interface
------------------

This interface is meant to serve a number of purposes, and it is meant to be expanded on in the future.

`````````````````````````````````````````````````````````````````````````````````````````
>>> from boxeeremotelib import CommandSpawner, CommandInterface
>>> spawner = CommandSpawner.from_discovery_result(*d.get_servers().iteritems().next())
>>> ci = CommandInterface(spawner)
>>> def printit(res):
... print res
...
>>> ci.getvolume(cb=printit)
100
>>> ci.setvolume(90)
`````````````````````````````````````````````````````````````````````````````````````````

It is likely clear from this example that the library is written with callback libraries in mind.

Authors
--------

Library written by Kali Norby <kali.norby@gmail.com>.

Thanks
-------

* Android [boxeeremote](http://code.google.com/p/boxeeremote/) - helpful guide, particularly for discovery

Release files for boxeeremotelib 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boxeeremotelib 0.1
File Size Uploaded
boxeeremotelib-0.1.tar.gz 8.0 kB Details

Release files / boxeeremotelib-0.1.tar.gz

Download URL boxeeremotelib-0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cce99d13624d3422813ae277e87abcf5ea5777b123540e9f9ea5f0612bad3d20
BLAKE2b-256 checksum
How to use checksums
4f0e20a1c122d9f2b0e9e6893a50a95d3178524752b9bed9fc1160236ddfec16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page