MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Remote-Control in conjunction with Network-Scan



  • Hi!

    I am a happy tinkering, first time Magic Mirror creator and I am having trouble with the Remote-Control / Network-Scan module.

    I’m using the “standard” code as given in the example on
    *
    {
    module: ‘MMM-NetworkScanner’,
    position: ‘top_left’,
    config: {
    devices: [
    { ipAddress: “github.com”, name: “Github”, icon: “globe”},
    { macAddress: “1a:1b:1c:1a:1b:1c”, name: “Server”, icon: “server”},
    { macAddress: “2a:2b:2c:2a:2b:2c”, name: “Desktop”, icon: “desktop”},
    { ipAddress: “10.1.1.10”, name: “Laptop”, icon: “laptop”},
    { macAddress: “4a:4b:4c:4a:4b:4c”, name: “Mobile”, icon: “mobile”},
    ],
    showUnknown: false,
    showOffline: true,
    keepAlive: 600,
    updateInterval: 5,
    residents: [“Mobile”, “Laptop”],
    occupiedCMD: {notification: ‘REMOTE_ACTION’, payload: {action: ‘MONITORON’}},
    vacantCMD : {notification: ‘REMOTE_ACTION’, payload: {action: ‘MONITOROFF’}},
    }
    },
    *
    With my devices MAC ID’s and names, the scan works fine and the module for the remote control receives the “MONITOROFF” and “MONITORON” notifications and executes them as expected…
    When none of the listed devices are active on the network, the monitor shuts off.

    But there is something that makes the screen go off and then on again every 20-30 seconds, i have previously had the PI 3B+ running for hours without this phenomena occur, but now with the modules installed it seems that the network scan sends the on/off notifications to the remote control module more often than intended.

    As you see in the code, the “keepAlive” timer is set to 10 minutes, and the scan is set to every 5 second. In my small understanding of code e.t.c the keepAlive timer should hold the “MONITOROFF” notification for 600 seconds before sending it to the remote-control module IF it does not detect any network activity from the specified devices…

    Does anyone know why this happens on what i could do to make it work more smoothly?

    I’m thinking of basing the shutoff sequence on the calendar and time instead… although it would be nice to have the network part of it working.

    Best regards.


Log in to reply