Open Weather Map

Thanks again.
I would like it to 15 instead of 59…and 0 instead of 32…ie display the Celsius value instead of the Fahrenheit value.
I have found this suggestions online, but am not sure how to incorporate in the script:-

https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?lang=zh-tw&units=si

The URL you have is not correct. That’s not the same API. You need to replace “imperial” with “metric” on line 30.

openweathermap_weatheridfix_metric.plugin (8.9 KB)

https://openweathermap.org/api/one-call-api

When I change from DarkSky plugin to OpenWeather plugin, now there are no values whatsoever for any parameters or icons

I assumed you were using the OpenWeatherMap API. That is the title of the discussion:)

What I sent earlier did not apply to your Dark Sky project. Do not import my changes into there because it will not work with that.

Sorry Bill, My bad!.
I don’t mind whether I use OpenWeather or Dark Sky. I really like the idea and I copied the DarkSky_Weather.hrp from gregkinney above. I naively thought that I could interchange the Dark Sky and OpenWeather info.
Is it possible to amend the units on the Dark Sky system, or is it there any info to use Openweather project system instead?
Thanks again for your help.

Neither of these plugins are officially supported. My help is going to be somewhat limited on this topic. Maybe someone else can answer your question.

I don’t know everything you’ve already tried but you can see where the URL query parameters are in the script. Try adding your si parameter to it.

It’ll probably be easier to use a web widget. That’s another option you can look into. Or submit a feature request for an official weather integration.

Thank you again Bill.
I managed it with the Dark Sky script by changing line 26 to var forecastUrl = “https://api.darksky.net/forecast/” + apiKey + “/” + latitude + “,” + longitude + “?exclude=minutely,hourly,flag,lang=zh-tw&units=si”

Trying to set up some weather status on a page, using the openweather plugin.
I can display the current temperature in a label, but would also like to display the current weather icon. I added a webimage control with source CurrentWeather.Icon
It does not display anything, but in the log it does show “weather icon: http://openweathermap.org/img/wn/04n@4x.png”. If I put that actual URL in the source it works.

That’s the wrong attribute. You need to set the source to CurrentWeather.WeatherIcon. CurrentWeather.Icon is the common device object icon attribute that all objects have.

Thanks! I should have noticed the other attribute…

Hi All, I’ve installed the weather plugin, I added the API key and longitudinal and attitude, I then created a Label with the appropriate device bindings but nothing appears! Any help would be very much appreciated.

Replace LATITUDE LONGITUDE and APIKEY below with your correct info and then paste that link into your browser and tell me if it returns good info.

https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=LATITUDE&lon=LONGITUDE&appid=APIKEY

I get this, but I’m copying and pasting the API key from the email I got from OpenWeater so I know it’s correct.

{“cod”:401, “message”: “Invalid API key. Please see Frequently Asked Questions - OpenWeatherMap for more info.”}

If I use this then it’s ok

http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=

And I get this

{“coord”:{“lon”:-0.1257,“lat”:51.5085},“weather”:[{“id”:801,“main”:“Clouds”,“description”:“few clouds”,“icon”:“02n”}],“base”:“stations”,“main”:{“temp”:292.68,“feels_like”:292.49,“temp_min”:290.25,“temp_max”:293.76,“pressure”:1014,“humidity”:69},“visibility”:10000,“wind”:{“speed”:3.6,“deg”:100},“clouds”:{“all”:14},“dt”:1662326766,“sys”:{“type”:2,“id”:2075535,“country”:“GB”,“sunrise”:1662268666,“sunset”:1662316911},“timezone”:3600,“id”:2643743,“name”:“London”,“cod”:200}

I tried it and got success with both links. Can you post the exact link you are using with only the api key removed? When you do, highlight the link and choose the “preformatted text” option in the message options here for this forum (it’s the icon to the right of the large quotes.

Sorry didn’t realise.

https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=51.340402&lon=0.731596&appid=

I tried it and it worked for me, so this must be one of two things.

  1. Since you’re not posting the entire request here because it would not be good to share your api key, the issue could still lie with your request. Make sure that after appid= you do not have any spaces or quotes. Your request should look like https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=51.340402&lon=0.731596&appid=a1b1c1d1 . Also when you paste it in your browser, scroll to the end of what you pasted after you press enter and make sure there are no characters after the last character in your api key. If there’s an accidental space, it could show %20 after your api key which could cause the request to fail.

  2. There’s an issue with your api key. I know you were able to successfully use your api key in a different request so it seems that it works, but I don’t know enough to know if it’s still not an issue. Does openweathermap limit certain api keys to certain functions? Consider trying to add another api key and use it. If you login to the openweathermap website, under your account, you should be able to add another api key.

Unfortunately, this is as far as my knowledge base goes. Hopefully you get it figured out or someone else chimes in. Please report back and let us know.

Hi, I did already checked those possibilities and tried a new API key but still nothing.

I do have a free account is that the limitation why it’s not working?

No, unless it’s changed. I am using the free account.

I’ve kept this thread in mind because I knew someday my DarSky plugin would stop working… Looks like I’ve got about 3 months (March 31st 2023) until the DarkSky switch is flipped. I’m going to see it to the end and go down with the ship. lol

Hi everyone,

Now that the DarkSky plugin has officially sunset, I thought I’d try to make the OpenWeather plugin work. Is it working for anyone ?
I’m having the same issue as colhemm where:

This doesn’t work:
https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=LATITUDE&lon=LONGITUDE&appid=APIKEY

But this works:
http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=APIKEY

Thanks,

M.