Read the statement by Michael Teeuw here.
Shelly-PM not working?
-
Hello,
I get the message below after I had configured the Module MMM-Shelly-PM. Is anyone running this module and can support? I don`t know how to fix this.
Module Link:
MMM-Shelly-PM0|mm | > magicmirror@2.29.0 start 0|mm | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js 0|mm | [2024-10-20 20:51:40.183] [LOG] Starting MagicMirror: v2.29.0 0|mm | [2024-10-20 20:51:40.225] [LOG] Loading config ... 0|mm | [2024-10-20 20:51:40.229] [LOG] config template file not exists, no envsubst 0|mm | [2024-10-20 20:51:40.772] [INFO] Checking config file /home/chris/MagicMirror/config/config.js ... 0|mm | [2024-10-20 20:51:40.890] [INFO] Your configuration file doesn't contain syntax errors :) 0|mm | [2024-10-20 20:51:40.892] [INFO] Checking modules structure configuration ... 0|mm | [2024-10-20 20:51:41.008] [INFO] Your modules structure configuration doesn't contain errors :) 0|mm | [2024-10-20 20:51:42.894] [ERROR] (node:13565) UnhandledPromiseRejectionWarning: Error: Cannot find module 'request' 0|mm | Require stack: 0|mm | - /home/chris/MagicMirror/modules/MMM-Shelly-PM/node_helper.js 0|mm | - /home/chris/MagicMirror/js/app.js 0|mm | - /home/chris/MagicMirror/js/electron.js 0|mm | at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15) 0|mm | at s._resolveFilename (node:electron/js2c/browser_init:2:121498) 0|mm | at Module._resolveFilename (/home/chris/MagicMirror/node_modules/module-alias/index.js:49:29) 0|mm | at Module._load (node:internal/modules/cjs/loader:1058:27) 0|mm | at c._load (node:electron/js2c/node_init:2:17025) 0|mm | at Module.require (node:internal/modules/cjs/loader:1318:19) 0|mm | at require (node:internal/modules/helpers:179:18) 0|mm | at Object.<anonymous> (/home/chris/MagicMirror/modules/MMM-Shelly-PM/node_helper.js:3:17) 0|mm | at Module._compile (node:internal/modules/cjs/loader:1484:14) 0|mm | at Module._extensions..js (node:internal/modules/cjs/loader:1564:10) 0|mm | at Module.load (node:internal/modules/cjs/loader:1295:32) 0|mm | at Module._load (node:internal/modules/cjs/loader:1111:12) 0|mm | at c._load (node:electron/js2c/node_init:2:17025) 0|mm | at Module.require (node:internal/modules/cjs/loader:1318:19) 0|mm | at require (node:internal/modules/helpers:179:18) 0|mm | at loadModule (/home/chris/MagicMirror/js/app.js:200:19) 0|mm | (Use `electron --trace-warnings ...` to show where the warning was created) 0|mm | [2024-10-20 20:51:42.908] [ERROR] (node:13565) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
-
-
@sdetweil Hi, that fixed the startup problem. Many thanks!
But there are still some errors. I`ll check and maybe reopen this topic. -
Okay, maybe someone is successfully running this module and can help. I get this message:
0|mm | [2024-10-21 14:58:00.242] [ERROR] Whoops! There was an uncaught exception... 0|mm | [2024-10-21 14:58:00.242] [ERROR] Error: undefined is not a valid uri or options object. 0|mm | at request (/home/chris/MagicMirror/modules/node_modules/request/index.js:44:11) 0|mm | at Class.socketNotificationReceived (/home/chris/MagicMirror/modules/MMM-Shelly-PM/node_helper.js:30:4) 0|mm | at Socket.<anonymous> (/home/chris/MagicMirror/js/node_helper.js:91:10) 0|mm | at Socket.onevent (/home/chris/MagicMirror/node_modules/socket.io/dist/socket.js:462:26) 0|mm | at Socket._onpacket (/home/chris/MagicMirror/node_modules/socket.io/dist/socket.js:430:22) 0|mm | at /home/chris/MagicMirror/node_modules/socket.io/dist/client.js:214:24 0|mm | at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 0|mm | [2024-10-21 14:58:00.243] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|mm | [2024-10-21 14:58:00.244] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues
I had a look in the index.js and the node_helper.js but I can‘t see whats not working.
Cheers,
Chris. -
@chrisfr1976 so, it is trying to use the config parm you should have set
uri: self.config.uri
do you have a uri : property in the module config?
there is no default set by the module
-
@chrisfr1976 the author posted a replay to
https://github.com/stefanjacobs/MMM-Shelly-PM/issues/1
about an hour ago