#Description This files will enable you to directly connect your widgets with your mqtt broker. It consists of a job, which will manage the connection to your project. It will over a rest api to publish, subscribe and unsubscribe from your widgets.
#Installation Add the mqtt.rb to your dashing jobs.
#Usage To connect a widget to mqtt use a post on 'mqtt/subscribe' on your constructor. As parameters you need to post the topic to subscribe and the widget id. E.g.:
$.post 'mqtt/subscribe',
topic: @get('subscribe'),
widgetId: @get('id'),
(data) =>
console.log data
Briliant piece of code! Do you know how I can remember the state on a page refresh? I am thing on outputting the state and widget name to txt file that is read directly in the widget constructor. What do you think, @mapero ?