2021年9月5日 星期日

Open Data AQI 空氣品質指數

Open Data AQI 空氣品質指數






[{"id":"580840eb.9bd58","type":"inject","z":"b57146cd.220188","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"14400","crontab":"","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"date","x":260,"y":120,"wires":[["a6f62fc4.399da"]]},{"id":"a6f62fc4.399da","type":"http request","z":"b57146cd.220188","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://opendata.epa.gov.tw/ws/Data/AQI/?$format=json","tls":"","persist":false,"proxy":"","authType":"","x":400,"y":120,"wires":[["e4c95293.277d8"]]},{"id":"4c50ed66.11a944","type":"debug","z":"b57146cd.220188","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"e4c95293.277d8","type":"json","z":"b57146cd.220188","name":"","property":"payload","action":"","pretty":false,"x":590,"y":120,"wires":[["4c50ed66.11a944","8f9ada61.fd8588"]]},{"id":"708093cd.03dd4c","type":"comment","z":"b57146cd.220188","name":"","info":"https://opendata.epa.gov.tw/ws/Data/AQI/?$format=json","x":390,"y":60,"wires":[]},{"id":"a074bbbc.4098f8","type":"ui_table","z":"b57146cd.220188","group":"f4ddc713.cb9a58","name":"","order":3,"width":"6","height":"8","columns":[{"field":"SiteName","title":"SiteName","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"AQI","title":"AQI","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Status","title":"Status","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"PM25","title":"PM2.5","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"PublishTime","title":"PublishTime","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":770,"y":280,"wires":[]},{"id":"8f9ada61.fd8588","type":"function","z":"b57146cd.220188","name":"","func":"var a= msg.payload;\nvar len= msg.payload.length;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":180,"wires":[["f88cf3fa.512f4","3ac58951.424b06"]]},{"id":"f88cf3fa.512f4","type":"debug","z":"b57146cd.220188","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":180,"wires":[]},{"id":"3ac58951.424b06","type":"function","z":"b57146cd.220188","name":"","func":"var a = msg.payload;\nlet arr = [];\nlet obj;\n\na.forEach(function(e,i){\n    obj = {};\n    obj.SiteName    = e['SiteName'];\n    obj.AQI         = e['AQI'];\n    obj.Status      = e['Status'];\n    obj.PM25        = e['PM2.5'];\n    obj.PublishTime = e['PublishTime'];\n    \n    arr.push(obj) ;    \n})\n\nmsg.payload = arr;\ncontext.global.AQI= msg.payload;\ncontext.global.lengtTMP=0;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":240,"wires":[["aecd04.1ada63","a074bbbc.4098f8"]]},{"id":"aecd04.1ada63","type":"debug","z":"b57146cd.220188","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":240,"wires":[]},{"id":"f4ddc713.cb9a58","type":"ui_group","name":"AQI","tab":"763667c5.ae1af8","order":1,"disp":true,"width":"6","collapse":false},{"id":"763667c5.ae1af8","type":"ui_tab","name":"LAB","icon":"dashboard"}]

沒有留言:

張貼留言

113 學年度第 1 學期 RFID應用課程 Arduino程式

113 學年度第 1 學期 RFID應用課程 Arduino程式 https://www.mediafire.com/file/zr0h0p3iosq12jw/MFRC522+(2).7z/file 內含修改過後的 MFRC522 程式庫 (原程式有錯誤) //定義MFRC522...