node-red / node-red-web-nodes

A collection of node-red nodes aimed at web services
Apache License 2.0
226 stars 156 forks source link

Getting wrong country when I get the weather reports. #267

Closed Just-another-pleb closed 3 years ago

Just-another-pleb commented 3 years ago

This is the message I get out of the node:

Note the country:

{"payload":{"id":804,"weather":"Clouds","detail":"overcast clouds","icon":"04n","tempk":288.89,"tempc":15.7,"temp_maxc":17.2,"temp_minc":14.4,"humidity":100,"pressure":1018,"maxtemp":290.37,"mintemp":287.59,"windspeed":2.99,"winddirection":179,"location":"Ashfield","sunrise":1603451647,"sunset":1603490184,"clouds":96,"description":"The weather in Ashfield at coordinates: 42.53, -72.79 is Clouds (overcast clouds)."},"event":{"clientX":56,"clientY":148,"bbox":[33,170,81,122]},"socketid":"H5w7KYPCyMEVyksQAAFL","_msgid":"7ece1f7e.2b7","location":{"lon":-72.79,"lat":42.53,"city":"Ashfield","country":"US"},"data":{"coord":{"lon":-72.79,"lat":42.53},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"base":"stations","main":{"temp":288.89,"feels_like":288.69,"temp_min":287.59,"temp_max":290.37,"pressure":1018,"humidity":100},"visibility":10000,"wind":{"speed":2.99,"deg":179},"clouds":{"all":96},"dt":1603510407,"sys":{"type":3,"id":2003381,"country":"US","sunrise":1603451647,"sunset":1603490184},"timezone":-14400,"id":4929276,"name":"Ashfield","cod":200},"time":"2020-10-24T03:33:27.000Z","title":"Current Weather Information","description":"Current weather information at coordinates: 42.53, -72.79"}

Yet this is the node:

[{"id":"e2669be9.4362d","type":"openweathermap","z":"e43e3902.57c4e8","name":"Ashfield","wtype":"current","lon":"","lat":"","city":"ashfield","country":"australia","language":"en","x":480,"y":1080,"wires":[["3ef9c40c.987954","fb3a9ff3.21c0a8","ebbede7a.6d7868","1518637.5855b9d","7988b001.a3363","6de0488a.32431"]]}]

Note it says australia, not us as with the output.

Is this a bug?

dceejay commented 3 years ago

No - just their search being not as good as it could be... manually go to https://openweathermap.org/find?q= and search then try using Ashfield and AU as the country....