Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

OpenWeatherMap

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

OpenWeatherMap

Post by PaulMy »

I enabled OpenWeatherMap in v3.9.4 and after I requested and received an API key from OpenWeatherMap I found I had already signed up, likely years so now have 2 API keys but that should be no issue. MXdiags indicates

Code: Select all

2020-12-30 14:35:00.070 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:35:00.070 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609356900,"temperature":4,"wind_deg":360,"wind_speed":1.8,"wind_gust":5.9,"pressure":1006.7,"humidity":86,"rain_1h":1.4,"rain_24h":2.8}]
so this looks good.
Now what... How do I use it... Is it just clicking on my location on the Map to display the data? Anything else?

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: OpenWeatherMap

Post by mcrossley »

I don't know a whole lot about OpenweatherMap, I tested uploading to them, and using their API to check my data was there, beyond that I haven't played with it much.
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: OpenWeatherMap

Post by PaulMy »

Hi Mark,
I have used http://api.openweathermap.org/data/2.5/ ... thmyAPIkey] and get

Code: Select all

{"coord":{"lon":-81.43,"lat":42.95},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"base":"stations","main":{"temp":277.11,"feels_like":274.28,"temp_min":275.93,"temp_max":278.15,"pressure":1006,"humidity":67},"visibility":10000,"wind":{"speed":0.89,"deg":360,"gust":2.24},"clouds":{"all":100},"dt":1609360755,"sys":{"type":3,"id":2009087,"country":"CA","sunrise":1609333001,"sunset":1609365602},"timezone":-18000,"id":5993934,"name":"Komoka","cod":200}
Are those temps such as 277.11, feels like 274.28 and temp min 275.33 in some code?

And on further checking the MXdiags I see after each successful upload there is a second entry with an error

Code: Select all

2020-12-30 14:41:02.911 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:41:02.911 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609357262,"temperature":4,"wind_deg":360,"wind_speed":2.4,"wind_gust":5.9,"pressure":1006.3,"humidity":86,"rain_1h":1.2,"rain_24h":2.8}]

2020-12-30 14:41:03.349 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:41:03.349 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:45:00.125 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:45:00.125 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609357500,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":7.1,"pressure":1006.4,"humidity":86,"rain_1h":1,"rain_24h":2.8}]

2020-12-30 14:45:01.993 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:45:01.993 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:46:02.913 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:46:02.913 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609357562,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":7.1,"pressure":1006.5,"humidity":86,"rain_1h":1,"rain_24h":2.8}]

2020-12-30 14:46:03.365 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:46:03.365 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:50:00.252 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:50:00.252 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609357800,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":7.1,"pressure":1006.5,"humidity":86,"rain_1h":0.8,"rain_24h":2.8}]

2020-12-30 14:50:00.736 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:50:00.736 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:51:02.920 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:51:02.920 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609357862,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":7.1,"pressure":1006.5,"humidity":86,"rain_1h":0.8,"rain_24h":2.8}]

2020-12-30 14:51:03.298 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:51:03.298 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:55:00.096 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:55:00.096 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609358100,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":7.1,"pressure":1006.6,"humidity":86,"rain_1h":0.6,"rain_24h":2.8}]

2020-12-30 14:55:00.575 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:55:00.575 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}

2020-12-30 14:56:02.921 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 14:56:02.921 OpenWeatherMap: Body = [{"station_id":"KomokaWeather","dt":1609358162,"temperature":4.1,"wind_deg":360,"wind_speed":2.4,"wind_gust":6.5,"pressure":1006.6,"humidity":86,"rain_1h":0.6,"rain_24h":2.8}]

2020-12-30 14:56:03.342 OpenWeatherMap: Response code = Error - BadRequest
2020-12-30 14:56:03.342 OpenWeatherMap: Response data = {"code":400001,"message":"Station id is invalid"}
The interval is set at 5 minutes.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: OpenWeatherMap

Post by mcrossley »

The station id should be some long hexadecimal number, you have "KomokaWeather". Presumably you entered that manually.

Do you already have a OWM station created by other software?
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: OpenWeatherMap

Post by beteljuice »

Are those temps such as 277.11, feels like 274.28 and temp min 275.33 in some code?
I seem to vaguely remember that they return temp data in deg K
i.e. temp - 273 = deg C
Would that make the figures correct ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: OpenWeatherMap

Post by mcrossley »

Iirc Windy uses Kelvin, I thought OWM used Celsius. But I agree they do look like K.

[pendant] It's just Kelvin, not degrees Kelvin [/pendant] ;)
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: OpenWeatherMap

Post by freddie »

mcrossley wrote: Wed 30 Dec 2020 10:18 pm [pendant] It's just Kelvin, not degrees Kelvin [/pendant] ;)
[pedant] .... [/pedant]
;) :D
Freddie
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: OpenWeatherMap

Post by beteljuice »

Guilty of dumbing down for a wider audience - must have been my good deed for 2020 !
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: OpenWeatherMap

Post by mcrossley »

freddie wrote: Wed 30 Dec 2020 10:29 pm
[pedant] .... [/pedant]
;) :D
Ah the irony!

Anyway, the data access API does use Kelvin, unless you specify the units to use. https://openweathermap.org/current#data

Though I my defence I was looking at data with the PWS API, which does work in Celsius! https://openweathermap.org/stations
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: OpenWeatherMap

Post by PaulMy »

Hi Mark,
'KomokaWeather' is one the 'names' associated with my APIs on OpenWeatherMap, the other is 'Default'.

I had originally left the Station id blank, as the settings text indicated, but that didn't work and gave errors so then entered KomokaWeather manually. Now I removed that and left it blank again and CumulusMX did find the Station id and seems to be working.

Code: Select all

[code]2020-12-30 17:32:59.652 OpenWeatherMap: No station defined, attempting to create one
2020-12-30 17:32:59.656 OpenWeatherMap: Creating new station
2020-12-30 17:32:59.656 OpenWeatherMap: - {"external_id":"CMX-2012302232","name":"KomokaWeather","latitude":42.96,"longitude":-81.4380555555556,"altitude":249}
2020-12-30 17:32:59.999 OpenWeatherMap: Create station response code = OK - Created
2020-12-30 17:32:59.999 OpenWeatherMap: Create station response data = {"ID":"---removed---","updated_at":"2020-12-30T22:33:01.314877683Z","created_at":"2020-12-30T22:33:01.314877529Z","user_id":"---removed---","external_id":"CMX-2012302232","name":"KomokaWeather","latitude":42.96,"longitude":-81.4380555555556,"altitude":249,"rank":10,"source_type":5}
2020-12-30 17:33:00.002 OpenWeatherMap: Created new station, id = ---removed---, name = KomokaWeather

Code: Select all

2020-12-30 17:50:00.153 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2020-12-30 17:50:00.153 OpenWeatherMap: Body = [{"station_id":"5fed001d09e7430001b9d25c","dt":1609368600,"temperature":4.2,"wind_deg":360,"wind_speed":3,"wind_gust":7.1,"pressure":1007.7,"humidity":88,"rain_1h":0.2,"rain_24h":4}]
@beteljuice
i.e. temp - 273 = deg C
Yes, the actual temperature was just above 0°C so that seems to calculate correctly.
And now that the upload is working the temp is 4.2°C so something I can understand.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: OpenWeatherMap

Post by freddie »

mcrossley wrote: Wed 30 Dec 2020 10:46 pm
freddie wrote: Wed 30 Dec 2020 10:29 pm
[pedant] .... [/pedant]
;) :D
Ah the irony!
:lol: ;) couldn't resist it!
Freddie
Image
meteoalberobello
Posts: 1
Joined: Thu 11 Feb 2021 1:24 pm
Weather Station: Ecowitt GW1000
Operating System: Windows 10

Re: OpenWeatherMap

Post by meteoalberobello »

Hi everyone, I'm using Cumulus MX release 3.9.7 (build 3107) on Windows 10, I've enabled OpenWeatherMap option and configured correctly API KEY and Station ID.

Here the log related to the request:
2021-02-11 14:39:18.843 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/ ... appid=<key>
2021-02-11 14:39:19.202 OpenWeatherMap: Response code = Error - BadRequest

No other information from logs.
Can anyone help me?

Many thanks
Post Reply