MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-ResRobot - Public transport information for Sweden

    Transport
    3
    6
    615
    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.
    • W
      WillieGarvin last edited by

      @Alvinger
      Hello
      I don’t get the settings to work properly.
      “from:” works properly, “to:” does not seem to be taken into account.
      I get all departures from my specified from: station.

      The arriving station should only be Linköping Centralstation

      I have made modification in MMM-ResRobot.js with depLineCell.innerHTML = departure.track || " ";

      	{
      		module: "MMM-ResRobot",
      		position: "bottom_right",
      		header: "Buss/Tåg -avgångar",
      		config: {
      			routes: [
      				{from: "740000338", to: "740000009"},	// ResRobot Station IDs of starting and destination station(s). At least one route must be defined.
      //				{from: "", to: ""},	// "from" is required but "to" is optional (set "to" to empty string to indicate all destinations)
      			],
      			skipMinutes: 0,		// Skip departures that happens within the next <value> minutes.
      			maximumEntries: 6,	// Number of departures to show on screen
      			truncateAfter: 5,	// A value > 0 will truncate direction name at first space after <value> characters. 0 = no truncation
      			apiKey: "XXXXXXXXXXXXXXXXXXX"		// Your ResRobot apiKey
              }
          },
      

      0_1575717637954_MMM-ResRobot_01.png

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

        @WillieGarvin never mind… the data marked as ‘undefined’ is the ‘track number’
        I see in the repo this was changed recently (7 months)

        I’m guessing the api changed again

        Sam

        Create a working config
        How to add modules

        W 1 Reply Last reply Reply Quote 0
        • W
          WillieGarvin @sdetweil last edited by

          @sdetweil Sorry, old picture.
          undefined is a reference to the track the departure is from and is not used in my location.
          Modification in MMM-ResRobot.js is adjusted so that it only appears IF there is a specified track for the train / bus.

          It should only be Linköping to the right column as it is the only “to:” the destination I am interested in and defined in to:the “to:”

          I changed the tours and got the same results.
          May be the API provider’s filter that fails.

          New image that matches better with the problem.

          0_1575720200632_MMM-ResRobot_01.png

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

            @WillieGarvin looking at the code in node_helper, it only filters out the total number of entries and start
            of route time if requested

            the js code doesn’t filter at all

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • W
              WillieGarvin last edited by

              Left the project a few hours.
              Had changed in MMM-ResRobot.js line 22 where the default settings were set. Entered my data there and now the variable to: works as it was supposed to.
              Only departures that match my destination are displayed.

              0_1575750507830_MMM-ResRobot_01.png

              1 Reply Last reply Reply Quote 0
              • Alvinger
                Alvinger last edited by

                @WillieGarvin,
                Thank you all for using my module! I know that it hasn’t been updated in a while as there has been no request for feature expansion apart from the TrackNo request seven months ago. The addition of that field was a bit of a hack on my part and it is not implemented in the best way, sorry for that.

                As you have found out there is no additional filtering done apart from matching to and from destination ids. The reason for this is that, for most use cases, setting the destination id should be enough. Of course, if the destination id is just a waypoint, the ultimate destination might be different.

                If you have request for new/changed functionality, do let me know.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy