Skip to content

Commit

Permalink
Release v2.29 (#263)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Added docs for new notification - . Fixes #261

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ross Younger <crazyscot@gmail.com>
Co-authored-by: Bugsounet - Cédric <github@bugsounet.fr>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: veeck <michael.veeck@nebenan.de>
Co-authored-by: WallysWellies <59727507+WallysWellies@users.noreply.github.com>
Co-authored-by: Veeck <github@veeck.de>
Co-authored-by: jargordon <50050429+jargordon@users.noreply.github.com>
Co-authored-by: sam detweiler <sdetweil@gmail.com>
Co-authored-by: Ryan Williams <65094007+ryan-d-williams@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
11 people authored Sep 30, 2024
1 parent a6907a5 commit 42f1cc6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
2 changes: 2 additions & 0 deletions development/core-module-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ Whenever your module need to be updated, call the `updateDom(speed)` method. It
requests the MagicMirror core to update its dom object. If you define the speed,
the content update will be animated, but only if the content will really change.

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.

As an example: the clock modules calls this method every second:

```javascript
Expand Down
3 changes: 2 additions & 1 deletion development/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ The system sends three notifications when starting up:
| `ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules. |
| `DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes. |
| `MODULE_DOM_CREATED` | _none_ | This module's dom has been fully loaded. You can now access your module's dom objects. |
| `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). |

# Default module notifications

These notifications are send by the default modules:
These notifications are sent by the default modules:

| Notification | Payload | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
23 changes: 23 additions & 0 deletions modules/compliments.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ compliments.
Compliments can be set for a specific day in the format `YYYY-MM-DD`. `.` can be
used as a wildcard.

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
the cron format string is 5 groups of space separated values<br><br>
**minute hour day month day_of_week**<br><br>
each can be a range, and use numbers or names
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.

If set, the weather can be used for compliments. The available properties are:

- `day_sunny`
Expand Down Expand Up @@ -92,6 +98,23 @@ config: {
}
```

#### Example use with a cron entry

```javascript
config: {
compliments: {
"48-50 16-18 * * 5,6": [
"Happy Hour!", "Its a Party"
]
}
}
```
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**

another example,. you could use this for scary messages ONLY on between 8 and 9pm Halloween evening
<br>"* 20-21 31 10 *":["Boo!!"]


#### Example use with weather module

```javascript
Expand Down
5 changes: 3 additions & 2 deletions modules/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ see [configuration](/configuration/introduction.md) for more information.
| **Option** | **Description** |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
| `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. |
| `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. |
| `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. |
| | 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)|
| `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. |
| `header` | To display a header text above the module, add the header property. This field is optional. |
| `hiddenOnStartup` | Set module as being hidden on startup. This field is optional. |
| `disabled` | Set disabled to `true` to skip creating the module. This field is optional. |
Expand Down
5 changes: 2 additions & 3 deletions modules/weather.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ retrieve more than 5 days you must subscribe to the OpenWeatherMap API.

| Option | Description |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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** |
| `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** |
| `apiSecret` | Your API secret (MetOffice API ClientSecret). <br> This value is **REQUIRED** |
| `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** |
| `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** |
| `lat` | The latitude coordinate for the desired location. <br><br> **Possible value:** `50.7271915` <br> This value is **REQUIRED** |
| `lon` | The longitude coordinate for the desired location. <br><br> **Possible value:** `-3.4776089` <br> This value is **REQUIRED** |

Expand Down

0 comments on commit 42f1cc6

Please sign in to comment.