Get openweathermap.org 台北溫濕度天氣狀況
{"coord":{"lon":121.5319,"lat":25.0478},"weather":[{"id":800,"main":"Clear","description":"晴","icon":"01n"}],"base":"stations","main":{"temp":30.39,"feels_like":35.49,"temp_min":30.26,"temp_max":31.07,"pressure":1012,"humidity":68},"visibility":10000,"wind":{"speed":0.45,"deg":299,"gust":0.89},"clouds":{"all":3},"dt":1631280210,"sys":{"type":2,"id":2032887,"country":"TW","sunrise":1631223485,"sunset":1631268250},"timezone":28800,"id":1668341,"name":"Taipei","cod":200}
|
|
|
|
/******************************** 資料介接方式 ***************In JSON
*****************/ By city name : api.openweathermap.org/data/2.5/weather?q=Taichung,tw By city ID "id":
1668399 api.openweathermap.org/data/2.5/weather?id=1668399 By geographic coordinates :
"lon": 120.68,
"lat": 24.15
api.openweathermap.org/data/2.5/weather?lat=24.15&lon=120.68
|
{
"id": 1665148,
"name": "Taipei",
"state": "",
"country": "TW",
"coord": {
"lon":
121.581749,
"lat": 24.94702
}
}, {
"id": 1665194,
"name": "Yunlin",
"state": "",
"country": "TW",
"coord": {
"lon": 120.384811,
"lat": 23.70701
}
}, {
"id": 1665196,
"name": "Douliu",
"state": "",
"country": "TW",
"coord": {
"lon": 120.543327,
"lat": 23.70944
}
}, {
"id": 1665310,
"name": "Yuren",
"state": "",
"country": "TW",
"coord": {
"lon": 121.542778,
"lat": 22.0275
}
}, {
"id": 1665357,
"name": "Yujing",
"state": "",
"country": "TW", "coord": {
"lon": 120.46138,
"lat": 23.124929
}
}, {
"id": 1665988,
"name": "Zhigaozhuang",
"state": "",
"country": "TW",
"coord": {
"lon": 120.61602,
"lat": 24.154539
}
}, {
"id": 1665989,
"name": "Chishan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.356468,
"lat": 22.639231
}
}, {
"id": 1666529,
"name": "Tongpanqian",
"state": "",
"country": "TW",
"coord": {
"lon": 120.213608,
"lat": 22.95417
}
}, {
"id": 1667031,
"name": "Touchongbu",
"state": "",
"country": "TW",
"coord": {
"lon": 121.047218,
"lat": 24.7775
}
}, {
"id": 1667289,
"name": "Dingjiaotan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.729721,
"lat": 24.26417
}
}, {
"id": 1667905,
"name": "Taoyuan",
"state": "",
"country": "TW",
"coord": {
"lon": 121.318703,
"lat": 24.989599
}
}, {
"id": 1668284,
"name": "Taiwan",
"state": "",
"country": "TW",
"coord": {
"lon": 121.0,
"lat": 24.0
}
}, {
"id": 1668295,
"name": "Taitung",
"state": "",
"country": "TW",
"coord": {
"lon": 121.144569,
"lat": 22.759911
}
}, {
"id": 1668338,
"name": "Taipei City",
"state": "",
"country": "TW",
"coord": {
"lon": 121.650269,
"lat": 25.048611
}
}, {
"id": 1668341,
"name": "Taipei",
"state": "",
"country": "TW",
"coord": {
"lon": 121.531853,
"lat": 25.04776
}
}, {
"id": 1668347,
"name": "Taibao",
"state": "",
"country": "TW",
"coord": {
"lon": 120.332222,
"lat": 23.45944
}
}, {
"id": 1668352,
"name": "Tainan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.188759,
"lat": 23.000019
}
}, {
"id": 1668353,
"name": "Xinying",
"state": "",
"country": "TW",
"coord": {
"lon": 120.310562,
"lat": 23.30694
}
}, {
"id": 1668355,
"name": "Tainan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.213333,
"lat": 22.990829
}
}, {
"id": 1668396,
"name": "Fengyuan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.716942,
"lat": 24.25
}
}, {
"id": 1668399,
"name": "Taichung",
"state": "",
"country": "TW",
"coord": {
"lon": 120.683899,
"lat": 24.1469
}
}, {
"id": 1668467,
"name": "Daxi",
"state": "",
"country": "TW",
"coord": {
"lon": 121.290428,
"lat": 24.88373
}
}, {
"id": 1668630,
"name": "Wucheng",
"state": "",
"country": "TW",
"coord": {
"lon": 119.624107,
"lat": 23.56588
}
}, {
"id": 1668664,
"name": "Songwu",
"state": "",
"country": "TW",
"coord": {
"lon": 121.206108,
"lat": 24.94389
}
}, {
"id": 1668841,
"name": "Siji",
"state": "",
"country": "TW",
"coord": {
"lon": 121.426109,
"lat": 24.48694
}
}, {
"id": 1668885,
"name": "Shuiyuandi",
"state": "",
"country": "TW",
"coord": {
"lon": 121.599998,
"lat": 23.98333
}
}, {
"id": 1669321,
"name": "Shibazhang",
"state": "",
"country": "TW",
"coord": {
"lon": 120.683327,
"lat": 23.91667
}
}, {
"id": 1669401,
"name": "Dongshan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.6325,
"lat": 24.27306
}
}, {
"id": 1670029,
"name": "Banqiao",
"state": "",
"country": "TW",
"coord": {
"lon": 121.467194,
"lat": 25.014271
}
}, {
"id": 1670310,
"name": "Puli",
"state": "",
"country": "TW",
"coord": {
"lon": 120.969521,
"lat": 23.966391
}
}, {
"id": 1670395,
"name": "Pojiao",
"state": "",
"country": "TW",
"coord": {
"lon": 121.223083,
"lat": 25.08622
}
}, {
"id": 1670479,
"name": "Pingtung",
"state": "",
"country": "TW",
"coord": {
"lon": 120.614441,
"lat": 22.49555
}
}, {
"id": 1670481,
"name": "Pingtung",
"state": "",
"country": "TW",
"coord": {
"lon": 120.488136,
"lat": 22.67135
}
}, {
"id": 1670651,
"name": "Penghu County",
"state": "",
"country": "TW",
"coord": {
"lon": 119.611382,
"lat": 23.57111
}
}, {
"id": 1671564,
"name": "Nantou",
"state": "",
"country": "TW",
"coord": {
"lon": 120.92704,
"lat": 23.83419
}
}, {
"id": 1671566,
"name": "Nantou",
"state": "",
"country": "TW",
"coord": {
"lon": 120.663872,
"lat": 23.915661
}
}, {
"id": 1671971,
"name": "Miaoli",
"state": "",
"country": "TW",
"coord": {
"lon": 120.823669,
"lat": 24.56427
}
}, {
"id": 1672222,
"name": "Huiyaozi",
"state": "",
"country": "TW",
"coord": {
"lon": 121.12825,
"lat": 22.76885
}
}, {
"id": 1672228,
"name": "Magong",
"state": "",
"country": "TW",
"coord": {
"lon": 119.586273,
"lat": 23.565399 }
}, {
"id": 1672430,
"name": "Longshanli",
"state": "",
"country": "TW",
"coord": {
"lon": 120.550003,
"lat": 24.08333
}
}, {
"id": 1672551,
"name": "Lugu",
"state": "",
"country": "TW",
"coord": {
"lon": 120.752502,
"lat": 23.746389
}
}, {
"id": 1672557,
"name": "Lugang",
"state": "",
"country": "TW",
"coord": {
"lon": 120.434998,
"lat": 24.05583
}
}, {
"id": 1672850,
"name": "Lindefu",
"state": "",
"country": "TW",
"coord": {
"lon": 120.319832,
"lat": 22.62184
}
}, {
"id": 1673046,
"name": "Laodian",
"state": "",
"country": "TW",
"coord": {
"lon": 120.406113,
"lat": 23.4575 }
}, {
"id": 1673169,
"name": "Guting",
"state": "",
"country": "TW",
"coord": {
"lon": 121.51667,
"lat": 25.033331
}
}, {
"id": 1673200,
"name": "Guomin",
"state": "",
"country": "TW",
"coord": {
"lon": 121.616669,
"lat": 24.0
}
}, {
"id": 1673816,
"name": "Fengshan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.361259,
"lat": 22.626591
}
}, {
"id": 1673820,
"name": "Kaohsiung",
"state": "",
"country": "TW",
"coord": {
"lon": 120.313332,
"lat": 22.616261
}
}, {
"id": 1674197,
"name": "Yilan",
"state": "",
"country": "TW",
"coord": {
"lon": 121.633614,
"lat": 24.5425
}
}, {
"id": 1674199,
"name": "Yilan",
"state": "",
"country": "TW",
"coord": {
"lon": 121.752998,
"lat": 24.757
}
}, {
"id": 1674502,
"name": "Hualien",
"state": "",
"country": "TW",
"coord": {
"lon": 121.393333,
"lat": 23.78166
}
}, {
"id": 1674504,
"name": "Hualien City",
"state": "",
"country": "TW",
"coord": {
"lon": 121.604439,
"lat": 23.97694
}
}, {
"id": 1675107,
"name": "Hsinchu County",
"state": "",
"country": "TW",
"coord": {
"lon": 121.16111,
"lat": 24.67416
}
}, {
"id": 1675151,
"name": "Hsinchu",
"state": "",
"country": "TW",
"coord": {
"lon": 120.968613,
"lat": 24.80361
}
}, {
"id": 1675247,
"name": "Xiguoshan",
"state": "",
"country": "TW",
"coord": {
"lon": 118.349998,
"lat": 24.425831
}
}, {
"id": 1675720,
"name": "Xianeibu",
"state": "",
"country":
"TW",
"coord": {
"lon": 121.542473,
"lat": 25.017719
}
}, {
"id": 1676087,
"name": "Houzhuangzi",
"state": "",
"country": "TW",
"coord": {
"lon": 120.662033,
"lat": 24.194019
}
}, {
"id": 1676242,
"name": "Hengchun",
"state": "",
"country": "TW",
"coord": {
"lon": 120.743889,
"lat": 22.004169
}
}, {
"id": 1676426,
"name": "Guoxizi",
"state": "",
"country": "TW",
"coord": {
"lon": 121.128304,
"lat": 25.039129
}
}, {
"id": 1676453,
"name": "Fuxingcun",
"state": "",
"country": "TW",
"coord": {
"lon": 119.949997,
"lat": 26.16667
}
}, {
"id": 1676959,
"name": "Erqiao",
"state": "",
"country": "TW",
"coord": {
"lon": 120.366669,
"lat": 22.549999
}
}, {
"id": 1677028,
"name": "Zhuzilin",
"state": "",
"country": "TW",
"coord": {
"lon": 121.549149,
"lat": 25.080521
}
}, {
"id": 1677112,
"name": "Zhubei",
"state": "",
"country": "TW",
"coord": {
"lon": 121.007782,
"lat": 24.838329
}
}, {
"id": 1677210,
"name": "Zhongdacuo",
"state": "",
"country": "TW",
"coord": {
"lon": 120.354874,
"lat": 22.58102
}
}, {
"id": 1677307,
"name": "Zhongliao", "state": "",
"country": "TW",
"coord": {
"lon": 121.471939,
"lat": 22.67417
}
}, {
"id": 1677314,
"name": "Chonglan",
"state": "",
"country": "TW",
"coord": {
"lon": 120.485023,
"lat": 22.692551
}
}, {
"id": 1678008,
"name": "Jincheng",
"state": "",
"country": "TW",
"coord": {
"lon": 118.318329,
"lat": 24.43667
}
}, {
"id": 1678228,
"name": "Keelung",
"state": "",
"country": "TW",
"coord": {
"lon": 121.741898,
"lat": 25.12825
}
}, {
"id": 1678375,
"name": "Chikanlou",
"state": "",
"country": "TW",
"coord": {
"lon": 120.199997,
"lat": 23.0
}
}, {
"id": 1678813,
"name": "Jiali",
"state": "",
"country": "TW",
"coord": {
"lon": 121.606262,
"lat": 24.021469
}
}, {
"id": 1678836,
"name": "Jiayi Shi",
"state": "",
"country": "TW",
"coord": {
"lon": 120.448891,
"lat": 23.47917
}
}, {
"id": 1679136,
"name": "Chang-hua",
"state": "",
"country": "TW",
"coord": {
"lon": 120.562759,
"lat": 24.073271
}
}, |
[{"id":"f7dba0b4.2b79f","type":"http request","z":"de669ff.680036","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.openweathermap.org/data/2.5/weather?q=Taipei,TW&units=metric&lang=zh_tw&appid=f08ca40bc5a92b5f61f6dc642137b2dda280","tls":"","persist":false,"proxy":"","authType":"","x":220,"y":720,"wires":[["dd80e8d3.8b3be8","570f17b7.71f188"]]},{"id":"43ef4c01.49f5f4","type":"inject","z":"de669ff.680036","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":80,"y":720,"wires":[["f7dba0b4.2b79f"]]},{"id":"dd80e8d3.8b3be8","type":"json","z":"de669ff.680036","name":"","property":"payload","action":"","pretty":false,"x":350,"y":720,"wires":[["f3976edb.fd72a","45e5375d.942318","1c288770.4dc8b9"]]},{"id":"f3976edb.fd72a","type":"change","z":"de669ff.680036","name":"Set Description","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.weather[0].description","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":720,"wires":[["181f286c.f95378"]]},{"id":"181f286c.f95378","type":"ui_text","z":"de669ff.680036","group":"b4723ffe.7b172","order":3,"width":"0","height":"0","name":"","label":"天氣描述: ","format":"{{msg.payload}}","layout":"row-center","x":680,"y":720,"wires":[]},{"id":"45e5375d.942318","type":"change","z":"de669ff.680036","name":"Set Temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.temp","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":780,"wires":[["ee791d67.17e05"]]},{"id":"ee791d67.17e05","type":"ui_gauge","z":"de669ff.680036","name":"","group":"b4723ffe.7b172","order":4,"width":"3","height":"3","gtype":"gage","title":"溫度: ","label":"°C","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":670,"y":780,"wires":[]},{"id":"1c288770.4dc8b9","type":"change","z":"de669ff.680036","name":"Set Humidity","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.humidity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":840,"wires":[["e8b26e35.de67b"]]},{"id":"e8b26e35.de67b","type":"ui_gauge","z":"de669ff.680036","name":"","group":"b4723ffe.7b172","order":5,"width":"3","height":"3","gtype":"gage","title":"溼度: ","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":670,"y":840,"wires":[]},{"id":"e1fc602a.ebe9a","type":"comment","z":"de669ff.680036","name":"ch5-5","info":"","x":70,"y":680,"wires":[]},{"id":"570f17b7.71f188","type":"debug","z":"de669ff.680036","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":310,"y":780,"wires":[]},{"id":"3189b2bc.b8978e","type":"comment","z":"de669ff.680036","name":"appid","info":"https://api.openweathermap.org/data/2.5/weather?q=Taipei,TW&units=metric&lang=zh_tw&appid=f08c2a40bc5a29b5f6f6d2c6411237bdda280","x":90,"y":780,"wires":[]},{"id":"b4723ffe.7b172","type":"ui_group","name":"OpenWeatherMap","tab":"3f79c420.cfc1bc","order":3,"disp":true,"width":"6","collapse":false},{"id":"3f79c420.cfc1bc","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
沒有留言:
張貼留言