- fix newsfeed and calendar e2e tests so they don't need `--forceExit`
anymore
- `--forceExit` should stay in test runs to avoid running until test
limit in case of errors
- remove mocking console, not needed anymore
- configFactory-stuff should not run in browser (otherwise we get errors
`[ReferenceError: exports is not defined]`)
Refactored calendarfetcherutils to remove as many of the date
conversions as possible and use moment tz when calculating recurring
events, this will make debugging a lot easier and fixes problems from
the past with offsets and DST not being handled properly. Also added
some tests to test the behavior of the refactored methodes to make sure
the correct event dates are returned.
Refactored calendar.js aswell to make sure the unix UTC start and end
date of events are properly converted to a local timezone and displayed
correctly for the user.
This PR relates to:
https://github.com/MagicMirrorOrg/MagicMirror/issues/3797
---------
Co-authored-by: Koen Konst <c.h.konst@avisi.nl>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Hello and thank you for wanting to contribute to the MagicMirror²
project!
**Please make sure that you have followed these 4 rules before
submitting your Pull Request:**
> 1. Base your pull requests against the `develop` branch.
> 2. Include these infos in the description: implement short syntax for
clock week
>
> - Does the pull request solve a **related** issue? n/a
> - If so, can you reference the issue like this `Fixes
#<issue_number>`?
> - What does the pull request accomplish? Use a list if needed.
> - If it includes major visual changes please add screenshots.
>
> 3. Please run `npm run lint:prettier` before submitting so that
> style issues are fixed.
> 4. Don't forget to add an entry about your changes to
> the CHANGELOG.md file.


**Note**: Sometimes the development moves very fast. It is highly
recommended that you update your branch of `develop` before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.
Thanks again and have a nice day!
---------
Co-authored-by: BugHaver <43462320+lsaadeh@users.noreply.github.com>
- [2b395b9f] Fix command to lint markdown in `CONTRIBUTING.md`
- [fed4c86c] Re-activate JSDoc ESLint plugin and fix linting issues (As
far as I remember, we deactivated it when we upgraded to ESLint 9
because it was not compatible with it. But its now.)
- [a3d2064b] Refactor ESLint config to use `defineConfig` and
`globalIgnores` ([these are like new
defaults](https://eslint.org/blog/2025/03/flat-config-extends-define-config-global-ignores/))
- [a3d2064b] Replace `eslint-plugin-import` with
`eslint-plugin-import-x`
(https://github.com/es-tooling/module-replacements/blob/main/docs/modules/eslint-plugin-import.md)
- [86a185b6] Switch Stylelint config to flat format and simplify
Stylelint scripts (like we already did for ESLint and prettier)
- [f5a2c541] Fix some typos
This has the advantage that the package manager is no longer involved
after the installation process.
However, previous start commands such as `npm run start` continue to
work. So we don't even have to adapt the documentation.
Hello and thank you for wanting to contribute to the MagicMirror²
project!
**Please make sure that you have followed these 4 rules before
submitting your Pull Request:**
> 1. Base your pull requests against the `develop` branch.
> 2. Include these infos in the description:
>
> - Does the pull request solve a **related** issue? No
> - If so, can you reference the issue like this `Fixes
#<issue_number>`? N/A
> - What does the pull request accomplish? Use a list if needed.
Introduce showNextEvent to show/hide next sun event
> - If it includes major visual changes please add screenshots.
>

> 3. Please run `npm run lint:prettier` before submitting so that
> style issues are fixed.
> 4. Don't forget to add an entry about your changes to
> the CHANGELOG.md file.
**Note**: Sometimes the development moves very fast. It is highly
recommended that you update your branch of `develop` before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.
Thanks again and have a nice day!
---------
Co-authored-by: BugHaver <43462320+lsaadeh@users.noreply.github.com>
Fixed Version of PR #3526 since that was against the wrong branch and
had issues.
Original PR Text:
Basically the title. Just some existing weather data included into
hourly, some config option ("hideZeroes") to hide precipitation when it
is zero (this actually shrinks the entire table, removing columns that
are completely empty), and add a spacing column to fix the UV Index
column.
---------
Co-authored-by: Veeck <github@veeck.de>
see
https://forum.magicmirror.builders/topic/19440/digital-clock-minutes-darker
changelog added
question..
we have a config parm for seconds color, but not hour/minute
I have used css here.. is that too inconsistent?
---------
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: Veeck <github@veeck.de>
I have updated weatherflow.js to implement the following changes (as
described in #3728)
- Fixed: Weather icons now show up properly
- Added: Location Name support
- Added: Hourly weather forecast support
- Added to current conditions:
- "Feels like" temp
- Fixed icon for current conditions to be sourced from current
conditions (rather than daily forecast)
- UV index
- Added to daily forecast
- Precipitation amount and UV index (via hourly forecast data)
Before:

After:

Fixes#3296
The problem was that the fetch-methods threw errors when something went
wrong instead of calling `updateAvailable()`. `updateAvailable()` must
be called in order to schedule the next update.
I added some filtering for the hourly forecast that removes hours in the
past. If the API call fails we use the cached data, but we should only
display hours in the future.
fixes#3267 AGAIN, correctly, add testcase
add testcase for #3679 , broadcast clipping incorrectly
I added a test module (tests/testNotification) to catch the notification
and check the count. (one way to configure)
i put this module in the tests folder, and added /tests to the server
paths.
(can't have a module in a nested folder, like tests/modules/xxx)
but I have a problem. i can run the test config (MM_CONFIG_FILE), and
the two modules work correctly,
but in the spec runner, the calendar module times out on the broadcast
test.. there is only local ics file access, no outside hosts
I forced my system date to 1/1/24 (same as runner) and again the manual
testcase works fine
I added two test config.js,(configs/calendar) one works great (symbols)
, one fails (broadcast test)
I added additional delay in the calendarspec runner to try to debug the
module, but it still not long enough.. no messages of trouble when I get
into the browser.. BUT, this may be because of the log being turned
off... (just thought of this)
I created a special ICS (in mocks) that has 12 events, 1 for each
month.. (so I can check clipping and broadcast) the US holidays one is
sensitive to the current date, and I couldn't get it to work on
1/1/2024..
also, in general, is there a mechanism to run test:just_one_runner?
waiting thru the electron test to get to one testcase.. ugh..
Main point was to enable ESLint `dot-notation` and `no-unneeded-ternary`
rules for more code consistency.
I took the occasion to add two minor commits:
- Fix a problem found by running `test:spelling
- Minor dependency update
It wouldn't be a problem if the PR didn't arrive in the next release,
the changes are cosmetic.
here is an updated test version of the fixes for all kinds of calendar
date problems.
NOTE: the changed branch name
NOTE: this used the node-cal@0.19.0 library UNCHANGED
best to make a new folder and git clone there
git clone https://github.com/sdetweil/MagicMirror
cd MagicMirror
git checkout fixcaldates2 // <------ note this is a changed branch name
npm run install-mm
copy your config.js and custom.css from the prior folder
and the non-default modules you have installed…
this ONLY changes the default calendar
but DOES ship an updated node-ical library too
if you need to fall back, just rename the folders around again so that
your original is called MagicMirror
all the testcases for node-ical and MagicMirror execute successfully.
the ‘BIG’ change here is to get the local NON-TZ dates for the
rrule.between()
all the checking and conversion code is commented out or not used
the node-ical fixes are for excluded dates (exdate) values being
adjusted for DST/STD time… waiting to submit that PR
one fix in calendar.js for checking if a past date was too far back,
but it never checked to see IF the event date was in the past… (before
today) so it chopped off too many
and one change in calendarfetcher.js to put out a better diagnostic
message of the parsed data… (exdate was excluded cause JSON stringify
couldn’t convert the complex structure)
I added the tests you all have documented
please re-pull and checkout the new branch (I deleted the old branch)
and npm run install-mm again
---------
Co-authored-by: Veeck <github@veeck.de>
This will fix#3576
@FrankBlackMG:
I don't use `*env.unique_id` because some others modules can use pm2 too
for starting a service and unique_id is the same (this will make
confusion)
So I check `name` and `pm_id` for found it
since API 3.0 is default, weatherEndpoint should be set to "/onecall"
Fixes#3574
ATTENTION: since lat / lon defaults to 0 / 0, the weather plugins works
after this patch, but shows the weather from
https://de.wikipedia.org/wiki/Null_Island if lat / lon is not manually
set.
---------
Co-authored-by: Karsten Hassel <hassel@gmx.de>
Co-authored-by: Pedro Lamas <pedrolamas@gmail.com>
I discover this bug:
When pm2 `sh` script is on MagicMirror root folder, updatenotification
is not able to detect pm2 using
```
0|MagicMirror | [2024-10-02 17:23:09.215] [DEBUG] Version Compare: 2.30.0-develop 2.30.0-develop --> true
0|MagicMirror | [2024-10-02 17:23:09.216] [DEBUG] Status: online
0|MagicMirror | [2024-10-02 17:23:09.216] [DEBUG] PM2 MagicMirror starting from Path: /home/bugsounet/MagicMirror-dev
0|MagicMirror | [2024-10-02 17:23:09.216] [DEBUG] MagicMirror Path /home/bugsounet/MagicMirror-dev/
0|MagicMirror | [2024-10-02 17:23:09.216] [DEBUG] Compare: false
0|MagicMirror | [2024-10-02 17:23:09.216] [INFO] updatenotification: [PM2] You are not using pm2
```
sliceMultiDayEvents occasionally gets the number of events wrong and
produces too many rows
Math.ceil() rounds up over 1.04 so we get an abnormal count
then the calcs for the midnight loop control used different moment()
functions, producing different results
fixes#3542
This PR resolve Issue number #3419 .
I have added the method `convertWeatherObjectToImperial()` which
converts the units of the `notificationPayload` to imperial if needed,
in order to pass the object in `sendNotification()`.
---------
Co-authored-by: veeck <michael.veeck@nebenan.de>
> - What does the pull request accomplish? Use a list if needed.
this change allows uses to configure date/time events for compliments..
also linked site that will build the cron entry..
and example was Happy hour in a pub, on fri/sat between 5 and 7 pm.
or just after midnight on Halloween (Boooooo!)
I also added testcases for #3478
(and added support for this in MMM-Config), with a custom, drop down
selection list of the types.. )
| if this is approved I will update the module doc
Fixes#3384
Changed the UKMetOfficeDataHub provider to the new API structure as per
the documentation.
API Base URL updated.
Header information amended to the correct key name.
API Secret no longer required so removed.
Changelog updated to reflect the change.
related to #3480
Change module updatenotification so that it can work without `pm2` in a
docker container.
It now tests if file `/.dockerenv` exists and if so `require("pm2")` is
never called.
`Fixes #3465`
Add config option `specialDayUnique` that defaults to `false` and causes
special day compliments to be added to the existing compliments array.
Setting this option to `true` will only show the compliments that have
been configured for that day.
---------
Co-authored-by: Veeck <github@veeck.de>
Co-authored-by: veeck <michael.veeck@nebenan.de>
Co-authored-by: Karsten Hassel <hassel@gmx.de>
As discussed in #3466, the Open-Meteo provider is using the apparent
temperature ("Feels like") in the forecast and hourly weather reporting.
This is contrary to expected behavior.
Note: I'm a little unclear on how I should be editing the `CHANGELOG.md`
file with this PR - happy to update this PR with a little guidance. This
is my first attempted PR in this project.
Let me know if there are any questions.
---------
Co-authored-by: veeck <michael.veeck@nebenan.de>
Hey!
This PR should change the behaviour of starting fullDay events that last
several days. The goal was to change the behavior of the "Starting
today, ends T" (T=Tomorrow) event, so it should show how many days it
will occur from the first day on
Before situation:
a fullDay event that started 'today' and ends several days later showed
Today on the first day. The rest of the days it showed X days left.

Y => Yesterday
T => Tomorrow
Target situation with this commit:
a fullDay event that started 'today' shows 'X days left' from the first
day on and 'Today' on the last day.

---------
Co-authored-by: Veeck <github@veeck.de>