Page 1 of 2

Openweathermap Data

Posted: Mon 12 Jul 2021 11:14 pm
by Whizzwoz
Hello how do you know that Openweathermap is getting your data?I have got the api key and cumulusmx has auto filled the satation id.

Stay Safe

Warren.

Re: Openweathermap Data

Posted: Tue 13 Jul 2021 1:56 pm
by PaulMy
They are not the easiest maps to use but mine does show as Komoka https://openweathermap.org/weathermap?b ... 97&zoom=10
Are you in this vicinity? https://openweathermap.org/weathermap?b ... 57&zoom=10

Enjoy,
Paul

Re: Openweathermap Data

Posted: Tue 13 Jul 2021 9:42 pm
by Whizzwoz
hello paul this is what I get with the api:

[{"id":"60e101f009e7430001b9f34b",
"created_at":"2021-07-04T00:33:52.423Z",
"updated_at":"2021-07-04T00:33:52.423Z",
"external_id":"CMX-2107040033",
"name":"Lancing",
"longitude":-0.315,
"latitude":50.835,
"altitude":5,
"rank":10}]
To me it does not seem to be updated,I was going to try and delete the station and replace it, but I do not understand the comands on openweathermap site.
How do you use the comands?
Cheers Warren.

Re: Openweathermap Data

Posted: Tue 13 Jul 2021 11:08 pm
by beteljuice
The API does seem to be a bit of a minefield, plus there is no way to directly get (station_id) current data and timestamp.
Although from your a/c you can get station_id data from > to, interval - all very confusing.

That is to say that the API interrogates your Account, where you declare what stations / locations interest you.

I think the info request you made above is referring to literally info about the station_id not the data !

There appears to be an 'echo' type response when you successfully send data, but I don't think Cumulus does anything with it.

Re: Openweathermap Data

Posted: Tue 13 Jul 2021 11:14 pm
by PaulMy
Hi Warren,
I can't remember when I added OpenWeatherMap and it has been a while since I visited the site, but my data is showing.

Have you checked your MXdiags? mine shows:

Code: Select all

2021-07-13 19:10:00.157 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/measurements?appid=<key>
2021-07-13 19:10:00.157 OpenWeatherMap: Body = [{"station_id":"xxxxxxx7430001b9d25c","dt":1626217800,"temperature":24.8,"wind_deg":249,"wind_speed":1.2,"wind_gust":3.6,"pressure":1014.7,"humidity":72,"rain_1h":0,"rain_24h":0.6}]
2021-07-13 19:10:00.157
Enjoy,
Paul

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 12:54 am
by Whizzwoz
Hello Paul yes mine shows the following:

2021-07-13 14:15:00.841 OpenWeatherMap: ERROR - An error occurred while sending the request

How do I delete the station from openweathermap and start again?

[DELETE] /stations/{:id}

I dont understand how to use this command.

Plus if I put in the following:http://api.openweathermap.org/data/3.0/ ... nts?appid=(My API)

I get code:400001 Bad station id

So it looks like api key is working but not the station id.

Cheers Warren.

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 1:53 am
by beteljuice
@warren .... careful what you play with !!!

Earlier you said
hello paul this is what I get with the api:

[{"id":"60e101f009e7430001b9f34b",
....
To me it does not seem to be updated,I was going to try and delete the station
I assume you were using the /stations/ url ?

Now you have ..
2021-07-13 14:15:00.841 OpenWeatherMap: ERROR - An error occurred while sending the request

Plus if I put in the following:http://api.openweathermap.org/data/3.0/ ... nts?appid=(My API)

I get code:400001 Bad station id
1/ possible you have accidentally deleted the station ?

2/ ... because that is the url to send data (or ask for a range of data) and requires the station_id etc.

Use the url you did originally to see if you haven't deleted the station, if needed re-create the station_id with the required data.

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 8:37 am
by mcrossley
How are you sending these commands to the API? Are you using something like Postman?

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 10:05 am
by Whizzwoz
Hello Yes I am now getting this:

2021-07-14 05:45:00.353 OpenWeatherMap: URL = http://api.openweathermap.org/data/3.0/ ... appid=<key>
2021-07-14 05:45:00.353 OpenWeatherMap: Body = [{"station_id":"60e101f009e7430001b9f34b","dt":1626237900,"temperature":16,"wind_deg":311,"wind_speed":2.2,"wind_gust":4,"pressure":1017.2,"humidity":

I did not copy it all but now seems to be sending data but lancing does not show up on the sites map.Maybe it takes time?

Plus looking the station up:

[{"id":"60e101f009e7430001b9f34b",
"created_at":"2021-07-04T00:33:52.423Z",
"updated_at":"2021-07-04T00:33:52.423Z",
"external_id":"CMX-2107040033",
"name":"Lancing",
"longitude":-0.315,
"latitude":50.835,
"altitude":5,
"rank":10}]

Yes I have looked at postman but cant get my head around how to use the commands.

Cheers Warren

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 11:16 am
by mcrossley
Can you retrieve the data? eg 12 hours from midnight...
http://api.openweathermap.org/data/3.0/ ... appid=<KEY>

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 11:31 am
by Whizzwoz
tried doing that get:

{"code":400001,"message":"Parametr to is required"}

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 11:37 am
by Whizzwoz
I could give you my api to try and then afterwards generate a new one?


what is:1626256800 in ulr? its alright read up on it=Epoch Unix Timestamp

still getting: {"code":400001,"message":"Parametr to is required"}

Cheers Warren

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 12:54 pm
by mcrossley

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 1:13 pm
by Whizzwoz
Hello Mark,

I get this:


[{"type":"h","date":1626220800,"station_id":"60e101f009e7430001b9f34b","temp":{"max":17.6,"min":16.9,"average":17.2,"weight":4},"humidity":{"average":80,"weight":4},"wind":{"deg":335.55,"speed":0.87},"pressure":{"min":1017,"max":1017.1,"average":1017.03,"weight":4},"precipitation":{"rain":0}},{"type":"h","date":1626231600,"station_id":"60e101f009e7430001b9f34b","temp":{"max":17.3,"min":16.6,"average":17.3,"weight":1},"humidity":{"average":78,"weight":1},"wind":{"deg":322.08,"speed":1.33},"pressure":{"min":1016.8,"max":1016.8,"average":1016.8,"weight":1},"precipitation":{"rain":0}},{"type":"h","date":1626224400,"station_id":"60e101f009e7430001b9f34b","temp":{"max":18.2,"min":17.6,"average":17.95,"weight":4},"humidity":{"average":78.5,"weight":4},"wind":{"deg":313.72,"speed":1.23},"pressure":{"min":1016.9,"max":1017.1,"average":1017.03,"weight":4},"precipitation":{"rain":0}},{"type":"h","date":1626228000,"station_id":"60e101f009e7430001b9f34b","temp":{"max":18.1,"min":17.5,"average":17.88,"weight":4},"humidity":{"average":76.25,"weight":4},"wind":{"deg":314.84,"speed":1.76},"pressure":{"min":1016.7,"max":1016.8,"average":1016.78,"weight":4},"precipitation":{"rain":0}},{"type":"h","date":1626235200,"station_id":"60e101f009e7430001b9f34b","temp":{"max":16.6,"min":15.4,"average":16.07,"weight":3},"humidity":{"average":80.33,"weight":3},"wind":{"deg":316.59,"speed":1.12},"pressure":{"min":1016.9,"max":1017.1,"average":1016.97,"weight":3},"precipitation":{"rain":0}},{"type":"h","date":1626238800,"station_id":"60e101f009e7430001b9f34b","temp":{"max":16.8,"min":16,"average":16.75,"weight":2},"humidity":{"average":80,"weight":2},"wind":{"deg":308.65,"speed":2.42},"pressure":{"min":1017.1,"max":1017.2,"average":1017.1,"weight":2},"precipitation":{"rain":0}},{"type":"h","date":1626242400,"station_id":"60e101f009e7430001b9f34b","temp":{"max":16.6,"min":16.1,"average":16.32,"weight":4},"humidity":{"average":80,"weight":4},"wind":{"deg":315.34,"speed":2.77},"pressure":{"min":1017.1,"max":1017.3,"average":1017.18,"weight":4},"precipitation":{"rain":0}},{"type":"h","date":1626246000,"station_id":"60e101f009e7430001b9f34b","temp":{"max":17.4,"min":16.9,"average":17.17,"weight":3},"humidity":{"average":79.67,"weight":3},"wind":{"deg":329.51,"speed":2.79},"pressure":{"min":1017.4,"max":1017.4,"average":1017.4,"weight":3},"precipitation":{"rain":0}},{"type":"h","date":1626249600,"station_id":"60e101f009e7430001b9f34b","temp":{"max":18.2,"min":17.7,"average":17.88,"weight":4},"humidity":{"average":79.25,"weight":4},"wind":{"deg":332.11,"speed":3.45},"pressure":{"min":1017.4,"max":1017.7,"average":1017.58,"weight":4},"precipitation":{"rain":0}},{"type":"h","date":1626253200,"station_id":"60e101f009e7430001b9f34b","temp":{"max":19.7,"min":18.8,"average":19.23,"weight":4},"humidity":{"average":77.5,"weight":4},"wind":{"deg":338.08,"speed":3.79},"pressure":{"min":1017.8,"max":1018,"average":1017.88,"weight":4},"precipitation":{"rain":0}},
{"type":"h","date":1626256800,"station_id":"60e101f009e7430001b9f34b","temp":{"max":19.6,"min":19.6,"average":19.6,"weight":1},"humidity":{"average":77,"weight":1},"wind":{"deg":319,"speed":3.6},"pressure":{"min":1018,"max":1018,"average":1018,"weight":1},"precipitation":{"rain":0}}]

Warren

Re: Openweathermap Data

Posted: Wed 14 Jul 2021 1:16 pm
by mcrossley
OK, so that should be your data from midnight to midday today summarised hourly - so the data is getting there OK.