driver-kodi

command module
v0.1.0-7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2015 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Ninja Sphere - Kodi Driver

Build status godoc MIT License Ninja Sphere Ninja Sphere


Introduction

This is a Ninja Sphere driver for Kodi (previously known as Xbmc) that exposes any discovered instances as media devices, allowing control from the mobile apps and led controller.

Supported Sphere Protocols
Name URI Supported Events Supported Methods
volume http://schema.ninjablocks.com/protocol/volume set, volumeUp, volumeDown, mute, unmute, toggleMute state
media-control http://schema.ninjablocks.com/protocol/media-control play, pause, next, previous playing, paused, stopped
battery http://schema.ninjablocks.com/protocol/battery warning
To Do
  • Configuration UI (to find instances by IP)
  • Notifications
  • Media metadata
  • Remote control? (up down left right etc...)
  • Seeking
  • Repeat + Shuffle
  • Low battery alert
  • Show playlist? Jump to item?
Bugs
  • Sometimes the Kodi instance isn't discovered using ZeroConf. Add upnp?
Requirements
  • Go 1.3
  • Kodi (may work with recent Xbmc also)
Dependencies

https://github.com/ninjasphere/kodi_jsonrpc https://github.com/jonaz/mdns

Building the driver

The follwoing instructions were collected from the discussion in #3. See the issue thread for more details.

Requirements
GoLang

Install golang with cross compilation capabilities, since you will be compiling the driver for linux/arm (this is of course not needed if you are building from a linux/arm machine).

Some pointers for installing golang with cross compilation capability:

Logging in to the Spheramid

Your Spheramid should be accessible using the hostname ninjasphere or ninjasphere.local. If it is not, you need to find its IP address from your router.

ssh ninja@ninjasphere
# type in password: <default password is temppwd>
Prepare the Spheramid to receive the new driver

The spheramid root file system is mounted read-only. You will need to first enable read-write on the root file system, and create a directory for the new driver.

In the spheramid:

sudo -i
with-rw bash
mkdir /opt/ninjablocks/drivers/driver-kodi
chmod +w /opt/ninjablocks/drivers/driver-kodi
Compile

In the driver project directory:

GOOS=linux GOARCH=arm go build
Deploy the compiled driver

In the driver project directory:

scp driver-kodi package.json ninja@ninjasphere:/opt/ninjablocks/drivers/driver-kodi
Install the new driver

On the spheramid:

sudo -i
with-rw bash
nano /opt/ninjablocks/config/default.json
<add "driver-kodi" to the list of drivers in section homecloud.autostart -- don't forget the comma!>
Options

The usual Ninja Sphere configuration and parameters apply, but these are the most useful during development.

  • --autostart - Don't wait to be started by Ninja Sphere
  • --mqtt.host=HOST - Override default mqtt host
  • --mqtt.port=PORT - Override default mqtt host
More Information

More information can be found on the project site or by visiting the Ninja Blocks forums.

Contributing Changes

To contribute code changes to the project, please clone the repository and submit a pull-request (What does that mean?).

License

This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.

This work is Copyright (c) 2014-2015 - Ninja Blocks Inc.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址