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 177.2k 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.
    • sweupS Offline
      sweup @Alvinger
      last edited by

      @Alvinger - hmm something email adress. Any advice?

      pi@raspberrypi:~ $ cd ~/MagicMirror/modules/MMM-ResRobot
      pi@raspberrypi:~/MagicMirror/modules/MMM-ResRobot $ git stash
      
      *** Please tell me who you are.
      
      Run
      
        git config --global user.email "you@example.com"
        git config --global user.name "Your Name"
      
      to set your account's default identity.
      Omit --global to set the identity only in this repository.
      
      fatal: unable to auto-detect email address (got 'pi@raspberrypi.(none)')
      Cannot save the current index state
      pi@raspberrypi:~/MagicMirror/modules/MMM-ResRobot $ git pull
      Updating 1618fcc..695f70d
      error: Your local changes to the following files would be overwritten by merge:
      	package.json
      Please commit your changes or stash them before you merge.
      Aborting
      pi@raspberrypi:~/MagicMirror/modules/MMM-ResRobot $ npm install
      npm WARN npm npm does not support Node.js v10.21.0
      npm WARN npm You should probably upgrade to a newer version of node as we
      npm WARN npm can't make any promises that npm will work with this version.
      npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
      npm WARN npm You can find the latest version at https://nodejs.org/
      up to date in 1.02s
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @sweup
        last edited by

        @sweup let’s find out what u changed
        do

        git diff

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        sweupS 1 Reply Last reply Reply Quote 0
        • sweupS Offline
          sweup @sdetweil
          last edited by

          @sdetweil - sry I’m a bit lost, do I do “git diff” after?

          cd ~/MagicMirror/modules/MMM-ResRobot
          git stash
          git pull
          npm install
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @sweup
            last edited by

            @sweup git stash fails cause u are not registered to git on your machine
            git pull fails cause it would overwrite a change u.made to package.json

            so, I was trying to find out what the change was, and how important it is…

            the other commands won’t work til we resolve the diff(erence) issue

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • sweupS Offline
              sweup
              last edited by

              @sdetweil @Alvinger - thx guys, after

              $ git config --global user.email "you@example.com" 
              $ git config --global user.name "Your Name"
              

              I could solve it with git stash

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

                @sweup yeh, but we don’t know what change u lost/stashed

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                AlvingerA 1 Reply Last reply Reply Quote 0
                • AlvingerA Offline
                  Alvinger @sdetweil
                  last edited by

                  @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
                  • AlvingerA Offline
                    Alvinger
                    last edited by

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

                    sweupS 1 Reply Last reply Reply Quote 0
                    • Z Offline
                      Zapman
                      last edited by

                      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:

                      AlvingerA 2 Replies Last reply Reply Quote 0
                      • AlvingerA Offline
                        Alvinger @Zapman
                        last edited by

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

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 9
                        • 10
                        • 11
                        • 12
                        • 13
                        • 14
                        • 11 / 14
                        • 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