• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-Alexa Control with monitortoggle true -- but these command not work

Scheduled Pinned Locked Moved Solved Troubleshooting
7 Posts 2 Posters 766 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.
  • C Offline
    Chazzer @sdetweil
    last edited by Oct 24, 2023, 1:16 PM

    @sdetweil
    Hi Sam, thanks for your quick help. I’m starting to get a bit anxious. I’m not sure if I can do this and would really appreciate a step-by-step guide. I’m afraid I might mess things up if it goes wrong.

    Can you explain how to make a backup of the Magic Mirror on the Raspberry Pi? My head is spinning with all these thoughts. Go take Timmy for a walk!

    S 1 Reply Last reply Oct 24, 2023, 1:18 PM Reply Quote 0
    • S Offline
      sdetweil @Chazzer
      last edited by Oct 24, 2023, 1:18 PM

      @Chazzer backup see my scripts
      https://github.com/sdetweil/MagicMirror-backup-restore

      and changes, see the post above yours…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chazzer @sdetweil
        last edited by sdetweil Oct 24, 2023, 3:37 PM Oct 24, 2023, 3:23 PM

        @sdetweil
        Dear Sam, I wanted to express my heartfelt thanks. I’ve duplicated the entry and made all the settings accordingly. I must say, I’m thrilled! Alexa can now turn off and on the monitor. I’ll paste in the code snippet shortly.

        else if(this.config.vcgencmd =='xrandr'){
                        device.handler = function(action) {     
                            if(action === 1){
                                exec("xrandr --output HDMI-1 --auto --rotate right", opts, (error, stdout, stderr) => {
                                    _this.checkForExecError(error, stdout, stderr);
                                });
                            }if(action === 0){
                                exec("xrandr --output HDMI-1 --off", opts, (error, stdout, stderr) => {
                                    _this.checkForExecError(error, stdout, stderr);
                                });
                            }
                        }
                    }
        

        now, if you had made a fork, downloaded this fork, changed and used git to commit , and push, you could have contributed this as a pull request for the author to add, so that others could benefit too…

        one minor thing, the code block markers MUST be the first thing on the line

        C 1 Reply Last reply Oct 24, 2023, 3:46 PM Reply Quote 0
        • C Offline
          Chazzer @Chazzer
          last edited by Oct 24, 2023, 3:46 PM

          @Chazzer said in MMM-Alexa Control with monitortoggle true -- but these command not work:

          @sdetweil
          Dear Sam, I wanted to express my heartfelt thanks. I’ve duplicated the entry and made all the settings accordingly. I must say, I’m thrilled! Alexa can now turn off and on the monitor. I’ll paste in the code snippet shortly.

          else if(this.config.vcgencmd =='xrandr'){
                          device.handler = function(action) {     
                              if(action === 1){
                                  exec("xrandr --output HDMI-1 --auto --rotate right", opts, (error, stdout, stderr) => {
                                      _this.checkForExecError(error, stdout, stderr);
                                  });
                              }if(action === 0){
                                  exec("xrandr --output HDMI-1 --off", opts, (error, stdout, stderr) => {
                                      _this.checkForExecError(error, stdout, stderr);
                                  });
                              }
                          }
                      }
          

          now, if you had made a fork, downloaded this fork, changed and used git to commit , and push, you could have contributed this as a pull request for the author to add, so that others could benefit too…

          > one minor thing, the code block markers MUST be the first thing on the line

          Hello Sam, I’m really a newcomer to the world of Linux and Magic Mirror! :-) The developer seems informed, already through my first forum post, and I’ve already sent him the corresponding code snippet. I don’t quite understand if the code is faulty. Could you please show me what you mean by “one minor thing, the code block markers MUST be the first thing on the line”?

          S 1 Reply Last reply Oct 24, 2023, 3:49 PM Reply Quote 0
          • S Offline
            sdetweil @Chazzer
            last edited by sdetweil Oct 24, 2023, 3:50 PM Oct 24, 2023, 3:49 PM

            @Chazzer on your post, which I edited, the code marker was on a line following the word shortly,

            so the code block did not expand

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              7/7
              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