Read the statement by Michael Teeuw here.
[MMM-Remote-Control](v2-dev) Extensible REST API, Dynamic Menus, and Socket Communications, plus other updates
-
@Cr4z33
Make trials with your terminal :- Turn screen on by pasting that in your terminal : echo on 0 | cec-client -s -d 1
- Check the feedback status sent by the TV by putting that in terminal : echo pow 0 | cec-client -s -d 1
- Remind the result
Do exactly the same with turn off :
- Turn screen on by pasting that in your terminal : echo standby 0 | cec-client -s -d 1
- Check the feedback status sent by the TV by putting that in terminal : echo pow 0 | cec-client -s -d 1
- Remind the result
The 2 results you will get should be updated in node.js line 610 / 620.
-
@bolish as I wrote before that’s EXACTLY what I already did. ;)
Terminal commands work straight away while the same commands in MMM-Remote-Control have no effect when used by tapping the buttons in the menu.
-
@Cr4z33
So, the ouput you got in the terminal by sending the “pow 0” command is in line with what is written into node helper.js line 610 / 620? -
-
@Cr4z33
Strange, it worked for me… FMI, what output do you get in the terminal with “echo pow 0 | cec-client -s -d 1”.
When the screen is ON? When the screen is “OFF”? -
@bolish depending wheter the TV is on or off it says
power status: on
orpower status: standby
. -
@Cr4z33 same as me…let’s try to cross check our node helper .js to see if they are written the same on line 610 and 620.
-
@bolish wait cannot remember if I am using perhaps the developer version, but line numbers are different.
Mine are 601 (on), 604 (off) and 607 (status).
-
This is what I did on my side :
if (["MONITORTOGGLE", "MONITORSTATUS", "MONITORON"].indexOf(action) !== -1) { screenStatus = exec(monitorStatusCommand, opts, (error, stdout, stderr) => { if (stdout.indexOf("TV is off") !== -1 || stdout.indexOf("false") !== -1) { // REPLACE "TV is off" or "false" by "power status: standby" // Screen is OFF, turn it ON status = "off"; if (action === "MONITORTOGGLE" || action === "MONITORON") { exec(monitorOnCommand, opts, (error, stdout, stderr) => { this.checkForExecError(error, stdout, stderr, res, { monitor: "on" }); }); this.sendSocketNotification("USER_PRESENCE", true); return; } } else if (stdout.indexOf("HDMI") !== -1 || stdout.indexOf("true") !== -1) { // REPLACE "HDMI" OR "true" by "power status: on" // Screen is ON, turn it OFF status = "on"; if (action === "MONITORTOGGLE") { this.monitorControl("MONITOROFF", opts, res); return;
At least this is what worked for me.
-
@bolish what about the previous lines?
I thought that was the part to edit by replacing monitor commands with HDMI CEC ones like mines?
monitorControl: function(action, opts, res) { let status = "unknown"; let monitorOnCommand = (this.initialized && "monitorOnCommand" in this.thisConfig.customCommand) ? this.thisConfig.customCommand.monitorOnCommand : "echo on 0 | cec-client -s -d 1"; let monitorOffCommand = (this.initialized && "monitorOffCommand" in this.thisConfig.customCommand) ? this.thisConfig.customCommand.monitorOffCommand : "echo standby 0 | cec-client -s -d 1"; let monitorStatusCommand = (this.initialized && "monitorStatusCommand" in this.thisConfig.customCommand) ? this.thisConfig.customCommand.monitorStatusCommand : "echo pow 0 | cec-client -s -d 1";