OpenWeatherMap or any other free solution please

The Ambientweather.net is a solution to people that have their own weather station - the very minority here.
Is there any solution for the majority of us that dont have their own weather station?
OpenWeatherMap has a free API key that can be used by anyone. Can PvOutput check if it can implement the ability to connect to OpenWeatherMap.net or any other free service?
Tx

2 Likes

OK, well I don’t know how you update pvoutput, but I run a script every 5 mins. I have amended that script so that the last thing it does is to call another Perl script, that gets the current temperature for my town, and update pvoutput

It is probably not the most efficient way of doing things since I now update pvoutput.org twice every 5 mins, but we’ll see how it goes.

Here is a link to the script. Best to open the link in a new tab and cut/paste text.

openweather script

All the stuff at the end about detecting curl failures is part of my error recovery stuff elsewhere. Ignore it if you want.

2 Likes

Its a good solution but really PVOutput should enable an in home solution like we had before.

Thanks! That works OK on my raspberry Pi.

Turning this to an idea.

1 Like

Open weather map is now supported.

Select OpenWeatherMap under the new Weather Device section.

Currently only querying by City Id is supported.

Click on List to and download the cities list file -

or csv/excel -

image

Click on TEST to check that the API Key and City Id is valid before saving.

4 Likes

Set it up about 30 minutes ago and it’s working although there does seem to be some lag before the temperature values are populated. My poll interval is set to 5 minutes.

Bob.

Just set mine up, working good so far.
To get my city id number just when to this address and found my city, THEN copied the city number from the IP address.
https://openweathermap.org/find

Thanks for the extra work to solve this.

1 Like

Hi @bankstownbloke,

When using OpenWeatherMap, where will the temp data go to? When using WU in the past, I had the temp set to v11 because I am using the regular temp for my SolarEdge inverter temp.

Thanks.

Not claiming to be an expert but, once you select OpenWeatherMap in the Weather Device option, you need only fill in API key, the City ID. There is no option for the “v numbers” and the temp data magically
shows up in your PVOUTput data.

You can see where mine started at 9am this morning once I set the API key and city ID.

https://pvoutput.org/intraday.jsp?id=45408&sid=41431&dt=20190315

Yes, I can now see that both temp from OpenWeatherMap and SolarEdge Inverter are going to the standard Temp, which causes one data overwriting the other.

@bankstownbloke, is it possible that the temp data from OpenWeatherMap can be implemented the same way as WU, so that it can be stored in the Extended Data (v7-v12)?

Thanks

I just set mine up and yep, the temp data just started appearing.

May I ask where you find the API key please?

Bazzle

edit:
Here after you make an account…
https://home.openweathermap.org/api_keys

edit 2: Working great after midnight turnover. Thanks for setting up the pvoutput side :slight_smile:

Working for me as well.
A quick way to identify your city number is to type in your city name to search for a location for weather. When the city info comes up, click on the link to jump to the city’s weather and you will see city id number at the end of the hyperlink address.

Nice job Bankstownbloke adding the additional weather resources, and thanks to all who provided the api info etc. to allow Bankstownbloke to set the alternatives up.

The city list in a more readable format below -

1 Like

OK, I have this working, but initially had an issue - I had the Primary Device set for my Efergy uploader, which does not upload temperature - in fact I’d deliberately mangled the Efergy key, so it should have had no readings at all in any field.
With the Primary Device set to Efergy (but key mangled), even after setting the OpenWeatherMap info the temperature field stayed stubbornly blank until after I changed the Primary Device to (none).

Now Primary Device appears to have been set by the system to ‘Weather’.

Which prompted me to look at the Secondary Device - which doesn’t have the Weather option, or some of the options that have been added to Primary Device over the years.

BB, any chance you could synchronise the selectable options for Primary Device into the Secondary Device drop-down menu at some stage? Then we could keep the Primary Device for whatever we’ve been using, and set Secondary Device to ‘Weather’, and have both systems operating.

Weather Device will work with Primary Device, but only if the primary is working i.e. the key from efergy must be valid otherwise both Efergy and Weather will be removed from downloading.

Not sure what’s going on, but I’m getting an error when testing my OWM API Key:

{“cod”:401, “message”: “Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.”}

I’ve triple checked the City ID and API key are correct. Even generated a new API key just to be sure.

Oh wait… just noticed in the ‘welcome’ email that they say that the API key “Within the next couple of hours, it will be activated and ready to use”

Would be nice if they said that on the website when you create it!!!