AMS5915 Dashboard - Historic

Node-RED Dashboard – AMS5915

AMS5915 Dashboard - Historic

Node-RED Dashboard Flow

The examples in this series are for use with Node-RED and our NCD IoT line of products. If you haven’t already, check out this post, which will provide the resources required to get your environment set up.

This example will set up a dashboard with 2 tabs, one containing current readings, the other showing historical data. All telemetry reported from the sensor is displayed in both tabs.

Usage

From the command line (Power Shell for Windows users), navigate to the Node-RED directory and type npm i ncd-red-ams5915, then start Node-RED.

Click on the flow below to copy it to your clipboard.

From the hamburger menu on the top right of your flow window, hover over import, click clipboard, and paste in the copied flow.

Double click on the AMS5915 node and set up the “I2C Connection” field.

You also need to update the sensor type, the info tab has more information.

Deploy the flow and you will begin receiving telemetry at the interval indicated by the sensor node settings.

The Flow

[{"id":"b084cf2d.b73b6","type":"ui_gauge","z":"13754c0b.dca3a4","name":"","group":"d79de0e4.bda58","order":2,"width":0,"height":0,"gtype":"gage","title":"Temperature (Current)","label":"Fahrenheit","format":"{{value | number:2}}","min":0,"max":"100","colors":["#4288ff","#0de617","#ff312d"],"seg1":"","seg2":"","x":470,"y":360,"wires":[]},{"id":"966d9f8d.a3776","type":"ui_chart","z":"13754c0b.dca3a4","name":"","group":"e42b58e2.7254b8","order":2,"width":"8","height":"5","label":"Temperature (Historic)","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#0eb417","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":470,"y":320,"wires":[[],[]]},{"id":"4f759e4d.a8b1","type":"ui_chart","z":"13754c0b.dca3a4","name":"","group":"e42b58e2.7254b8","order":1,"width":"8","height":"5","label":"Pressure (Historic)","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":470,"y":160,"wires":[[],[]]},{"id":"be16cc6f.47a6","type":"ui_gauge","z":"13754c0b.dca3a4","name":"","group":"d79de0e4.bda58","order":1,"width":0,"height":0,"gtype":"gage","title":"Pressure (Current)","label":"mBar","format":"{{value | number:2}}","min":"-1.5","max":"1.5","colors":["#ff151a","#e6e600","#18ca10"],"seg1":"","seg2":"","x":470,"y":200,"wires":[]},{"id":"68a3f00b.aef48","type":"ncd-ams5915","z":"13754c0b.dca3a4","name":"","connection":"","interval":"500","range":5,"sType":"d-b","pScale":1,"tempScale":"f","x":160,"y":260,"wires":[["4f759e4d.a8b1","be16cc6f.47a6"],["b084cf2d.b73b6","966d9f8d.a3776"]]},{"id":"d79de0e4.bda58","type":"ui_group","z":"","name":"Default","tab":"104ce52d.cc60bb","disp":false,"width":"12","collapse":false},{"id":"e42b58e2.7254b8","type":"ui_group","z":"","name":"Default","tab":"459c002f.aa916","disp":false,"width":"16","collapse":false},{"id":"104ce52d.cc60bb","type":"ui_tab","z":"","name":"Current","icon":"dashboard"},{"id":"459c002f.aa916","type":"ui_tab","z":"","name":"History","icon":"dashboard"}]
AMS5915 Flow

Check out a full list of AMS5915 products on our store!