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

      @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 Reply Quote 0
      • Z Offline
        Zapman @Alvinger
        last edited by

        @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:

        AlvingerA 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @Alvinger
          last edited by

          @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

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

            @sdetweil Really strange. You got the expected behavior but @Zapman and I got it to work when we removed the comment. I should state that I use a fork of MM as my screens are iPad 4 running IOS9.3.5 which might have an impact. But I don’t know which MM @Zapman uses.

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

              @Zapman You’re welcome. Do let me know if you see anything you want to add/change.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                SvenT @Alvinger
                last edited by

                @Alvinger Thank You for a brilliant module that works like a charm.
                Do You have a simple fix for limiting updates?
                I want frequent updates for my bus stop when present, and none when I’m not present…
                I have a PIR sensor hooked up. Possible to use that? Suspend module?
                OR a simple schedule as proposed by Trafiklab:
                https://www.trafiklab.se/docs/using-trafiklab-data/best-practices/limiting-requests/

                Not a high prio request…

                Cheers
                /Sven

                S AlvingerA 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @SvenT
                  last edited by

                  @SvenT I would post an issue to the module GitHub issues page to engage the author

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @SvenT I have experimented with a number of algorithms for minimizing updates but ended up with the one implemented. The current algorithm is:

                    • If initial request, get updates from Trafiklab

                    • If the first item in departure list (per routeId) is “old”, i.e. before cutoff time (now + skipMinutes), clear list (for routeId) and get updates from Trafiklab

                    What the above means is that updates only occur ON ACTUAL DEPARTURES, e.g. if a bus departs every 15 minutes the module will get updates from Trafiklab every 15 minutes (per routeId). In rush hour this often means that the module get updates every minute but at night it might only update once per 60 minutes or longer (per routeId). This behavior has the benefit of automatically adjusting to rush hour and slow hours without user intervention or tweaking.

                    If only one routeId is configured, the number of Trafiklab updates is usually way below the Trafiklab suggestions.

                    /j

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      SvenT @Alvinger
                      last edited by

                      @Alvinger I see.
                      My local bus station has departures every 3 minutes almost all day. :-(
                      I’ll tinker with the change profile module to see if I can pause the Reslust module.

                      Cheers
                      /Sven

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

                        @SvenT I think that if you just hide the module it will stop updating (but I’m not sure). Try it.

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          noorm91
                          last edited by

                          Has anyone gotten ResRobot v2.1 to work?
                          If so how does your config look like?

                          I’m trying {from: “740000260”, to: “740000120”}, the rest is default except apiKey of course.

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

                            @noorm91 Please post your entire config for ResRobot (with the secrets masked).

                            N 1 Reply Last reply Reply Quote 0
                            • P Offline
                              Populus
                              last edited by

                              I quickly looked but couldn’t find if “Kalmar län” is included?

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

                                @Populus ResRobot covers all of Sweden as far as I know.

                                P 1 Reply Last reply Reply Quote 0
                                • N Offline
                                  noorm91 @Alvinger
                                  last edited by

                                  @Alvinger It’s all good, thank you!
                                  It seems that you have to restart the rpi for every change you do.

                                  Is there a way to see how many changes you have to do?
                                  For example 1. Bus departure station > 2. Transit station > 3. Final destination.
                                  Would also be nice to see how many minutes it takes from A-B.

                                  1 Reply Last reply Reply Quote 0
                                  • N Offline
                                    noorm91 @Populus
                                    last edited by

                                    @Populus which stations are you looking for in Kalmar?

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      Populus @Alvinger
                                      last edited by

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

                                      @Populus ResRobot covers all of Sweden as far as I know.

                                      It doesn’t appear to have my local stations. Our network is “Kalmar Länstrafik”.

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

                                      @Populus which stations are you looking for in Kalmar?

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

                                        @Populus According to Samtrafikens webpage Kalmar länstrafik is part of their network and should be included. Is there a specific station I could try to look up?

                                        P 1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          Populus @Alvinger
                                          last edited by

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            axllin
                                            last edited by axllin

                                            Hi @Alvinger I have a question for you!

                                            When I run npm run start I get the message:

                                            [name-here]@raspberrypi:~/MagicMirror $ npm run start
                                            
                                            > magicmirror@2.26.0 start
                                            > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                                            
                                            [11.02.2024 18:46.51.586] [LOG]   Starting MagicMirror: v2.26.0
                                            [11.02.2024 18:46.51.592] [LOG]   Loading config ...
                                            [11.02.2024 18:46.51.596] [DEBUG] config template file not exists, no envsubst
                                            [11.02.2024 18:46.51.600] [LOG]   Loading module helpers ...
                                            [11.02.2024 18:46.51.603] [LOG]   No helper found for module: alert.
                                            [11.02.2024 18:46.51.649] [LOG]   Initializing new module helper ...
                                            [11.02.2024 18:46.51.651] [LOG]   Module helper loaded: updatenotification
                                            [11.02.2024 18:46.51.655] [LOG]   No helper found for module: clock.
                                            [11.02.2024 18:46.51.659] [LOG]   No helper found for module: weather.
                                            [11.02.2024 18:46.51.661] [WARN]  No /home/[name-here]/MagicMirror/js/../modules/MMM-ResRobot/MMM-ResRobot.js found for module: MMM-ResRobot.
                                            [11.02.2024 18:46.51.663] [LOG]   No helper found for module: MMM-ResRobot.
                                            

                                            The module doesn’t load and it posts something about not finding a .js for the module?

                                            My current config in the config.js looks like this where I have pulled the station IDs from Trafiklab:

                                            {
                                                        module: "MMM-ResRobot",
                                                        position: "top_right",
                                                        header: "Departures",
                                                        config: {
                                                            routes: [
                                                                {from: "[removed]", to: "[removed]"},
                                                                ],
                                                            skipMinutes: 0,
                                                            maximumEntries: 3,
                                                            maximumDuration: 60,
                                                                    getRelative: 10, 
                                                            truncateAfter: 5,
                                                            truncateLineAfter: 5,
                                                                        showTrack: true,
                                                            coloredIcons: false,
                                                            apiKey: "[my-api-key]",
                                                                  }
                                                        },
                                            

                                            Do you know what would be the issue with the module loading?

                                            EDIT: I found the issue. I had the folder in /modules named as MMM-ResRobot-master. Removing the -master made it match the given module name in the config.js. It now works.

                                            S 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
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 2 / 7
                                            • 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