Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
161922b
Auto-merge master back to develop
actions-user Sep 30, 2025
08e7175
Auto-merge master back to develop
actions-user Oct 14, 2025
d285b99
Auto-merge master back to develop
actions-user Oct 14, 2025
e1dc2cd
Auto-merge master back to develop
actions-user Oct 14, 2025
2dff6cb
Add `forecastDateFormat` option to weather module configuration (#330)
KristjanESPERANTO Oct 18, 2025
e9bcca4
Update to envcanada Provider doc for URL change (#331)
Crazylegstoo Oct 19, 2025
109adb9
Auto-merge master back to develop
actions-user Oct 21, 2025
4893abe
Auto-merge master back to develop
actions-user Oct 23, 2025
6889efc
Auto-merge master back to develop
actions-user Oct 25, 2025
1adfb8e
Add documentation for `server:watch` script (#336)
KristjanESPERANTO Nov 4, 2025
fe8206f
docs: remove deprecated ukmetoffice weather provider (#337)
KristjanESPERANTO Nov 8, 2025
95ee4aa
Auto-merge master back to develop
actions-user Nov 17, 2025
9d75ca2
Auto-merge master back to develop
actions-user Nov 22, 2025
be91f68
remove duplicate default values for mmFetchTimeout (#340)
sdetweil Dec 1, 2025
562fe96
Auto-merge master back to develop
actions-user Dec 2, 2025
bebe4fa
Auto-merge master back to develop
actions-user Dec 2, 2025
9478895
Auto-merge master back to develop
actions-user Jan 1, 2026
d0a6b27
Merge branch 'MagicMirrorOrg:develop' into develop
sdetweil Jan 1, 2026
81d03b1
fix lint errors 2.34.0 release day
sdetweil Jan 1, 2026
a826ede
Merge pull request #344 from sdetweil/lint_errors
sdetweil Jan 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion configuration/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The following properties can be configured, place them above the modules item:
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `kiosk: true`, `autoHideMenuBar: false` and `fullscreen: false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). This will most likely be used in advanced installations, below. | [] |
| `electronSwitches` | An optional array of Electron switches. This allows configuration of electron app itself. <br> This properties will not affect the `serveronly` mode. Usually normal `MM` users don't need this property, but if you are a hard-core hacker, you might need this to handle Electron itself over `MagicMirror` provides. More options can be found [here](https://www.electronjs.org/docs/latest/api/command-line-switches) (Not all available switches are described there.)<br>example:`electronSwitches:["enable-transparent-visuals", "disable-gpu"];` | [] |
| `customCss` | The path of the `custom.css` stylesheet. The default is `css/custom.css`. | `css/custom.css` |
| `watchTargets` | An optional array of file paths to monitor when using `node --run server:watch`. When any of these files change, the server automatically restarts and connected browsers reload. Particularly useful when frequently modifying `config.js`, `custom.css`, or module files during development or setup. Example: `watchTargets: ["config/config.js", "css/custom.css", "modules/MMM-MyModule/MMM-MyModule.js"]`. See [Development Mode](/core-development/debugging.html#development-mode-with-auto-reload) for more details. | `undefined` |

After the above options, you will then add modules. See
[module configuration](/modules/configuration.md) for more information.
Expand All @@ -74,7 +75,7 @@ are:
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| MM_CONFIG_FILE | This specifies an alternate configuration file for the system. This is useful when running multiple mirrors on the same device. This does not work with the template option below. NOTE: this file **_MUST_** be located in a directory within the MagicMirror directory. Ideally, place any config file in the config subdirectory. |
| MM_PORT | This specifies an alternate TCP/IP port, overriding "port" item within the config file. This is useful for testing to see if the product will run using another port. |
| mmFetchTimeout | time in milliseconds for fetch timeout. default (30000) <br><br>this value can be used to adjust the nodejs fetch function timeout value (default 10 seconds) for all node_helper modules that use fetch() |
| mmFetchTimeout | time in milliseconds for fetch timeout. default (30000) <br><br>this value can be used to adjust the nodejs fetch function timeout value for all node_helper modules that use fetch() |

#### Examples of use

Expand Down
45 changes: 42 additions & 3 deletions core-development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,57 @@ Developer consoles in browsers and the Electron app (typically CTRL+SHIFT+I to
toggle open/close) can be used to set client-side breakpoints, step through
scripts and inspect variables.

## Watch Mode with Auto-Reload

For active development, MagicMirror² provides a `server:watch` script that
automatically restarts the server and reloads connected browsers when files
change:

```sh
node --run server:watch
```

This mode monitors files specified in your `config.js` under the `watchTargets`
property:

```js
let config = {
watchTargets: [
"config/config.js",
"css/custom.css",
"modules/MMM-MyModule/MMM-MyModule.js",
"modules/MMM-MyModule/node_helper.js",
],
// ... rest of config
};
```

When any monitored file changes:

1. The server automatically restarts
2. Waits for the port to become available
3. Sends a reload notification to all connected browsers via Socket.io
4. Browsers automatically refresh to show the changes

This creates a seamless development experience where you can edit code, save,
and see the results within seconds without manual restarts.

**Note:** If `watchTargets` is empty or undefined, the watcher starts but
monitors nothing.

## Logging

While there are no log files produced by the server, info is reported in two
different places:

- The console when running from `npm run start` or `npm run server`.
- The console when running from `node --run start`, `node --run server`, or
`node --run server:watch`.
- This is separated into two streams, `console.log()` is output as the
`stdout` stream, and
- `console.error()` is output as the `stderr` stream.
- These can be redirected to files when starting the server. `>` will redirect
`stdout`, and `2>` will redirect `stderr`. `2>&1` will combine both streams:
`npm run start > out.log 2>&1`
`node --run start > out.log 2>&1`
- The browser's developer console (typically CTRL+SHIFT+I to toggle open/close)
will have output from scripts that run on the browser.

Expand Down Expand Up @@ -113,5 +152,5 @@ script, such as `start:dev`:
Or when running from the command line (Linux example):

```sh
TZ=Europe/Madrid npm run start:dev
TZ=Europe/Madrid node --run start:dev
```
1 change: 0 additions & 1 deletion cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"Trixie",
"trunc",
"tympanus",
"ukmetoffice",
"ukmetofficedatahub",
"UKMO",
"updatenotification",
Expand Down
2 changes: 1 addition & 1 deletion modules/updatenotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following properties can be configured:
| `updates` | Array of updates modules commands. <br> **Default value:** `[]` (see bellow) |
| `updateTimeout` | Maximum Update duration before cancel it. <br> **Default Value:** `120000` (2 minutes) |
| `updateAutorestart` | Restart automatically MagicMirror² after update is done. <br> **Default Value:** `false` |
| `useModulesFromConfig` | If `false`, iterate over the modules directory instead of using the modules defined in `config.js`. <br> **Default Value:** `true` |
| `useModulesFromConfig` | If `false`, iterate over the modules directory instead of using the modules defined in `config.js`. <br> **Default Value:** `true` |

### `updates` Array

Expand Down
Loading