Skip to content

Instantly share code, notes, and snippets.

@leedrch
Last active December 25, 2018 16:22
Show Gist options
  • Save leedrch/aad8ddd1b56aa2e2ef049ba0ebfbc503 to your computer and use it in GitHub Desktop.
Save leedrch/aad8ddd1b56aa2e2ef049ba0ebfbc503 to your computer and use it in GitHub Desktop.
Flow example - data.go.kr API(temperature)
[{"id":"d4c6d033.49438","type":"comment","z":"5b33d6eb.97a4a8","name":"Readme","info":"\nInsert Url in http request node\n\n\n","x":100,"y":60,"wires":[]},{"id":"78e7974d.add3a8","type":"simpletime","z":"5b33d6eb.97a4a8","name":"","x":290,"y":100,"wires":[["8cfcde4b.0a3f6"]]},{"id":"37d3a738.ad98d8","type":"moment","z":"5b33d6eb.97a4a8","name":"","topic":"daytime","input":"payload","inputType":"msg","inTz":"Asia/Seoul","adjAmount":"40","adjType":"minutes","adjDir":"subtract","format":"20YYMMDD","locale":"ko_KR","output":"daytime","outputType":"msg","outTz":"Asia/Seoul","x":180,"y":180,"wires":[["5873269d.c7ec88"]]},{"id":"9e64b3a3.02e3e","type":"inject","z":"5b33d6eb.97a4a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":100,"wires":[["78e7974d.add3a8"]]},{"id":"8cfcde4b.0a3f6","type":"function","z":"5b33d6eb.97a4a8","name":"현재입력 HH00","func":"ontime = msg.myminute;\nonhour = msg.myhour;\nif(ontime>=40){\n msg.hourtime = onhour + \"00\";\n return msg;\n}","outputs":1,"noerr":0,"x":480,"y":100,"wires":[[]]},{"id":"57588ebf.67c08","type":"link out","z":"5b33d6eb.97a4a8","name":"w1","links":["99d3b097.4c33b"],"x":635,"y":100,"wires":[]},{"id":"99d3b097.4c33b","type":"link in","z":"5b33d6eb.97a4a8","name":"","links":["57588ebf.67c08"],"x":55,"y":180,"wires":[["37d3a738.ad98d8"]]},{"id":"8f30b283.e8a6e","type":"debug","z":"5b33d6eb.97a4a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":550,"y":180,"wires":[]},{"id":"5873269d.c7ec88","type":"http request","z":"5b33d6eb.97a4a8","name":"","method":"GET","ret":"obj","url":"","tls":"","x":370,"y":180,"wires":[["8f30b283.e8a6e","a93028b6.4173b8","f59f7f5f.91723"]]},{"id":"a93028b6.4173b8","type":"ui_gauge","z":"5b33d6eb.97a4a8","name":"","group":"c7fbc668.bf6fa8","order":0,"width":0,"height":0,"gtype":"gage","title":"우리동네 온도","label":"도","format":"{{payload.response.body.items.item[3].obsrValue}}","min":"-10","max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":560,"y":220,"wires":[]},{"id":"f59f7f5f.91723","type":"ui_gauge","z":"5b33d6eb.97a4a8","name":"","group":"c7fbc668.bf6fa8","order":0,"width":0,"height":0,"gtype":"gage","title":"우리동네 습도","label":"%","format":"{{payload.response.body.items.item[1].obsrValue}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":560,"y":260,"wires":[]},{"id":"13a806e5.b73a59","type":"simpletime","z":"5b33d6eb.97a4a8","name":"","x":290,"y":140,"wires":[["ec84d78d.b9e898"]]},{"id":"39fff2f4.c7690e","type":"inject","z":"5b33d6eb.97a4a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":140,"wires":[["13a806e5.b73a59"]]},{"id":"ec84d78d.b9e898","type":"function","z":"5b33d6eb.97a4a8","name":"현재입력 HH00","func":"ontime = msg.myminute;\nonhour = msg.myhour - 1;\nif(ontime<40){\n msg.hourtime = onhour + \"00\";\n return msg;\n}","outputs":1,"noerr":0,"x":480,"y":140,"wires":[["57588ebf.67c08"]]},{"id":"c7fbc668.bf6fa8","type":"ui_group","name":"Group 1","tab":"ab275d1.49409a","order":1,"disp":true,"width":6},{"id":"ab275d1.49409a","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment