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-Remote-Control API and remote fails after V2.25.0 update

    Scheduled Pinned Locked Moved Solved Troubleshooting
    21 Posts 3 Posters 2.9k 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.
    • R Offline
      rhbauman @sdetweil
      last edited by

      @sdetweil
      And if I post, please read it and think about what you are about to post before adding noise to the discussion. I am not seeing any error messages about missing modules and I am not getting a black screen.

      Perhaps you could load Remote-Control and let me know if you can duplicate my problem?

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

        @rhbauman Screenshot at 2023-10-04 08-09-18.png

        Screenshot at 2023-10-04 08-18-34.png

        and came up on my phone

        my module config

        {
            module: 'MMM-Remote-Control',
            // uncomment the following line to show the URL of the remote control on the mirror
            // position: 'bottom_left',
            // you can hide this module afterwards from the remote control itself
            config: {
                customCommand: {},  // Optional, See "Using Custom Commands" below
                showModuleApiMenu: true, // Optional, Enable the Module Controls menu
                secureEndpoints: true, // Optional, See API/README.md
                // uncomment any of the lines below if you're gonna use it
                // customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
                apiKey: "12345", // Optional, See API/README.md for details
                // classes: {} // Optional, See "Custom Classes" below
            }
        },
        

        my top line mm config

        let config = {
        	address: "0.0.0.0",	// Address to listen on, can be:
        							// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
        							// - another specific IPv4/6 to listen on a specific interface
        							// - "0.0.0.0", "::" to listen on any interface
        							// Default, when address config is left out or empty, is "localhost"
        	port: 8090,
        	basePath: "/",			// The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
        					  		// you must set the sub path here. basePath must end with a /
        	ipWhitelist: [],	// Set [] to allow all IP addresses
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • R Offline
          rhbauman
          last edited by

          Thanks! I’ll try using an apikey. That’s a difference between your configuration and mine.

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

            @rhbauman it was the same before apiKey was uncommented…

            I was just trying to use a function that required a key… as well as the others.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • R Offline
              rhbauman
              last edited by

              Yeah, secureEndpoints made no difference for me. What’s your MM host, a Raspberry Pi? If so, are you running bullseye? And you’re running MM V2.25, right?

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

                @rhbauman i installed on a pi3, pi4 and my linux desktop, all on node 18 or 20 all with the same module config (cut and paste)

                buster and bullseye, all MM 2.25

                and all worked.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rhbauman
                  last edited by

                  Excellent. Then I’ve got some problem in my Pi environment. Thanks for the info and taking the time to try to duplicate the issue.

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

                    @rhbauman let us know how it works out…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      rhbauman @sdetweil
                      last edited by

                      @sdetweil
                      OK. This masked the root problem: pm2 logs mm --lines 100 doesn’t show the same information as npm run start. From pm2 logs:

                      /home/pi/.pm2/logs/mm-out.log last 100 lines:
                      0|mm       | [04.10.2023 10:23.56.064] [LOG]   Loading config ...
                      0|mm       | [04.10.2023 10:23.56.071] [DEBUG] config template file not exists, no envsubst
                      0|mm       | [04.10.2023 10:23.56.081] [LOG]   Loading module helpers ...
                      0|mm       | [04.10.2023 10:23.56.084] [LOG]   No helper found for module: alert.
                      0|mm       | [04.10.2023 10:23.56.143] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 10:23.56.145] [LOG]   Module helper loaded: updatenotification
                      0|mm       | [04.10.2023 10:23.56.147] [LOG]   No helper found for module: clock.
                      0|mm       | [04.10.2023 10:23.56.511] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 10:23.56.513] [LOG]   Module helper loaded: calendar
                      0|mm       | [04.10.2023 10:23.56.516] [LOG]   No helper found for module: MMM-WeatherGraph.
                      0|mm       | [04.10.2023 10:23.56.765] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 10:23.56.766] [LOG]   Module helper loaded: MMM-Remote-Control
                      0|mm       | [04.10.2023 10:23.56.771] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 10:23.56.772] [LOG]   Module helper loaded: WallberryTheme
                      0|mm       | [04.10.2023 10:23.56.874] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 10:23.56.875] [LOG]   Module helper loaded: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 10:23.56.875] [LOG]   All module helpers loaded.
                      0|mm       | [04.10.2023 10:23.56.895] [LOG]   Starting server on port 8080 ...
                      0|mm       | [04.10.2023 10:23.56.934] [LOG]   Server started ...
                      0|mm       | [04.10.2023 10:23.56.937] [LOG]   Connecting socket for: updatenotification
                      0|mm       | [04.10.2023 10:23.56.938] [LOG]   Starting module helper: updatenotification
                      0|mm       | [04.10.2023 10:23.56.940] [LOG]   Connecting socket for: calendar
                      0|mm       | [04.10.2023 10:23.56.941] [LOG]   Starting node helper for: calendar
                      0|mm       | [04.10.2023 10:23.56.943] [LOG]   Connecting socket for: MMM-Remote-Control
                      0|mm       | [04.10.2023 10:23.56.944] [LOG]   Starting node helper for: MMM-Remote-Control
                      0|mm       | [04.10.2023 10:23.56.962] [LOG]   Connecting socket for: WallberryTheme
                      0|mm       | [04.10.2023 10:23.56.963] [LOG]   Starting module helper: WallberryTheme
                      0|mm       | [04.10.2023 10:23.56.964] [LOG]   Connecting socket for: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 10:23.56.966] [LOG]   Sockets connected & modules started ...
                      0|mm       | [04.10.2023 10:23.57.425] [LOG]   Launching application.
                      0|mm       | [04.10.2023 10:24.02.086] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 3600000
                      0|mm       | [04.10.2023 10:24.02.389] [LOG]   Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/subergnc60%40gmail.com/private-aea673a8cf3f206ff493088e6bbdbda9/basic.ics - Interval: 3600000
                      0|mm       | [04.10.2023 10:24.02.512] [LOG]   Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/ronbauman36%40gmail.com/private-4a25d5bf1c4accb1dce4e685fdcf2fcd/basic.ics - Interval: 3600000
                      0|mm       | [04.10.2023 10:24.03.547] [INFO]  [MMM-HomeAssistantDisplay] [ 'HomeAssistant connected for module_11_MMM-HomeAssistantDisplay' ]
                      0|mm       | [04.10.2023 10:24.03.597] [INFO]  Checking git for module: MMM-WeatherGraph
                      0|mm       | [04.10.2023 10:24.03.654] [LOG]   Electron's cache successfully cleared.
                      0|mm       | [04.10.2023 10:24.03.816] [INFO]  Checking git for module: MMM-Remote-Control
                      0|mm       | [04.10.2023 10:24.03.924] [INFO]  Checking git for module: WallberryTheme
                      0|mm       | [04.10.2023 10:24.04.045] [INFO]  Checking git for module: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 10:24.04.149] [INFO]  Checking git for module: MagicMirror
                      0|mm       | [04.10.2023 10:24.04.566] [INFO]  Calendar-Fetcher: Broadcasting 1 events from http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics.
                      0|mm       | [04.10.2023 10:24.04.794] [INFO]  [MMM-HomeAssistantDisplay] [
                      0|mm       |   'Conected to Home Assistant for module_11_MMM-HomeAssistantDisplay after 0 retries'
                      0|mm       | ]
                      0|mm       | [04.10.2023 10:24.09.117] [INFO]  Calendar-Fetcher: Broadcasting 2 events from https://calendar.google.com/calendar/ical/ronbauman36%40gmail.com/private-4a25d5bf1c4accb1dce4e685fdcf2fcd/basic.ics.
                      0|mm       | [04.10.2023 10:24.11.480] [INFO]  Calendar-Fetcher: Broadcasting 6 events from https://calendar.google.com/calendar/ical/subergnc60%40gmail.com/private-aea673a8cf3f206ff493088e6bbdbda9/basic.ics.
                      0|mm       | [04.10.2023 11:24.05.182] [INFO]  Calendar-Fetcher: Broadcasting 1 events from http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics.
                      0|mm       | [04.10.2023 11:24.11.829] [INFO]  Calendar-Fetcher: Broadcasting 2 events from https://calendar.google.com/calendar/ical/ronbauman36%40gmail.com/private-4a25d5bf1c4accb1dce4e685fdcf2fcd/basic.ics.
                      0|mm       | [04.10.2023 11:24.13.950] [INFO]  Calendar-Fetcher: Broadcasting 6 events from https://calendar.google.com/calendar/ical/subergnc60%40gmail.com/private-aea673a8cf3f206ff493088e6bbdbda9/basic.ics.
                      0|mm       |
                      0|mm       | > magicmirror@2.25.0 start
                      0|mm       | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                      0|mm       |
                      0|mm       | [04.10.2023 12:16.42.478] [LOG]   Starting MagicMirror: v2.25.0
                      0|mm       | [04.10.2023 12:16.42.491] [LOG]   Loading config ...
                      0|mm       | [04.10.2023 12:16.42.498] [DEBUG] config template file not exists, no envsubst
                      0|mm       | [04.10.2023 12:16.42.508] [LOG]   Loading module helpers ...
                      0|mm       | [04.10.2023 12:16.42.512] [LOG]   No helper found for module: alert.
                      0|mm       | [04.10.2023 12:16.42.570] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 12:16.42.572] [LOG]   Module helper loaded: updatenotification
                      0|mm       | [04.10.2023 12:16.42.574] [LOG]   No helper found for module: clock.
                      0|mm       | [04.10.2023 12:16.42.942] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 12:16.42.944] [LOG]   Module helper loaded: calendar
                      0|mm       | [04.10.2023 12:16.42.947] [LOG]   No helper found for module: MMM-WeatherGraph.
                      0|mm       | [04.10.2023 12:16.43.212] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 12:16.43.215] [LOG]   Module helper loaded: MMM-Remote-Control
                      0|mm       | [04.10.2023 12:16.43.220] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 12:16.43.221] [LOG]   Module helper loaded: WallberryTheme
                      0|mm       | [04.10.2023 12:16.43.349] [LOG]   Initializing new module helper ...
                      0|mm       | [04.10.2023 12:16.43.349] [LOG]   Module helper loaded: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 12:16.43.350] [LOG]   All module helpers loaded.
                      0|mm       | [04.10.2023 12:16.43.370] [LOG]   Starting server on port 8080 ...
                      0|mm       | [04.10.2023 12:16.43.412] [LOG]   Server started ...
                      0|mm       | [04.10.2023 12:16.43.414] [LOG]   Connecting socket for: updatenotification
                      0|mm       | [04.10.2023 12:16.43.416] [LOG]   Starting module helper: updatenotification
                      0|mm       | [04.10.2023 12:16.43.417] [LOG]   Connecting socket for: calendar
                      0|mm       | [04.10.2023 12:16.43.419] [LOG]   Starting node helper for: calendar
                      0|mm       | [04.10.2023 12:16.43.420] [LOG]   Connecting socket for: MMM-Remote-Control
                      0|mm       | [04.10.2023 12:16.43.422] [LOG]   Starting node helper for: MMM-Remote-Control
                      0|mm       | [04.10.2023 12:16.43.440] [LOG]   Connecting socket for: WallberryTheme
                      0|mm       | [04.10.2023 12:16.43.441] [LOG]   Starting module helper: WallberryTheme
                      0|mm       | [04.10.2023 12:16.43.442] [LOG]   Connecting socket for: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 12:16.43.444] [LOG]   Sockets connected & modules started ...
                      0|mm       | [04.10.2023 12:16.43.932] [LOG]   Launching application.
                      0|mm       | [04.10.2023 12:16.48.648] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 3600000
                      0|mm       | [04.10.2023 12:16.48.956] [LOG]   Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/subergnc60%40gmail.com/private-aea673a8cf3f206ff493088e6bbdbda9/basic.ics - Interval: 3600000
                      0|mm       | [04.10.2023 12:16.50.033] [INFO]  [MMM-HomeAssistantDisplay] [ 'HomeAssistant connected for module_11_MMM-HomeAssistantDisplay' ]
                      0|mm       | [04.10.2023 12:16.50.062] [LOG]   Electron's cache successfully cleared.
                      0|mm       | [04.10.2023 12:16.50.122] [INFO]  Checking git for module: MMM-WeatherGraph
                      0|mm       | [04.10.2023 12:16.50.220] [LOG]   Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/ronbauman36%40gmail.com/private-4a25d5bf1c4accb1dce4e685fdcf2fcd/basic.ics - Interval: 3600000
                      0|mm       | [04.10.2023 12:16.50.283] [INFO]  Checking git for module: MMM-Remote-Control
                      0|mm       | [04.10.2023 12:16.50.412] [INFO]  Checking git for module: WallberryTheme
                      0|mm       | [04.10.2023 12:16.50.560] [INFO]  Checking git for module: MMM-HomeAssistantDisplay
                      0|mm       | [04.10.2023 12:16.50.682] [INFO]  Checking git for module: MagicMirror
                      0|mm       | [04.10.2023 12:16.51.047] [INFO]  Calendar-Fetcher: Broadcasting 1 events from http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics.
                      0|mm       | [04.10.2023 12:16.51.265] [INFO]  [MMM-HomeAssistantDisplay] [
                      0|mm       |   'Conected to Home Assistant for module_11_MMM-HomeAssistantDisplay after 0 retries'
                      0|mm       | ]
                      0|mm       | [04.10.2023 12:16.56.265] [INFO]  Calendar-Fetcher: Broadcasting 2 events from https://calendar.google.com/calendar/ical/ronbauman36%40gmail.com/private-4a25d5bf1c4accb1dce4e685fdcf2fcd/basic.ics.
                      0|mm       | [04.10.2023 12:16.58.824] [INFO]  Calendar-Fetcher: Broadcasting 6 events from https://calendar.google.com/calendar/ical/subergnc60%40gmail.com/private-aea673a8cf3f206ff493088e6bbdbda9/basic.ics.
                      

                      From npm run start:

                      [04.10.2023 12:28.01.300] [LOG]   Starting MagicMirror: v2.25.0
                      [04.10.2023 12:28.01.312] [LOG]   Loading config ...
                      [04.10.2023 12:28.01.322] [DEBUG] config template file not exists, no envsubst
                      [04.10.2023 12:28.01.334] [LOG]   Loading module helpers ...
                      [04.10.2023 12:28.01.339] [LOG]   No helper found for module: alert.
                      [04.10.2023 12:28.01.403] [LOG]   Initializing new module helper ...
                      [04.10.2023 12:28.01.405] [LOG]   Module helper loaded: updatenotification
                      [04.10.2023 12:28.01.411] [LOG]   No helper found for module: clock.
                      [04.10.2023 12:28.01.967] [LOG]   Initializing new module helper ...
                      [04.10.2023 12:28.01.969] [LOG]   Module helper loaded: calendar
                      [04.10.2023 12:28.01.972] [LOG]   No helper found for module: MMM-WeatherGraph.
                      [04.10.2023 12:28.02.332] [LOG]   Initializing new module helper ...
                      [04.10.2023 12:28.02.333] [LOG]   Module helper loaded: MMM-Remote-Control
                      [04.10.2023 12:28.02.353] [LOG]   Initializing new module helper ...
                      [04.10.2023 12:28.02.354] [LOG]   Module helper loaded: WallberryTheme
                      [04.10.2023 12:28.02.561] [LOG]   Initializing new module helper ...
                      [04.10.2023 12:28.02.561] [LOG]   Module helper loaded: MMM-HomeAssistantDisplay
                      [04.10.2023 12:28.02.562] [LOG]   All module helpers loaded.
                      [04.10.2023 12:28.02.581] [LOG]   Starting server on port 8080 ...
                      [04.10.2023 12:28.02.590] [WARN]  You're using a full whitelist configuration to allow for all IPs
                      [04.10.2023 12:28.02.618] [LOG]   Server started ...
                      [04.10.2023 12:28.02.621] [LOG]   Connecting socket for: updatenotification
                      [04.10.2023 12:28.02.622] [LOG]   Starting module helper: updatenotification
                      [04.10.2023 12:28.02.624] [LOG]   Connecting socket for: calendar
                      [04.10.2023 12:28.02.625] [LOG]   Starting node helper for: calendar
                      [04.10.2023 12:28.02.626] [LOG]   Connecting socket for: MMM-Remote-Control
                      [04.10.2023 12:28.02.627] [LOG]   Starting node helper for: MMM-Remote-Control
                      [04.10.2023 12:28.02.640] [ERROR] Error when starting node_helper for module MMM-Remote-Control:
                      [04.10.2023 12:28.02.645] [ERROR] Error: Cannot find module 'node-fetch'
                      Require stack:
                      - /home/pi/MagicMirror/modules/MMM-Remote-Control/scripts/download_modules.js
                      - /home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js
                      - /home/pi/MagicMirror/js/app.js
                      - /home/pi/MagicMirror/js/electron.js
                      - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
                      -
                          at node:internal/modules/cjs/loader:1084:15
                          at Function.<anonymous> (node:electron/js2c/browser_init:2:117419)
                          at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
                          at node:internal/modules/cjs/loader:929:27
                          at Function._load (node:electron/js2c/asar_bundle:2:13327)
                          at Module.require (node:internal/modules/cjs/loader:1150:19)
                          at require (node:internal/modules/cjs/helpers:110:18)
                          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Remote-Control/scripts/download_modules.js:15:15)
                          at Module._compile (node:internal/modules/cjs/loader:1271:14)
                          at Object..js (node:internal/modules/cjs/loader:1326:10)
                          at Module.load (node:internal/modules/cjs/loader:1126:32)
                          at node:internal/modules/cjs/loader:967:12
                          at Function._load (node:electron/js2c/asar_bundle:2:13327)
                          at Module.require (node:internal/modules/cjs/loader:1150:19)
                          at require (node:internal/modules/cjs/helpers:110:18)
                          at Class.updateModuleList (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:191:35) {
                        code: 'MODULE_NOT_FOUND',
                        requireStack: [
                          '/home/pi/MagicMirror/modules/MMM-Remote-Control/scripts/download_modules.js',
                          '/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js',
                          '/home/pi/MagicMirror/js/app.js',
                          '/home/pi/MagicMirror/js/electron.js',
                          '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
                          undefined
                        ]
                      }
                      [04.10.2023 12:28.02.647] [LOG]   Connecting socket for: WallberryTheme
                      [04.10.2023 12:28.02.648] [LOG]   Starting module helper: WallberryTheme
                      [04.10.2023 12:28.02.649] [LOG]   Connecting socket for: MMM-HomeAssistantDisplay
                      [04.10.2023 12:28.02.651] [LOG]   Sockets connected & modules started ...
                      [04.10.2023 12:28.03.227] [LOG]   Launching application.
                      .
                      .
                      .
                      

                      Once I discovered that node-fetch wasn’t found it was easy enough to follow your instructions to do an npm install node-fetch, although if I ran it in the MMM-Remote-Control directory I got

                      pi@magicmirror:~/MagicMirror/modules/MMM-Remote-Control $ npm install node-fetch
                      
                      up to date, audited 88 packages in 4s
                      

                      But from the MM directory:

                      pi@magicmirror:~/MagicMirror $ npm install node-fetch
                      
                      added 6 packages in 17s
                      

                      And which 6 packages got installed? Who knows. At any rate, Remote-Control API’s are now working again for me. Looking at the MM changelog again I see in the Updates section “Replace node-fetch with internal fetch (#2649) and remove digest-fetch.” To me that seems to be a transparent change that should break anything.

                      And a question for you, Sam. When you installed MMM-Remote-Control in V2.25, did you have to run npm install node-fetch? If not, why not?

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

                        @rhbauman on the PM2 output masking the problem there are two output areas The error output and the output output You’re just showing the output output.

                        I did not have to install node fetch in the remote control module. on any platform. I do not know why, but these were new installs not upgrades

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        karsten13K 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • 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