Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.