Adam - Just FYI, Openweather has deprecated the...
Just FYI, Openweather has deprecated their 2.5 api for new accounts. You have to use the 3.0 Onecall API which requires an account with billing setup. I did create a fork of openweather-signalk project that uses a fork I made of openweather-apis that changes 2.5 to 3.0 as it's backwards compatible if anyone runs into the same issue I did.
15 Replies
is the original project dead or why the fork?
I forked it so I could test it and make sure it actually worked. But the master branch on openweather-apis hasn't been updated in a few years so idk.
I was planning to open an MR to their repository.
I do have an issue outstanding with them to let them know with links to openweather stating that 2.5 is deprecated.
https://github.com/CICCIOSGAMINO/openweather-apis/compare/master...adam6806:openweather-apis:API-v3.0
It's a very simple change. Just 2.5 to 3.0
🤷♂️
FYI you can configure Freeboard-SK to source data from Openweather. If nothing else you can at least confirm operation.
Config is in
plugin config
of admin UI.
If the openweather plugin is updated then you should probably look at aligning it to operate with the new meteo
context`.
If you setup Freeboard-SK you can see the meteo context in use.BTW, I got an email today from openweathermap that they blocked my api key because of "performing 2474 requests within a minute". I only just configured my key in Freeboard the other day and I'm not using it anywhere else. (And I didn't restart Freeboard 2474 times...)
What's a meteo context?
meteo
is a new context introduced in server v2.6.0 which is used to represent weather data from AIS weather stations.
Like vessels
or aton
, etc. the path is meteo.{uuid}.xxx
Attached is an example of what Freeboard-SK produces under the meteo.freeboard-sk
path.Ohhhh meteorology got it.
Sorry.. I'm too close to it and sometimes forget the terminology is not always known!
I had earlier similar issue when I tried it from Freeboad-SK. They didn't block, but sent email asking about high access rate.
II have seen where the node event loop can cause
setTimeout
to trigger continouously.
f you turn of debugging for freeboard you will see verbose messages about checking when to fetech and when it fetches.
It should only fetch at the configured interval (in plugin settings).There must be something wrong. Here's small debug log excerpt:
Mar 26 10:47:01 2024-03-26T09:47:01.454Z @signalk/freeboard-sk *** Weather: wake from sleep....poll provider.
Mar 26 10:47:01 2024-03-26T09:47:01.454Z @signalk/freeboard-sk *** Vessel position: {"longitude":20.6393552,"latitude":38.9755008}.
Mar 26 10:47:01 2024-03-26T09:47:01.454Z @signalk/freeboard-sk *** Weather: Next poll due in 60 min(s)... sleep for 60 secs...
Mar 26 10:47:01 2024-03-26T09:47:01.455Z @signalk/freeboard-sk *** Weather: wake from sleep....poll provider.
Mar 26 10:47:01 2024-03-26T09:47:01.455Z @signalk/freeboard-sk *** Vessel position: {"longitude":20.6393552,"latitude":38.9755008}.
Mar 26 10:47:01 2024-03-26T09:47:01.455Z @signalk/freeboard-sk *** Weather: Next poll due in 60 min(s)... sleep for 60 secs...
Mar 26 10:47:01 2024-03-26T09:47:01.455Z @signalk/freeboard-sk *** Weather: wake from sleep....poll provider.
Mar 26 10:47:01 2024-03-26T09:47:01.456Z @signalk/freeboard-sk *** Vessel position: {"longitude":20.6393552,"latitude":38.9755008}.
Mar 26 10:47:01 2024-03-26T09:47:01.456Z @signalk/freeboard-sk *** Weather: Next poll due in 60 min(s)... sleep for 60 secs...
Mar 26 10:47:01 2024-03-26T09:47:01.456Z @signalk/freeboard-sk *** Weather: wake from sleep....poll provider.
Mar 26 10:47:01 2024-03-26T09:47:01.456Z @signalk/freeboard-sk *** Vessel position: {"longitude":20.6393552,"latitude":38.9755008}.
Mar 26 10:47:01 2024-03-26T09:47:01.456Z @signalk/freeboard-sk *** Weather: Next poll due in 60 min(s)... sleep for 60 secs...
Check out the timestamps. No 60 secs...I've seen this before. It requires a reboot generally, even if you're running in a docker container.
The node event loop is clearly not waiting 60 secs to poll.
https://github.com/CICCIOSGAMINO/openweather-apis/pull/56 I've made a PR for the update.
Upcoming version of Freeboard-SK has a watch dog to detect runaway timer events.
This will hopefully prevent excessive calls, especially now OpenWeather 3.0 will charge for excessive calls.