The issue described below may not be a problem with the OpenWeatherMap provider itself, but Niagara Community user 'roc' suggested I record the issue here too.
Note: The issue was observed using the 4.0.1 release of this module.
I think the idea would be to add optional extras to the OWM provider that:
- Output a log message whenever it is called by the WeatherService (so we can see when it stops)
- Can output a log message when the OWN provider has not had a request to update from the WeatherProvider for longer than expected
Anyway, the issue description as posted on Niagara Community:
_We're getting occasional problems with the WeatherService on some of our JACE 8000s.
We are in the UK and using the OpenWeatherMap Provider kindly provided as open source by Neopsis: https://github.com/neopsis/niagara-weather
I've just been examining the issue on a JACE running N4.7.109.20.
What I see is that the WeatherService stops updating automatically, and using the UpdateWeatherReport action either at the service or report level does not update it either. There are no messages in the Application Director other than the regular station saves and NTP time sync updates.
I tried creating another report under the existing WeatherService, but that would not update either.
I tried disabling and re-enabling the WeatherService, but that did not help.
I tried duplicating the WeatherService to create a WeatherService1. The report within this was then able to update.
My guess is that there is some background thread or timer created when the WeatherService is created during station start-up or on creating a new entry under Services when a station is already running. This has silently died and neither automatic or manual updates occur any more. This is not removed and recreated when you disable and then re-enable the WeatherService, so doing that does not fix the issue.
The best workaround I have found is to 'cut' the WeatherService and 'paste' it back in the same location in the Services folder, then renaming it back from WeatherService1 to WeatherService. Getting it running again this way preserves any links in/out of the WeatherService (e.g. we use the current external temperature from the WeatherService in an average of the site's OAT sensor readings).
Can anyone shed any further light on what's going on and why there are no Application Director messages about failures to update?
Perhaps as a first step towards resolving this sort of issue Tridium can think about updating the WeatherService so the disabling and re-enabling the WeatherService would recreate this background thread/timer too?_