Skip to content

Commit 42f1cc6

Browse files
khasselcrazyscotbugsounetKristjanESPERANTOrejas
authored
Release v2.29 (#263)
* weather.md: update for recent changes (#230) * add updates feature configuration (#234) * Update calendar.md (#236) * updateOnFetch feature Docs (#235) * Minor changes (#238) * Minor changes - wording - Magic Mirror -> MagicMirror - format * sh -> shell * Update compliments docs page (#242) Add documentation for the specialDayUnique config option * Cleanup formatting (#247) * bump prettier * run prettier * UK Met Office Documentation Fix (#253) * Update weather.md Updated documentation for MetOffice update * Update weather.md * add doc for new compliments(#3481) and support custom positions (#3518) (#254) * add doc for new compliments(#3481) and support custom positions (#3518) * fix typo * update compliments, and module position info (#255) * add doc for new compliments(#3481) and support custom positions (#3518) * fix typo * Added docs for new notification `MODULE_DOM_UPDATED` (#262) * Bump send and express (#260) Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `send` from 0.18.0 to 0.19.0 - [Release notes](https://github.com/pillarjs/send/releases) - [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md) - [Commits](pillarjs/send@0.18.0...0.19.0) Updates `express` from 4.20.0 to 4.21.0 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md) - [Commits](expressjs/express@4.20.0...4.21.0) --- updated-dependencies: - dependency-name: send dependency-type: indirect - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added docs for new notification - . Fixes #261 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Ross Younger <[email protected]> Co-authored-by: Bugsounet - Cédric <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: WallysWellies <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: jargordon <[email protected]> Co-authored-by: sam detweiler <[email protected]> Co-authored-by: Ryan Williams <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent a6907a5 commit 42f1cc6

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

development/core-module-file.md

+2
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ 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 asynchronously. You can listen for the [`DOM_OBJECTS_UPDATED` notification](/development/notifications.html) to know when the rendering is complete and the new dom is safe to interact with. This notification only fires if the content will really change.
336+
335337
As an example: the clock modules calls this method every second:
336338

337339
```javascript

development/notifications.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ The system sends three notifications when starting up:
2222
| `ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules. |
2323
| `DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes. |
2424
| `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
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

modules/compliments.md

+23
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ 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 specification, which provides more options. In addition to date, one can use hours, minutes and day of week for additional control
62+
the cron format string is 5 groups of space separated values<br><br>
63+
**minute hour day month day_of_week**<br><br>
64+
each can be a range, and use numbers or names
65+
see https://crontab-generator.org for a visual cron syntax creator.. this tool asks for the command to be executed (cron is usually used to execute commands on a schedule), just use anything, and take the first 5 space separated tokens of the result.
66+
6167
If set, the weather can be used for compliments. The available properties are:
6268

6369
- `day_sunny`
@@ -92,6 +98,23 @@ config: {
9298
}
9399
```
94100

101+
#### Example use with a cron entry
102+
103+
```javascript
104+
config: {
105+
compliments: {
106+
"48-50 16-18 * * 5,6": [
107+
"Happy Hour!", "Its a Party"
108+
]
109+
}
110+
}
111+
```
112+
this means, on Friday or Saturday, every week (* (every) month/day) between 16:48-16:50, 17:48-17:50, and 18:48-18:50, the assigned messages will be used. note: like with the date only setting, if these are the only possible messages you want displayed, you need to set **specialDayUnique:true**
113+
114+
another example,. you could use this for scary messages ONLY on between 8 and 9pm Halloween evening
115+
<br>"* 20-21 31 10 *":["Boo!!"]
116+
117+
95118
#### Example use with weather module
96119

97120
```javascript

modules/configuration.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ see [configuration](/configuration/introduction.md) for more information.
66
| **Option** | **Description** |
77
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88
| `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
9-
| `position` | The location of the module in which the module will be loaded. Possible values are `top_bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |
10-
| `classes` | One or more additional CSS classes which will be set on the module, as a string of space-separated values. This field is optional. |
9+
| `position` | The location of the module in which the module will be loaded. The built in values are `top_bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. (if not set, the module will not be shown, but will run the same) Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file, top down. |
10+
| | Note: <br><br>if your implementation of MagicMirror wishes to use custom position values, they need used in **index.html** to be in the format <br><br>class="region newpos-a newpos-b"<br> <br>MagicMirror will underscore join the last two terms to make a position value like <br><br>newpos-a_newpos-b<br><br>example: class="region top3 left" <br>the position will be "top3_left"<br><br>newpos_b is optional<br>class="region top3" would be valid and produce a position of "top3"<br><br>the new position values will be checked during MagicMirror startup and also in the configuration checker <br> npm run config:check <br><br> AND you have to have the appropriate css settings in custom.css for these new region values (top3 and left as used in the example above)|
11+
| `classes` | One or more additional CSS classes which will be set on the module, as a string of space-separated values. This field is optional. |
1112
| `header` | To display a header text above the module, add the header property. This field is optional. |
1213
| `hiddenOnStartup` | Set module as being hidden on startup. This field is optional. |
1314
| `disabled` | Set disabled to `true` to skip creating the module. This field is optional. |

modules/weather.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ retrieve more than 5 days you must subscribe to the OpenWeatherMap API.
141141

142142
| Option | Description |
143143
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
144-
| `apiBase` | The UKMO DataHub base URL.<br><br> **Possible value:** `'https://api-metoffice.apiconnect.ibmcloud.com/metoffice/production/v0/forecasts/point/'` <br> This value is **REQUIRED** |
145-
| `apiKey` | Your API key (MetOffice API ClientID). See the [Getting Started](https://metoffice.apiconnect.ibmcloud.com/metoffice/production/start) guide on the Met Office website for creating a new account. <br> This value is **REQUIRED** |
146-
| `apiSecret` | Your API secret (MetOffice API ClientSecret). <br> This value is **REQUIRED** |
144+
| `apiBase` | The UKMO DataHub base URL.<br><br> **Possible value:** `'https://data.hub.api.metoffice.gov.uk/sitespecific/v0/point/'` <br> This value is **REQUIRED** |
145+
| `apiKey` | Your API key (MetOffice API ClientID). See the [Getting Started](https://datahub.metoffice.gov.uk) guide on the Met Office website for creating a new account. Subscribe to the Site Specific Forecast service - Global Spot.<br> This value is **REQUIRED** |
147146
| `lat` | The latitude coordinate for the desired location. <br><br> **Possible value:** `50.7271915` <br> This value is **REQUIRED** |
148147
| `lon` | The longitude coordinate for the desired location. <br><br> **Possible value:** `-3.4776089` <br> This value is **REQUIRED** |
149148

0 commit comments

Comments
 (0)