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-DBF does not work, no error messages

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    16 Posts 3 Posters 3.4k Views 3 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.
    • KristjanESPERANTOK Offline
      KristjanESPERANTO Module Developer @sletrabf
      last edited by

      @sletrabf Have you tried deactivating all modules except for MMM-DBF to see if the problem disappears?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sletrabf @KristjanESPERANTO
        last edited by

        @KristjanESPERANTO

        OK, I temporarily disabled all other modules following this advice here except for MMM-DBF.

        With

        showApp: false,
        

        I now get a black (blank) screen; with “true” it is showing the timetable app but nothing else (as expected).

        Is there any way to enable a (verbose) logging output to show what this module does?

        KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
        • KristjanESPERANTOK Offline
          KristjanESPERANTO Module Developer @sletrabf
          last edited by

          showApp: false,

          disabled: true, is the option setting to disable modules. Where did you find showApp?

          it is showing the timetable app

          So it works without the other modules and doesn’t work when you activate the other modules? Can you figure out with which module it stops working?

          Is there any way to enable a (verbose) logging output to show what this module does?

          Seem that this module doesn’t have debug outputs. Only errors you could see in the browser console.

          Also, maybe it is important - when I start up MagicMirror, it gives the following error messages:

          I’m quit sure this is unrelated to this issue. You can try using the Wayland start option (npm run start:wayland) instead of the default start option (npm run start).

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sletrabf @KristjanESPERANTO
            last edited by sletrabf

            @KristjanESPERANTO said in MMM-DBF does not work, no error messages:

            showApp: false,

            disabled: true, is the option setting to disable modules. Where did you find showApp?

            I did use the setting disabled: true, to disable the other modules (as explained here). The setting showApp: false, tells MMM-DBF to not load the table in the iFrame but generate a HTML table from the loaded information. showApp: true, works whereas showApp: false, does not.

            So it works without the other modules and doesn’t work when you activate the other modules? Can you figure out with which module it stops working?

            No, disabling the other modules doesn’t change anything.

            Is there any way to enable a (verbose) logging output to show what this module does?

            Seem that this module doesn’t have debug outputs. Only errors you could see in the browser console.

            OK, I’ll try to see something there!

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

              @KristjanESPERANTO:

              I installed the module MMM-ViewNotifications and then I added several notifications to the file MMM-DBF.js, see: https://pastebin.com/YZEYgPpA

              Now the outcome is as follows:
              showApp: true,

              • The message “MMM_DBF_LOADED” is not shown. From my understanding this means that start() is not being (fully) executed?
              • The following messages are shown (in this order): MMM_DBF_GENERATING_URL, MMM_DBF_IFRAME_URL_GENERATED, MMM_DBF_ERROR_PROCESSING_DATA.

              showApp: false,

              • The message “MMM_DBF_LOADED” is not shown. From my understanding this means that start() is not being (fully) executed?
              • Only the following message is shown: MMM_DBF_ERROR_PROCESSING_DATA

              So, from my understanding, the error occurs here, possibly in the line await fetch (urlApi):

                async getData() {
                  const self = this;
                  const urlApi = `${this.generateUrl()}&mode=json&version=3`;
                  const dataRequest = await fetch(urlApi);
              
                  if (!dataRequest.ok) {
                    // Show that the data request is being processed
                    this.sendNotification("MMM_DBF_ERROR_PROCESSING_DATA", { message: '[MMM-DBF] Data processing returned an error.'});
                    let message = `An error has occurred: ${dataRequest.status}`;
                    if (dataRequest.status === 300) {
                      message += " - Ambiguous station name.";
                    }
                    throw new Error(message);
                  }
                  else {
                    const data = await dataRequest.json();
                    // Show that the data request is being processed
                    this.sendNotification("MMM_DBF_START_PROCESSING_DATA", { message: '[MMM-DBF] Data processing started.'});
                    self.processData(data);
                  }
                  self.scheduleUpdate(self.config.retryDelay);
                },
              

              I’m somehow not able to see the actual error that happened. Could you maybe please point out where I have to look for the value of dataRequest.status?

              Thanks in advance!
              Best regards,
              sletrabf

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

                @sletrabf open the developers window

                ctrl-shift-i
                select the console tab
                enter a unique part of the module name in the filter field, dbf

                and see what you see

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sletrabf
                  last edited by

                  Hello,

                  It took me some time to answer//retry that because life was happening.

                  I have reinstalled the system and the Magic Mirror application:

                  • I have upgraded the system with an SSD and reinstalled the Raspberry OS based on Debian Trixie
                  • My version of Magic Mirror is now 2.37.0.
                  • Installed modules: MMM-DBF, MMM-DVB, MMM-ViewNotifications, MMM-BackgroundSlideShow
                  • The module MMM-DBF was modified by me. Most importantly, log messages were added, but I also fixed a small error regarding departure/arrival times --> https://pastebin.com/x7EJVzKg

                  Additionally, I’ve set up some things to make the configuration and the debugging easier:

                  • A service file to be able to start, stop, and restart Magic Mirror as a systemd service
                  • A graphical remote connection (VNC) to be able to access the Magic Mirror screen from my laptop

                  It didn’t take long until I have gotten the same error - at some point, the table doesn’t get reloaded. I logged in remotely and pressed CTRL + SHIFT + I. Apparently, the server could not be reached and the script cannot handle that.

                  4d9dabfc-dde0-4542-9909-afb7fbeb0bff-image.jpeg

                  Unfortunately, I was not able to see any other of the debug messages that were issued before (maybe they were deleted because a long time has elapsed). I’ll try to read the error closer after it occurs.

                  Best regards,
                  sletrabf

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

                    @sletrabf error recovery is always a challenge.

                    You could access the MagicMirror server from another browser anywhere , just change the address and IpWhitelist config options. Interesting in the module fails there too

                    And the pm2 app makes setup of ‘service’ like apps a lot easier

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @sdetweil

                      “the pm2 app makes setup of ‘service’ like apps a lot easier”
                      I haven’t seen that Magic Mirror actually has a help page for that. --> https://docs.magicmirror.builders/configuration/autostart.html
                      I’ll be looking into that when I need to change the config again, at the moment my service file looks very similar to the one proposed in that link.
                      BTW, I looked past that autostart link that exists on the left side when opening the installation guide --> https://docs.magicmirror.builders/getting-started/installation.html
                      Maybe it would be good to add the reference to the autostart also to the bottom of the installation guide page?

                      “You could access the MagicMirror server from another browser anywhere , just change the address and IpWhitelist config options. Interesting in the module fails there too”
                      I could do that, probably by opening my MagicMirror to my whole home network (https://forum.magicmirror.builders/topic/9513/how-to-display-the-mirror-remotely/13?page=2). But I don’t understand what different information I can get from accessing the page from another client? The module still runs on the pi, doesn’t it? Thus, if the information cannot be retrieved somehow, I should also not see it with an external client?

                      best regards,
                      sletrabf

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

                        @sletrabf this module runs completely in browser
                        So two clients will operate independently wherever they are.

                        I provide the scripted install and upgrade scripts mentioned in the alternative install section of the doc
                        And use pm2 to setup auto start, and commanded restart

                        I also provide other scripts to add pm2 , etc if you change your mind after install

                        I also provide scripts for backup/restore

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        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 / 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