如何取得空氣品質指標(AQI)的 資料-1
[{"id":"b2948675.b83368","type":"inject","z":"46b6a476.64e92c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":460,"y":200,"wires":[["c64b8198.77d79"]]},{"id":"6913086a.1f0ab8","type":"function","z":"46b6a476.64e92c","name":"","func":"var PM25,Status,PublishTime;\n\nArray.from(msg.payload).forEach(function(e,i){ \n if(e.SiteName=='大里'){ \n PM25 = {payload:Number(e['PM2.5'])}; \n Status={payload:e['Status']}; \n PublishTime={payload:e['PublishTime']}; \n }\n});\n\nreturn [PM25,Status,PublishTime];\n","outputs":3,"noerr":0,"initialize":"","finalize":"","x":750,"y":200,"wires":[["7672ede0.cd9e34","69bab252.132a3c"],["4de6518d.692fc"],["ce2b124.c566ff"]]},{"id":"7672ede0.cd9e34","type":"debug","z":"46b6a476.64e92c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":950,"y":140,"wires":[]},{"id":"c64b8198.77d79","type":"http request","z":"46b6a476.64e92c","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://opendata.epa.gov.tw/webapi/Data/REWIQA/?$orderby=SiteName&$skip=0&$top=1000&format=json","tls":"","persist":false,"proxy":"","authType":"","x":600,"y":200,"wires":[["6913086a.1f0ab8","3ce3191a.22ed56"]]},{"id":"4de6518d.692fc","type":"ui_text","z":"46b6a476.64e92c","group":"91d3cfc5.c30bb","order":1,"width":0,"height":0,"name":"","label":"空氣品質","format":"{{msg.payload}}","layout":"row-left","x":940,"y":220,"wires":[]},{"id":"ce2b124.c566ff","type":"ui_text","z":"46b6a476.64e92c","group":"91d3cfc5.c30bb","order":2,"width":0,"height":0,"name":"","label":"發佈時間","format":"{{msg.payload}}","layout":"row-left","x":940,"y":260,"wires":[]},{"id":"69bab252.132a3c","type":"ui_gauge","z":"46b6a476.64e92c","name":"","group":"91d3cfc5.c30bb","order":0,"width":0,"height":0,"gtype":"gage","title":"細懸浮微粒PM2.5","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":970,"y":180,"wires":[]},{"id":"3ce3191a.22ed56","type":"debug","z":"46b6a476.64e92c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":120,"wires":[]},{"id":"91d3cfc5.c30bb","type":"ui_group","z":"","name":"IAQI","tab":"2e8eb9a2.9f45f6","order":4,"disp":true,"width":"12","collapse":false},{"id":"2e8eb9a2.9f45f6","type":"ui_tab","z":"","name":"Weather","icon":"Dashboard","disabled":false,"hidden":false}]
沒有留言:
張貼留言