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.

    trouble with MMM-GoogleTrafficTimes

    Scheduled Pinned Locked Moved Troubleshooting
    traffic
    39 Posts 3 Posters 8.2k Views 3 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.
    • S Offline
      sdetweil @laschalkh
      last edited by sdetweil

      @laschalkh u might want my version of Googlemapstraffic, as the original is broken

      https://github.com/sdetweil/MMM-GoogleMapsTraffic

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • L Offline
        laschalkh
        last edited by

        yea, that’s the one I’m trying. I just tried that module only and it’s not working. I ran the install again and it is warning about grunt styles not being installed. Seems like it’s missing parts.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @laschalkh
          last edited by

          @laschalkh thats noise

          you did the git clone
          cd
          and then npm install

          right?

          so, whats your config section look like… no one has had trouble installing it, it was a run problem I fixed…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • L Offline
            laschalkh
            last edited by sdetweil

            yup, went through and did the install and such

             {
                                    module: 'MMM-GoogleMapsTraffic',
                                    position: 'bottom_left',
                                    config: {
                                            key: '< my key>',
                                            lat: < my lat>,
                                            lng: < my long>,
                                            height: '300px',
                                            width: '300px'
                                            styledMapType: "transparent",
                                            disableDefaultUI: true,
                                            backgroundColor: 'hsla(0, 0%, 0%, 0)',
                                            markers: [
                                                    {
                                                            lat: <my lat>,
                                                            lng: <my long>,
                                                            fillColor: '#9966ff'
                                                    },
                                            ],
                                    },
                            },
            
            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @laschalkh
              last edited by

              @laschalkh how are u specifying lat/lng (in both places, right)

              like this (good)

              lat:30.4623841,
              

              or this (bad)

              lat:"30.4623841",
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • L Offline
                laschalkh
                last edited by

                yup, not quoted

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @laschalkh
                  last edited by

                  @laschalkh ok, so what is the error?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    laschalkh
                    last edited by

                    magicmirror@2.13.0 start /home/pi/MagicMirror
                    ./run-start.sh $1 “dev”

                    [2020-10-16 11:15:36.565] [LOG] Starting MagicMirror: v2.13.0
                    [2020-10-16 11:15:36.775] [LOG] Loading config …
                    [2020-10-16 11:15:36.823] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:73
                    styledMapType: “transparent”,
                    ^^^^^^^^^^^^^

                    SyntaxError: Unexpected identifier
                    at Module._compile (internal/modules/cjs/loader.js:723:23)
                    at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
                    at Module.load (internal/modules/cjs/loader.js:653:32)
                    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
                    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
                    at Module.require (internal/modules/cjs/loader.js:692:17)
                    at require (internal/modules/cjs/helpers.js:25:18)
                    at loadConfig (/home/pi/MagicMirror/js/app.js:70:12)
                    at App.start (/home/pi/MagicMirror/js/app.js:217:3)
                    at Object. (/home/pi/MagicMirror/serveronly/index.js:4:5)
                    [2020-10-16 11:15:36.862] [LOG] Loading module helpers …
                    [2020-10-16 11:15:37.496] [LOG] Initializing new module helper …
                    [2020-10-16 11:15:37.507] [LOG] Module helper loaded: updatenotification
                    [2020-10-16 11:15:37.525] [LOG] No helper found for module: helloworld.
                    [2020-10-16 11:15:37.531] [LOG] All module helpers loaded.
                    [2020-10-16 11:15:39.089] [LOG] Starting server on port 8080 …
                    [2020-10-16 11:15:39.324] [LOG] Server started …
                    [2020-10-16 11:15:39.335] [LOG] Connecting socket for: updatenotification
                    [2020-10-16 11:15:39.346] [LOG] Sockets connected & modules started …
                    [2020-10-16 11:15:39.354] [LOG]

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @laschalkh
                      last edited by sdetweil

                      @laschalkh said in trouble with MMM-GoogleTrafficTimes:

                      /home/pi/MagicMirror/config/config.js:73
                      styledMapType: “transparent”,
                      ^^^^^^^^^^^^^
                      SyntaxError: Unexpected identifier

                      rule number 1 debugging syntax errors:

                      IF you see ’ Unexpected identifier’, find the line number
                      config.js:73

                      back up one line (72), and check for the missing , at the end

                                                      width: '300px'                                   <  --- 
                                                      styledMapType: "transparent",
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        laschalkh
                        last edited by

                        I see it, damn, I’ve stared at that for way too long, rebooting…

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