Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather module using Environment Canada, days are reversed.. but not weather information! #2987

Closed
etrefal opened this issue Jan 2, 2023 · 13 comments

Comments

@etrefal
Copy link

etrefal commented Jan 2, 2023

Platform: Raspberry Pi 3 on Raspbian Buster
Node version: v16.19.0
MagicMirror version: 2.22.0

Description: I use the weather module with Environment Canada as provider. It always worked well, until today when I noticed that the day names are reversed. The weather information is not reversed though. I have attached two screenshots - one is the MagicMirror display, the other is the Environment Canada webpage. Note that these are in french. The day names displayed on the MagicMirror are "Aujourd'hui" (Today) - which is a monday), "Demain" (Tomorrow), then "sam." (Saturday), "ven." (Friday), "jeu." (Thursday) and then "mer." (Wednesday). These should be "Aujourd'hui, Demain, mer., jeu., ven. and sam."

Note that the weather information is correct. The weather forecast is in the correct order when you compare to the Environment Canada screenshot.

I did upgrade MagicMirror to the latest version yesterday afternoon. But I only noticed the error a few minutes ago.

Configuration: My edited config.js file is also attached... but does not appear. Here is the relevant info:

{
module: "weather",
position: "top_left", // This can be any of the regions.
// Best results in left or right regions.
config: {
weatherProvider: "envcanada",
siteCode: "xxxxxxx",
provCode: "xx",
location: "xxxxx, xx",
type: "forecast",
locationID: "",
showPrecipitationAmount: "true", // Ne fonctionne pas?
colored: "true",
tableClass: "medium",
maxNumberOfDays: 7
}

Screenshot from 2023-01-02 13-19-35

Screenshot from 2023-01-02 12-56-02

@rejas rejas self-assigned this Jan 2, 2023
@rejas
Copy link
Collaborator

rejas commented Jan 4, 2023

Thx for the report @etrefal I can reproduce this, will have a fix on the weekend ready

@etrefal
Copy link
Author

etrefal commented Jan 4, 2023 via email

khassel pushed a commit that referenced this issue Jan 7, 2023
Fixes #2987

lastDate isnt a unix date, but just a normal moment-date

Co-authored-by: veeck <michael@veeck.de>
@etrefal
Copy link
Author

etrefal commented Jan 7, 2023

I had a notification of a new commit, so I did a git pull && npm install --only=prod --omit=dev

Weather forecast with Environment Canada is still not fixed... today is Samedi (Saturday), tomorrow is Dimanche (Sunday). So Sunday appears twice - as Tomorrow (Demain) and as Sunday (Dim.) Please see attached screenshot.
Screenshot from 2023-01-07 17-18-06
The weather forecast is correct, and in the correct order. Only the day names are wrong. In the screenshot above, they should be:
Aujourd'hui (Today)
Demain (Tomorrow)
lun. (Monday)
mar. (Tuesday)
mer. (Wednesday)
jeu. (Thursday)

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2023

we collect all fixes on the develop branch, releases are only quaterly so next on April 1.

You can use the develop branch so far or wait until next release or do the one line fix from the PR in your code directly (in last case don't forget to revert before next git pull)

@etrefal
Copy link
Author

etrefal commented Jan 7, 2023

Understood. I edited the envcanada.js file to reflect the change, and will update again in April.

Thanks!

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 7, 2023

@etrefal if you used my upgrade script, it would detect that you were using the develop branch and would have switched u back to master before the version upgrade

@etrefal
Copy link
Author

etrefal commented Jan 8, 2023

@sdetweil - I didn't know about your upgrade script. I downloaded it on the Pi a few minutes ago. I guess since I edited the envcanada.js file manually it might not help right now, but it might in April! I'll keep that in mind when we get there, thanks!

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 8, 2023

u don't have to download, just copy/paste from the repo readme online

@rejas
Copy link
Collaborator

rejas commented Jan 8, 2023

Understood. I edited the envcanada.js file to reflect the change, and will update again in April.

Thanks!

Good to hear that it fixed your problem for real. Can we close this issue now?

@khassel
Copy link
Collaborator

khassel commented Jan 8, 2023

Can we close this issue now?

I thought we close such issues when the fix/feature is released, see Collaboration.md (?)

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 8, 2023

I think and confirmed by the op

@etrefal
Copy link
Author

etrefal commented Jan 8, 2023

Yes, the issue could be closed now, the fix works!

@etrefal etrefal closed this as completed Jan 8, 2023
@rejas
Copy link
Collaborator

rejas commented Jan 8, 2023

Can we close this issue now?

I thought we close such issues when the fix/feature is released, see Collaboration.md (?)

True. Maybe we should add a label "Fix ready in next release" (or something like that) to those issues so that we can see which are "done"

MichMich added a commit that referenced this issue Apr 4, 2023
## [2.23.0] - 2023-04-04

Thanks to: @angeldeejay, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @grenagit, @Hirschberger, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt.

Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome!

### Added

- Added increments for hourly forecasts in weather module (#2996)
- Added tests for hourly weather forecast
- Added possibility to ignore MagicMirror repo in updatenotification module
- Added Pirate Weather as new weather provider (#3005)
- Added possibility to use your own templates in Alert module
- Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403)
- Added possibility to use environment variables in `config.js` (#1756)
- Added option `pastDaysCount` to default calendar module to control of how many days past events should be displayed
- Added thai language to alert module
- Added option `sendNotifications` in clock module (#3056)

### Removed

- Removed darksky weather provider
- Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896)

### Updated

- Use develop as target branch for dependabot
- Update issue template, contributing doc and sample config
- The weather modules clearly separates precipitation amount and probability (risk of rain/snow)
  - This requires all providers that only supports probability to change the config from `showPrecipitationAmount` to `showPrecipitationProbability`.
- Update tests for weather and calendar module
- Changed updatenotification module for MagicMirror repo only: Send only notifications for `master` if there is a tag on a newer commit
- Update dates in Calendar widgets every minute
- Cleanup jest coverage for patches
- Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues, update `main.css` matching new rules
- Update Eslint config, add new rule and handle issue
- Convert lots of callbacks to async/await
- Revise require imports (#3071 and #3072)

### Fixed

- Fix wrong day labels in envcanada forecast (#2987)
- Fix for missing default class name prefix for customEvents in calendar
- Fix electron flashing white screen on startup (#1919)
- Fix weathergov provider hourly forecast (#3008)
- Fix message display with HTML code into alert module (#2828)
- Fix typo in french translation
- Yr wind direction is no longer inverted
- Fix async node_helper stopping electron start (#2487)
- The wind direction arrow now points in the direction the wind is flowing, not into the wind (#3019)
- Fix precipitation css styles and rounding value
- Fix wrong vertical alignment of calendar title column when wrapEvents is true (#3053)
- Fix empty news feed stopping the reload forever
- Fix e2e tests (failed after async changes) by running calendar and newsfeed tests last
- Lint: Use template literals instead of string concatenation
- Fix default alert module to render HTML for title and message
- Fix Open-Meteo wind speed units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants