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

RMV module issue (no live data)

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 2 Posters 1.7k Views 2 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.
  • D Offline
    drfukc
    last edited by Mar 31, 2019, 5:49 PM

    Hi,
    I try to setup the RMV module, but constantly fail with this message on the mirror: [Loading data] and nothing happens after.
    This message on the mirror stays forever and is never replaced with real time-table data.
    For testing I am working with a minimal setup: Clock in the upper left corner and the ‘MMM-RMV’ module in the upper right corner.

    This is my ‘MMM-RMV’ section:

    	{
           module: 'MMM-RMV',
           position: 'top_right',
           config: {
                   apiKey: '12345678-1234-1234-1234-123456789abc', 
                   stationId: '30000001', // default is: '30000001' - 'Frankfurt (Main) Hauptwache'
                   fDestination1: 'Frankfurt (Main) Hauptbahnhof', // default is: 'Frankfurt (Main) Hauptbahnhof'
          }
       },
    

    On the console that is used to launch the mirror application (npm start) I get the following error message:

    “Error: No connection data received. Error Code: 500”

    The HAFASReST Interface documentation tells me the following about the Error Code 500:

    Error Code 500:

    • SVC_SMS: fail to send sms
    • SVC_FAILED_SEARCH: unsuccessful search
    • SVC_NO_RESULT: no result found
    • SVC_NO_MATCH: no match found
    • INT_ERR: internal error

    For testing purposes I invalidate my apiKey into something random and receive this Error Code 403:

    Error Code 403:

    • API_AUTH: access denied for ‘key’ on ‘service’

    So I trust my real apiKey is valid and accepted by RMV.

    The other the base modules plus MMM-GoogleMapsTraffic or MMM-SoccerLiveScore are fully functional.
    Replacing this character ’ by this " has no effect in the script.

    Does anyone have an idea what may go wrong here, why am I not receiving live RMV transport data?

    Cheers
    ukc

    1 Reply Last reply Reply Quote 0
    • D Offline
      drfukc
      last edited by Apr 1, 2019, 7:14 AM

      Additional information:

      Since I edit my files on a Windows machine, I want to double check the encoding of the config.js file (ANSI; UTF-8; etc).
      To verify the encoding, I execute this command in the MagicMirror/config directory: [file -i *]

      file -i *:
      config.js: text/plain; charset=us-ascii
      config.js.sample: text/plain; charset=us-ascii
      config.js.sample.js: text/plain; charset=us-ascii
      config.original.js: text/plain; charset=us-ascii

      Above outcome looks OK for me on my Raspberry Pi.
      Cheers
      ukc

      1 Reply Last reply Reply Quote 0
      • D Offline
        drfukc
        last edited by Apr 18, 2019, 4:27 PM

        @all
        now I found the issue and created a Github pullrequest for the RMV module:

        In addition to the regular config file, RMV ships by default with another file:
        /home/pi/MagicMirror/modules/MMM-RMV/MMM-RMV.js

        In this file you will find below variables that are prefilled with data that will in most cases not work for the average user:

        stationId: '', // update required here
        fDestination1: '', // update required here
        fDestination2: '', // update required here
        

        These variables need updates.
        After a successful update, the RMV module does work nicely even with buses :-)

        S 1 Reply Last reply Apr 18, 2019, 5:56 PM Reply Quote 0
        • S Offline
          sdetweil @drfukc
          last edited by sdetweil Apr 18, 2019, 5:57 PM Apr 18, 2019, 5:56 PM

          @drfukc those variables are documented as needing entries in the config section in config.js

          Station ID and apiKey
          An apiKey has to be requested at RMV - opendata.
          The stationId can be found in file 'StationID.txt' or at RMV - opendata.
          The correct station name is in column 'E'.
          Note: The stations have to be added in german only.
          
          Config Options
          
          fDestination1	'Frankfurt (Main) Hauptbahnhof'	
          The final stop of the train line has to be added here! (station name)
          default value: 'Frankfurt (Main) Hauptbahnhof'
          fDestination2	'Frankfurt (Main) Flughafen Regionalbahnhof'	
          The final stop of the train line has to be added here! (station name)
          default value: 'Frankfurt (Main) Flughafen Regionalbahnhof'
          
          

          note that dest 3,4,5 are marked optional, where 1 and 2 are not

          maybe doc update

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • D Offline
            drfukc
            last edited by drfukc Apr 18, 2019, 6:26 PM Apr 18, 2019, 6:21 PM

            @sdetweil
            I am unsure if we are talking about the same thing.
            I understand you are referring to this file:

            /home/pi/MagicMirror/config/config.js
            

            I see the issue in this file:

            /home/pi/MagicMirror/modules/MMM-RMV/MMM-RMV.js
            

            To get it to work, both files need to be edited in the current version.

            S 1 Reply Last reply Apr 18, 2019, 6:38 PM Reply Quote 0
            • S Offline
              sdetweil @drfukc
              last edited by sdetweil Apr 18, 2019, 6:39 PM Apr 18, 2019, 6:38 PM

              @drfukc i looked at the source for the module u described, I see your pull request…

              		fDest: 'true',
              		fDestination1: 'Frankfurt (Main) Hauptbahnhof',
              		fDestination2: 'Frankfurt (Main) Flughafen Regionalbahnhof',
              		fDestination3: '',
              		fDestination4: '',
              		fDestination5: '',
              		lines: '', // "S1, U1,Tram 11"
              

              because they are in the defaults section of the code, all u have to do is set them in the config entry for this module in config.js
              that will override the defaults

              {
                 module: "MMM-RMV",
                 position: "center",
                 config: {       
                     		fDestination1: 'Frankfurt (Main) Hauptbahnhof',
                     		fDestination2: 'Frankfurt (Main) Flughafen Regionalbahnhof',
                     		fDestination3: 'something',
                     		fDestination4: 'something else',
                     		fDestination5: 'and even more',
                  }
              }

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil
                last edited by sdetweil Apr 18, 2019, 6:41 PM Apr 18, 2019, 6:40 PM

                and the MMM-MRV.js code says (for example)

                else if (trains.direction === this.config.fDestination1 || trains.direction === this.config.fDestination2 || trains.direction === this.config.fDestination3 || trains.direction === this.config.fDestination4 || trains.direction === this.config.fDestination5) 
                				{	
                					if (trains.Product.catOutL == "S-Bahn" || trains.Product.catOutL == "Niederflurstraßenbahn")
                					{	countedLinesTram = countedLinesTram + 1;	}
                					else if (trains.Product.catOutL == "U-Bahn")
                					{	countedLinesSub = countedLinesSub + 1;	}
                					else if (trains.Product.catOutL == "Niederflurbus" || trains.Product.catOutL == "Bus")
                					{	countedLinesBus = countedLinesBus + 1;	}
                					else if (trains.Product.catOutL == "RB" || trains.Product.catOutL == "RE" || trains.Product.catOutL == "IC" || trains.Product.catOutL == "ICE" || trains.Product.catOutL == "R-Bahn" || trains.Product.catOutL == "EC")
                					{	countedLinesTrain = countedLinesTrain + 1;	}
                					else 
                					{	countedLines = countedLines + 1; }
                				}
                

                you should not have to edit the code

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • D Offline
                  drfukc
                  last edited by Apr 18, 2019, 8:03 PM

                  @sdetweil
                  I have not edited the code, I have created a pull-request.
                  All I can see it that it is working in my environment with my proposed change but not with the default values.
                  In case other users have a similar issue, I suggest to give it a try.

                  S 1 Reply Last reply Apr 18, 2019, 8:11 PM Reply Quote 0
                  • S Offline
                    sdetweil @drfukc
                    last edited by Apr 18, 2019, 8:11 PM

                    @drfukc said in RMV module issue (no live data):

                    I have not edited the code, I have created a pull-request.

                    well, you edited the source file, which is the same…

                    it doesn’t matter what the defaults are (what u changed)…

                    just set the values in config (as the deverloper expects you to do), and all is good…

                    your ‘’ vs the original produce the same results… it doesn’t work…

                    it was expected that you would put values in config, they override the defaults…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      drfukc
                      last edited by Apr 18, 2019, 8:30 PM

                      @sdetweil
                      if you are the author of the RMV module its perfect, if you are not the author of this module it is perfect as well.
                      However, please accept that in my case the “MMM-RMV.js” requires auditing, otherwise it will not work.
                      I would be more than pleased if all editing can be done in the “config.js”, at least in my case it does not work.
                      The default values do not seem to be overriden.
                      Any idea why?

                      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 Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy