4845 Commits

Author SHA1 Message Date
Veeck
c0a5f35a00
Cleanup nunjuck templates (#3109)
Ran a linter over it (djlint) which fixed intendation and a few errors

---------

Co-authored-by: veeck <michael@veeck.de>
2023-09-02 22:18:57 +02:00
Paranoid93
2ad463b6c7
fix calendar not showing events with the same name and start date but different calendar url (#3166)
I fixed the calendar module, which did not show calendar entries from
different calendars that share the same name and start date.

My use case: We have each office days documented in each an own
calendar. If both "Office" Calendar entries start at the same date just
one was shown

Google Calendar (each Office event in an own calendar)

![260753381-c8d5aedf-3c11-4d91-83e8-8549eb261e58](https://github.com/MichMich/MagicMirror/assets/6515818/0cb0ecbd-65bb-4ec4-b5e6-b011cb1c9c6b)

Before

![260751994-b308d549-fcb9-406e-9419-cdd2fed96dc6](https://github.com/MichMich/MagicMirror/assets/6515818/ed4d4645-0852-4e19-99ed-fec3f25d547a)

After

![260753208-3278e32b-9ca5-483a-bc6f-745cbf3964fc](https://github.com/MichMich/MagicMirror/assets/6515818/41b70843-af9f-47fc-baed-91c3c63e9acb)
2023-08-26 13:53:41 +02:00
Veeck
200db181d5
Update typescript definition (#3173) 2023-08-22 20:52:10 +01:00
Bugsounet - Cédric
7ba96aeb98
Add Npmrc (#3135)
Fix engines check on npm install

it will alow to check engine requirement of `package.json`

actually:
```js
	"engines": {
		"node": ">=16"
	}
```

if requirements are not suitable, it's break installer

```sh
bugsounet@Kubuntu:~/MagicMirror-dev$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: magicmirror@2.24.0-develop
npm ERR! notsup Not compatible with your version of node/npm: magicmirror@2.24.0-develop
npm ERR! notsup Required: {"node":">=16"}
npm ERR! notsup Actual:   {"npm":"x.y.z","node":"v14.xx.yy"}
```

actually, it's just a warn:
```sh
bugsounet@KUbuntu:~/MagicMirror-dev$ npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'magicmirror@2.24.0-develop',
npm WARN EBADENGINE   required: { node: '>=16' },
npm WARN EBADENGINE   current: { node: 'v14.xx.yy', npm: 'x.y.z' }
npm WARN EBADENGINE }
...
```
and don't break installation, this can causes errors in the main core of
MM²

---------

Co-authored-by: veeck <michael.veeck@nebenan.de>
2023-08-20 13:14:21 +02:00
Kristjan ESPERANTO
7c64d8fce6
Minimum node version v18 (#3170)
When the next MagicMirror version is released, node v16 will have
reached its end of life.
2023-08-20 12:55:17 +02:00
Kristjan ESPERANTO
7dcea98e99
Handle pretty-quick issue (#3169)
- Replace pretty-quick by lint-staged (to fix:
<https://github.com/azz/pretty-quick/issues/164>)
- Update prettier dependencies
- Handle prettier issues
2023-08-16 14:21:02 +02:00
Karsten Hassel
59e9d765e2
update to electron v26 (#3168)
- tested on rpi4
- electron tests are fine
2023-08-16 00:05:32 +02:00
Karsten Hassel
156db32c76
fix electron width/heigth when using xrandr under bullseye (#3161)
This PR uses `electron.screen.getPrimaryDisplay().workAreaSize` under
electron to get the screen size.

If this fails the current defaults (800x600) are used.

This solves some problems with xrandr under bullseye where the sreen
comes up with 800x600 instead of fullscreen, e.g. described
[here](https://khassel.gitlab.io/magicmirror/pi-modules/).

Tested this on my pi setup.

By the way, the Issue #1919 is back on my side (not related to this PR)
...
2023-08-12 22:57:42 +02:00
Karsten Hassel
58cdfa3cb1
update dependencies (except prettier v3) (#3160) 2023-08-12 22:55:09 +02:00
Veeck
49c72d8dfc
Update dependencies (#3155)
Takes https://github.com/MichMich/MagicMirror/pull/3153 (why does that
always base against master despite the yaml configuring it against
develop?) and updates othe rminor dependencies (not prettier v3 that
will take a little time)

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-16 23:16:53 +02:00
sam detweiler
1bd146f52e
fix clientOnly not starting up after async startup added in 2.23 (#3154)
Fixes #3151 

app.whenReady() was removed when async changes made, needed for
clientonly in electron.js
2023-07-16 23:04:58 +02:00
Karsten Hassel
948910d304
add section for foreign modules in issue template (#3149) 2023-07-05 20:22:19 +02:00
Karsten Hassel
0b97639341
update roboto fonts to v5 (#3121)
there are no "all" files in the v5 versions of roboto-fonts anymore so I
used the content of their css files in `roboto.css`.

~~PR is set to draft because @rejas wants to wait until next release is
done.~~
2023-07-03 00:01:12 +02:00
Veeck
f802c85a38
Fix undefined error for showSunTime / showMoonTime in clock module (#3146)
Fixes #3143 and adds tests for showSunTime / showMoonTime
2023-07-02 22:10:58 +02:00
Knapoc
62eb23ba6a
Add openweathermap UV index support (#3145)
This PR adds UV index support to the openweathermap provider for the One
Call api.
2023-07-02 21:47:25 +02:00
Michael Teeuw
4b0e0aa48f Prepare 2.25.0-develop branch. 2023-07-01 21:24:52 +02:00
Michael Teeuw
e9f1bd9d7a Merge branch 'master' into develop 2023-07-01 21:18:12 +02:00
Michael Teeuw
e87f50e64a
Release 2.24.0 (#3141)
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Karsten Hassel <hassel@gmx.de>
Co-authored-by: Malte Hallström <46646495+SkySails@users.noreply.github.com>
Co-authored-by: Veeck <github@veeck.de>
Co-authored-by: veeck <michael@veeck.de>
Co-authored-by: dWoolridge <dwoolridge@charter.net>
Co-authored-by: Johan <jojjepersson@yahoo.se>
Co-authored-by: Dario Mratovich <dario_mratovich@hotmail.com>
Co-authored-by: Dario Mratovich <dario.mratovich@outlook.com>
Co-authored-by: Magnus <34011212+MagMar94@users.noreply.github.com>
Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
Co-authored-by: buxxi <buxxi@omfilm.net>
Co-authored-by: Thomas Hirschberger <47733292+Tom-Hirschberger@users.noreply.github.com>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: Andrés Vanegas Jiménez <142350+angeldeejay@users.noreply.github.com>
Co-authored-by: Dave Child <dave@addedbytes.com>
Co-authored-by: grenagit <46225780+grenagit@users.noreply.github.com>
Co-authored-by: Grena <grena@grenabox.fr>
Co-authored-by: Magnus Marthinsen <magmar@online.no>
Co-authored-by: Patrick <psieg@users.noreply.github.com>
Co-authored-by: Piotr Rajnisz <56397164+rajniszp@users.noreply.github.com>
Co-authored-by: Suthep Yonphimai <tomzt@users.noreply.github.com>
Co-authored-by: CarJem Generations (Carter Wallace) <cwallacecs@gmail.com>
Co-authored-by: Nicholas Fogal <nfogal.misc@gmail.com>
Co-authored-by: JakeBinney <126349119+JakeBinney@users.noreply.github.com>
Co-authored-by: OWL4C <124401812+OWL4C@users.noreply.github.com>
Co-authored-by: Oscar Björkman <17575446+oscarb@users.noreply.github.com>
Co-authored-by: Ismar Slomic <ismar@slomic.no>
Co-authored-by: Jørgen Veum-Wahlberg <jorgen.wahlberg@amedia.no>
Co-authored-by: Eddie Hung <6740044+eddiehung@users.noreply.github.com>
Co-authored-by: Bugsounet - Cédric <github@bugsounet.fr>
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v2.24.0
2023-07-01 21:17:31 +02:00
Michael Teeuw
46bca1bc6d Merge branch 'master' into develop 2023-07-01 20:59:34 +02:00
Michael Teeuw
2b6720e6e5 Prepare 2.24.0 release. 2023-07-01 20:34:43 +02:00
Veeck
ea818bf899
Fix fetchInterval for sample calendar (#3139)
fixes #3138 just in case #3137 doesnt get worked on until the next
release

- inc fetchInterval for sample calender
- add fetchInterval config per calendar
2023-06-30 20:13:07 +02:00
Karsten Hassel
0e00e64493
update dependencies (#3140)
last dependency update before next release
2023-06-29 22:59:43 +02:00
Karsten Hassel
3c35d346ee
fix updatenotification where no branch is checked out ... (#3136)
... but e.g. a version tag

fixes #3130 

This happens e.g. in my docker image where I use the version tag to get
the mm sources.

With this PR the error message is avoided and there will be never an
updatenotification when using a tag. This is o.k. because a tag should
never be moved.
2023-06-27 11:18:16 +02:00
Veeck
675e4d4f67
Update dependencies and fix dependabot issues (#3134)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-25 20:12:55 +02:00
Bugsounet - Cédric
c1850f2577
Remote force check update (#3127)
updatenotification: 

allow force scanning with `SCAN_UPDATES` notification from other modules
2023-06-18 14:33:03 +02:00
Bugsounet - Cédric
e985e99036
Updates notification (#3119)
Hi,

Like some default modules, I propose to send an `UPDATES` notification
in an array with the git information of these modules

This allows developers to create their own auto-update system (which
I've been using in my case since 3 years, with automatic things)

Of course, for security reasons `MagicMirror` is excluded

---------

Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
2023-06-08 22:41:48 +02:00
Karsten Hassel
b7371538bc
update deps and remove stylelint fix (#3120)
~~there are no "all" files in the v5 versions of roboto-fonts anymore so
I used the content of their css files in `roboto.css`~~

coming with separate PR
2023-06-08 22:40:23 +02:00
Karsten Hassel
a56b92990d
update deps incl. electron to v25, fix stylelint segmentation dump (#3118)
- update electron to v25
- added `overrides:` section to `package.json` to fix
https://github.com/stylelint/stylelint/issues/6898 (must be removed when
fixed upstream, fixing the version to `v15.6.2` did not fix the problem)
- update other deps
2023-06-06 10:16:24 +02:00
Veeck
c7405b76b3
Split install and run commands in github actions (#3112)
... makes looking at the checks a little easier in case they fail

---------

Co-authored-by: veeck <michael@veeck.de>
2023-05-27 22:22:26 +02:00
OWL4C
eceec8285d
Adding experimental UV Index support for weather module (#3108)
This pr adds (config.js toggleable) showUV_Index to the hourly and
current weather modules, with right now only openmeteo configured to
supply the data. Other providers could have support too by adding
`uv_index` to current and hourly.

For example the current weather looks like
![image](https://github.com/MichMich/MagicMirror/assets/124401812/00fdf5db-c0d5-4797-9a31-1d72dd970d26)
positioned after sunset in the top row.



The following "hacks" are included and could be fixed to make it
cleaner, but the functionality is wanted and it works without problem.
- To hide entries where the UV Index is 0 i added an if statement to the
`hourly.njk` which is not how precipitation is handled.
The following are minor things that might not need fixing:
- The forecast option does not have UV support. This might not be
relevant since UV changes throughout the day but i tried to implement a
"max_UV" to openmeteo.js, but am not confident enough in JS to
accomplish that.
- The UV Icon is wi-hot and manually added to the `.njk`'s. This could
be made changeable by a config but does not seem relevant since wi-hot
is not used by anything else as far as i can tell.

---------

Co-authored-by: veeck <michael@veeck.de>
2023-05-22 10:57:48 +02:00
Eddie Hung
0573d6e772
Fix envcanada today pop (#3106)
Fix for today's probability-of-precipitation weather module's envcanada
provider.

Without which, requesting `showPrecipitationProbability` causes
"undefined" to be shown.

Consistent with method used elsewhere in the file:

abe5c08a52/modules/default/weather/providers/envcanada.js (L395-L399)
2023-05-21 10:51:13 +02:00
Jørgen Veum-Wahlberg
babd22b04f
Bug fix: adding date to the analog clock if showDate is true (#3101)
Adding date to the clock module when displayType is "analog" and
"showDate" is true. The setting in analogShowDate is respected.

Fixes #3100

---------

Co-authored-by: Michael Teeuw <michael@xonaymedia.nl>
Co-authored-by: Veeck <github@veeck.de>
2023-05-19 14:52:59 +02:00
Veeck
432d900ecd
Add tests for some weather utils (#3103)
Co-authored-by: veeck <michael@veeck.de>
2023-05-15 21:04:50 +02:00
Ismar Slomic
83315f1fed
fix: don't filter out ongoing full day events in Calendar module (#3095) (#3096)
Fixes #3095.

Param `hideOngoing` is by default set to `false`, but the event
filtering handles `full day` & `non-full day` events inconsistently. For
`non-full day` _ongoing_ and _upcoming_ events are returned, while for
`full day` only _upcoming_ events where returned.
2023-05-15 20:16:33 +02:00
Oscar Björkman
e09d60d1d1
Use single config backup file when config.template is used (#3104)
Copy `config.js` to a single `config.js-old` file whenever a
`config.template` is present, instead of using `Date()` as a suffix.
Creating files with a timestamp suffix means that whenever Magic Mirror
is restarted or recreated a new file is written into the config
directory.

Benefits:
* Single backup file will avoid excessive writing of files
* Saves space and usage on SD cards.
* Makes the folder cleaner and easier to overview, compared to ending up
with something like this as time goes on:

![image](https://github.com/MichMich/MagicMirror/assets/17575446/9b66a99c-e760-471e-884c-9daa19689702)
2023-05-15 20:11:23 +02:00
OWL4C
d832d795df
Add openmeteo precipitation probability (#3099)
Due to the size of the commit there is no need for a long explanation:
Openmeteo supports precipitation probability in api, but the weather
provider .js had no support for it. After adding 4 lines it works as
expected. This should have no consequences on other files but improves
usability for (imo) the best weather provider.

---------

Co-authored-by: veeck <michael@veeck.de>
2023-05-13 09:29:00 +02:00
Karsten Hassel
a41aa48dd1
add .gitattributes and fix prettier/js warnings (#3094)
see title, as discussed in
https://github.com/MichMich/MagicMirror/pull/3093
2023-04-22 09:29:51 +02:00
Karsten Hassel
b80485b52f
use node v20 in github workflow (replacing v19) (#3093)
additional:

- update deps
- suppress more unwanted log errors in e2e tests
- add .gitattributes
- fix prettier/js warnings
2023-04-22 09:29:23 +02:00
Veeck
7e58b38ddf
Add no-param-reassign from eslint (#3089)
While waiting for the easterbunny I cleaned up some bad coding practice
:-)

Very open for comments especially regarding the places I commented
myself...

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-16 17:38:39 +02:00
Karsten Hassel
979f4ec664
fix electron not running under windows (after async changes) (#3091)
fixes #3083 

tested under windows 11 and linux.
2023-04-12 08:25:07 +02:00
Veeck
4e3369062e
Fix envcanada hourly forecast time (#3090)
Fixes #3080

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-09 19:23:44 +02:00
Veeck
77f9c86774
Refactor calendar methods into util class (#3088)
Refactored some methods in calendar module:
- move methods into own file 
- dont call shorten method from titelTransform because why? just call
them after each other.
- added tests for util methods
- cleaned up other tests

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-09 12:49:50 +02:00
JakeBinney
dee3cd3da7
Fixed clock module sunrise/sunset timezone bug (#3070)
Updated sunrise/sunset times to display user-requested timezone rather
than system timezone.

Note: rebase of  #3069 against develop rather than master

Co-authored-by: Veeck <github@veeck.de>
2023-04-09 09:19:51 +02:00
Karsten Hassel
09f117c3d9
set Timezone Europe/Berlin in unit tests (#3087)
needed for new formatTime unit tests.

Avoiding ugly TZ setting in github workflows, see
https://github.com/MichMich/MagicMirror/pull/3073
2023-04-08 08:55:43 +02:00
Veeck
32192d1698
Refactor formatTime into util class (#3073)
While looking at https://github.com/MichMich/MagicMirror/pull/3070 I
noticed that the weather and clock module do some formatTime stuff, so
why not use a common function for that?

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-07 23:11:54 +02:00
Karsten Hassel
2c7beeaaaf
added test for serveronly (#3086)
- add test for serveronly, fixes #3076 
- use template literals in port_variable.js.template
2023-04-07 19:42:46 +02:00
Kristjan ESPERANTO
0d3ad9812c
Drop node v14 support (#3085)
node v14 will have reached end-of-life by the next release.

From April 18th we can use node v20 instead of v19 for testing.
2023-04-07 19:24:27 +02:00
Karsten Hassel
b7eb21e48f
removed unneeded (and unwanted) '.' (#3084)
after the year in calendar repeatingCountTitle (#2896, second attempt
...)
2023-04-07 14:54:19 +02:00
Karsten Hassel
9703226c73
Update electron to v24, remove th.json from root dir (#3079)
- current electron v22 has end of life 07 Jul 2023 so it has to be
upgraded before next release
- removed th.json from root dir (came back with latest release)
- updated other dependencies
2023-04-05 07:43:42 +02:00
Michael Teeuw
cc11b77f24 Prepare v2.24.0-develop 2023-04-04 20:56:49 +02:00