Hauptmenü

OpenWeatherMapAPI v2.1.4

Begonnen von mgmino, 09 April 2021, 07:35:39

Vorheriges Thema - Nächstes Thema

mgmino

How do I specify imperial units?

What is the meaning of the following for city? -- Woods (historical)

The code returned is 28 (two digit); all of the codes in the OpenWeatherMap API documentation are three digit

Can we get the three digit OpenWeatherMap code?

What are the parameters in the function? -- WeatherAsHtmlH("MyWeather","h",10)
my guess is WeatherAsHtmlD(<weather-device-name>, h | v | d, <number-of-three-hours-forecasts>)

CoolTux

Zitat von: mgmino am 09 April 2021, 07:35:39
How do I specify imperial units?

What is the meaning of the following for city? -- Woods (historical)

The code returned is 28 (two digit); all of the codes in the OpenWeatherMap API documentation are three digit

Can we get the three digit OpenWeatherMap code?
my guess is WeatherAsHtmlD(<weather-device-name>, h | v | d, <number-of-three-hours-forecasts>)
two digit is historical since the original function of Yahoo Weather came.

Zitat von: mgmino am 09 April 2021, 07:35:39
What are the parameters in the function? -- WeatherAsHtmlH("MyWeather","h",10)
my guess is WeatherAsHtmlD(<weather-device-name>, h | v | d, <number-of-three-hours-forecasts>)

Your guess is correct
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

mgmino

Thank you for your quick response. A few additional questions:

a) can the module provide imperial units (the OpenWeatherMap supports units=imperial)

b) why does the "get city" return "Woods (historical)"

c) the weather code 613 is not translated

d) I am willing to make some of these changes but don't know what the protocol is. Do I just report issues or work with the developer to fix them -- I like to be part of the solution rather than the problem

CoolTux

Zitat von: mgmino am 10 April 2021, 00:42:17
Thank you for your quick response. A few additional questions:

a) can the module provide imperial units (the OpenWeatherMap supports units=imperial)
If the OpenWeatherMap API can do that, so can the module. It just needs to be adjusted

Zitat von: mgmino am 10 April 2021, 00:42:17
b) why does the "get city" return "Woods (historical)"

I do not understand that. What's with you in Reading City

Zitat von: mgmino am 10 April 2021, 00:42:17
c) the weather code 613 is not translated

The weather code 613 definitely comes from OpenWeatherMap and has not been translated

Zitat von: mgmino am 10 April 2021, 00:42:17
d) I am willing to make some of these changes but don't know what the protocol is. Do I just report issues or work with the developer to fix them -- I like to be part of the solution rather than the problem

If you look at the module file OpenWeatherMapAPI.pm you should quickly see how the module works.

You are welcome to contribute something to the module, I would be very happy.
I can give you an account on my Git server or you can do the whole thing via github and send me a pull request.
github.com/fhem


Please excuse my bad English, I'm not that good at this language

best regards
Marko
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net