Read the statement by Michael Teeuw here.
MMM-Remote-Control can not turn ON monitor
-
@sdetweil I finally have a solution that worked for me.
In the node_helper.js file, there is a function with the name “monitorControl”. In there, I used 2 things as shown below. Essentially, we want it to execute both, vcgen and cec, when we turn the monitor on and off. So I added the cec command to the already existing vcgencmd command. Now it looks like this.
this.thisConfig.customCommand.monitorOnCommand:
“vcgencmd display_power 1 && sudo echo 'on 0 | cec-client -s -d 1”;this.thisConfig.customCommand.monitorOffCommand:
“vcgencmd display_power 0 && sudo echo 'standby 0 | cec-client -s -d 1”;I did not change anything in the statusCommand part.
After that, I removed the customCommands from my config so that the module uses the default commands above for turning monitor ON and Off. That worked for me. See if it works for you.
-
@anaghd no, but you could have put the same strings in your custom commands
-
@sdetweil I tried doing that initially but that did not work for me.
-
@anaghd said in MMM-Remote-Control can not turn ON monitor:
“vcgencmd display_power 0 && sudo echo 'standby 0 | cec-client -s -d 1”;
I am not a programmer but there seems to be a syntax error in this line of code (and the next one too). Shouldn’t there be a closing ’ after the opening 'standby ?
-
@anaghd
Even adding what I think is the correct syntax I still get an error. I am having the same issue where the TV will not turn back on after it goes to “sleep”. Initially (with unmodified code), as long as it is searching for the HDMI signal it will turn the monitor back on; however, when the signal search stops these commands will not turn the TV back on.
Here is the error:
Whoops! There was an uncaught exception…
0|mm | [01.01.2022 06:21.55.922] [ERROR]
0|mm | /home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:640
0|mm | “vcgencmd display_power 1” && sudo echo ‘on 0’ | cec-client -s -d 1”;
0|mm | ^^^^ -
@stevegoble do you have the cec code installed?
do
cec-client
if you get command not found
dosudo apt install cec-utils