-
Notifications
You must be signed in to change notification settings - Fork 0
/
flows (1).json
1 lines (1 loc) · 5.78 KB
/
flows (1).json
1
[{"id":"55dd9328.111afc","type":"tab","label":"플로우 1","disabled":false,"info":""},{"id":"d8a983fb.b16ef","type":"ibmiot in","z":"55dd9328.111afc","authentication":"apiKey","apiKey":"ab86c866.7e6318","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"dev01","applicationId":"","deviceType":"vDev","eventType":"status","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":"","allApplications":"","allDeviceTypes":"","allLogicalInterfaces":"","allEvents":"","allCommands":"","allFormats":"","qos":0,"x":230,"y":100,"wires":[["c4fc895c.a40b48","61dc442d.e8316c"]]},{"id":"c4fc895c.a40b48","type":"debug","z":"55dd9328.111afc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":390,"y":60,"wires":[]},{"id":"61dc442d.e8316c","type":"function","z":"55dd9328.111afc","name":"","func":"msg.payload = msg.payload.d.cpu_usage;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":100,"wires":[[]]},{"id":"898811a8.7bcc4","type":"ui_slider","z":"55dd9328.111afc","name":"","label":"Target Temp","tooltip":"","group":"17c53cd1.a61013","order":4,"width":0,"height":0,"passthru":false,"outs":"end","topic":"slider1","topicType":"msg","min":0,"max":"50","step":1,"x":390,"y":320,"wires":[["c2298d9c.4ed9","1223820.beb9f7e","92dfa6f7.1feb08"]]},{"id":"c2298d9c.4ed9","type":"ui_gauge","z":"55dd9328.111afc","name":"","group":"17c53cd1.a61013","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":590,"y":280,"wires":[]},{"id":"1223820.beb9f7e","type":"function","z":"55dd9328.111afc","name":"","func":"global.set(\"sensorTemp\",msg.payload)\nreturn msg;\n\n/*var sangsu = msg.payload;\nglobal.set(\"sangsu\",msg.payload);\nreturn {payload:JSON.stringify(sangsu)};\n//return sangsu;*/","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":320,"wires":[["bfdaffe8.10007"]]},{"id":"9079442a.f85b08","type":"ui_text","z":"55dd9328.111afc","group":"17c53cd1.a61013","order":5,"width":0,"height":0,"name":"","label":"Valve","format":"{{msg.payload}}","layout":"row-spread","x":810,"y":380,"wires":[]},{"id":"92dfa6f7.1feb08","type":"debug","z":"55dd9328.111afc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":240,"wires":[]},{"id":"fb5e9de2.2ce06","type":"ibmiot in","z":"55dd9328.111afc","authentication":"apiKey","apiKey":"ab86c866.7e6318","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"vTemp","applicationId":"","deviceType":"vDev","eventType":"status","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":"","allApplications":"","allDeviceTypes":"","allLogicalInterfaces":"","allEvents":"","allCommands":"","allFormats":"","qos":0,"x":470,"y":520,"wires":[["1a9a216e.72bf8f","88668f1e.27246"]]},{"id":"1a9a216e.72bf8f","type":"debug","z":"55dd9328.111afc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":600,"wires":[]},{"id":"8a98d15b.da953","type":"function","z":"55dd9328.111afc","name":"","func":"/*var sangsu = msg.payload;\nglobal.set(\"sangsu2\",msg.payload);\nreturn {payload:JSON.stringify(sangsu)};\n//return sangsu;*/\nglobal.set(\"sangsu2\",msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":440,"wires":[["bfdaffe8.10007"]]},{"id":"5c19bc34.b7d804","type":"ibmiot out","z":"55dd9328.111afc","authentication":"apiKey","apiKey":"ab86c866.7e6318","outputType":"evt","deviceId":"dev01","deviceType":"vDev","eventCommandType":"status","format":"json","data":"data","qos":0,"name":"IBM IoT","service":"registered","x":840,"y":80,"wires":[]},{"id":"eb07312a.d7503","type":"function","z":"55dd9328.111afc","name":"","func":"var evt1 = {'d':{}};\nevt1.d.cpu_usage = msg.payload;\nreturn {payload:JSON.stringify(evt1)};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":660,"y":80,"wires":[["5c19bc34.b7d804"]]},{"id":"bfdaffe8.10007","type":"function","z":"55dd9328.111afc","name":"","func":"var ss1 = global.get(\"sensorTemp\");\nvar ss2 = global.get(\"sangsu2\");\n\nvar ss3 = \"On\";\n\nif(ss1>ss2){\n ss3 = \"On\";\n}else{\n ss3 = \"Off\";\n}\n\n//global.set(\"sangsu2\",msg.payload)\n//msg.payload = ss1+ss2;\nmsg.payload = ss3;\nglobal.set(\"valve\",msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":380,"wires":[["9079442a.f85b08"]]},{"id":"a329523.dc4b9b","type":"ui_text","z":"55dd9328.111afc","group":"17c53cd1.a61013","order":5,"width":0,"height":0,"name":"","label":"Temp","format":"{{msg.payload}}","layout":"row-spread","x":810,"y":520,"wires":[]},{"id":"88668f1e.27246","type":"function","z":"55dd9328.111afc","name":"","func":"msg.payload = msg.payload.d.temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":520,"wires":[["a329523.dc4b9b"]]},{"id":"4003a0dc.f76c3","type":"ui_slider","z":"55dd9328.111afc","name":"","label":"Current Temp","tooltip":"","group":"17c53cd1.a61013","order":4,"width":0,"height":0,"passthru":false,"outs":"end","topic":"slider1","topicType":"msg","min":0,"max":"50","step":1,"x":420,"y":440,"wires":[["8a98d15b.da953"]]},{"id":"ab86c866.7e6318","type":"ibmiot","name":"kdt","keepalive":"60","serverName":"","cleansession":true,"appId":"","shared":false},{"id":"17c53cd1.a61013","type":"ui_group","name":"Default","tab":"b3db5033.4a181","order":1,"disp":true,"width":"6","collapse":false},{"id":"b3db5033.4a181","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]