MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-MMM-Remote-Control monitor problem

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 1.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      off112
      last edited by

      Hi,

      I can’t turn on my monitor after I upgraded to debian buster.
      I tried to change the node_helper.js to:

      let monitorOnCommand = (this.initialized && "monitorOnCommand" in this.thisConfig.customCommand) ?
                      this.thisConfig.customCommand.monitorOnCommand :
                      "vcgencmd display_power 1";
                  let monitorOffCommand = (this.initialized && "monitorOffCommand" in this.thisConfig.customCommand) ?
                      this.thisConfig.customCommand.monitorOffCommand :
                      "vcgencmd display_power 0";
                  let monitorStatusCommand = (this.initialized && "monitorStatusCommand" in this.thisConfig.customCommand) ?
                      this.thisConfig.customCommand.monitorStatusCommand :
                      "tvservice --status";
      

      But I can only turn off the monitor, not turn it on again. Is there a fix to this problem?

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil
        last edited by

        Does this work from command line (via ssh with screen off)

        vcgencmd display_power 1
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • O Offline
          off112
          last edited by

          For some reason it started to work.

          But I’m not sure how to do to get the monitor status to work.

          I have tried to make these changes. But it doesn’t work:

            monitorControl: function(action, opts, res) {
                      let status = "unknown";
                      let monitorOnCommand = (this.initialized && "monitorOnCommand" in this.thisConfig.customCommand) ?
                          this.thisConfig.customCommand.monitorOnCommand :
                          "vcgencmd display_power 1";
                      let monitorOffCommand = (this.initialized && "monitorOffCommand" in this.thisConfig.customCommand) ?
                          this.thisConfig.customCommand.monitorOffCommand :
                          "vcgencmd display_power 0";
                      let monitorStatusCommand = (this.initialized && "monitorStatusCommand" in this.thisConfig.customCommand) ?
                          this.thisConfig.customCommand.monitorStatusCommand :
                          "vcgencmd display_power";
                      if (["MONITORTOGGLE", "MONITORSTATUS", "MONITORON"].indexOf(action) !== -1) {
                          screenStatus = exec(monitorStatusCommand, opts, (error, stdout, stderr) => {
                              if (stdout.indexOf("display_power=0") !== -1 || stdout.indexOf("0") !== -1) {
                                  // 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) {
                                  // Screen is ON, turn it OFF
                                  status = "on";
                                  if (action === "MONITORTOGGLE") {
                                      this.monitorControl("MONITOROFF", opts, res);
                                      return;
                                  }
                              }
                              this.checkForExecError(error, stdout, stderr, res, { monitor: status });
                              return;
                          });
          
          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy