Read the statement by Michael Teeuw here.
MMM-MyCommute has delay
-
Hi,
i’m having a little problem with MMM-MyCommute:The dates and times when it should be displayed are configured as in the text below,
but it is never display at the specified time. It is always delayed by about 10 - 15 minutes.
iE it should show up at 22:00 but is displayed at about 22:13,
it should be closed at 23:00 but keeps being displayed until about 23:09
But when i then restart the MM or Raspberry at 22:03 or so, everything is displayed correctly.
is there any kind of missing refresh or time between refresh to long?
Any other ideas?
Thanks for you help{ module: 'MMM-MyCommute', position: 'bottom_left', header: 'Traffic', config: { apikey: 'key', origin: 'Home', startTime: '00:00', endTime: '23:59', moderateTimeThreshold: 1.1, poorTimeThreshold: 1.3, hideDays: [], destinations: [ { destination: 'Dest1', label: 'Dest1', colorCodeTravelTime: true, hideDays: [6,0], startTime: '08:30', endTime: '09:20', }, { destination: 'Dest2', label: 'Dest2', hideDays: [1,2,4,5,0], startTime: '22:00', endTime: '23:00', } ] } },
-
@Zambuca the Rapsberry Pi is notoriously bad about keeping time, and Javascript timers over time don’t fare much better.
To mitigate this, first install NTP to make sure your Raspberry Pi syncs with an online TV service periodically. Next, I suggest setting a cron job to restart MagicMirror maybe each night when you’re asleep to reset JavaScript timers.
This won’t get rid of the problem entirely, as you’ll still be at the whim of the refresh cycle of the module — if the module is set to refresh it’s data every five minutes, the show/hide can be off by as much as five minutes. The show/hide check is done during data refresh.