MeshRuby
Ruby library for the MeshBlu IoT messaging platform. We're on Rubygems.org. Tell everybody.
Technical Details
- socket.io-client-simple as a SocketIO client.
- EventMachine for single threaded concurrency goodness.
Pushes incoming messages (background thread) into an EM::Queue object that executes in the main thread.
Project Status: Active
Under active maintenance but still in early development. API is likely to change in future releases.
The only event that is currently implemented is onmessage. Support the project by submitting an issue (you'll win our friendship forever)!
Example
Receive messages from MeshBlu and send a response to sender:
uid = '11111111-1111-1111-1111-111111111111'
token = '22222222222222222222222222222222'
mesh = EM::MeshRuby.new(uid, token)
mesh.toggle_debug!
EM.run do
mesh.connect
mesh. { |msg| mesh.emit(msg["fromUuid"], {wow: "Thanks! :)"}) }
end
Otherstuff
Licensed under the Ruby License. Built with love by DataMelon.