• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Help with MMM-ModuleSchedule to turn off monitor

Scheduled Pinned Locked Moved Unsolved Troubleshooting
4 Posts 3 Posters 1.1k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mlm198
    last edited by Mar 7, 2020, 5:07 PM

    Hi All,

    I want to use MMM-ModuleSchedule and MMM-Remote switch off the monitor. I know remote is working as I can connect to it using my phone but when I get an error message when I start to use the schedule which is just a cut and paste job. Not sure what I am doing wrong but below is the code for the two modules along with the error message when starting MM.

    Thanks for any help.

    Matthew

    {
            module: 'MMM-ModuleScheduler',
            config: {
                notification_schedule: [
                    // TURN THE MONITOR/SCREEN ON AT 07:30 EVERY DAY
                    {notification: 'REMOTE_ACTION', schedule: '30 6 * * *', payload: {action: "MONITORON"}},
                    // TURN THE MONITOR/SCREEN OFF AT 22:30 EVERY DAY
                    {notification: 'REMOTE_ACTION', schedule: '30 8 * * *', payload: {action: "MONITOROFF"}},
                    {notification: 'REMOTE_ACTION', schedule: '00 16 * * *', payload: {action: "MONITORON"}},
    				{notification: 'REMOTE_ACTION', schedule: '00 21 * * *', payload: {action: "MONITOROFF"}},
                    
                    // RESTART THE MAGICMIRROR PROCESS AT 2am EVERY SUNDAY
                    {notification: 'REMOTE_ACTION', schedule: '0 2 * * SUN', payload: {action: "RESTART"}}
                ]
            }
        },
    
    {
            module: 'MMM-Remote-Control',
            // uncomment the following line to show the URL of the remote control on the mirror
            // position: 'top_right',
            // you can hide this module afterwards from the remote control itself
            config: {
                apiKey: ''
            }
        },
    

    This is the error message:
    16:43:32.896] [ERROR] { Error: Cannot find module ‘cron’
    at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Function.Module._load (internal/modules/cjs/loader.js:528:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-ModuleScheduler/node_helper.js:11:15)
    at Object. (/home/pi/MagicMirror/modules/MMM-ModuleScheduler/node_helper.js:327:3)
    at Module._compile (internal/modules/cjs/loader.js:711:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:722:10) code: ‘MODULE_NOT_FOUND’ }

    S 1 Reply Last reply Mar 7, 2020, 6:53 PM Reply Quote 0
    • S Offline
      sdetweil @mlm198
      last edited by Mar 7, 2020, 6:53 PM

      @mlm198 cd to that module folder, and do

      npm install -save cron
      

      Looks like the module package.json doesn’t list that drpendency

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Mar 8, 2020, 7:45 AM Reply Quote 0
      • M Offline
        mlm198 @sdetweil
        last edited by Mar 8, 2020, 7:45 AM

        @sdetweil thanks for the response and forgive my lack of knowledge but which of the folders listed?

        Matthew

        1 Reply Last reply Reply Quote 0
        • F Offline
          fribse
          last edited by Mar 8, 2020, 9:43 AM

          go to you ‘magicmirror’ folder, then to modules, and then to the MMM-Remote-Control folder and run ‘npm install’, I think you forgot that.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            2/4
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy