agile-visualization-example

AGILE flow to demonstrate some visualization possibilities of real-time data.

[{"id":"db8516a4.bd8de8","type":"debug","z":"f70adc27.a6079","name":"Logger","active":false,"console":"false","complete":"payload","x":711.5,"y":208,"wires":[]},{"id":"3fbaf80e.934cd8","type":"websocket in","z":"f70adc27.a6079","name":"Optical","server":"","client":"1e03d2f0.9434bd","x":249.5,"y":312,"wires":[["6519ef32.afec6","3dfbfee8.cfa4d2","729fc821.c6b75","a0ce03b9.70f548"]]},{"id":"93bf2b0c.7e684","type":"iot-datasource","z":"f70adc27.a6079","name":"Optical-DB","tstampField":"myData.myTimestamp","dataField":"myData.myInnerData.x","disableDiscover":true,"x":648.5,"y":292,"wires":[[]]},{"id":"6519ef32.afec6","type":"function","z":"f70adc27.a6079","name":"","func":"var json = JSON.parse(msg.payload)\nvar timestamp = json.lastUpdate;\nvar value = json.value;\n\nmsg.payload = {\n  myData: {\n   myTimestamp: timestamp,\n   myInnerData: {\n   x: value\n   }\n  }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":453.5,"y":292,"wires":[["db8516a4.bd8de8","93bf2b0c.7e684"]]},{"id":"3dfbfee8.cfa4d2","type":"debug","z":"f70adc27.a6079","name":"Logger","active":true,"console":"false","complete":"payload","x":369.5,"y":211,"wires":[]},{"id":"be6551ad.85864","type":"http request","z":"f70adc27.a6079","name":"REST Connect","method":"POST","ret":"txt","url":"http://agile:8080/api/device/ble247189079500/connection","tls":"","x":275,"y":80,"wires":[[]]},{"id":"bc54018.7f9ec","type":"inject","z":"f70adc27.a6079","name":"Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":100,"y":45,"wires":[["be6551ad.85864"]]},{"id":"54cecdad.c88a1c","type":"ui_chart","z":"f70adc27.a6079","name":"","group":"b33fe24f.3a787","order":0,"width":0,"height":0,"label":"Optical","chartType":"line","legend":"true","xformat":"%H:%M:%S","interpolate":"linear","nodata":"","ymin":"0","ymax":"","removeOlder":"60","removeOlderUnit":"1","x":623,"y":372,"wires":[[],[]]},{"id":"729fc821.c6b75","type":"function","z":"f70adc27.a6079","name":"","func":"var json = JSON.parse(msg.payload)\nvar timestamp = json.lastUpdate;\nvar value = json.value;\n\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":449.5,"y":373,"wires":[["54cecdad.c88a1c","ad3f903c.460ca"]]},{"id":"3146bc14.7ee684","type":"ui_button","z":"f70adc27.a6079","name":"Connect","group":"b33fe24f.3a787","order":0,"width":0,"height":0,"label":"Connect","color":"","icon":"","payload":"","payloadType":"str","topic":"","x":91,"y":123,"wires":[["be6551ad.85864"]]},{"id":"ad3f903c.460ca","type":"ui_gauge","z":"f70adc27.a6079","name":"","group":"b33fe24f.3a787","order":0,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"x":623,"y":414,"wires":[]},{"id":"a0ce03b9.70f548","type":"function","z":"f70adc27.a6079","name":"","func":"var json = JSON.parse(msg.payload)\nvar timestamp = json.lastUpdate;\n\nmsg.measurement = json.componentID;\nmsg.payload = parseFloat(json.value);\n\nreturn msg;","outputs":1,"noerr":0,"x":450.5,"y":478,"wires":[["c058cdf3.c5be48"]]},{"id":"c058cdf3.c5be48","type":"debug","z":"f70adc27.a6079","name":"Logger","active":false,"console":"false","complete":"payload","x":573.5,"y":551,"wires":[]},{"id":"1e03d2f0.9434bd","type":"websocket-client","z":"","path":"ws://agile:8080/ws/device/ble247189079500/Optical/subscribe","wholemsg":"false"},{"id":"b33fe24f.3a787","type":"ui_group","z":"f70adc27.a6079","name":"Default","tab":"e45433ee.11ceb","disp":false,"width":"6"},{"id":"e45433ee.11ceb","type":"ui_tab","z":"f70adc27.a6079","name":"SensorTag","icon":"dashboard"}]
cskiraly

Flow Info

created 7 months ago
updated 2 months, 3 weeks ago

Node Types

Core
  • debug (x3)
  • function (x3)
  • http request (x1)
  • inject (x1)
  • websocket in (x1)
  • websocket-client (x1)
Other
  • iot-datasource (x1)
  • ui_button (x1)
  • ui_chart (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_tab (x1)

Tags

  • agile
  • Agile-IoT
  • SensorTag
  • websocket
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option