2021年8月20日 星期五

台中市11站監控PM2.5中的大里國中站PM2.5資料擷取

 台中市11站監控PM2.5中大里國中站PM2.5資料擷取


https://www.airq.org.tw/Home/realtime10m




資料格式

17: object

ID: "412_10002"

City: "臺中市"

Address: "臺中市大里區國中路365"

Name: "大里高中"

Latitude: "24.0951235"

Longitude: "120.6789632"

SensorType: "PM2.5"

Value: "5.71"

StartTime: "2021/8/19 下午 07:50:40"

EndTime: "2021/8/19 下午 08:00:40"

 [{"id":"7a496973.0db868","type":"inject","z":"38c96cc5.454e14","name":"Click","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"7200","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":60,"wires":[["d7bffa10.db0958"]]},{"id":"c2624101.0480d","type":"ui_switch","z":"38c96cc5.454e14","name":"","label":"啟動讀取opendata","tooltip":"","group":"9d7c6798.9fc5e8","order":61,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":100,"wires":[["d7bffa10.db0958"]]},{"id":"559d5560.1885bc","type":"ui_gauge","z":"38c96cc5.454e14","name":"PM2.5","group":"9d7c6798.9fc5e8","order":62,"width":0,"height":0,"gtype":"gage","title":"大里區 細懸浮微粒(PM2.5)指標","label":"(μg/m3)","format":"{{value}}","min":0,"max":"71","colors":["#00b500","#e6e600","#ca3838"],"seg1":"35","seg2":"59","x":550,"y":260,"wires":[]},{"id":"d7bffa10.db0958","type":"http request","z":"38c96cc5.454e14","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://www.airq.org.tw/Home/realtime10m","tls":"","persist":false,"proxy":"","authType":"","x":240,"y":60,"wires":[["a1699e3e.367bf","d01fa14d.c3dca","6e2ea64c.85d278"]]},{"id":"a1699e3e.367bf","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":60,"wires":[]},{"id":"d01fa14d.c3dca","type":"function","z":"38c96cc5.454e14","name":"找出大里國中 PM2.5  , PublishTime","func":"\nvar a = msg.payload;\na.forEach(function(e,i){\n    if(e.Name=='大里高中')\n    {\n        msg.PM25 = e['Value'];\n        msg.PublishTime = e['StartTime'];\n    }\n});\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":160,"y":200,"wires":[["56ac0e9.34235f","8dbd6d12.10c86","18edab.dbb47255","f9f9d05.6516f3","270687e6.8220a8"]]},{"id":"56ac0e9.34235f","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"PM25","targetType":"msg","statusVal":"","statusType":"auto","x":470,"y":180,"wires":[]},{"id":"8dbd6d12.10c86","type":"function","z":"38c96cc5.454e14","name":"PM2.5資料","func":"msg.payload=msg.PM25;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":390,"y":260,"wires":[["559d5560.1885bc","e90ddad6.75c9c8"]]},{"id":"e90ddad6.75c9c8","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":300,"wires":[]},{"id":"58ec0859.8014c8","type":"comment","z":"38c96cc5.454e14","name":"PM2.5開放資料網址","info":"南投地區PM2.5開放資料網址如下:\n\nhttp://www.airq.org.tw/Home/AboutData_ZH\n\nJSON 格式 API(更新頻率:每 10分鐘)\n\nhttp://www.airq.org.tw/Home/realtime10m\n","x":110,"y":20,"wires":[]},{"id":"a5b5f26d.c3afc","type":"DataIn","z":"38c96cc5.454e14","collection":"7a14aca8.b15994","name":"PM2.5","update":false,"path":"/","x":670,"y":140,"wires":[]},{"id":"6e2ea64c.85d278","type":"function","z":"38c96cc5.454e14","name":"set global temp","func":"context.global.temp=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":20,"wires":[[]]},{"id":"18edab.dbb47255","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"PublishTime","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":220,"wires":[]},{"id":"b7db3840.90f4a8","type":"ui_text","z":"38c96cc5.454e14","group":"9d7c6798.9fc5e8","order":63,"width":0,"height":0,"name":"發行時間","label":"發行時間","format":"{{msg.payload}}","layout":"row-center","x":560,"y":340,"wires":[]},{"id":"7afd9739.644998","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":380,"wires":[]},{"id":"f9f9d05.6516f3","type":"function","z":"38c96cc5.454e14","name":"發行時間","func":"msg.payload=msg.PublishTime;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":380,"y":340,"wires":[["b7db3840.90f4a8","7afd9739.644998"]]},{"id":"b3fa1448.ed6908","type":"comment","z":"38c96cc5.454e14","name":"","info":"https://www.ntepb.gov.tw/sub/content/index.aspx?Parser=1,17,511,494,496\n\n0-11\t12-23\t24-35\t\n低\t    低\t    低\n36-41\t42-47\t48-53\n中\t    中\t    中\n54-58   59-64\t65-70\t\n高\t    高\t    高\n>71\n非常高","x":370,"y":300,"wires":[]},{"id":"a3889d5a.2287e","type":"change","z":"38c96cc5.454e14","name":"","rules":[{"t":"set","p":"datapath","pt":"msg","to":"/myRootTest","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":140,"wires":[["a5b5f26d.c3afc","13764a3d.b30696"]]},{"id":"6990d7f2.19f1f8","type":"change","z":"38c96cc5.454e14","name":"","rules":[{"t":"set","p":"datapath","pt":"msg","to":"/myRootTest","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":400,"wires":[["f68835a3.8114c8"]]},{"id":"f68835a3.8114c8","type":"DataOut","z":"38c96cc5.454e14","collection":"7a14aca8.b15994","name":"PM2.5","path":"/","error":false,"x":450,"y":420,"wires":[["a21b5c7a.65c7d","d5d97848.c9e668"]]},{"id":"a21b5c7a.65c7d","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"console":"false","complete":"false","x":590,"y":420,"wires":[]},{"id":"9596cdb2.d5fb5","type":"json","z":"38c96cc5.454e14","name":"","property":"payload","action":"str","pretty":false,"x":350,"y":140,"wires":[["a3889d5a.2287e","c755c089.5f086"]]},{"id":"c755c089.5f086","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":100,"wires":[]},{"id":"13764a3d.b30696","type":"debug","z":"38c96cc5.454e14","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":100,"wires":[]},{"id":"d5d97848.c9e668","type":"ui_text","z":"38c96cc5.454e14","group":"9d7c6798.9fc5e8","order":6,"width":"0","height":"0","name":"","label":"PM2.5訊息","format":"{{msg.payload}}","layout":"row-center","x":570,"y":460,"wires":[]},{"id":"270687e6.8220a8","type":"function","z":"38c96cc5.454e14","name":"PM2.5資料","func":"msg.payload=['大里國中',msg.PM25,msg.PublishTime];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":210,"y":140,"wires":[["9596cdb2.d5fb5"]]},{"id":"e9f95dc2.fe72a","type":"inject","z":"38c96cc5.454e14","name":"Click","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"7200","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":400,"wires":[["6990d7f2.19f1f8"]]},{"id":"f7360032.548b8","type":"ui_switch","z":"38c96cc5.454e14","name":"","label":"啟動資料庫開關","tooltip":"","group":"9d7c6798.9fc5e8","order":61,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":120,"y":360,"wires":[["6990d7f2.19f1f8"]]},{"id":"9d7c6798.9fc5e8","type":"ui_group","name":"Main","tab":"89e51ea1.a64af","order":1,"disp":true,"width":"6","collapse":false},{"id":"7a14aca8.b15994","type":"json-db-collection","name":"DATA_PM25","collection":"DATA","save":false},{"id":"89e51ea1.a64af","type":"ui_tab","name":"Dashboard","icon":"dashboard"}]

沒有留言:

張貼留言

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

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