You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove installer.sh and simplify installation
- Remove outdated installer.sh script
- Simplify postinstall to show API key on every install
- Add npm run generate-apikey for manual key generation
- Update README with standard git clone + npm ci workflow
- Remove installer references from documentation
The installer.sh was historically useful but has become unnecessary.
Modern npm handles dependencies automatically, and the script's main
functions (copying templates, generating API keys) are now better
served by postinstall.js. Installation is now like any other
MagicMirror module.
Copy file name to clipboardExpand all lines: API/README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,7 @@ $ curl -X POST http://magicmirrorip:8080/api/notification/HELLO_WORLD \
47
47
48
48
## Authentication
49
49
50
-
Providing an API key is recommended; however, remains optional. If you wish to use an API key to authenticate, add an `apiKey:` option to the config section for this module.
51
-
52
-
If you ran the `installer.sh` script when you installed the module, a non-canonical UUID is generated for you to use; you can use this unique code, or use any string you wish.
50
+
Providing an API key is recommended; however, remains optional. If you wish to use an API key to authenticate, add an `apiKey:` option to the config section for this module. You can use any string you prefer.
Copy file name to clipboardExpand all lines: README.md
+59-75Lines changed: 59 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,85 +35,75 @@ The module also includes a **RESTful API** for controlling all aspects of your m
35
35
36
36
## Installation
37
37
38
-
### Quick install
39
-
40
-
If you followed the default installation instructions for the [MagicMirror²](https://github.com/MagicMirrorOrg/MagicMirror) project, you should be able to use the automatic installer.
41
-
42
-
The following command will download the installer and execute it:
- (2) Add the module to your `config.js` file. **Note:** You must set a `position` to display the URL/QR code on the mirror.
60
-
61
-
```js
62
-
{
63
-
module:'MMM-Remote-Control',
64
-
position:'bottom_left', // Required to show URL/QR code on mirror
65
-
// you can hide this module afterwards from the remote control itself
66
-
config: {
67
-
customCommand: {}, // Optional, See "Using Custom Commands" below
68
-
showModuleApiMenu:true, // Optional, Enable the Module Controls menu
69
-
secureEndpoints:true, // Optional, See API/README.md
70
-
// uncomment any of the lines below if you're gonna use it
71
-
// customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
72
-
// apiKey: "", // Optional, See API/README.md for details
73
-
// classes: {}, // Optional, See "Custom Classes" below
74
-
75
-
// QR Code options (new!)
76
-
// showQRCode: true, // Optional, display QR code for easy mobile access (default: true)
77
-
// qrCodeSize: 150, // Optional, size of QR code in pixels (default: 150)
78
-
// qrCodePosition: "below" // Optional:
79
-
// "below" - Show URL above, QR code below (default)
80
-
// "above" - Show QR code above, URL below
81
-
// "replace" - Show only QR code, no URL text
82
-
}
83
-
},
84
-
```
85
-
86
-
- (3) For security reasons, the MagicMirror² (and therefore the Remote Control) is _not_ reachable externally.
87
-
To change this, configure `address`, and `ipWhitelist` in your `config.js` (see [these lines in the sample config](https://github.com/MagicMirrorOrg/MagicMirror/blob/master/config/config.js.sample#L12-L22)).
88
-
For example change `address` to `0.0.0.0` and add two allowed devices with IP addresses `192.168.0.42` and `192.168.0.50`:
- (4) Restart your MagicMirror² (i.e. `pm2 restart MagicMirror`).
103
-
104
-
- (5) Access the remote interface on [http://192.168.xxx.xxx:8080/remote.html](http://192.168.xxx.xxx:8080/remote.html) (replace with IP address of your RaspberryPi).
38
+
1. Clone this repository in your `modules` folder, and install dependencies:
The installation will display a sample API key that you can use (optional).
48
+
49
+
2. Add the module to your `config.js` file. **Note:** You must set a `position` to display the URL/QR code on the mirror.
50
+
51
+
```js
52
+
{
53
+
module:'MMM-Remote-Control',
54
+
position:'bottom_left', // Required to show URL/QR code on mirror
55
+
// you can hide this module afterwards from the remote control itself
56
+
config: {
57
+
customCommand: {}, // Optional, See "Using Custom Commands" below
58
+
showModuleApiMenu:true, // Optional, Enable the Module Controls menu
59
+
secureEndpoints:true, // Optional, See API/README.md
60
+
// uncomment any of the lines below if you're gonna use it
61
+
// customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
62
+
// apiKey: "", // Optional, See API/README.md for details
63
+
// classes: {}, // Optional, See "Custom Classes" below
64
+
65
+
// QR Code options (new!)
66
+
// showQRCode: true, // Optional, display QR code for easy mobile access (default: true)
67
+
// qrCodeSize: 150, // Optional, size of QR code in pixels (default: 150)
68
+
// qrCodePosition: "below" // Optional:
69
+
// "below" - Show URL above, QR code below (default)
70
+
// "above" - Show QR code above, URL below
71
+
// "replace" - Show only QR code, no URL text
72
+
}
73
+
},
74
+
```
75
+
76
+
3. For security reasons, the MagicMirror² (and therefore the Remote Control) is _not_ reachable externally.
77
+
To change this, configure `address`, and `ipWhitelist` in your `config.js` (see [these lines in the sample config](https://github.com/MagicMirrorOrg/MagicMirror/blob/master/config/config.js.sample#L12-L22)).
78
+
For example change `address` to `0.0.0.0` and add two allowed devices with IP addresses `192.168.0.42` and `192.168.0.50`:
4. Restart your MagicMirror² (i.e. `pm2 restart MagicMirror`).
93
+
94
+
5. Access the remote interface on [http://192.168.xxx.xxx:8080/remote.html](http://192.168.xxx.xxx:8080/remote.html) (replace with IP address of your RaspberryPi).
105
95
106
96
### Install as PWA (Progressive Web App)
107
97
98
+
> **Note:** PWA installation may require HTTPS. If you experience issues, this feature might only work when MagicMirror² is running under HTTPS. Feedback would be appreciated!
99
+
108
100
You can install the remote control as an app on your smartphone:
109
101
110
102
1. Open the remote interface in your mobile browser (Chrome/Safari)
111
103
2. On **Android** (Chrome): Tap the menu (⋮) → "Install app" or "Add to Home screen"
112
104
3. On **iOS** (Safari): Tap Share (□↑) → "Add to Home Screen"
113
105
4. The remote control will now work like a native app with offline support!
114
106
115
-
Note: If your user does not have `sudo` rights, the shutdown does not work (it _should_ work for everyone who did not change anything on this matter).
116
-
117
107
### Update
118
108
119
109
Update this module by navigating into its folder on the command line and using `git pull`:
@@ -124,12 +114,6 @@ git pull
124
114
npm ci --omit=dev
125
115
```
126
116
127
-
Alternatively you can run the `installer.sh` script again:
0 commit comments