Read the statement by Michael Teeuw here.
MMM-Remote-Control API and remote fails after V2.25.0 update
-
let config = { address: "0.0.0.0", // to listen on any interface // - "localhost", // 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 // Default, when address config is left out or empty, is "localhost" port: 8080, 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: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.249.0/24"], // Set [] to allow all IP addresses
-
[03.10.2023 21:02.54.966] [ERROR] Error when starting node_helper for module MMM-Remote-Control: [03.10.2023 21:02.54.969] [ERROR] Error: Cannot find module 'node-fetch' Require stack: - /opt/magic_mirror/modules/MMM-Remote-Control/scripts/download_modules.js - /opt/magic_mirror/modules/MMM-Remote-Control/node_helper.js
so https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later
-
@rhbauman set
ipWhitelist:[],
-
No difference.
root@snowy:~# curl -X GET http://192.168.249.34:8080/api/test <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /api/test</pre> </body> </html>
-
-
-
@sdetweil
I posted the startup section of the log file. You can see there are no error messages about missing modules. It seems you’re trying to suggest solutions to all the problems similar to this one that have been covered before. I appreciate that but I did research this problem before posting here.Have you updated your MM to V2.25 and tried to access the Remote-Control API? Does it work for you?
-
@rhbauman I don’t use this module, but if Karsten posts, then you listen. the
node_fetch library was removed in this release. -
@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?
-
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
-
Thanks! I’ll try using an apikey. That’s a difference between your configuration and mine.