Read the statement by Michael Teeuw here.
Help with MMM-ModuleSchedule to turn off monitor
-
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’ } -
@mlm198 cd to that module folder, and do
npm install -save cronLooks like the module package.json doesn’t list that drpendency
-
@sdetweil thanks for the response and forgive my lack of knowledge but which of the folders listed?
Matthew
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login