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.

    Cron Job Question

    Scheduled Pinned Locked Moved Solved Troubleshooting
    22 Posts 4 Posters 5.5k Views 4 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.
    • plainbrokeP Offline
      plainbroke @sdetweil
      last edited by

      @sdetweil said in Cron Job Question:

      @plainbroke autoreconfig?

      u don’t have to build motion, they have binaries (on every platform I’ve tried so far)

      my script (launched by something outside mm)
      creates an empty file in a known folder for each motion event

      detected
      ended

      my module node_helper watches for those files to be created, and then sends notification to my module side to signal sleep or wake depending on the config.

      the default folder is ‘motion’ inside the MMM-SleepWake folder

      the script locates the running mm instance, and uses it’s path to locate the module folder and this it’s motion folder

      the script assumes the path includes the username mm is running under and that username is used to set file permissions, so the module can remove them after processing the detection

      So if I send a empty file ended to the motion folder in MMM-SleepWake that triggers the timer in config.js to blank screen?
      and then in the morning send empty file detected to the same motion folder in MMM-SleepWake it should turn the modules back on.
      Have I got this correct in my head or am I still wondering at sea?

      Slow learner. But trying anyways.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @plainbroke
        last edited by

        @plainbroke yes, but just call my script with

        ended
        (motion stopped)
        started
        (motion started)

        same as my doc says for the motion config

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • 1
        • 2
        • 3
        • 3 / 3
        • First post
          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