• 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-SwissTransport

Scheduled Pinned Locked Moved Transport
transportation
17 Posts 7 Posters 11.1k Views 9 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.
  • B Offline
    Bangee Module Developer
    last edited by May 3, 2016, 1:28 PM

    https://github.com/Bangee44/MMM-TrainConnections

    I’ve modified my script. Check out this one.

    0_1462282072441_MM_ST.JPG

    P F 2 Replies Last reply May 3, 2016, 4:37 PM Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by Jun 9, 2016, 7:36 PM

      For troubleshooting or HOWTO questions, please post in the Troubleshooting thread:
      https://forum.magicmirror.builders/topic/212/mmm-swisstransport/1

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • F Offline
        flooo @Bangee
        last edited by Jun 15, 2016, 8:27 PM

        @Bangee is the first version of this module still around?
        I prefer the old versions style as it looks ‘cleaner’…

        If this version doesn’t exist anymore, is it a load of stuff I would have to change to create that look in the new version? :D

        K 1 Reply Last reply Jun 15, 2016, 9:19 PM Reply Quote 0
        • K Offline
          KirAsh4 Moderator @flooo
          last edited by paviro Jun 18, 2016, 6:43 PM Jun 15, 2016, 9:19 PM

          @flooo, you can look at the repository’s commit history (https://github.com/Bangee44/MMM-swisstransport/commits/master), and then checkout a specific revision by using the SHA1: git checkout <sha1> Note that you may need to use the full sha1 value, not the truncated one.

          For example, the last commit on May 3rd is 146a6ce. If you click on that, it expands that commit and you can see the full sha1 value as 146a6cec2aaa5007255cb157ed415ba180639354 in the upper right. So your checkout command then becomes:

          git checkout 146a6cec2aaa5007255cb157ed415ba180639354

          This is of course done from INSIDE the module’s folder!

          A Life? Cool! Where can I download one of those from?

          1 Reply Last reply Reply Quote 1
          • K Offline
            KirAsh4 Moderator
            last edited by Jun 15, 2016, 9:22 PM

            Oh, I just noticed that his post where he said he change it was also done on May 3rd … so perhaps that original version no longer exists, which sort of defeats the purpose of using git …

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 1
            • B Offline
              Bangee Module Developer
              last edited by Jun 17, 2016, 3:27 PM

              I think you would like to use this one.
              https://github.com/Bangee44/MMM-swisstransport

              1 Reply Last reply Reply Quote 1
              • F Offline
                flooo
                last edited by Jun 17, 2016, 4:37 PM

                cool, thanks a lot

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kwyjibo089
                  last edited by Mar 30, 2017, 8:06 PM

                  Great module. Already added it to my mirror. Is there any chance I could filter the list and display only trains? If I put in my Station (Wädenswil) I get lots of busses and also boats.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    Bangee Module Developer
                    last edited by Mar 31, 2017, 11:21 AM

                    @kwyjibo089, yes it’s possible:

                    change the line function getParams() like this:

                    	/* getParams()
                    	 * Generates an url with api parameters based on the config.
                    	 *
                    	 * return String - URL params.
                    	 */
                    	getParams: function() {
                    		var params = "?";
                                    params += "id=" + this.config.id;
                    		params += "&limit=" + this.config.maximumEntries;
                                    params += "&transportations[]=ec_ic&transportations[]=s_sn_r&transportations[]=ir&transportations[]=re_d&transportations[]=ice_tgv_rj";
                    
                    		return params;
                    },
                    
                    

                    The line params += "&transportations[]=ec_ic&transportations[]=s_sn_r..."; is new an should allow you to filter the transportation object.

                    Here are all option:
                    transportations
                    Transportation means; one or more of ice_tgv_rj, ec_ic, ir, re_d, ship, s_sn_r, bus, cableway, arz_ext, tramway_underground
                    example:
                    &transportations[]=ec_ic&transportations[]=bus

                    Source: http://transport.opendata.ch/docs.html#section

                    It’s not testet yet, but I think it should work for you.

                    Have fun,

                    Gruss aus Oberrieden :-)

                    K 1 Reply Last reply Mar 31, 2017, 5:10 PM Reply Quote 0
                    • K Offline
                      kwyjibo089 @Bangee
                      last edited by Mar 31, 2017, 5:10 PM

                      nice, works like a charm! thanks a lot!

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