0.0
No commit activity in last 3 years
No release in over 3 years
Ruby implementation of the Google Anymote Protocol.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.4.11
 Project Readme

Ruby Gem for the Google TV Pairing and Anymote Protocols http://stillmaintained.com/rnhurt/google_anymote

This gem implements the Google Anymote Protocol which is used to send events to Google TVs. The protocol is based on a client-server model, with communications based on protocol buffers. Clients search for a server on the local network. When a client wants to connect to a server it has discovered, it does pairing authentication. After a successful pairing, both the client and the server have certificates specific to the client app, and can communicate in the future without the need to authenticate again. The transport layer uses TSL/SSL to protect messages against sniffing.

Note: I couldn't have made this without Steven Le's Python client.

Installation

Add this line to your application's Gemfile:

gem 'google_anymote'

And then execute:

$ bundle

Or install it yourself as:

$ gem install google_anymote

Prerequisites

In order to send commands to a Google TV you must have an OpenSSL certificate. This certificate can be self-signed and is pretty easy to generate. Just follow these steps (taken from http://www.akadia.com/services/ssh_test_certificate.html):

$ openssl genrsa -des3 -out server.key 1024
$ openssl req -new -key server.key -out server.csr
$ openssl rsa -in server.key -out server.key
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
$ cat server.key server.crt > cert.pem

Use the cert.pem as your certificate when you pair with the Google TV.

Usage

Command Line Utilities

This gem includes several command line utilities to get you up and running.

  • discover - searches your network for compatible Google TVs
  • pair - helps you pair your computer to a particular Google TV

As a gem

  1. Create a GoogleAnymote::TV object

    gtv = GoogleAnymote::TV.new(my_cert, hostname)

  2. Fling URIs to that TV

    gtv.fling_uri('http://github.com')

Contributing

  1. Fork it
  2. Create your feature branch ('git checkout -b my-new-feature')
  3. Commit your changes ('git commit -am 'Added some feature')
  4. Push to the branch ('git push origin my-new-feature')
  5. Create new Pull Request