<?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-PIR-Sensor is turning off the screen when it detects user?]]></title><description><![CDATA[<p dir="auto">Ive managed to get the PIR Sensor installed, but when I trip the sensor it shuts off my screen. I see in the pm2 logs that MMM-PIR-Sensor is sending a USER_PRESENCE notification.</p>
<p dir="auto">Wondering if anyone has seen this before, or how I can reverse this?</p>
]]></description><link>https://forum.magicmirror.builders/topic/1652/mmm-pir-sensor-is-turning-off-the-screen-when-it-detects-user</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 19:01:22 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/1652.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Feb 2017 13:00:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sun, 05 Feb 2017 03:12:59 GMT]]></title><description><![CDATA[<p dir="auto">Yes you should be able to start everything up… then walk away and see what happens… what I did was once the mirror was loaded I took a towel and covered the PIR Sensor… ;)  Then once the screen went out I took it off and waved my hand in front of it and it came back on :)</p>
]]></description><link>https://forum.magicmirror.builders/post/13650</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13650</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Sun, 05 Feb 2017 03:12:59 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 19:23:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Perfect, so I should expect it to shut off by the time the system loads to the prompt.</p>
<p dir="auto">Yes it has two sensors, one for sensitivity and the other for how long to send the active signal. Suppose I’ll just play around a bit. Maybe i’ll try find the logs for wherever it tells you when cron jobs have run. Not having any luck so far. i might be doing the cron part wrong, i’ve never played around with cron jobs before.</p>
<p dir="auto">Im thinking its the <a href="http://pir.py" target="_blank" rel="noopener noreferrer nofollow ugc">pir.py</a> script as I’ve done the cron job right I think.</p>
<p dir="auto">edit: locations of the startup and shutdown script in <a href="http://pir.py" target="_blank" rel="noopener noreferrer nofollow ugc">pir.py</a> need to be updated! Doh!</p>
]]></description><link>https://forum.magicmirror.builders/post/13614</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13614</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 19:23:15 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 18:11:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mar" aria-label="Profile: Mar">@<bdi>Mar</bdi></a> Because it’s not mirror related it will shut off and turn on if the mirror is running or not … :)</p>
<p dir="auto">Hang in there it took me a bit to get it working … not being sure how the PIR sensor is setup [should be two screw settings on the sensor one is timing the other is sensitivity]…</p>
]]></description><link>https://forum.magicmirror.builders/post/13613</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13613</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Sat, 04 Feb 2017 18:11:20 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 18:09:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Great i’ll move it across and keep it simple. And yes my sensor is installed to your default pin. Just so I can get an idea if its working, when would the screen shut off? Is this before MM loads or after?</p>
]]></description><link>https://forum.magicmirror.builders/post/13611</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13611</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 18:09:13 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 18:05:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mar" aria-label="Profile: Mar">@<bdi>Mar</bdi></a> I kept it really simple on mine… no directories just put the files directly into the root directory… that way didn’t have to figure out paths and such.</p>
<p dir="auto">Also this has to match how your’s is setup… in the <a href="http://pir.py" target="_blank" rel="noopener noreferrer nofollow ugc">pir.py</a> file:</p>
<pre><code>io.setmode(io.BCM)
SHUTOFF_DELAY = 20  # seconds
PIR_PIN = 17        # Pin 11 on the board
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/13609</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13609</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Sat, 04 Feb 2017 18:05:05 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 17:57:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Trying to give this a shot, cloned it into /home/pi/Pir-Sensor/ and changed the shutdown/startup files and confirmed they work, running with sh.</p>
<pre><code>/opt/vc/bin/tvservice --preferred &amp;&amp; sudo chvt 6 &amp;&amp; sudo chvt 2
</code></pre>
<pre><code>#! /bin/bash
/opt/vc/bin/tvservice -o
</code></pre>
<p dir="auto">In my crontab I have:</p>
<pre><code>@reboot python cd /home/pi/Pir-Sensor/pir.py &amp;
</code></pre>
<p dir="auto">but it doenst look like its doing anything on reboot, ive confirmed the sensor is working correctly and i’ve run the chmod commands.</p>
]]></description><link>https://forum.magicmirror.builders/post/13608</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13608</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 17:57:49 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 17:16:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Thanks for the tip, it does seem like a lot less hassle.</p>
]]></description><link>https://forum.magicmirror.builders/post/13602</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13602</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 17:16:21 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 16:55:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mar" aria-label="Profile: Mar">@<bdi>Mar</bdi></a> This is why when I had mine running I ran outside the mirror…</p>
<p dir="auto"><a href="https://github.com/cowboysdude/Pir-Sensor" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/cowboysdude/Pir-Sensor</a></p>
<p dir="auto">The commands for on and off could be replaced with the ones I used then I just ran it at Raspberry pi startup… worked great!</p>
]]></description><link>https://forum.magicmirror.builders/post/13595</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13595</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Sat, 04 Feb 2017 16:55:23 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 16:51:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jopyth" aria-label="Profile: Jopyth">@<bdi>Jopyth</bdi></a><br />
On this line</p>
<pre><code>/opt/vc/bin/tvservice --preferred &amp;&amp; sudo chvt 6 &amp;&amp; sudo chvt 7
</code></pre>
<p dir="auto">changing the 7 to 2 fixed being able to turn the screen back on.</p>
<pre><code>/opt/vc/bin/tvservice --preferred &amp;&amp; sudo chvt 6 &amp;&amp; sudo chvt 2
</code></pre>
<p dir="auto">The only issue im having with this now seems to be that on a reboot the screen stays on if the sensor is not detecting anyone. Tested with a small script to show the sensor is sending a 0. Then when I trigger the sensor after a boot it shuts off the screen but then everything starts working properly.</p>
]]></description><link>https://forum.magicmirror.builders/post/13593</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13593</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 16:51:39 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 16:26:57 GMT]]></title><description><![CDATA[<p dir="auto">Thanks not sure this worked, looks like the screen shuts off still. Looked through the code and found that “/opt/vc/bin/tvservice -o” shuts off my monitor correctly, but “/opt/vc/bin/tvservice --preferred &amp;&amp; sudo chvt 6 &amp;&amp; sudo chvt 7” does not turn it back on. When i try it on the command line it says “Powering on HDMI with preferred settings” but it doesnt turn back on.</p>
<p dir="auto">Also I’m not even sure its shutting down on its own but cant really test that as i dont have a reliable PIR on/off function yet.</p>
<p dir="auto">edit: well it does look like that command turns the monitor back on as the light stops blinking and stays on, but the screen is just blank</p>
]]></description><link>https://forum.magicmirror.builders/post/13589</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13589</guid><dc:creator><![CDATA[Mar]]></dc:creator><pubDate>Sat, 04 Feb 2017 16:26:57 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor is turning off the screen when it detects user? on Sat, 04 Feb 2017 13:44:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mar" aria-label="Profile: Mar">@<bdi>Mar</bdi></a> If it is doing the reverse of what you want, swap the comparison of <code>value == 1</code> and <code>value == 0</code> of <a href="https://github.com/paviro/MMM-PIR-Sensor/blob/master/node_helper.js#L56-L66" target="_blank" rel="noopener noreferrer nofollow ugc">this section</a> in the <code>node_helper.js</code>.</p>
]]></description><link>https://forum.magicmirror.builders/post/13547</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13547</guid><dc:creator><![CDATA[Jopyth]]></dc:creator><pubDate>Sat, 04 Feb 2017 13:44:06 GMT</pubDate></item></channel></rss>