Agile node red flow, with Dashboard, and websocket
-
-
Save doitdagi/46eb0754d27c4310d795107c44ca7674 to your computer and use it in GitHub Desktop.
Agile node red flow, with Dashboard, and websocket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"46141ce3.c69904","type":"websocket-listener","z":"d29b6a7a.b67198","path":"ws://localhost:8080/ws/device/bleF4B85E8D514A/PULSE/subscribe","wholemsg":"false"},{"id":"bbd05ec3.def92","type":"debug","z":"d29b6a7a.b67198","name":"Logger","active":true,"console":"false","complete":"payload","x":748,"y":434,"wires":[]},{"id":"fd9e4720.b778b8","type":"websocket in","z":"d29b6a7a.b67198","name":"pulse","server":"46141ce3.c69904","client":"","x":319,"y":467,"wires":[["d5fdba53.0c6348","a465e2fc.50284"]]},{"id":"b4e87c1e.865","type":"iot-datasource","z":"d29b6a7a.b67198","name":"PULSE-DB","tstampField":"myData.myTimestamp","dataField":"myData.myInnerData.x","disableDiscover":true,"x":751,"y":559,"wires":[[]]},{"id":"d5fdba53.0c6348","type":"function","z":"d29b6a7a.b67198","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":536,"y":457,"wires":[["bbd05ec3.def92","b4e87c1e.865"]]},{"id":"a465e2fc.50284","type":"debug","z":"d29b6a7a.b67198","name":"Logger","active":true,"console":"false","complete":"payload","x":713,"y":334,"wires":[]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment