Skip to content

Ruby gem for the Google Anymote Protocol used to control Google TVs.

License

Notifications You must be signed in to change notification settings

rnhurt/google_anymote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby gem for the Google Anymote Protocol used to control Google TVs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages