saml-dev / MMM-Traffic

This a module for the MagicMirror. It displays travel time between two locations, using the Mapbox directions API to factor in current traffic conditions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module wont show up with parameter days set

codac opened this issue · comments

I would like to show the module on each day from Monday to Friday and between 06:00 am und 10:00 am.
I figured out that as soon as I set the "days" parameter, the module won't show up at all.
Might be an error in my config or might be an issue in the module.

My config is:

{
                        module: "MMM-Traffic",
                        position: "top_left",
                        config: {
                                accessToken: "<accessToken>",
                                originCoords: "<Lat,Lon>",
                                destinationCoords: "<Lat,Lon>",
                                loadingText: "loading...",
                                firstLine: "{duration} min",
                                secondLine: "Work",
                                days: [0,1,2,3,4],
                                hoursStart: "06:00",
                                hoursEnd: "10:00",
                        }
                },

Hey, I just tested the days options on my setup and noticed a couple things:

  1. The README was incorrect, 0 is actually Sunday. So I updated it. If you happened to be testing this on a Friday, then that would explain why it was hiding when you used [0,1,2,3,4] since that is actually Sunday - Thursday. Thanks for bringing this to my attention!
  2. Just last week I fixed a bug related to the showing/hiding of the module. Make sure to pull down the latest version of the module to rule that out as the issue.

Hey, I pulled down the latest code, the issue OP posted still is happening when the hoursStart and hoursEnd parameter is set.

Hey @manireddy045 I just tested having days, hoursStart, and hoursEnd set in my config and the module worked fine. Can you paste your config sans api key?

Closing, stale.