Read the statement by Michael Teeuw here.
MMM-Remote-Control to receive notification
-
Hello,
I’m trying to execute an action in MMM-Remote-Control from a notification sent by MMM-GoogleAssistant.
I setup the following notification in GA :notificationExec: { notification: "REMOTE_ACTION", payload: {action: "RESTART",}, },
I seems that MMM-Remote-Control receives the notification but I face the following issue :
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:1096:26) {
code: ‘MODULE_NOT_FOUND’,Is there any specific setup to add in Remote-Control to enable RESTART ?
Thanks in advance for your support.
-
@totofar take off the comma after restart
-
Hi @sdetweil
Thank you very much for your answer.
I did change the syntax but it seems that “RESTART” notification does not work properly.
In can use sucessfully the below actions :payload: { action: "REBOOT" }
or
payload: { action: "SHOW", module: "MMM-MyModuleName" }
…but action: “RESTART” would not work :(
…by the way, the button “Restart Magic Mirror” does not work in the interface …/remote.html.I found this issue in the log
[07.02.2021 11:05.21.291] [ERROR] Whoops! There was an uncaught exception…
[07.02.2021 11:05.21.300] [ERROR] Error: Cannot find module ‘pm2’Any idea ?
Thanks :) -
@totofar do u use pm2 to start/restart mm?
i guess remote-control assumes yes
pm2 is an app process manager 2.
if you used my script to install, you were prompted
if not you can get it and setup pm2 ,to autostart mm on boot by running the fixuppm2 script from here
https://github.com/sdetweil/MagicMirror_scriptsafter setup see the things u can do, by
pm2 --help -
Hi @sdetweil
I do use pm2 to autostart my mm.
…and the logs I shared earlier come from pm2 logs.
So I dont understand why calling action:“RESTART” mentions that issue with pm2 module missing…
Can you please tell me which command is executed when we call that action ?
Is it ?pm2 restart 0
Thanks
-
@totofar no idea not my module.