GithubHelp home page GithubHelp logo

benjaminchodroff / freeboard-mqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alsm/freeboard-mqtt

3.0 2.0 0.0 56 KB

MQTT and IBM IoT Foundation plugins for freeboard.io

License: Eclipse Public License 1.0

JavaScript 100.00%

freeboard-mqtt's Introduction

freeboard-mqtt

MQTT plugin for freeboard.io

MQTT 3.1.1 is an ISO standard publish-subscribe based message protocol for fast and secure IoT communication over TCP/IP.

For a quick demo, try the IBM Watson IoT Quickstart. Add this plugin to Freeboard.io by logging in and editing your board, click "Developer Console" and add the following plugin URL to the list of scripts: https://rawgit.com/benjaminchodroff/freeboard-mqtt/master/clearobject.mqtt.plugin.js

Add a new datasource to your freeboard and select the MQTT plugin. Enter any name for this plugin, substitute the DEVICEID shown in the upper right of the quickstart in the topic setting, and click "Save". In Freeboard, add a pane, and then in your pane click the "+" icon to add a text widget. In the widget, you can click the "+ Datasource" button and enter a value such as datasources["Example"]["16e158b44ac0"]["d"]["temp"] where "Example" is the name of your datasource and 16e158b44ac0 is the DEVICEID.

Save your widget, and freeboard will show the data returned from your datasource as you update it!

This opensource plugin is community supported with help from ClearObject, Eclipse Paho, and IBM Watson IoT. Contact Benjamin Chodroff for IoT assistance.

Alternatively, to use these plugins with your own local copy of freeboard, copy the files into a directory where freeboard will be able to see them, such as plugins/thirdparty in the freeboard main directory. To load the plugins in your local instance of freeboard you will have to add them to the list used to initialize freeboard, for example below is a section of the default freeboard index.html that I have extended to load the plugin.

<script type="text/javascript">
	head.js("js/freeboard+plugins.min.js",
			"plugins/thirdparty/clearobject.mqtt.plugin.js",
			// *** Load more plugins here ***
			function(){
				$(function()
				{ //DOM Ready
					freeboard.initialize(true);
				});
			});
</script>

This plugin uses a cloud hosted version of Paho MQTT Javascript. If you do not have access to the internet, you will need to modify clearobject.mqtt.plugin.js and reference a local version of the Paho MQTT javascript library.

freeboard-mqtt's People

Contributors

theashwanik avatar benjaminchodroff avatar

Stargazers

Karabo The Answer avatar Baks Farayev avatar Mahesh Neelakanta avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.