Node-RED Dashboard – Enterprise Light Sensor

Enterprise Light Sensor Dashboard - History

Node-RED Dashboard Flow

The examples in this series are for use with Node-RED and our Wireless Enterprise line of products. If you haven’t already, check out this post, which will explain the packages required for this flow.

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

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 Wireless Gateway node and set up the “Serial Device” field.

At this point you can deploy (it will throw an error about unconfigured nodes, this is fine).

Go to the other node that still shows a triangle, indicating it needs additional configuration, and select the serial device you just created from the drop down.

Deploy again and you will begin receiving telemetry when the sensor is restarted, or at the interval indicated by the settings stored in the sensor.

Enterprise Light Sensor Dashboard - Current

The Flow

[{"id":"47d1a7c3.ae2358","type":"ncd-wireless-node","z":"13754c0b.dca3a4","name":"","connection":"","config_comm":"","addr":"","sensor_type":"10","auto_config":true,"node_id":0,"delay":"5","destination":"0000FFFF","power":"1","retries":10,"pan_id":"7FFF","change_enabled":false,"change_pr":"0","change_interval":"0","cm_calibration":"0","bp_altitude":"0","bp_pressure":"0","bp_temp_prec":"0","bp_press_prec":"0","amgt_accel":"0","amgt_mag":"0","amgt_gyro":"0","x":130,"y":320,"wires":[["48815e1.4a654a","c97b7299.a1ff"]]},{"id":"3b49bbb1.7d7b64","type":"ui_chart","z":"13754c0b.dca3a4","name":"","group":"8f08e849.547418","order":1,"width":"0","height":"0","label":"Light Level","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"bezier","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"1","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#00e40f","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":770,"y":220,"wires":[[],[]]},{"id":"48815e1.4a654a","type":"change","z":"13754c0b.dca3a4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"data.battery","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":420,"wires":[["b604b0e9.515f9"]]},{"id":"3ee4cb0d.c46c74","type":"ncd-gateway-node","z":"13754c0b.dca3a4","name":"","connection":"","x":250,"y":140,"wires":[["5fc4b3bf.ccaabc"]]},{"id":"5fc4b3bf.ccaabc","type":"debug","z":"13754c0b.dca3a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":510,"y":80,"wires":[]},{"id":"b604b0e9.515f9","type":"ui_gauge","z":"13754c0b.dca3a4","name":"","group":"a2478662.b4c238","order":2,"width":"12","height":"4","gtype":"gage","title":"Battery","label":"V","format":"{{value | number:2}}","min":0,"max":"3.3","colors":["#e00600","#e6e600","#07ca00"],"seg1":"","seg2":"","x":600,"y":420,"wires":[]},{"id":"c97b7299.a1ff","type":"split","z":"13754c0b.dca3a4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":370,"y":300,"wires":[["3b49bbb1.7d7b64","fe7e0bea.c7ddb8"]]},{"id":"fe7e0bea.c7ddb8","type":"ui_gauge","z":"13754c0b.dca3a4","name":"","group":"a2478662.b4c238","order":1,"width":"12","height":"4","gtype":"gage","title":"Light Level","label":"Lux","format":"{{value | number:2}}","min":"0","max":"1000","colors":["#403600","#d9ca00","#ffeb00"],"seg1":"","seg2":"","x":770,"y":300,"wires":[]},{"id":"8f08e849.547418","type":"ui_group","z":"","name":"Thermocouple","tab":"c4f82725.5cb928","disp":false,"width":"24","collapse":false},{"id":"a2478662.b4c238","type":"ui_group","z":"","name":"Thermocouple","tab":"298badf6.a6a0a2","disp":false,"width":"12","collapse":false},{"id":"c4f82725.5cb928","type":"ui_tab","z":"","name":"History","icon":"dashboard"},{"id":"298badf6.a6a0a2","type":"ui_tab","z":"","name":"Current","icon":"dashboard"}]
Enterprise Light Sensor Flow