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-Traffic not hiding itself out of hours

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 2 Posters 1.6k Views 2 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.
    • M Offline
      mvrlogins
      last edited by

      Hello,

      I’ve got it working fine, except for the part where it is supposed to hide during off hours (hideOffHours config). It doesn’t. It shows with a “–” for the time for the drive outside the start and end hours.

      Config is as follows.

       {
          module: 'MMM-Traffic',
          position: 'bottom_bar',
          classes: 'dimmed medium', 
          config: {
              api_key: 'xxxxxxxxxxxx',
              mode: 'driving',
              origin: 'xxxxxx',
              destination: 'xxxxx',
              route_name: 'Home to  office',
              prependText: 'Current drive time to  office is',
              changeColor: true,
              limitYellow: 5, //Greater than 5% of journey time due to traffic
              limitRed: 20, //Greater than 20% of journey time due to traffic
              interval: 120000, //2 minutes
              showWeekend: false,
              allTime: false,
              startHr: 6,
              endHr: 10,
              hideOffHours: true
          }
      

      Thanks for any help

      1 Reply Last reply Reply Quote 0
      • I Offline
        ironman_DK
        last edited by

        Install MMM-ModuleScheduler : https://github.com/ianperrin/MMM-ModuleScheduler

        and put this text in your Config.JS :

        {
        module: ‘MMM-ModuleScheduler’,
        config: {
        // SHOW MODULES WITH THE CLASS ‘daytime_scheduler’ AT 05:00 AND HIDE AT 08:00 EVERY DAY
        global_schedule: {from: ‘0 5 * * *’, to: ‘0 8 * * *’, groupClass: ‘MMM-Traffic’},
        }
        },

        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