MMM-MyCommute icon indicating copy to clipboard operation
MMM-MyCommute copied to clipboard

module disappears

Open kfksee opened this issue 4 years ago • 10 comments

It seems that approximately once per day, the module will completely disappear. No error messages appear in the PM2 log files mm-out.log or mm-error.log. Restarting my magicmirror always brings it back, only for it to disappear the next day.

What is causing this? How can I figure out the cause?

kfksee avatar Oct 16 '20 01:10 kfksee

There is functionality to hide the module at specific times or days of the week.

Could you share your configuration? (Remove passwords and api-keys)

qistoph avatar Oct 16 '20 07:10 qistoph

Sure. Here is the relevant section of /home/pi/MagicMirror/config/config.js:

{
  module: 'MMM-MyCommute',
  position: 'bottom_left',
  config: {
    apiKey: 'X',
    origin: 'X',
    //startTime: '00:00',
    //endTime: '23:59',
    //hideDays: [0,6],
         pollFrequency: 650000,
    destinations: [
      {
        destination: 'X',
        hideDays: '[0,6]',
        label: 'X',
        mode: 'driving',
        startTime: '05:13',
        color: '#636362'
      },
     {
        destination : 'X',
        hideDays: '[0,6]',
        label: 'X',
        waypoints: "X",
        //alternatives: true,
        startTime: '05:30',
        mode: 'driving',
        color: '#c9c8c5'
      },

//              {
 //       destination: 'X',
//      hideDays: '[0,6]',
 //       label: 'X',
//      waypoints: "X",
//      color: '#FFD800',
 //       mode: 'driving',
//      startTime: '06:25',
//      endTime: '22:00'
 //     },

//{
 //       destination: 'X',
 //       //destination: 'X',
 //       label: 'X',
//      hideDays: '[1,2,3,4,5]',
//        mode: 'driving',
//        color: '#34abeb',
//      startTime: '08:00',
//      endTime: '15:50'
//},

    {
        destination: 'X',
        hideDays: '[0]',
        startTime: '05:20',
        label: 'X',
        startTime: '05:30',
        //waypoints: "X",
        //color: '#FFD800',
        mode: 'driving'
      }
    ],
          maxCalendarEvents: 1,
          calendarOptions: [
                  {
                          mode: 'driving'
                  },
          ]
  }
},

kfksee avatar Oct 16 '20 22:10 kfksee

Any suggestions? This has been happening pretty consistently every 1-2 days. I have seen others mention a similar problem but haven't heard of any fixes. Any possible steps to debug? I have tried a fresh re-install of the MagicMirror code, without success either.

kfksee avatar Oct 28 '20 02:10 kfksee

The only weird thing I see is your hideDays setting. You've configured these as strings, though they should be arrays. Leave out the single quotes on them, e.g.

hideDays: [0, 6]

qistoph avatar Oct 28 '20 07:10 qistoph

I changed the hideDays - no change. The entire module still disappears, approximately once per day, at seemingly random times. No error messages in the logs I'm able to find. Any other suggestions?

kfksee avatar Oct 31 '20 17:10 kfksee

What other modules are you using?

Is your mirror using any modules or settings that might disable or suspend this module?

Could try disabling your other modules, keep just the MMM-MyCommute module, and see if it still disappears?

qistoph avatar Nov 02 '20 14:11 qistoph

Other modules running:

MMM-GooglePhotos
MMM-Dad-Jokes
MMM-MyCommute
MMM-Pollen
MMM-SmartWebDisplay
alert
updatenotification
MMM-DarkSkyForecast
clock
calendar 

However before disabling those, I have a theory that the problem might be related to the startTime and/or hideDays. I will try taking both of those away for a few days (in other words, making all destinations display continuously) and see if that "fixes" it.

kfksee avatar Nov 07 '20 18:11 kfksee

Update: after turning off all startTime and hideDays options, all of my destinations continued to remain visible. This makes me think that after being hidden, sometimes my destinations do not properly "wake up" , even though the startTime has passed.

kfksee avatar Nov 09 '20 20:11 kfksee

Thank you so much for your efforts. Interesting find, the possible conflict between startTime and hideDays.

Unfortunately I'm currently unable to work on this issue. If anyone manages to fix the bug, I would of course like to merge it into this repo. PR is most welcome.

qistoph avatar Nov 23 '20 15:11 qistoph

Based on the configuration I'm running now, using hideDays only, it fails to come back every Monday. I'm able to reset it, and force it to show destinations again by connecting to it via VNC, then reloading via CTRL+R.

{
  module: 'MMM-MyCommute',
  position: 'bottom_left',
  config: {
    apiKey: 'X',
    origin: 'X',
    //startTime: '00:00',
    //endTime: '23:59',
    //hideDays: [0,6],
         pollFrequency: 654000,
    destinations: [
      {
        destination: 'X',
        hideDays: [0,6],
        label: 'X',
        mode: 'driving',
        //startTime: '05:13',
        color: '#636362'
      },

            {
        destination : 'X',
        hideDays: [0,6],
        label: 'X',
        waypoints: "X",
        //alternatives: true,
        //startTime: '05:30',
        mode: 'driving',
        color: '#c9c8c5'
      },

//              {
 //       destination: 'X',
//      hideDays: '[0,6]',
 //       label: 'X',
//      waypoints: "X",
//      color: '#FFD800',
 //       mode: 'driving',
//      startTime: '06:25',
//      endTime: '22:00'
 //     },
//{
 //       destination: 'X',
 //       //destination: '20755',
 //       label: 'X',
//      hideDays: '[1,2,3,4,5]',
//        mode: 'driving',
//        color: '#34abeb',
//      startTime: '08:00',
//      endTime: '15:50'
//},

    {
        destination: 'X',
        hideDays: [0,4],
        //startTime: '06:00',
        label: 'X',
        //startTime: '05:30',
        //waypoints: "X",
        //color: '#FFD800',
        mode: 'driving'
      }
    ],
          maxCalendarEvents: 1,
          calendarOptions: [
                  {
                          mode: 'driving'
                  },
          ]
  }
},

kfksee avatar Dec 02 '20 00:12 kfksee