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-MyCommute

    Scheduled Pinned Locked Moved Transport
    286 Posts 80 Posters 655.0k Views 77 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
      sun34529
      last edited by

      @SoleLo and @bhepler , I’m trying to figure this out as well. Any luck?

      S 1 Reply Last reply Reply Quote 0
      • lavolp3L Offline
        lavolp3 Module Developer
        last edited by lavolp3

        I see that the most recent active fork of this module has changed to @qistoph ?
        I am wondering if the module still works with one origin or if there’s already a possibility for several routes with different origins and destinations?

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

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

          @sun34529 use a browser on your pc, chrome or firefox, and open the MM page, (make sure the mm config allows outside access with

          address:"0.0.0.0",
          ipWhitelist:[],
          

          in config.js)

          then do ctrl-shift-i on your keyboard to open the developers window,
          and select the elements tab, and navigate to the module content to the piece u are interested in
          once there, click on it in the elements tree (so it becomes selected) and u will see the css tree for that element on the right side.

          the top most is the info AT the element, u can click to add display:none and the element should not be shown…
          on the bottom of the screen shows the class name tree
          this will give u the info to get the file update right… Screenshot at 2020-05-25 17-11-54.png

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • RedNaxR Offline
            RedNax Module Developer
            last edited by RedNax

            Hi everyone,

            Just to remind you that this still works…

            https://github.com/RedNax67/MMM-TrafficCal

            https://forum.magicmirror.builders/topic/831/mmm-trafficcal-dynamically-display-commutes-based-on-calendar-entries?_=1590694194999

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              Srcodesalittle
              last edited by

              Hi there. Thanks for making this module.
              I was running this flawlessly till a few days ago when it randomly just disappeared from my mirror. The API is still active, I haven’t crossed my billing threshold or anything and the startup logs do show that Mycommute has started. Do you by any chance have any suggestions on what could be happening?

              Thanks in advance!

              1 Reply Last reply Reply Quote 0
              • S Offline
                Srcodesalittle @RedNax
                last edited by

                @RedNax Thanks for the heads up. So, I don’t actually run a calendar module so I’m a little lost on how to specify the destination (I go to the same destination everyday).
                Could you possibly please give me a more broken down instruction on what I need to do to set a destination?
                Thanks in advance!

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

                  Hi, I’m new to Pi and MM. I’ve installed few modules and got them working. MMM-MyCommute looks to be a very useful module but can’t get it to work. I installed it following the instructions on its git page. It’s failing to load. I get “Loading…”.

                  I’m running with unmodified config from the git module page with my apiKey and hideDays set to []. The API key works as I have tested it with another module and also with https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood&key=. No errors in pm2 logs either. Peeking into the main .js file, there are log statements. I can’t locate a log file. Not familiar with Node or MM. Would appreciate pointers on what to try and where to look next.

                  Thanks in advance.

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

                    @leem2000 for the MMM-MyCommute.js, open the developers window (ctrl-shift-i on the mirror keyboard), select the console tab… u can filter too, enter comm in the filter field to see messages out from only a module with ‘comm’ in its name

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      Thanks @sdetweil. There are some errors logged to the console.
                      7775e043-73e5-4686-9d3f-ad7796792449-image.png
                      The module it’s trying to access is
                      http://localhost:8080/modules/MMM-MyCommute/node_modules/moment-duration-format/lib/moment-duration-format.js.
                      When I put that into the browser I get
                      Cannot GET /modules/MMM-MyCommute/node_modules/moment-duration-format/lib/moment-duration-format.js

                      Then for each destination, I get
                      573cee3c-59fb-4268-bd4b-2086421aa26d-image.png

                      Clearly, moment.duration format function is missing. I installed node by following manual install instructions in MM install page.

                      I have the following in node_modules/moment. This is as installed and not modified.

                      pi@raspberrypi:~/MagicMirror/node_modules/moment $ pwd
                      /home/pi/MagicMirror/node_modules/moment
                      pi@raspberrypi:~/MagicMirror/node_modules/moment $ ls
                      CHANGELOG.md  ender.js  locale  moment.d.ts  package.js    README.md  ts3.1-typings
                      dist          LICENSE   min     moment.js    package.json  src
                      

                      Any ideas on how to fix this?

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

                        @leem2000its looking for the moment in the MODULE node_modules folder, NOT the base

                        did u do the npm install in the module folder?

                        Enter the MMM-MyCommute directory and execute npm install
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          Thanks, that worked! I haven’t been doing “npm install” for the other modules I installed. Is that recommended after each module install?

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

                            @leem2000 if it has a package.json file, yes, and if the instructions say so, yes

                            gotta follow the instructions

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              requiemmg
                              last edited by

                              Hi,

                              I have been installing this module on 2 MagicMirrors.
                              It’s running 24/7 and I check travelling time to 4 destinations (so, 8 with both mirrors).

                              Today I got an email, that after about only 2 weeks or so, there are just 25€ remaining of my testing period and 300€.

                              I do not have any other projects and I’ve checked the Dashboard, there have been more than 45000 queries to the directions API so far.

                              First thing I did: Limited the module on both mirrors to run only at daytime. But as I have different work locations and shifts, this is not so good. And, of course, I dont want to generate queries for a real amount of cash…

                              What should I do? Is this normal?

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

                                @requiemmg yes, I got a warning too from google, 4 mirrors, asking every 5 minutes, the api query counts add up fast… 8,000 calls a week…

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  requiemmg
                                  last edited by

                                  Okay, so no way to limit API calls? Would it be possible to call every 10 minutes or so and only every 60 minutes in the “non-active” time?

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

                                    @requiemmg if someone changes the code, sure. can do almost anything. I support another mirror app which does provide for a interested time period. (rush hour), and doesn’t call API outside that time period if set

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      requiemmg
                                      last edited by

                                      Okay, played around a bit. Set the module to show times only from 5am to 5pm. And I added a “pollFrequency: 15 * 60 * 1000,” to my config.
                                      While the first one works (the module disappears at night), the second one does not seem to work:

                                      c4f385b0-8d27-4890-888c-2e4e423b5ae9-grafik.png

                                      This is the Traffic from the last 2 days. You can see the requests are paused last night. I made changes to the poll frequency yesterday in the afternoon, no change.

                                      The module used up nearly all of my €300 starting balance. I wonder if this will go on like this.

                                      API calls in the last 48 hours:
                                      82b90aa9-a5a6-4e4f-95ed-6247f4df77b0-grafik.png

                                      API calls in the last ONE hour:
                                      d0d5561d-77e9-4093-b959-e32335b19ec5-grafik.png

                                      Which I do not understand: No errors. Poll Frequency of every 15 Minutes. 2 Mirrors with 4 destinations each. So 4*8=24 API calls/hour would be what I expect to see…

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

                                        @requiemmg 352/hour is 5.87 per minute, about once every 12 seconds… once every 24 seconds both of 2 machines.

                                        1 looked at the code, 1 api request per destination.

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          requiemmg
                                          last edited by

                                          Raised an issue. Seems like the problem comes with the use of MMM-Pages, so on every reload of the page, the module is loaded and the requests are sent again, even if the data is still up to date. @qistoph was so nice to make a fork to address this issue.

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

                                            @requiemmg yep, separate instance on every page.

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 15 / 15
                                            • 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