<?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[2 Mirrors and one Sensor ( MMM-PIR-Sensor )]]></title><description><![CDATA[<p dir="auto">is it posible to add only one sensor to 2 Raspberry Pi?<br />
Regards</p>
]]></description><link>https://forum.magicmirror.builders/topic/9760/2-mirrors-and-one-sensor-mmm-pir-sensor</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 08:19:09 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/9760.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Feb 2019 11:37:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 12:21:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/binia" aria-label="Profile: binia">@<bdi>binia</bdi></a> very cool implementation!</p>
]]></description><link>https://forum.magicmirror.builders/post/53745</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53745</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 06 Mar 2019 12:21:37 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 11:45:16 GMT]]></title><description><![CDATA[<p dir="auto">Here is a simple example for using <code>MMM-NotificationTrigger</code>. Not tested, but you can catch the concept.</p>
<p dir="auto"><strong>Assumption</strong></p>
<ul>
<li>RPI_A
<ul>
<li>MM IP : 192.168.178.101:8080</li>
<li>PIR_SENSOR is installed</li>
<li>This will emit notification <code>"USER_PRESENCE"</code> with payload <code>true/false</code></li>
</ul>
</li>
<li>RPI_B
<ul>
<li>MM IP : 192.168.178.102:8080</li>
<li>PIR_SENSOR IS not installed.</li>
<li>It needs payload value of <code>USER_PRESENCE</code> from RPI_A</li>
</ul>
</li>
</ul>
<p dir="auto"><strong>RPI_A MMM-NotificationTrigger config</strong></p>
<pre><code class="language-js">{
  module: "MMM-NotificationTrigger",
  config: {
    triggers: [
      {
        trigger: "USER_PRESENCE",
        triggerPayloadFilter: (payload) =&gt; {
          return payload
        },
        fires: [
          {
            fire: "DUMMY_NOTIFICATION",
            exec: `curl -d "notification=RELAYED_USER_PRESENCE&amp;payload=true" http://192.168.178.102:8080/webhook`
          }
        ]
      },
      {
        trigger: "USER_PRESENCE",
        triggerPayloadFilter: (payload) =&gt; {
          return !payload
        },
        fires: [
          {
            fire: "DUMMY_NOTIFICATION",
            exec: `curl -d "notification=RELAYED_USER_PRESENCE&amp;payload=false" http://192.168.178.102:8080/webhook`
          }
        ]
      },
    ]
  }
},
</code></pre>
<p dir="auto">If <code>USER_PRESENCE</code> notification is emitted from MMM-PIR-Sensor, it will be translated to <code>DUMMY_NOTIFICATION</code> and <code>curl</code> shell command will be executed to transfer message(RELAYED_USER_PRESENCE) to RPI_B</p>
<p dir="auto"><strong>RPI_B MMM-NotificationTrigger config</strong></p>
<pre><code class="language-js">{
  module: "MMM-NotificationTrigger",
  config: {
    useWebhook: true,
    triggers: [
      {
        trigger: "RELAYED_USER_PRESENCE",
        fires: [
          {
            fire: "DOING_MY_JOB",
            payload: (payload) =&gt; {
              return (payload == "true") ?  true : false
            }
          }
        ]
      }
    ]
  }
},
</code></pre>
<p dir="auto">By <code>useWebhook:true</code> it can listen message from RPI_A. When <code>RELAYED_USER_PRESENCE</code> is coming, <code>DOING_MY_JOB</code> (or whatever you want) notification will be emitted on RPI_B</p>
]]></description><link>https://forum.magicmirror.builders/post/53744</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53744</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 06 Mar 2019 11:45:16 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 10:10:54 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your answer.<br />
I will try it.</p>
]]></description><link>https://forum.magicmirror.builders/post/53741</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53741</guid><dc:creator><![CDATA[binia]]></dc:creator><pubDate>Wed, 06 Mar 2019 10:10:54 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 08:57:54 GMT]]></title><description><![CDATA[<p dir="auto">You can install one PIR on one RPI(A).<br />
Then, you can modify or build a module to send HTTPRequest to other RPI(B) on RPI(A) which has PIR sensor<br />
Then, you can also modify or build a module to catch HTTPRequest on RPI(B) to use it as a signal for your job.</p>
<ul>
<li>MMM-PIR-Sensor (RPI(A)) : You can modify <code>socektNotificationReceived()</code> to emit your custom notification,<br />
Or send HTTPRequest directly to RPI(B)</li>
<li>MMM-NotificationTrigger (RPI(A)) : Or you can translate notification from MMM-PIR-Sensor to your custom notification for further relayed module,<br />
Or you can execute directly external shell command/internal javascript for sending HTTPRequest when notification is coming from MMM-PIR-Sensor</li>
<li>Or … you can build your own module for this job.</li>
</ul>
<hr />
<ul>
<li>MMM-Remote-Controller (RPI(B)) : You can get HTTPRequest from RPI(A) to do something</li>
<li>MMM-NotificationTrigger(RPI(B)) : This module also can catch HTTPRequest and do something</li>
<li>Or … you can build your module for this job.</li>
</ul>
<hr />
<ul>
<li>Or you can make scripts with javascript or python or any other language to communicate between two RPIs. It will be not so difficult to expert, but…</li>
</ul>
]]></description><link>https://forum.magicmirror.builders/post/53739</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53739</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 06 Mar 2019 08:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 08:39:37 GMT]]></title><description><![CDATA[<p dir="auto">its 160cm x 65cm<br />
One is a TV and one a Display</p>
]]></description><link>https://forum.magicmirror.builders/post/53738</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53738</guid><dc:creator><![CDATA[binia]]></dc:creator><pubDate>Wed, 06 Mar 2019 08:39:37 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Wed, 06 Mar 2019 08:37:11 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1551861411335-img_20180916_150055-resized.jpg" alt="0_1551861410991_IMG_20180916_150055.jpg" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1551861416267-img_20180916_150101-resized.jpg" alt="0_1551861416010_IMG_20180916_150101.jpg" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1551861420438-img_20181218_144954-resized.jpg" alt="0_1551861420245_IMG_20181218_144954.jpg" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1551861424615-img_20181218_145005-resized.jpg" alt="0_1551861424435_IMG_20181218_145005.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/53737</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53737</guid><dc:creator><![CDATA[binia]]></dc:creator><pubDate>Wed, 06 Mar 2019 08:37:11 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Tue, 05 Mar 2019 13:39:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/binia" aria-label="Profile: binia">@<bdi>binia</bdi></a> oh!.. you have two monitors inside your single mirror!.. wow…</p>
<p dir="auto">all u need is the signal pin of the PIR… and connect the grounds together on the two PI devices…</p>
<p dir="auto">otherwise you could have one PI send a MMM message to the other to wakeup…</p>
]]></description><link>https://forum.magicmirror.builders/post/53697</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53697</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 05 Mar 2019 13:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Tue, 05 Mar 2019 13:35:15 GMT]]></title><description><![CDATA[<p dir="auto">Sorry for my bad English.</p>
<p dir="auto">I have 2 Magic.Mirrors in a mirror and just wanted to use 1 PIR module for both.</p>
<p dir="auto">Therefore the question if this is technically possible or if I have to use a module for each raspberry.</p>
]]></description><link>https://forum.magicmirror.builders/post/53695</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53695</guid><dc:creator><![CDATA[binia]]></dc:creator><pubDate>Tue, 05 Mar 2019 13:35:15 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Mon, 04 Mar 2019 11:34:51 GMT]]></title><description><![CDATA[<p dir="auto">sorry, do not understand question… typically one uses ONLY 1 PIR sensor…</p>
]]></description><link>https://forum.magicmirror.builders/post/53631</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53631</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 04 Mar 2019 11:34:51 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Mirrors and one Sensor ( MMM-PIR-Sensor ) on Mon, 04 Mar 2019 11:26:41 GMT]]></title><description><![CDATA[<p dir="auto">noone?<br />
I have in 1 Mirror 2 Display and Pi and want to add a sensor.</p>
]]></description><link>https://forum.magicmirror.builders/post/53628</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/53628</guid><dc:creator><![CDATA[binia]]></dc:creator><pubDate>Mon, 04 Mar 2019 11:26:41 GMT</pubDate></item></channel></rss>