A small example project that listens for Github commits via the MQTT Publish service hook and sends them to Google Glass.
This example uses Vagrant (http://www.vagrantup.com/) and Puppet (https://puppetlabs.com/) to setup a virtual machine that runs the both the web frontend for authentication and backend service script. This makes this project pretty easy to get up and running!
$api_client_id = "YOUR_CLIENT_ID";
$api_client_secret = "YOUR_CLIENT_SECRET";
$api_simple_key = "YOUR_SIMPLE_KEY";
_BROKER_URL = "YOUR_PUBLIC_MQTT_INSTANCE"
_BROKER_PORT = 1883
_TOPIC_BASE = "SOME_TOPIC_BASE"
_CLIENT_API = "YOUR_CLIENT_ID"
_CLIENT_SECRET = "YOUR_CLIENT_SECRET"
$ vagrant box add precise64 http://files.vagrantup.com/precise64.box
$ vagrant up
Navigate to the authentication page at http://localhost:4040 and log in.
Log into the virtual machine:
$ vagrant ssh
vagrant@precise64:~$ python /vagrant/backend/broker_listener.py
Enable the MQTT Publish service hook for one of your repos, reusing the existing broker information you already used in step two.
Commit something to that repo and see it pop!
So, the MQTT Publish service hook only uses QoS 0, which means it's sending out there and hoping. This is not the most robust situation, but usually works.
If you're still getting nothing and no error messages, there is a set of Github payload JSON you can uncomment and the manually just ping your broker using a mosquitto_pub or some such tool.
I wrote this demo pretty quick. It has bugs. It has gaps in features. And if I rolled it out, I'd burn my quota pretty quick (I see all you Glass Explorers making the codes and commits).