<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Alexa Control with monitortoggle true  --  but these command not work]]></title><description><![CDATA[<p dir="auto">Hello everyone, and a big thank you to the developer of Alexa Control. I’ve successfully installed it, and the Alexa commands are being recognized.</p>
<p dir="auto">Is it possible to ask Alexa to refresh or initialize the commands?</p>
<p dir="auto">Additionally, I’ve been testing the monitor on/off mode. Here’s what I’ve observed: I need to set the DISPLAY environment variable first using “export DISPLAY=:0,” and then the “xrandr” command works.</p>
<p dir="auto">The monitor can be turned off via SSH using the command “xrandr --output HDMI-1 --off” successfully. However, it’s not possible to turn it back on with “xrandr --output HDMI-1 --on.” To turn the monitor back on, I need to use “xxx@raspberrypi:~/MagicMirror $ xrandr --output HDMI-1 --auto --rotate right” because the monitor rotates to the left. Can you please assist me in developing a solution to control this via Alexa?</p>
<p dir="auto">As additional information, I am using a Raspberry Pi 3B with a 32GB SD card, and I have a 17.3-inch LED display with a matte finish that is compatible with the B173RW01 V.4 TOP NHD. To go along with this, I am using the controller: HDMI VGA AV USB LCD Control Panel for 17.3-inch LP173WD1 B173RW01 LTN173KT01-A01 N173FGE-L21 N17306-L02 1600x900 with a 40-pin LCD screen.</p>
]]></description><link>https://forum.magicmirror.builders/topic/18119/mmm-alexa-control-with-monitortoggle-true-but-these-command-not-work</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 02:07:53 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/18119.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Oct 2023 12:57:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 15:50:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chazzer" aria-label="Profile: Chazzer">@<bdi>Chazzer</bdi></a> on your post, which I edited, the code marker was on a line following the word shortly,</p>
<p dir="auto">so the code block did not expand</p>
]]></description><link>https://forum.magicmirror.builders/post/112046</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112046</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 24 Oct 2023 15:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 15:46:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chazzer" aria-label="Profile: Chazzer">@<bdi>Chazzer</bdi></a> said in <a href="/post/112044">MMM-Alexa Control with monitortoggle true -- but these command not work</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
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.</p>
<pre><code>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) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }if(action === 0){
                        exec("xrandr --output HDMI-1 --off", opts, (error, stdout, stderr) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }
                }
            }
</code></pre>
<p dir="auto">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…</p>
</blockquote>
<p dir="auto"><strong>&gt; one minor thing, the code block markers MUST be the first thing on the line</strong></p>
<p dir="auto">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”?</p>
]]></description><link>https://forum.magicmirror.builders/post/112045</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112045</guid><dc:creator><![CDATA[Chazzer]]></dc:creator><pubDate>Tue, 24 Oct 2023 15:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 15:37:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
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.</p>
<pre><code>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) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }if(action === 0){
                        exec("xrandr --output HDMI-1 --off", opts, (error, stdout, stderr) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }
                }
            }
</code></pre>
<p dir="auto">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…</p>
<p dir="auto">one minor thing, the code block markers MUST be the first thing on the line</p>
]]></description><link>https://forum.magicmirror.builders/post/112044</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112044</guid><dc:creator><![CDATA[Chazzer]]></dc:creator><pubDate>Tue, 24 Oct 2023 15:37:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 13:18:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chazzer" aria-label="Profile: Chazzer">@<bdi>Chazzer</bdi></a>  backup see my scripts<br />
<a href="https://github.com/sdetweil/MagicMirror-backup-restore" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/MagicMirror-backup-restore</a></p>
<p dir="auto">and changes, see the post above yours…</p>
]]></description><link>https://forum.magicmirror.builders/post/112041</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112041</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 24 Oct 2023 13:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 13:16:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
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.</p>
<p dir="auto">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!</p>
]]></description><link>https://forum.magicmirror.builders/post/112040</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112040</guid><dc:creator><![CDATA[Chazzer]]></dc:creator><pubDate>Tue, 24 Oct 2023 13:16:25 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Alexa Control with monitortoggle true  --  but these command not work on Tue, 24 Oct 2023 13:17:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chazzer" aria-label="Profile: Chazzer">@<bdi>Chazzer</bdi></a> you will have to edit the node helper and add another option, xrandr, with the appropriate commands</p>
<p dir="auto">this module doesn’t allow you to configure the actual commands used.</p>
<p dir="auto">in node_helper.js replicate  this block (line 249)</p>
<pre><code>            else if(this.config.vcgencmd =='tvservice'){
                device.handler = function(action) {     
                    if(action === 1){
                        exec("tvservice --preferred", opts, (error, stdout, stderr) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }if(action === 0){
                        exec("tvservice --off", opts, (error, stdout, stderr) =&gt; {
                            _this.checkForExecError(error, stdout, stderr);
                        });
                    }
                }
            }
</code></pre>
<p dir="auto">change this</p>
<pre><code>           else if(this.config.vcgencmd =='tvservice'){
</code></pre>
<p dir="auto">to</p>
<pre><code>           else if(this.config.vcgencmd =='xrandr'){
</code></pre>
<p dir="auto">and then change the two exec’s to the xrandr commands you documented…</p>
<p dir="auto">then change the config.js option for vcgencmd to ‘xrandr’</p>
]]></description><link>https://forum.magicmirror.builders/post/112039</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112039</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 24 Oct 2023 13:17:00 GMT</pubDate></item></channel></rss>