Read the statement by Michael Teeuw here.
[Weather - Env Canada] Forcast days name is the reverse order of the data.
-
When submitting a new issue, please supply the following information:
Platform:- Raspberry Pi 4
- Debian GNU/Linux 11 (bullseye)
- Kernel: Linux 5.15.84-v8+
- Architecture: arm64
- Electron: ./MagicMirror/node_modules/.bin/electron --version = v22.0.0
- Node Version: node -v = v16.19.0
MagicMirror² Version: “version”: “2.22.0”
Description: In the weather forecast the day name is in reverse order from the data. This was observed at around 15:30 so it may be specific to the late day scenario in the code.
Steps to Reproduce: List the step by step process to reproduce the issue.
Expected Results:
I expected the first line (top) of the forecast to be “Sun” that matches the 2°C/2°C Sunday forecast. Followed top to bottom by Mon, Tue, Wed, Thu. The data is top to bottom in chronological order, only the day name isn’t.Actual Results:
imgur linkConfiguration:
let config = { address: "localhost", port: 8080, basePath: "/", ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], useHttps: false, httpsPrivateKey: "", httpsCertificate: "", language: "en", locale: "en-US", logLevel: ["INFO", "LOG", "WARN", "ERROR"], timeFormat: 24, units: "metric", modules: [ { module: "MMM-Cursor", config: { timeout: 2000 } }, { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_right" }, { module: "compliments", position: "top_right" }, { module: "weather", position: "bottom_right", config: { updateInterval: 3600000, weatherProvider: "envcanada", siteCode: 's0000635', provCode: 'QC', type: "current", location: "Montreal", showHumidity: true, useBeaufort: false, windUnits: "metric" } }, { module: "weather", position: "bottom_right", header: "Weather Forecast", config: { updateInterval: 3600000, weatherProvider: "envcanada", siteCode: 's0000635', provCode: 'QC', type: "forecast", location: "Montreal,Canada", showPrecipitationAmount: true, fade: false, ignoreToday: true } }, ...
Additional Notes: Code appears to be here MagicMirror/modules/default/weather/providers/envcanada.js
Forecast was:
imgur link
XML Export (same URL code uses)This isn’t the first time the EnvCanada is buggy but my previous issues may be all linked to this order issue. For an even more weird view set ignoreToday to false.
-
@cedrikl thanks. we don’t take issues here. open at
https://github.com/MichMich/MagicMirror/issues -
@cedrikl For what it’s worth, I used your weather config parms on my own Mirror and found no issues. That is, I could not reproduce what you are seeing. To be fair, my RaspPi is not as current as yours (I’m running on Buster with MM 2.21.0).
HOWEVER… I can confirm that Environment Canada backend has been having issues since Fri Feb 3. Every so often it is returning weather data (XML document) for Fri Feb 3, which of course is in the past. I thought I was going crazy because my Mirror was showing bad current and/or forecast data on a random basis.
I did a bunch of testing (accessing EC URL directly from a browser) to confirm that, yes, this is really happening randomly. So, for example, it would be possible to have Current from today, and Forecast from Feb 3 (on both from Feb or both from today). I’m not saying this is causing your issue, but I wanted to mention that EC data quality is currently a problem.
My strong suspicion is that there is at least 1 caching server sitting in front of the EC datamart that has not updated its cache since Feb 3, so any HTTP requests directed to that server are getting old/bad data. FWIW I have a sent an email to an EC support address to highlight there is a problem that needs to be fixed.
-
Just a further update… Environment Canada actually got back to me and confirmed that they did have a problem with load balance caching and this has now been resolved. I confirmed with my own MM that the correct data is being returned to the weather module’s envCanada provider.
-
@crazylegs Thanks for looking into it. I finally found what was the issue and while trying to make a PR for it found out that it was fixed on develop 1 month before I started to look at it. This is probably why you couldn’t see the problem. Here is the commit in question: https://github.com/MichMich/MagicMirror/commit/a975b44fbbca53a7f2111dc971486cbeebb0f6ff