• 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.

MMM-ModuleScheduler, MMM-Remote-Control & MMv2.4.1

Scheduled Pinned Locked Moved Unsolved Troubleshooting
3 Posts 2 Posters 1.8k Views 1 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.
  • H Offline
    Hein-Jan
    last edited by Jul 15, 2018, 10:42 AM

    Guys and gals,

    I am at a loss here.

    I have update to 2.4.1 and my mirror not longer automatically starts in the morning.

    OK, so I have had my mirror for aprox. 18 months. In order to save a little on power consumption I am using a combination of MMM-Remote-Control and MMM-ModuleScheduler to turn my monitor on and off at certain times of the day. I am also using both modules to force a restart every night at 02:00 hr. This all worked well enough under previous MM versions.

    I am using the fake KMS driver (dtoverlay=vc4-fkms-v3d), the full KMS-driver (dtoverlay=vc4-kms-v3d) is not compatible with the tvservice commands, that are being used in MONITORON and MONITOROFF.

    This is a small part of my config (that did check out when I ran npm run config:check):

    {
    			module: 'MMM-ModuleScheduler',
    			config: {
    				notification_schedule: [
    					//turn the monitor/screen on at 07:00 mon-fri
    					{notification: 'REMOTE_ACTION', schedule: '00 7 * * 1-5', payload: {action: "MONITORON"}},
     					//turn the monitor/screen off at 08:15 mon-fri
    					{notification: 'REMOTE_ACTION', schedule: '15 8 * * 1-5', payload: {action: "MONITOROFF"}},
    					//turn the monitor/screen on at 17:30 mon-fri
    					{notification: 'REMOTE_ACTION', schedule: '30 17 * * 1-5', payload: {action: "MONITORON"}},
     					//turn the monitor/screen off at 23:30 mon-fri
    					{notification: 'REMOTE_ACTION', schedule: '30 23 * * 1-5', payload: {action: "MONITOROFF"}},
    					//turn the monitor/screen on at 13:00 wed
    					{notification: 'REMOTE_ACTION', schedule: '00 13 * * 3', payload: {action: "MONITORON"}},
    					//turn the monitor/screen on at 10:00 Fri
    					{notification: 'REMOTE_ACTION', schedule: '00 10 * * 5', payload: {action: "MONITORON"}},
    					//turn the monitor/screen on at 09:00 sat
    					{notification: 'REMOTE_ACTION', schedule: '00 9 * * 6', payload: {action: "MONITORON"}},
    					//turn the monitor/screen off at 23:59 sat
    					{notification: 'REMOTE_ACTION', schedule: '59 23 * * 6', payload: {action: "MONITOROFF"}},
    					//turn the monitor/screen on at 09:00 sun
    					{notification: 'REMOTE_ACTION', schedule: '00 9 * * 0', payload: {action: "MONITORON"}},
    					//turn the monitor/screen off at 23:00 sun
    					{notification: 'REMOTE_ACTION', schedule: '00 23 * * 0', payload: {action: "MONITOROFF"}},
    					// restart the Pi at 02:00 every day
    					{notification: 'REMOTE_ACTION', schedule: '00 02 * * *', payload: {action: "REBOOT"}},
    					// turn monitor off after RESTART
    					{notification: 'REMOTE_ACTION', schedule: '07 02 * * *', payload: {action: "MONITOROFF"}},
    				]
    			}
    		},
    
    

    I can run the MONITORON MONITOROFF and REBOOT commands from the remote controle website, and they work.

    But if I look at the log ( /home/pi/.pm2/logs/mm-out-0.log ) I find something strange:

    [CALEXT] https://calendar.google.com/calendar/ical/ XXXXX group.calendar.google.com/private- XXXXX /basic.ics  >> 
    { state: 'fetched but no change',
      lastFetchedTime: '18-07-15 01:58:21',
      lastFetchedEvents: 20,
      lastFetchedOldEvents: 20,
      lastServedEvents: 40,
      error: null }
    MMM-ModuleScheduler is sending SEND_NOTIFICATION to REMOTE_ACTION
    MMM-ModuleScheduler will next send SEND_NOTIFICATION to REMOTE_ACTION at Mon Jul 16 2018 02:00:00 GMT+0200 (CEST) based on "00 02 * * *"*
    [CALEXT] https://calendar.google.com/calendar/ical/ XXXXXXXX group.calendar.google.com/private- XXXXXXX /basic.ics  >> Fetch starts.
    [CALEXT] https://calendar.google.com/calendar/ical/ XXXXXXXXX group.calendar.google.com/private- XXXXXXXXX /basic.ics  >> Fetch starts.
    [CALEXT] https://calendar.google.com/calendar/ical/nl.dutch%23holiday%40group.v.calendar.google.com/public/basic.ics  >> Fetch starts.
    [CALEXT] https://calendar.google.com/calendar/ical/nl.dutch%23holiday%40group.v.calendar.google.com/public/basic.ics  >> Fetch starts.
    [CALEXT] https://calendar.google.com/calendar/ical/ XXXXXXX group.calendar.google.com/private- XXXXXXX /basic.ics  >> Fetch starts.
    [CALEXT] https://calendar.google.com/calendar/ical/nl.dutch%23holiday%40group.v.calendar.google.com/public/basic.ics  >> 
    { state: 'fetched',
      lastFetchedTime: '18-07-15 02:00:37',
      lastFetchedEvents: 0,
      lastFetchedOldEvents: 0,
      lastServedEvents: 0,
      error: null }
    
    

    A little before 02:00 hr Calender is Fetching info; at 02:00 MMM-ModuleScheduler sends a notification (I think it is the REBOOT ). At 02:00:37 Calender starts a new Fetch. This does not make sense, I was expecting to see something like:

    > magicmirror@2.4.1 start /home/pi/MagicMirror
    > sh run-start.sh
    
    Starting MagicMirror: v2.4.1
    Loading config ...
    Loading module helpers ...
    
    

    It looks like MM is not accepting commands from MMM-ModuleScheduler, but :

    [CALEXT] https://calendar.google.com/calendar/ical/ XXXXXX group.calendar.google.com/private- XXXXXX /basic.ics  >> 
    { state: 'fetched but no change',
      lastFetchedTime: '18-07-14 23:58:21',
      lastFetchedEvents: 19,
      lastFetchedOldEvents: 19,
      lastServedEvents: 38,
      error: null }
    MMM-ModuleScheduler is sending SEND_NOTIFICATION to REMOTE_ACTION
    MMM-ModuleScheduler will next send SEND_NOTIFICATION to REMOTE_ACTION at Sat Jul 21 2018 23:59:00 GMT+0200 (CEST) based on "59 23 * * 6"****
    Powering off HDMI
    
    

    It seems to be working here.

    Why can it Switch off (Monitor) automatically, but not Reboot or Switch on (Monitor) automatically?

    Anyone?

    Hein-Jan

    1 Reply Last reply Reply Quote 0
    • A Offline
      AxLed Module Developer
      last edited by AxLed Aug 7, 2018, 10:05 PM Aug 6, 2018, 8:53 PM

      @Hein-Jan
      1st idea:
      What happens, if you start your MM in Debug mode (npm start dev) and set the reboot time (for testing purposes) within the next five minutes and watch the logs.

      2nd idea:
      Does the reboot via URL (http://[IP of MM]:8080/remote?action=REBOOT, see also MMM-Remote-Control) work? If not, what informations are in the logs?

      AxLED

      H 1 Reply Last reply Aug 26, 2018, 10:11 AM Reply Quote 0
      • H Offline
        Hein-Jan @AxLed
        last edited by Hein-Jan Aug 26, 2018, 10:16 AM Aug 26, 2018, 10:11 AM

        @AxLed

        Sorry it took me some time to reply. Holidays and such.

        In reply to your suggestions:
        1st idea: Haven’t tried, I went a different route, see underneath.
        2nd idea: had tried i before; commands via the URL worked.

        It decided to go another route.
        Instead of using MMM-ModuleScheduler I have opted to use Cron to do the MONITORON and MONITOROFF commands.
        As I was only having trouble at the MONITORON command I first tried this in Cron.
        To my surpise I now had a mirror in the morning but not in the evening.
        It turned out that I was sending 1 MONITOROFF with Cron (after the nightly reboot).
        Actually I am not using MONITORON and MONITOROFF in Cron but vcgencmd display_power 1 and vcgencmd display_power 0.
        After the vcgencmd display_power 0 I was able to use Cron to turn the monitor back on with vcgencmd display_power 1
        But after MONITOROFF I was not able to turn the monitor back on with vcgencmd display_power 1.
        So MONITOROFF seems to be doing something strange in combination with the FakeKMS driver.

        I think I read a similar conclusion in another post:
        https://forum.magicmirror.builders/topic/8556/monitor-not-waking-up-from-sleep

        So my work around for all this is Cron. And it is working. And I learned something about Cron.

        Hope this may also help others who are struggling.

        Hein-Jan

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