• 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-ResRobot - Public transport information for Sweden

Scheduled Pinned Locked Moved Transport
138 Posts 27 Posters 150.6k Views 28 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.
  • A Offline
    Alvinger @sdetweil
    last edited by Sep 22, 2020, 7:30 AM

    @sdetweil @sweup
    My guess is that it is an unintended change probably caused by saving rather than exiting when viewing the file.
    Anyway, package.json only contains information about the module and can without issue be replaced with a “git pull”.

    @sweup Great that you solved it. A small suggestion for the future: as most modules (and MagicMirror itself) uses Github you should read up on GIT and its basic commands. It will make life easier for you!

    1 Reply Last reply Reply Quote 0
    • A Offline
      Alvinger
      last edited by Sep 22, 2020, 10:11 AM

      @sweup I just pushed a minor update with some new options. Feel free to try the new version out.

      S 1 Reply Last reply Sep 23, 2020, 2:29 PM Reply Quote 0
      • Z Offline
        Zapman
        last edited by Sep 23, 2020, 1:31 AM

        Hello! :D

        Got some issue with the module. The module loads when starting up MagicMirror, but stays at “Fetching departures …”. I tried my API key here;
        (https://api.resrobot.se/v2/trip?key=API-KEY-HERE&originId=740047279&destId=740010151&format=xml) and it worked fine. So the key itself seams to work. I’m using the API key from “ResRobot - Reseplanerare”. I set the key in the config.js.

        My current config.js;

                        {
        			module: "MMM-ResRobot",
                                position: "top_right",
                                header: "Departures",
                                config: {
                                        routes: [ // stations from: 
                                                {from: "740015972", to: ""}, 
                                        ],
                                        apiKey: "API-KEY-HERE"
                                },
                        },
        

        Terminal message;

        [2020-09-23 03:21:58.036] [LOG]    node_helper for MMM-ResRobot received a socket notification: CONFIG - Payload: {
          "updateInterval": 60000,
          "animationSpeed": 2000,
          "fade": true,
          "fadePoint": 0.25,
          "apiBase": "https://api.resrobot.se/v2/departureBoard?format=json&passlist=0",
          "apiKey": "API-KEY-HERE",
          "routes": [
            {
              "from": "740015972",
              "to": ""
            }
          ],
          "skipMinutes": 0,
          "maximumEntries": 6,
          "truncateAfter": 5,
          "truncateLineAfter": 5,
          "showTrack": true,
          "getRelative": 0,
          "coloredIcons": false,
          "iconTable": {
            "B": "fa fa-bus",
            "S": "fa fa-subway",
            "J": "fa fa-train",
            "U": "fa fa-subway",
            "F": "fa fa-ship"
          },
          "colorTable": {
            "B": "#DA4439",
            "S": "#019CD5",
            "J": "#FDB813",
            "U": "#019CD5",
            "F": "#444400"
          }
        }
        
        

        Maybe someone can have an idea what might be wrong here :crazy_face:

        A 2 Replies Last reply Sep 23, 2020, 6:08 AM Reply Quote 0
        • A Offline
          Alvinger @Zapman
          last edited by Sep 23, 2020, 6:08 AM

          @Zapman I’ll have a look. Your config looks fine at a first look.

          1 Reply Last reply Reply Quote 1
          • S Offline
            sweup @Alvinger
            last edited by Sep 23, 2020, 2:29 PM

            @Alvinger - thx for you work in this module!
            Sidenote, after updated my Rpi (3B) my wifi reception is far worst, never had problem with it before but now it’s loosing connection after a couple of minutes - but I was fast and manage to update to latest ResRobot :) working nicely

            1 Reply Last reply Reply Quote 0
            • A Offline
              Alvinger @Zapman
              last edited by Sep 23, 2020, 2:30 PM

              @Zapman said in MMM-ResRobot - Public transport information for Sweden:

                              {
              			module: "MMM-ResRobot",
                                      position: "top_right",
                                      header: "Departures",
                                      config: {
                                              routes: [ // stations from: 
                                                      {from: "740015972", to: ""}, 
                                              ],
                                              apiKey: "API-KEY-HERE"
                                      },
                              },
              

              @Zapman You can’t have a comment in the middle of the config. Remove the " // stations from: " and it should work.

              This is what it looks like for me:
              a0a58f9d-1271-4144-bca1-34d3746a4ed6-image.png

              S 1 Reply Last reply Sep 23, 2020, 2:32 PM Reply Quote 0
              • S Offline
                sdetweil @Alvinger
                last edited by Sep 23, 2020, 2:32 PM

                @Alvinger said in MMM-ResRobot - Public transport information for Sweden:

                @Zapman You can’t have a comment in the middle of the config. Remove the " // stations from: " and it should work.

                sure you can, they are ignored, there are comments all over the place

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                A 1 Reply Last reply Sep 23, 2020, 2:33 PM Reply Quote 0
                • A Offline
                  Alvinger @sdetweil
                  last edited by Sep 23, 2020, 2:33 PM

                  @sdetweil Yes, they should be. However, when I pasted @Zapman’s config into my test site, it didn’t work. When I removed the comment it worked. Go figure!

                  Z S 2 Replies Last reply Sep 23, 2020, 5:00 PM Reply Quote 0
                  • Z Offline
                    Zapman @Alvinger
                    last edited by Sep 23, 2020, 5:00 PM

                    @Alvinger Everything is working great now! Thank you for the fast response to my issue! I’ll use this module a lot from now on :smiling_face_with_open_mouth:

                    A 1 Reply Last reply Sep 23, 2020, 6:03 PM Reply Quote 0
                    • S Offline
                      sdetweil @Alvinger
                      last edited by Sep 23, 2020, 5:05 PM

                      @Alvinger i added that config to another module with the comment and got what was expected. 1 route structure in an array

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      A 1 Reply Last reply Sep 23, 2020, 6:01 PM Reply Quote 0
                      • 1
                      • 2
                      • 10
                      • 11
                      • 12
                      • 13
                      • 14
                      • 12 / 14
                      12 / 14
                      • First post
                        111/138
                        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