Skip to content

Instantly share code, notes, and snippets.

@njh
Created March 27, 2013 18:14
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Subscribe to BBC Radio 3 LiveText over MQTT
#!/usr/bin/env ruby
#
# Subscribe to BBC Radio 3 LiveText over MQTT
#
require 'rubygems'
require 'mqtt'
MQTT::Client.connect('test.mosquitto.org') do |c|
# If you pass a block to the get method, then it will loop
c.get('bbc/livetext/radio3') do |topic,message|
puts message
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment