<?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 Guide with Edits and Updates]]></title><description><![CDATA[<p dir="auto">I recently got the  MMM-PIR-Sensor up and going and it’s working flawlessly. I wanted to give a little information as I had to parse this from different sources and some of the info is a bit dated.</p>
<p dir="auto">I am relatively new to pi in general so definitely point it out if something isn’t right.</p>
<p dir="auto">Below is a step by step for <a href="https://github.com/paviro/MMM-PIR-Sensor" target="_blank" rel="noopener noreferrer nofollow ugc">MMM-PIR-Sensor</a> by <a href="https://github.com/paviro" target="_blank" rel="noopener noreferrer nofollow ugc">paviro</a>.</p>
<p dir="auto">Navigate to your modules folder at <code>cd ~/MagicMirror/modules</code><br />
Execute <code>git clone https://github.com/paviro/MMM-PIR-Sensor.git</code><br />
Navigate to <code>cd ~/MagicMirror/modules/MMM-PIR-Sensor</code></p>
<p dir="auto"><strong>This is one area I got held up</strong><br />
The guide states to perform an <code>npm install</code> where a dated version(2.25) of wiring-pi would be installed.<br />
When issuing the command <code>gpio -v</code>, I would get an error message “Unable to determine hardware version. I see: Hardware : BCM2835 - expecting BCM2708 or BCM2709. Please report this to <a href="mailto:project@drogon.net" target="_blank" rel="noopener noreferrer nofollow ugc">project@drogon.net</a>”.</p>
<p dir="auto">Instead use <code>npm install wiring-pi</code> inside your MMM-PIR-Sensor folder. This will install the updated version(2.44) which you can verify with <code>gpio -v</code>.</p>
<p dir="auto">Then issue command <code>sudo usermod -a -G gpio pi</code><br />
Then <code>sudo chmod u+s /opt/vc/bin/tvservice &amp;&amp; sudo chmod u+s /bin/chvt</code></p>
<p dir="auto">The guide says to reboot here but after that, it still wasn’t working for me. Then I stumbled on some excellent advice from the forums <a href="https://forum.magicmirror.builders/topic/848/mmm-pir-off-delay">here</a> from <a class="plugin-mentions-user plugin-mentions-a" href="/user/jamesmm" aria-label="Profile: JamesMM">@<bdi>JamesMM</bdi></a> with @strawberry 3.141 contributing.</p>
<p dir="auto">Their focus was on the node_helper.js within the module. These are their edits.</p>
<p dir="auto">First, rename the current file. <code>mv node_helper.js node_helper_backup.js</code></p>
<p dir="auto">Now, create a new file called node_helper.js using <code>sudo nano node_helper.js</code></p>
<p dir="auto">Copy and paste this code</p>
<pre><code>'use strict';

/* Magic Mirror
 * Module: MMM-PIR-Sensor
 *
 * By Paul-Vincent Roll http://paulvincentroll.com
 * MIT Licensed.
 */

const NodeHelper = require('node_helper');
const Gpio = require('onoff').Gpio;
const exec = require('child_process').exec;

module.exports = NodeHelper.create({
  start: function()
{
    this.started = false;
},

  activateMonitor: function()
{
    if (this.config.relayPIN != false)
    {
        this.relay.writeSync(this.config.relayOnState);
    }
    else if (this.config.relayPIN == false)
    {
        // Check if hdmi output is already on
        exec("/opt/vc/bin/tvservice -s").stdout.on('data', function(data) {
            if (data.indexOf("0x120002") !== -1)
                exec("/opt/vc/bin/tvservice --preferred &amp;&amp; chvt 6 &amp;&amp; chvt 7", null);
        });
    }
},

  deactivateMonitor: function()
{
    if (this.config.relayPIN != false)
    {
        this.relay.writeSync(this.config.relayOffState);
    }
    else if (this.config.relayPIN == false)
    {
        exec("/opt/vc/bin/tvservice -o", null);
    }
},

  // Subclass socketNotificationReceived received.
  socketNotificationReceived: function(notification, payload)
{
    if (notification === 'CONFIG' &amp;&amp; this.started == false)
    {
        const self = this;
        this.config = payload;
        self.timer = null;
        self.onState = 0;

        // Setup value which represent on and off
        const valueOn = this.config.invertSensorValue ? 0 : 1;
        const valueOff = this.config.invertSensorValue ? 1 : 0;

        //Log.info('PIR: ' + this.name);

        //Setup pins
        this.pir = new Gpio(this.config.sensorPIN, 'in', 'both');

        if (this.config.relayPIN)
        {
            this.relay = new Gpio(this.config.relayPIN, 'out');
            this.relay.writeSync(this.config.relayOnState);
            exec("/opt/vc/bin/tvservice --preferred &amp;&amp; sudo chvt 6 &amp;&amp; sudo chvt 7", null);
        }

        //Detected movement
        this.pir.watch(function(err, value) {
            if (value == 1)
            {
                clearTimeout(self.timer);
                if (self.onState != 1)
                {
                    self.sendSocketNotification("USER_PRESENCE", true);
                    if (self.config.powerSaving)
                    {
                        self.activateMonitor();
                        self.onState = 1;
                    }
                }
            }
            else if (value == 0)
            {
                if (self.onState != 0)
                {
                    self.timer = setTimeout(function(){
                        self.sendSocketNotification("USER_PRESENCE", false);
                        if (self.config.powerSaving)
                        {
                            self.deactivateMonitor();
                            self.onState = 0;
                        }
                    }, self.config.offDelay);
                }
            }
        });

        this.started = true;

    }
    else if (notification === 'SCREEN_WAKEUP')
    {
        this.activateMonitor();
    }
}

});
</code></pre>
<p dir="auto">This creates a new config called offDelay and it is in configurable in milliseconds.<br />
Reboot your pi.</p>
<p dir="auto">Then add the modules configuration to MM’s config.js. I used this but obviously adjust it to your own needs.</p>
<pre><code>	{
		module: 'MMM-PIR-Sensor',
		config: {
			sensorPIN: 22,
			powerSaving: true,
			offDelay: 30000,
		}
	}
</code></pre>
<p dir="auto">The offDelay of 30000 is 30 seconds.</p>
]]></description><link>https://forum.magicmirror.builders/topic/5521/mmm-pir-sensor-guide-with-edits-and-updates</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 01:42:56 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/5521.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Nov 2017 23:09:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Sun, 20 Feb 2022 06:37:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bugsounet" aria-label="Profile: bugsounet">@<bdi>bugsounet</bdi></a> my apologies. I have deleted the post.</p>
]]></description><link>https://forum.magicmirror.builders/post/99766</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/99766</guid><dc:creator><![CDATA[sparxx]]></dc:creator><pubDate>Sun, 20 Feb 2022 06:37:00 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Mon, 14 Feb 2022 07:00:11 GMT]]></title><description><![CDATA[<p dir="auto">Please no ads of any of my modules<br />
If no one respect this rules. I will make private it</p>
]]></description><link>https://forum.magicmirror.builders/post/99578</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/99578</guid><dc:creator><![CDATA[bugsounet]]></dc:creator><pubDate>Mon, 14 Feb 2022 07:00:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Fri, 18 Dec 2020 22:49:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/feedy88" aria-label="Profile: Feedy88">@<bdi>Feedy88</bdi></a><br />
Works with out any problems, much better solution then MMM-PIR-Sensor.<br />
Thanks</p>
]]></description><link>https://forum.magicmirror.builders/post/85856</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/85856</guid><dc:creator><![CDATA[sebfas]]></dc:creator><pubDate>Fri, 18 Dec 2020 22:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Mon, 27 Jul 2020 19:23:44 GMT]]></title><description><![CDATA[<p dir="auto">Thanks guys, sorry for the late response! It’s the summer holidays so I’ve been doing daddy day care. I’ll try removing the module and reinstalling it. I’ll keep you posted.</p>
]]></description><link>https://forum.magicmirror.builders/post/79227</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79227</guid><dc:creator><![CDATA[dubalda]]></dc:creator><pubDate>Mon, 27 Jul 2020 19:23:44 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Wed, 22 Jul 2020 17:16: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> looks like the wrong compiler level being used for the recompile.</p>
]]></description><link>https://forum.magicmirror.builders/post/79031</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79031</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 22 Jul 2020 17:16:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Wed, 22 Jul 2020 17:12:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fozi" aria-label="Profile: Fozi">@<bdi>Fozi</bdi></a> rm -rf foldername will recursively remove all folders and content from foldername</p>
]]></description><link>https://forum.magicmirror.builders/post/79030</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79030</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 22 Jul 2020 17:12:39 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Wed, 22 Jul 2020 16:47:06 GMT]]></title><description><![CDATA[<p dir="auto">I‘d delete the module and re-install it. Obviously you haven’t changed any code (no info on stashing in the log). Your configuration will not be affected when you delete the module, it‘ll persist in config. js.</p>
<ol>
<li>stop all processes with entering pm2 stop all.</li>
<li>cd to the module folder and enter: sudo rm -R MMM-PIR-Sensor. This will recursively remove the MMM-PIR-Sensor folder and it’s contents.</li>
<li>Re-install the module as described on GitHub. The installation build process should run through without errors.</li>
<li>Reboot</li>
</ol>
]]></description><link>https://forum.magicmirror.builders/post/79029</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79029</guid><dc:creator><![CDATA[Fozi]]></dc:creator><pubDate>Wed, 22 Jul 2020 16:47:06 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Mon, 20 Jul 2020 20:31:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fozi" aria-label="Profile: Fozi">@<bdi>Fozi</bdi></a> thank you for coming back to me. Here are the error messages I’m getting…apologies if it’s quite long! I unfortunately wasn’t able to upload the log file.</p>
<p dir="auto">pi@pi:~/MagicMirror/modules/MMM-PIR-Sensor $ git pull<br />
Updating be81cf0…d4831f2<br />
Fast-forward<br />
<a href="http://README.md" target="_blank" rel="noopener noreferrer nofollow ugc">README.md</a>      | 14 ++++++++++++++<br />
node_helper.js | 46 ++++++++++++++++++++++++++++++++++++++++++++±<br />
2 files changed, 59 insertions(+), 1 deletion(-)<br />
pi@pi:~/MagicMirror/modules/MMM-PIR-Sensor $ npm install</p>
<blockquote>
<p dir="auto">Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall /home/pi/MagicMirror/modules/MMM-PIR-Sensor<br />
electron-rebuild -e …/…/node_modules/electron</p>
</blockquote>
<p dir="auto">â Rebuild Failed</p>
<p dir="auto">An unhandled error occurred inside electron-rebuild<br />
make: Entering directory ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019/build’<br />
CXX(target) Release/obj.target/wiringPi/src/addon.o<br />
In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14,<br />
from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25,<br />
from …/src/addon.h:4,<br />
from …/src/addon.cc:1:<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]<br />
declarator <strong>attribute</strong>((deprecated(message)))<br />
^<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’<br />
V8_DEPRECATE_SOON("Use <em>WithData version.",<br />
^~~~~~~~~~~~~~~~~<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]<br />
declarator <strong>attribute</strong>((deprecated(message)))<br />
^<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’<br />
V8_DEPRECATE_SOON("Use <em>WithData version.",<br />
^~~~~~~~~~~~~~~~~<br />
In file included from …/src/addon.cc:1:<br />
…/src/addon.h:12:28: error: ‘Handle’ is not a member of ‘v8’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:12:44: error: expected primary-expression before ‘&gt;’ token<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:12:46: error: ‘val’ was not declared in this scope<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:13:28: error: redefinition of ‘bool node::Buffer::HasInstance’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:12:12: note: ‘bool node::Buffer::HasInstance’ previously defined here<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~~~~~~<br />
…/src/addon.h:13:28: error: ‘Handle’ is not a member of ‘v8’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:13:45: error: expected primary-expression before ‘&gt;’ token<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:13:47: error: ‘val’ was not declared in this scope<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.h:14:22: error: ‘Handle’ is not a member of ‘v8’<br />
char</em> Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:14:38: error: expected primary-expression before ‘&gt;’ token<br />
char</em> Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:14:40: error: ‘val’ was not declared in this scope<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:15:22: error: redefinition of ‘char* node::Buffer::Data’<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:14:13: note: ‘char* node::Buffer::Data’ previously defined here<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~<br />
…/src/addon.h:15:22: error: ‘Handle’ is not a member of ‘v8’<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:15:39: error: expected primary-expression before ‘&gt;’ token<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:15:41: error: ‘val’ was not declared in this scope<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.h:16:25: error: ‘Handle’ is not a member of ‘v8’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:16:41: error: expected primary-expression before ‘&gt;’ token<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:16:43: error: ‘val’ was not declared in this scope<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:17:25: error: redefinition of ‘size_t node::Buffer::Length’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:16:14: note: ‘size_t node::Buffer::Length’ previously defined here<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:17:25: error: ‘Handle’ is not a member of ‘v8’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:17:42: error: expected primary-expression before ‘&gt;’ token<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:17:44: error: ‘val’ was not declared in this scope<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.cc: In function ‘void throw_error(v8::Isolate*, const char*, …)’:<br />
…/src/addon.cc:35:90: error: no matching function for call to ‘v8::Exception::Error(v8::MaybeLocal<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>)’<br />
isolate-&gt;ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(isolate, buffer)));<br />
^<br />
In file included from …/src/addon.h:4,<br />
from …/src/addon.cc:1:<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:6538:23: note: candidate: ‘static v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> v8::Exception::Error(v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>)’<br />
static Local Error(Local message);<br />
^~~~~<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:6538:23: note:   no known conversion for argument 1 from ‘v8::MaybeLocal<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>’ to ‘v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>’<br />
make: *** [<a href="http://wiringPi.target.mk:147" target="_blank" rel="noopener noreferrer nofollow ugc">wiringPi.target.mk:147</a>: Release/obj.target/wiringPi/src/addon.o] Error 1<br />
make: Leaving directory ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019/build’<br />
gyp ERR! build error<br />
gyp ERR! stack Error: <code>make</code> failed with exit code: 2<br />
gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-gyp/lib/build.js:194:23)<br />
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)<br />
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)<br />
gyp ERR! System Linux 4.19.118-v7l+<br />
gyp ERR! command “/usr/bin/node” “/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/.bin/node-gyp” “rebuild” “–target=6.1.7” “–arch=arm” “–dist-url=<a href="https://www.electronjs.org/headers" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.electronjs.org/headers</a>” “–build-from-source”<br />
gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019<br />
gyp ERR! node -v v10.21.0<br />
gyp ERR! node-gyp -v v6.1.0<br />
gyp ERR! not ok</p>
<p dir="auto">Failed with exit code: 1</p>
<p dir="auto">Error: make: Entering directory ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019/build’<br />
CXX(target) Release/obj.target/wiringPi/src/addon.o<br />
In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14,<br />
from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25,<br />
from …/src/addon.h:4,<br />
from …/src/addon.cc:1:<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]<br />
declarator <strong>attribute</strong>((deprecated(message)))<br />
^<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’<br />
V8_DEPRECATE_SOON("Use <em>WithData version.",<br />
^~~~~~~~~~~~~~~~~<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]<br />
declarator <strong>attribute</strong>((deprecated(message)))<br />
^<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’<br />
V8_DEPRECATE_SOON("Use <em>WithData version.",<br />
^~~~~~~~~~~~~~~~~<br />
In file included from …/src/addon.cc:1:<br />
…/src/addon.h:12:28: error: ‘Handle’ is not a member of ‘v8’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:12:44: error: expected primary-expression before ‘&gt;’ token<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:12:46: error: ‘val’ was not declared in this scope<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:13:28: error: redefinition of ‘bool node::Buffer::HasInstance’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:12:12: note: ‘bool node::Buffer::HasInstance’ previously defined here<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~~~~~~<br />
…/src/addon.h:13:28: error: ‘Handle’ is not a member of ‘v8’<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:13:45: error: expected primary-expression before ‘&gt;’ token<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:13:47: error: ‘val’ was not declared in this scope<br />
bool HasInstance(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.h:14:22: error: ‘Handle’ is not a member of ‘v8’<br />
char</em> Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:14:38: error: expected primary-expression before ‘&gt;’ token<br />
char</em> Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:14:40: error: ‘val’ was not declared in this scope<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:15:22: error: redefinition of ‘char* node::Buffer::Data’<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:14:13: note: ‘char* node::Buffer::Data’ previously defined here<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~<br />
…/src/addon.h:15:22: error: ‘Handle’ is not a member of ‘v8’<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:15:39: error: expected primary-expression before ‘&gt;’ token<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:15:41: error: ‘val’ was not declared in this scope<br />
char* Data(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.h:16:25: error: ‘Handle’ is not a member of ‘v8’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:16:41: error: expected primary-expression before ‘&gt;’ token<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^<br />
…/src/addon.h:16:43: error: ‘val’ was not declared in this scope<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~<br />
…/src/addon.h:17:25: error: redefinition of ‘size_t node::Buffer::Length’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:16:14: note: ‘size_t node::Buffer::Length’ previously defined here<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> val);<br />
^~~~~~<br />
…/src/addon.h:17:25: error: ‘Handle’ is not a member of ‘v8’<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~~~~<br />
…/src/addon.h:17:42: error: expected primary-expression before ‘&gt;’ token<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^<br />
…/src/addon.h:17:44: error: ‘val’ was not declared in this scope<br />
size_t Length(v8::Handle<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Object</a> val);<br />
^~~<br />
…/src/addon.cc: In function ‘void throw_error(v8::Isolate*, const char*, …)’:<br />
…/src/addon.cc:35:90: error: no matching function for call to ‘v8::Exception::Error(v8::MaybeLocal<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>)’<br />
isolate-&gt;ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(isolate, buffer)));<br />
^<br />
In file included from …/src/addon.h:4,<br />
from …/src/addon.cc:1:<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:6538:23: note: candidate: ‘static v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::Value</a> v8::Exception::Error(v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>)’<br />
static Local Error(Local message);<br />
^~~~~<br />
/home/pi/.electron-gyp/6.1.7/include/node/v8.h:6538:23: note:   no known conversion for argument 1 from ‘v8::MaybeLocal<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>’ to ‘v8::Local<a target="_blank" rel="noopener noreferrer nofollow ugc">v8::String</a>’<br />
make: *** [<a href="http://wiringPi.target.mk:147" target="_blank" rel="noopener noreferrer nofollow ugc">wiringPi.target.mk:147</a>: Release/obj.target/wiringPi/src/addon.o] Error 1<br />
make: Leaving directory ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019/build’<br />
gyp ERR! build error<br />
gyp ERR! stack Error: <code>make</code> failed with exit code: 2<br />
gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-gyp/lib/build.js:194:23)<br />
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)<br />
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)<br />
gyp ERR! System Linux 4.19.118-v7l+<br />
gyp ERR! command “/usr/bin/node” “/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/.bin/node-gyp” “rebuild” “–target=6.1.7” “–arch=arm” “–dist-url=<a href="https://www.electronjs.org/headers" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.electronjs.org/headers</a>” “–build-from-source”<br />
gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi-2019<br />
gyp ERR! node -v v10.21.0<br />
gyp ERR! node-gyp -v v6.1.0<br />
gyp ERR! not ok</p>
<p dir="auto">Failed with exit code: 1<br />
at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/spawn-rx/lib/src/index.js:267:84)<br />
at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)<br />
at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:156:26)<br />
at Subscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)<br />
at Subscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)<br />
at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)<br />
at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)<br />
at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/spawn-rx/lib/src/index.js:242:65)<br />
at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)<br />
at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:143:22)<br />
npm ERR! code ELIFECYCLE<br />
npm ERR! errno 255<br />
npm ERR! Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall: <code>electron-rebuild -e ../../node_modules/electron</code><br />
npm ERR! Exit status 255<br />
npm ERR!<br />
npm ERR! Failed at the Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall script.<br />
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.</p>
<p dir="auto">npm ERR! A complete log of this run can be found in:<br />
npm ERR!     /home/pi/.npm/_logs/2020-07-16T09_45_07_608Z-debug.log<br />
[0_1595277021862_PIR-Sensor Error logs.txt](Uploading 100%)</p>
]]></description><link>https://forum.magicmirror.builders/post/78941</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78941</guid><dc:creator><![CDATA[dubalda]]></dc:creator><pubDate>Mon, 20 Jul 2020 20:31:10 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Thu, 16 Jul 2020 18:40:53 GMT]]></title><description><![CDATA[<p dir="auto">I am curious to know if there is a benefit by using the MM-Module for the PIR vs. the executable script which can be autostarted with pm2 (as per <a href="https://forum.magicmirror.builders/topic/9424/using-a-pir-sensor-to-turn-off-the-monitor">this</a> tutorial). Can anyone help?</p>
]]></description><link>https://forum.magicmirror.builders/post/78662</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78662</guid><dc:creator><![CDATA[Feedy88]]></dc:creator><pubDate>Thu, 16 Jul 2020 18:40:53 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Thu, 16 Jul 2020 15:40:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dubalda" aria-label="Profile: dubalda">@<bdi>dubalda</bdi></a> can you elaborate more detailed the failure, e.g, error message or similar?</p>
]]></description><link>https://forum.magicmirror.builders/post/78632</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78632</guid><dc:creator><![CDATA[Fozi]]></dc:creator><pubDate>Thu, 16 Jul 2020 15:40:07 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Thu, 16 Jul 2020 10:06:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi all, unfortunately I’m not too familiar with coding but had this module failed to update today having followed the steps above which worked fine with the previous version.</p>
<p dir="auto">Has anyone else experienced this?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.magicmirror.builders/post/78597</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78597</guid><dc:creator><![CDATA[dubalda]]></dc:creator><pubDate>Thu, 16 Jul 2020 10:06:39 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Sun, 09 Feb 2020 02:42:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/msherwood" aria-label="Profile: msherwood">@<bdi>msherwood</bdi></a> Hey FYI I just got my lastest build (from scratch yesterday) working with MMM-PIR-Sensor:</p>
<p dir="auto">I also found that <code>npm install wiring-pi</code> installed the old (2.25) version for me. I found a newer library:</p>
<p dir="auto"><code>npm install wiring-pi-2019</code></p>
<p dir="auto">which installs version 2.5 (this one works on my pi4!).</p>
<p dir="auto">I also found that  the location of the <code>tvservice</code> binary has changed, so I just used the following bash commands:</p>
<pre><code>sudo chmod u+s `which tvservice`
sudo chmod u+s `which chvt`
</code></pre>
<p dir="auto">It then worked for me (Note, I did not modify the <code>node_helper.js</code> script at all.)</p>
]]></description><link>https://forum.magicmirror.builders/post/69303</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/69303</guid><dc:creator><![CDATA[ardentaardvark]]></dc:creator><pubDate>Sun, 09 Feb 2020 02:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Fri, 24 Jan 2020 20:03:56 GMT]]></title><description><![CDATA[<p dir="auto">shit, this killed my MM build…it’s all blank…crap</p>
]]></description><link>https://forum.magicmirror.builders/post/68584</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68584</guid><dc:creator><![CDATA[msherwood]]></dc:creator><pubDate>Fri, 24 Jan 2020 20:03:56 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Fri, 04 Oct 2019 18:19:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stacheenthusiast" aria-label="Profile: StacheEnthusiast">@<bdi>StacheEnthusiast</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/dava" aria-label="Profile: DavA">@<bdi>DavA</bdi></a> Hey, I just decided to try and install MMM-PIR-Sensor but am running into the same issue.<br />
I was wondering if you ever did get this working as the directions have stated…</p>
]]></description><link>https://forum.magicmirror.builders/post/62121</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/62121</guid><dc:creator><![CDATA[FruityBebbles]]></dc:creator><pubDate>Fri, 04 Oct 2019 18:19:22 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Tue, 05 Dec 2017 13:56:40 GMT]]></title><description><![CDATA[<p dir="auto">I followed your guide but i still get version 2.25 when i use npm install wiring-pi.<br />
Any ideas why?</p>
]]></description><link>https://forum.magicmirror.builders/post/31980</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/31980</guid><dc:creator><![CDATA[DavA]]></dc:creator><pubDate>Tue, 05 Dec 2017 13:56:40 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Wed, 15 Nov 2017 02:46:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a></p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.magicmirror.builders/post/31147</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/31147</guid><dc:creator><![CDATA[StacheEnthusiast]]></dc:creator><pubDate>Wed, 15 Nov 2017 02:46:28 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-PIR-Sensor Guide with Edits and Updates on Wed, 15 Nov 2017 02:12:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stacheenthusiast" aria-label="Profile: StacheEnthusiast">@<bdi>StacheEnthusiast</bdi></a></p>
<p dir="auto">I like people who write guides! I don’t use a PIR sensor but I do appreciate the time and effort you put in on everyone’s behalf.</p>
]]></description><link>https://forum.magicmirror.builders/post/31138</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/31138</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Wed, 15 Nov 2017 02:12:32 GMT</pubDate></item></channel></rss>