Freeboard plugin that allows you to create a datasource to AWS IoT topic by way of websockets and MQTT
npm install -S freeboard-aws-iot-ws-mqtt
Make sure you are in a valid Freeboard project in order for post install to work correctly.
If post install doesn't work you can run:
npm run create
Define specific folder:
npm run create -- ${DIRECTORY}
Move everything from the ./src
folder to the plugins folder in your Freeboard project.
Modify the index.html
file in your Freeboard
project.
<script type="text/javascript">
head.js("js/freeboard_plugins.min.js",
// **** Load AWS IoT Websockets MQTT
"plugins/freeboard-aws-iot-ws-mqtt/index.js",
// *** Load more plugins here ***
function(){
$(function()
{ //DOM Ready
freeboard.initialize(true);
var hashpattern = window.location.hash.match(/(&|#)source=([^&]+)/);
if (hashpattern !== null) {
$.getJSON(hashpattern[2], function(data) {
freeboard.loadDashboard(data, function() {
freeboard.setEditing(false);
});
});
}
});
});
</script>
- Create a thing
- Copy IoT endpoint
Start Freeboard project and add Datasource.
- Add AWS IoT Endpoint
- Add AWS Region
- Add AWS Access Key w/ IoT permissions
- Add AWS Secret Key w/ IoT permissions
- Add Topic(s) to subscribe to
Create a Text panel with 3 columns, and the datasource to datasources["Read Me"].message
In the AWS IoT console go to the Test tab.
Subscribe to a topic.
Publish to the same topic.