OpenWeatherMap or any other free solution please


#1

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


Ambientweather.net - API from Wunderground
#2

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.


#3

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


#4

Thanks! That works OK on my raspberry Pi.


#5

Turning this to an idea.


#6

#7

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.


Ambientweather.net - API from Wunderground
Trannergy invertor
#8

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.


#9

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.


Ambientweather.net - API from Wunderground
#10

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.


#11

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


#12

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


#13

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


#14

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:


#15

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.


#16

The city list in a more readable format below -


Is PVOutput.org going to support the new WU API
Ambientweather.net - API from Wunderground
#17

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.


#18

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.


#19

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.


#20

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!!!