• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 506.4k 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.
  • J Offline
    j.e.f.f Project Sponsor Module Developer @beck0r
    last edited by May 26, 2017, 2:39 PM

    @beck0r Sure. Can you provide your config? Hide your API key, of course.

    B 1 Reply Last reply May 26, 2017, 2:51 PM Reply Quote 0
    • B Offline
      beck0r @j.e.f.f
      last edited by May 26, 2017, 2:51 PM

      @j.e.f.f

      Of course… here it comes

      	{
        				module: 'MMM-MyCommute',
        				position: 'top_left',
        				config: {
          					showHeader: true,
          					headerText: 'Verkehr',
         					apikey: '...',
          					origin: '...',
          					startTime: '05:00',
          					endTime: '17:00',
          					destinations: [
            							{
              						destination: '...',
             	 						label: 'Auto zur Arbeit',
              						mode: 'driving',
              						color: '#82E5AA'
            							},      						
            							{
              						destination: '...',
              						label: 'Fahrrad zur Arbeit',
              						mode: 'bicycling',
      							color: '#FFB444'
            							},
      							{
              						destination: '...',
              						label: 'RMV zur Arbeit',
              						mode: 'transit'
            							}
          							]
        					}
      		},
      
      J 1 Reply Last reply May 26, 2017, 4:12 PM Reply Quote 0
      • J Offline
        j.e.f.f Project Sponsor Module Developer @beck0r
        last edited by j.e.f.f May 26, 2017, 6:18 PM May 26, 2017, 4:12 PM

        @beck0r Can you try doing a git pull in your MMM-MyCommute directory and restarting your mirror? I think I found your issue – I didn’t have an icon definition for High-speed rail.

        EDIT Maybe not… I need to add definitions for all sorts of possible transit vehicle types. Stay tuned…

        EDIT OK fixed for real this time. I added definitions for all of the transit modes listed here: https://developers.google.com/maps/documentation/directions/intro#VehicleType

        Note: You’ll see the tram icon while the route is loading, as that is the default icon used when no transitMode is specified. But you’ll see it change to the train icon after your travel times are retrieved.

        1 Reply Last reply Reply Quote 1
        • B Offline
          BlackTalon @j.e.f.f
          last edited by May 26, 2017, 8:56 PM

          @j.e.f.f This is perfect! Thank you so much!

          1 Reply Last reply Reply Quote 0
          • B Offline
            beck0r
            last edited by May 27, 2017, 10:44 AM

            Hi,

            once again for everybody with the same issue. It’s working now! Thumbs up for j.e.f.f, thank you!

            1 Reply Last reply Reply Quote 0
            • J Offline
              joela85
              last edited by May 27, 2017, 2:34 PM

              One more question. I want to make a route going via different roads, can that be done in this config file?
              For example:
              Destination: X
              Via: A1

              Destination: X
              Via: A2

              J 3 Replies Last reply May 27, 2017, 4:09 PM Reply Quote -1
              • J Offline
                j.e.f.f Project Sponsor Module Developer @joela85
                last edited by May 27, 2017, 4:09 PM

                @joela85 so the google API doesn’t allow that specifically, but there are a couple of ways we could accomplish something similar:

                1. I can have Google return alternative routes, and they can be listed out. No garantee you’re going to get any of the routes you’re interested, but they will be the fastest.

                2. you can provide a list of waypoints and Google will return your route passing through those specific places. So if you put specific landmark addresses that are on the highways you’re interested in then you would more or less get the result you’re looking for.

                Both of these options seem fairly straightforward to add so I might just do both :)

                1 Reply Last reply Reply Quote 0
                • J Offline
                  j.e.f.f Project Sponsor Module Developer @joela85
                  last edited by May 29, 2017, 1:39 AM

                  @joela85 I added the first of the above two options. You can specify alternatives:true for any of your destinations to get alternative routes. showSummary must be set to true for this to work.

                  Will be working on the second option soon.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    j.e.f.f Project Sponsor Module Developer @joela85
                    last edited by May 29, 2017, 12:55 PM

                    @joela85 I’ve added the second option too. You can now specify a waypoints parameter for any of the destinations to influence the route Google will find.

                    0_1496062463387_Screen Shot 2017-05-29 at 8.48.11 AM.png

                    T 1 Reply Last reply May 29, 2017, 6:47 PM Reply Quote 1
                    • T Offline
                      tidus5 @j.e.f.f
                      last edited by May 29, 2017, 6:47 PM

                      @j.e.f.f Hey Jeff
                      can you add the time for the next metro/tram/bus ?
                      is it possible to catch the adress in the agenda ? and if its blank just used the definited adress in destination ? :-)

                      J 2 Replies Last reply May 29, 2017, 9:36 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 28
                      • 29
                      • 3 / 29
                      3 / 29
                      • First post
                        26/286
                        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