-
Notifications
You must be signed in to change notification settings - Fork 3
/
node-red-flow-DeviceTwin.json
1 lines (1 loc) · 2.85 KB
/
node-red-flow-DeviceTwin.json
1
[{"id":"edbf203a.0f898","type":"debug","z":"75c85207.8e81a4","name":"","active":true,"console":"false","complete":"false","x":765.0000076293945,"y":182.50000190734863,"wires":[]},{"id":"8fb39308.e84238","type":"http request","z":"75c85207.8e81a4","name":"","method":"GET","ret":"obj","url":"https://oztf1x.internetofthings.ibmcloud.com/api/v0002/device/types/Mac/devices/Mac001/state/5a6dc0df5908010030c7f284","tls":"","x":493.5,"y":85,"wires":[["edbf203a.0f898","503e372c.868678","d57c0269.941d38"]]},{"id":"134c27fe.534e2","type":"inject","z":"75c85207.8e81a4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":135,"y":86,"wires":[["8022815d.319f8"]]},{"id":"8022815d.319f8","type":"function","z":"75c85207.8e81a4","name":"headers","func":"msg.headers={ 'Content-Type': 'application/json' }\nreturn msg;","outputs":1,"noerr":0,"x":299,"y":85,"wires":[["8fb39308.e84238"]]},{"id":"503e372c.868678","type":"function","z":"75c85207.8e81a4","name":"core","func":"return {payload:msg.payload.state.mem_core};","outputs":1,"noerr":0,"x":411.5,"y":177,"wires":[["edbf203a.0f898","40c2e82.25bde98"]]},{"id":"d57c0269.941d38","type":"function","z":"75c85207.8e81a4","name":"cpu","func":"return {payload:msg.payload.state.mem_cpu};","outputs":1,"noerr":0,"x":410.75000762939453,"y":244.75000381469727,"wires":[["edbf203a.0f898","ec6ca36f.7e5288"]]},{"id":"40c2e82.25bde98","type":"ui_gauge","z":"75c85207.8e81a4","name":"","group":"a21b4e81.1e9768","order":0,"width":0,"height":0,"gtype":"gage","title":"Memory","label":"units","format":"{{value}}","min":0,"max":"32850","colors":["#00B500","#E6E600","#CA3838"],"seg1":"","seg2":"","x":638.125,"y":267.5,"wires":[]},{"id":"ec6ca36f.7e5288","type":"ui_gauge","z":"75c85207.8e81a4","name":"","group":"49ff1015.c17b","order":0,"width":0,"height":0,"gtype":"gage","title":"Memory","label":"units","format":"{{value}}","min":0,"max":"32850","colors":["#00B500","#E6E600","#CA3838"],"seg1":"","seg2":"","x":640.6250076293945,"y":341.2500057220459,"wires":[]},{"id":"9aaf2701.30f5a","type":"ui_template","z":"75c85207.8e81a4","group":"fe3a76ca.0a93a","name":"Macbook Pro","order":0,"width":"0","height":"0","format":"<img src=\"https://images-na.ssl-images-amazon.com/images/I/71z-mURq4QL._SL1500_.jpg\" />","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":191.87500762939453,"y":180.0000057220459,"wires":[[]]},{"id":"a21b4e81.1e9768","type":"ui_group","z":"","name":"Memory per Core","tab":"6c9ca5b4.3ee7b4","order":1,"disp":true,"width":"6"},{"id":"49ff1015.c17b","type":"ui_group","z":"","name":"Memory per CPU","tab":"6c9ca5b4.3ee7b4","order":3,"disp":true,"width":"6"},{"id":"fe3a76ca.0a93a","type":"ui_group","z":"","name":"Macbook Pro","tab":"6c9ca5b4.3ee7b4","order":2,"disp":true,"width":"6"},{"id":"6c9ca5b4.3ee7b4","type":"ui_tab","z":"","name":"Device_Twin_Dashboard","icon":"dashboard","order":1}]