Skip to content

Commit 98b72b3

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 7f29d9b + 5ed5b13 commit 98b72b3

File tree

9 files changed

+642
-651
lines changed

9 files changed

+642
-651
lines changed

development/core-module-file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,12 @@ Whenever your module need to be updated, call the `updateDom(speed)` method. It
332332
requests the MagicMirror core to update its dom object. If you define the speed,
333333
the content update will be animated, but only if the content will really change.
334334

335+
Note that the rendering of the updated dom on the screen will happen
336+
asynchronously. You can listen for the
337+
[`DOM_OBJECTS_UPDATED` notification](/development/notifications.html) to know
338+
when the rendering is complete and the new dom is safe to interact with. This
339+
notification only fires if the content will really change.
340+
335341
As an example: the clock modules calls this method every second:
336342

337343
```javascript

development/notifications.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ Additional technical information on the notifications can be found in the
1717

1818
The system sends three notifications when starting up:
1919

20-
| Notification | Payload | Description |
21-
| --------------------- | ------- | -------------------------------------------------------------------------------------- |
22-
| `ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules. |
23-
| `DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes. |
24-
| `MODULE_DOM_CREATED` | _none_ | This module's dom has been fully loaded. You can now access your module's dom objects. |
20+
| Notification | Payload | Description |
21+
| --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22+
| `ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules. |
23+
| `DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes. |
24+
| `MODULE_DOM_CREATED` | _none_ | This module's dom has been fully loaded. You can now access your module's dom objects. |
25+
| `MODULE_DOM_UPDATED` | _none_ | This module's dom has been updated and re-rendered. You can now access your module's (updated) dom objects. This notification is sent in response to a call to [`updateDom`](https://docs.magicmirror.builders/development/core-module-file.html#module-instance-methods). |
2526

2627
# Default module notifications
2728

28-
These notifications are send by the default modules:
29+
These notifications are sent by the default modules:
2930

3031
| Notification | Payload | Description |
3132
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

getting-started/installation.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ These instructions deploy a standalone version of MagicMirror², for [Server Onl
2121
- [Linux based distributions](https://github.com/nodesource/distributions)
2222
- [Others](https://nodejs.org/en/download)
2323

24-
2. check if `git` is installed on your machine by executing `git`
25-
(should show usage), otherwise install it
24+
2. check if `git` is installed on your machine by executing `git` (should show
25+
usage), otherwise install it
2626
3. Clone the repository:
2727
`git clone https://github.com/MagicMirrorOrg/MagicMirror`
2828
4. Enter the repository: `cd MagicMirror/`
@@ -72,6 +72,11 @@ team. Use these scripts and methods at your own risk.
7272
of the box with a default setup of MagicMirror, under the hood it uses the
7373
[docker setup](https://gitlab.com/khassel/magicmirror).
7474

75+
### NPM
76+
77+
- We also publish the latest version of MagicMirror to the
78+
[npm-registry](https://www.npmjs.com/package/magicmirror).
79+
7580
## Other Operating Systems
7681

7782
### Windows:

modules/compliments.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ compliments.
5858
Compliments can be set for a specific day in the format `YYYY-MM-DD`. `.` can be
5959
used as a wildcard.
6060

61+
starting in Version 2.29, the compliments configuration can use a cron type
62+
specification, which provides more options. In addition to date, one can use
63+
hours, minutes and day of week for additional control the cron format string is
64+
5 groups of space separated values<br><br> **minute hour day month
65+
day_of_week**<br><br> each can be a range, and use numbers or names see
66+
https://crontab-generator.org for a visual cron syntax creator.. this tool asks
67+
for the command to be executed (cron is usually used to execute commands on a
68+
schedule), just use anything, and take the first 5 space separated tokens of the
69+
result.
70+
6171
If set, the weather can be used for compliments. The available properties are:
6272

6373
- `day_sunny`
@@ -92,6 +102,36 @@ config: {
92102
}
93103
```
94104

105+
#### Example use with a cron entry
106+
107+
```javascript
108+
config: {
109+
compliments: {
110+
"48-50 16-18 * * 5,6": [
111+
"Happy Hour!", "Its a Party"
112+
]
113+
}
114+
}
115+
```
116+
117+
this means, on Friday or Saturday, every week (\* (every) month/day) between
118+
16:48-16:50, 17:48-17:50, and 18:48-18:50, the assigned messages will be used.
119+
note: like with the date only setting, if these are the only possible messages
120+
you want displayed, you need to set **specialDayUnique:true**
121+
122+
As another example you could use this for scary messages ONLY between 8 and
123+
9pm on Halloween evening:
124+
125+
```javascript
126+
config: {
127+
compliments: {
128+
"* 20-21 31 10 *": [
129+
"Boo!!"
130+
]
131+
}
132+
}
133+
```
134+
95135
#### Example use with weather module
96136

97137
```javascript

0 commit comments

Comments
 (0)