Skip to content

Configuration

Ezequiel Holzweissig edited this page Jan 2, 2021 · 4 revisions

Configuration

So you download your Remote Control repository inside your module folder and install the dependencies. Now, we're explain what's every configuration that you can add inside your Remote Control configuration.

{
    module: 'MMM-Remote-Control',
    position: 'bottom_left',
    config: {}
},

Config

Custom Commands

Depending on your installation, some shell commands used by this module are not appropriate and can be overwritten by something that will work for you. To overwrite the commands, add a customCommand object to your config section. You can also add and run your own commands with the API, see more info in Custom Commands. The following commands are supported:

config: {
    customCommand: {
        shutdownCommand: 'shell command to shutdown your pc',
        rebootCommand: 'shell command to reboot your pc',
        monitorOnCommand: 'shell command to turn on your monitor',
        monitorOffCommand: 'shell command to turn off your monitor',
        monitorStatusCommand: 'shell command to return status of monitor, must return "true" if screen is on; "false" if it is off to be recognized',
    },
},

Show Module Menu

Let you control your modules inside the remote web.

config: {
    showModuleApiMenu: true,
},

apiKey

Remote Control have it's own API, that you can use externally to automate all kind of things with simply using an url. Setting an apiKey will protect you against everyone trying to use the API to change the MM. You'll need to enter the apikey in every request you make into the API. More info in the API wiki.

config: {
    apiKey: 'any apiKey you like',
},

Secure your Endpoints

If you don't set the apiKey inside the config, some API endpoints will be blocked to protect against malicious actions. If you want to bypass this actions, you can use the secureEndpoint config. More info in the API wiki.

config: {
    secureEndpoints: false,
},

Custom Menu

If you want to customize your own menu, you can add the name of the file in here. See Custom Menus for more info.

config: {
    customMenu: "custom_menu.json",
},

Classes

You probably wanna hide or show some modules at the same time, right? It's everything that we want this module for, of course. Well, now you can add as many classes as you like, and define whether they show themself, hide or toggle between the two stages! See Classes for more info.

config: {
    classes: {
        "Any Name You Want": {
            hide: ["calendar"],
            show: ["newsfeed"],
            toggle: ["clock"],
        },
        "Another Name You Want": {
            hide: ["newsfeed"],
            show: ["calendar"],
        },
    },
},

PM2 Process Name

If you manage to install the pm2 but the process name of the MagicMirror it's other than mm by default, you can also change that using just one line inside the config file

config: {
        pm2ProcessName: 'name of the process in pm2',
},

Position

The position it's gonna show the IP of your mirror. You can hide it inside the modules menu, or by commenting the line.

// position: 'bottom_left',
Clone this wiki locally