<?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[PIR / MQTT - Presence sensor(s) revived]]></title><description><![CDATA[<p dir="auto">Dear MagicMirror-ians</p>
<p dir="auto">As may already known I was a real fan of MMM-Pir.<br />
For also good known reasons this nice module is not longer maintained.</p>
<p dir="auto">I have a local clone which runs OK but in the meantime I had switched to MMM-MQTTScreenOnOff wich attaches a “better” (radar-) sensor to my mirror.  But I’ve missed the progress bar, the dimming and cron-like functionality. In addition the radar sensor is much slower than PIR- caused by a 5 second update intervall as minimum.</p>
<p dir="auto">After plenty of tinkering and testing, and above all torturing AI heavily I’m excited to announce: <strong>MMM-PresenceScreenControl</strong> is finally out! 🎉</p>
<p dir="auto">This module brings together the best of both worlds:<br />
•	The beloved timer bar and auto-dimming from MMM-Pir,<br />
•	The reliability, MQTT support, and simplicity of MMM-MQTTScreenOnOff,<br />
•	All cleaned up, without unnecessary complexity, cryptic cron strings, or weird build tricks.</p>
<p dir="auto">A few highlights:<br />
•	Presence detection with PIR, MQTT, or <strong>both</strong> (whichever triggers first wins)<br />
•	A visual timer bar so you always know how long the screen will stay on<br />
•	Straightforward “ignore” and newly introduced “always-on” time windows using plain times and days—no cryptic cron needed<br />
•	Customizable screen on/off commands—works on Pi, PC, X11, Wayland, CEC, and more<br />
•	Touch mode for remote or manual override (yes, you can poke your mirror awake remotely!)</p>
<p dir="auto">If you’re after spinning circles or relay magic, this isn’t your thing (yet 😉). <br />
But if you want a solid, readable, and maintainable presence module that just works—even (hopefully) after updates—this is for you.</p>
<p dir="auto">Give it a try, share your feedback, open pull requests, or ask questions right here or on <a href="https://github.com/rkorell/MMM-PresenceScreenControl" target="_blank" rel="noopener noreferrer nofollow ugc">GitHub</a>:</p>
<p dir="auto">Happy mirroring! </p>
<p dir="auto">Ralf</p>
]]></description><link>https://forum.magicmirror.builders/topic/19829/pir-mqtt-presence-sensor-s-revived</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 17:43:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19829.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Aug 2025 11:20:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Tue, 18 Aug 2026 18:58:48 GMT]]></title><description><![CDATA[<p dir="auto">Good evening to all.<br />
Today was an interesting day - caused by an issue posted by Stefano ( <a href="https://github.com/papinist" target="_blank" rel="noopener noreferrer nofollow ugc">papinist</a> )</p>
<p dir="auto">He opened <a href="https://github.com/rkorell/MMM-PresenceScreenControl/issues/10" target="_blank" rel="noopener noreferrer nofollow ugc">issue # 10</a> . with a friendly, well-argued suggestion: expose the mirror screen to Home Assistant as a proper switch — something you can both <strong>see</strong> (is the screen on?) and <strong>control</strong> (turn it on/off) as a native HA entity.</p>
<p dir="auto">The nice realisation while designing it was that this needs almost nothing new. PSC already speaks MQTT — it already subscribes to a presence topic so that MQTT occupancy sensors can drive the screen. So <strong>Home Assistant is simply another presence source</strong>, exactly like a radar or mmWave sensor publishing occupancy. The only piece genuinely missing was the reverse direction: a topic the mirror <em>writes</em>, carrying its own screen state. No extra module, no shell scripts, no IPC — just publish one more thing and let HA subscribe to it.</p>
<h2>The design</h2>
<p dir="auto">The result is an optional <code>homeAssistant</code> config block. Enable it and PSC opens a dedicated MQTT connection (independent of <code>mode</code>, so it works even in pure <code>PIR</code> setups), reusing the broker and credentials you already configured:</p>
<pre><code class="language-js">homeAssistant: {
  enabled: false,                  // opt-in, default off → no surprise
  discovery: true,                 // publish the HA auto-discovery config
  discoveryPrefix: "homeassistant",// must match your HA MQTT discovery prefix
  objectId: "magicmirror_screen",  // technical id → topic paths + HA unique_id
  name: "MagicMirror Screen"       // friendly name shown in HA
}
</code></pre>
<p dir="auto">A few decisions worth flagging, because each is a small opinion:</p>
<p dir="auto"><strong>It’s a switch, not a button — so ON latches.</strong> <code>ON</code> sets a held presence signal: the screen stays on for as long as the switch is on. <code>OFF</code> releases it, and the mirror returns to standby through your normal <code>counterTimeout</code> — the same graceful countdown a PIR walk-away uses. There’s deliberately no separate “instant off”; if you want a snappy off, lower <code>counterTimeout</code>.</p>
<p dir="auto"><strong>It never reaches into the module’s own logic.</strong> The integration adds exactly one OR-term to the presence evaluation — <code>haPresence</code> alongside the existing PIR / MQTT / touch sources — and it sits <em>below</em> the cron windows in precedence. The scheduler still wins: an <code>ON</code> during a <code>cronIgnoreWindows</code> is swallowed, an <code>OFF</code> during a <code>cronAlwaysOnWindows</code> is overridden. Timer, dimming and window logic are untouched.</p>
<p dir="auto"><strong>The switch is a strict mirror of the real screen.</strong> The state topic always publishes the actual screen state, whatever caused the change — PIR, schedule, touch or HA — and it re-publishes after every command. So when the schedule rejects or overrides a command, the switch snaps back to reality rather than lying: HA can never show “on” while the screen is off, or vice versa. A command is a request; the fact is whatever the mirror actually does.</p>
<p dir="auto"><strong>Auto-discovery + availability, so setup is effortless.</strong> On connect PSC publishes a retained Home Assistant MQTT-Discovery config and an availability topic backed by a Last-Will. HA creates the entity automatically and marks it <em>unavailable</em> if the mirror drops off the broker.</p>
<p dir="auto">The topics, all derived from <code>objectId</code>:</p>
<pre><code>homeassistant/switch/magicmirror_screen/config   (retained)  → discovery
magicmirror/magicmirror_screen/set                           → command  (HA → mirror: ON/OFF)
magicmirror/magicmirror_screen/state             (retained)  → state     (mirror → HA: ON/OFF)
magicmirror/magicmirror_screen/availability      (retained)  → online/offline (LWT)
</code></pre>
<h2>How the auto-creation works</h2>
<p dir="auto">The mirror and Home Assistant never talk to each other directly — the broker is the only meeting point, and the <code>discoveryPrefix</code> (<code>homeassistant</code>) is the agreed channel. HA’s MQTT integration subscribes to <code>homeassistant/#</code> and listens for anyone announcing themselves there. Because our config is published <em>retained</em>, the broker hands it to HA the instant HA connects — even if HA boots hours later. HA reads the topic path plus the JSON body and builds <code>switch.magicmirror_screen</code>, wired to the command/state/availability topics. It’s the same mechanism Tasmota, Zigbee2MQTT and ESPHome use — the mirror just follows the convention, so it’s picked up like any other device.</p>
<h2>An example automation (doorbell → wake → graceful standby)</h2>
<pre><code class="language-yaml">automation:
  - alias: "Doorbell wakes the MagicMirror"
    trigger:
      - platform: state
        entity_id: binary_sensor.video_doorbell
        to: "on"
    action:
      - service: switch.turn_on
        target: { entity_id: switch.magicmirror_screen }
      - delay: "00:00:30"        # keep the camera visible while you look
      - service: switch.turn_off
        target: { entity_id: switch.magicmirror_screen }
</code></pre>
<p dir="auto">Turn it on when the doorbell rings, keep it visible for half a minute, then hand back to PSC’s timer for the standby — or drop the delay/off and turn it off from another trigger, whatever fits your flow.</p>
<h2>A note on testing</h2>
<p dir="auto">I don’t run Home Assistant here, so I verified the whole MQTT surface with MQTT Explorer playing HA’s role — publishing <code>ON</code>/<code>OFF</code> to the command topic and watching the discovery, state and availability topics. The entire round-trip is observable that way: <code>ON</code> holds, <code>OFF</code> starts the countdown, the state tracks the real screen (including snapping back when the schedule overrides a command), the discovery config is well-formed, availability goes online on start. The one thing that needs a real instance — does HA actually auto-create the entity from that config — is being confirmed by papinist, who has the setup for it.</p>
<h2>Update / install</h2>
<p dir="auto">If you’re already on the module:</p>
<pre><code>cd ~/MagicMirror/modules/MMM-PresenceScreenControl
git pull
</code></pre>
<p dir="auto">No dependency changes this time, so no <code>npm install</code> is needed — just restart MagicMirror. Everything is backwards-compatible and opt-in: <code>homeAssistant.enabled</code> defaults to <code>false</code>, and the rest is additive, so an update touches nothing in your existing setup until you switch it on.</p>
<p dir="auto">A genuine thank-you to papinist for the friendly, well-reasoned suggestion and the pleasantconversation that shaped it. Exactly the kind of exchange that makes maintaining a module worthwhile.</p>
<p dir="auto">Hope you find it useful.</p>
<p dir="auto">Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/131729</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131729</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Tue, 18 Aug 2026 18:58:48 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 01 Jun 2026 19:32:36 GMT]]></title><description><![CDATA[<p dir="auto">That got me fixed up!.  Thanks!</p>
]]></description><link>https://forum.magicmirror.builders/post/131237</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131237</guid><dc:creator><![CDATA[atwist]]></dc:creator><pubDate>Mon, 01 Jun 2026 19:32:36 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Sun, 31 May 2026 08:37:27 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/atwist" aria-label="Profile: atwist">@<bdi>atwist</bdi></a>,</p>
<p dir="auto">first of all apologies for long delay - I was on vacation and offline.</p>
<p dir="auto">A small  disclaimer upfront: I haven’t seen your actual MQTT traffic, so the following is a hypothesis  based on the log excerpt you posted. It fits the  symptoms cleanly, but please verify before changing anything.</p>
<p dir="auto">What I see in your log:</p>
<ul>
<li>The module connects to the broker fine</li>
<li>It subscribes successfully to <code>sensor/presence</code></li>
<li><code>[updatePresence]</code> fires (so messages ARE arriving — otherwise you wouldn’t see those entries triggered)</li>
<li>But no parse error is logged, which means JSON.parse() did not throw</li>
<li>The result is consistently <code>mqttPresence=false</code>, screen turns off after the counter or even never turns on.</li>
</ul>
<p dir="auto">Most likely cause: HomeAssistant publishes the value <code>true</code> directly (a JSON primitive), not a JSON object like <code>{"presence": true}</code>.<br />
The module   currently expects an object and reads the field onfigured in <code>mqttPayloadOccupancyField</code> (default: “presence”). <code>JSON.parse("true")</code> succeeds and   returns the boolean <code>true</code>, but <code>true["presence"]</code> is <code>undefined</code> — which evaluates to no presence.<br />
No exception, no parse error log, just silent   false.</p>
<p dir="auto">Quick way to verify what HA actually sends:</p>
<pre><code>mosquitto_sub -h 192.168.4.160 -t sensor/presence -v
</code></pre>
<p dir="auto">That’ll print one line per message. You’ll see exactly what arrives.<br />
If the payload turns out to be a bare value (just <code>true</code>, <code>"ON"</code>, etc.), there are two paths forward:</p>
<p dir="auto">Either:<br />
<strong>1. Update the module</strong> — I just pushed support for bare-string payloads exactly because of this case:</p>
<pre><code>cd ~/MagicMirror/modules/MMM-PresenceScreenControl
git pull
</code></pre>
<p dir="auto">Then add to your module config:</p>
<pre><code>mqttPayloadOn: "true"
</code></pre>
<p dir="auto">(or whatever HA actually publishes — <code>"ON"</code>, <code>"on"</code>, etc.; check with the mosquitto_sub command above). With this set, the module compares the raw  MQTT payload exactly against your string. Match → presence detected. Anything else → no presence.</p>
<p dir="auto">Or:<br />
<strong>2. Configure HA to publish a JSON object</strong> like <code>{"presence": true}</code> / <code>{"presence": false}</code> instead of the bare value (e.g. via the <code>payload</code>  template of your MQTT publish action). Then your existing config works unchanged.</p>
<p dir="auto">The new release also adds two diagnostic improvements that would have made this immediately visible:</p>
<ul>
<li>A new <code>[MQTT] received (field/bare mode): mqttPresence=true/false</code> log line on every message (debug level “complex”)</li>
<li>The <code>[updatePresence]</code> line now includes <code>mqttPresence=</code> alongside the other sources</li>
</ul>
<p dir="auto">Sorry for the silent-fail behavior in the previous version — that’s been a documentation gap as well as a feature gap. Let me know if my hypothesis  turns out to be wrong; if HA publishes something else entirely, the diagnosis would change.</p>
<p dir="auto">Good luck.<br />
Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/131226</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131226</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Sun, 31 May 2026 08:37:27 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Sat, 23 May 2026 12:40:28 GMT]]></title><description><![CDATA[<p dir="auto">For some reason, my mirror is not able to turn on thru MQTT.  Below is most of the detail from the log file.  MQTT explorer is showing that HomeAssistant is publishing via MQTT “true”.    Do you have any suggestions?</p>
<p dir="auto">[2026-05-22T21:32:28.750Z] PresenceControl: Received config: {“mode”:“MQTT”,“pirGPIO”:4,“mqttServer”:“mqtt://192.168.4.160:1883”,“mqttTopic”:“sensor/presence”,"mqttPayloadOccupancyF&gt;<br />
[2026-05-22T21:32:28.910Z] PresenceControl: [updateScreen] on=true, cmd=“wlopm --on HDMI-A-2”<br />
[2026-05-22T21:32:29.211Z] PresenceControl: [updateScreen] SUCCESS: executed “wlopm --on HDMI-A-2”<br />
[2026-05-22T21:32:29.357Z] PresenceControl: [updatePresence] pirPresence=false, touchPresence=false, presence=false, newPresence=false, locked=false<br />
[2026-05-22T21:32:29.359Z] PresenceControl: Subscribed to MQTT topic: sensor/presence<br />
[2026-05-22T21:33:02.189Z] PresenceControl: [startCounter] Counter expired: presence=false, pirPresence=false, calling updateScreen(false)<br />
[2026-05-22T21:33:02.190Z] PresenceControl: [updateScreen] on=false, cmd=“wlopm --off HDMI-A-2”<br />
[2026-05-22T21:40:24.572Z] PresenceControl: [updatePresence] pirPresence=false, touchPresence=false, presence=false, newPresence=false, locked=false<br />
[2026-05-22T21:40:25.575Z] PresenceControl: [startCounter] Counter expired: presence=false, pirPresence=false, calling updateScreen(false)<br />
[2026-05-22T21:40:25.576Z] PresenceControl: Counter expired, set presence to FALSE and stopped timer.</p>
]]></description><link>https://forum.magicmirror.builders/post/131185</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131185</guid><dc:creator><![CDATA[atwist]]></dc:creator><pubDate>Sat, 23 May 2026 12:40:28 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Tue, 05 May 2026 11:40:15 GMT]]></title><description><![CDATA[<p dir="auto">MMM-PresenceScreenControl — two new releases (ecoMode + Notification API)</p>
<p dir="auto">Dear all</p>
<p dir="auto">a small but meaningful round of updates for MMM-PresenceScreenControl just landed on main. Both started from a single GitHub issue, so I thought I’d write up the chain of reasoning rather than just drop a changelog — maybe useful for anyone evaluating a migration from MMM-Pir, and definitely useful as a reminder to myself to check the parent project’s feature surface more carefully when forking.</p>
<p dir="auto">Part 1 — ecoMode (Issue #5)</p>
<p dir="auto">Rocket78 opened issue #5 with a really well-argued request: even with the screen physically off, Electron keeps repainting hidden DOM. On a Pi 3 with X11, MMM-PresenceScreenControl was leaving things like Newsfeed cross-fades running every 20 seconds — and those repaints showed up clearly as CPU spikes in his graph. He asked for an equivalent of MMM-Pir’s ecoMode, which hides every other module while the screen is off, so the browser skips layout/paint/composite for them.<br />
So I built it, but tried to keep it lean:</p>
<pre><code>ecoMode: false,        // opt-in, default off → no surprise
ecoModeIgnore: []      // module names to keep visible
</code></pre>
<p dir="auto">Implementation notes that might interest other module authors:</p>
<p dir="auto">Rocket78 also dropped a great ddcutil snippet in the issue for monitors that show a “no signal” splash when the video output is cut — that splash is genuinely immersion-breaking, and ddcutil setvcp D6 sends the actual DDC/CI power command, which is much closer to pressing the hardware power button:</p>
<pre><code>onCommand:  ddcutil setvcp D6 1 --skip-ddc-checks
offCommand: ddcutil setvcp D6 5 --skip-ddc-checks
</code></pre>
<p dir="auto">Added to the README’s offCommand examples. The --skip-ddc-checks is needed because some monitors stop responding to DDC queries when powered off but still process incoming power-on commands — so the check would fail before the command is even sent.</p>
<p dir="auto">→ Issue #5 closed, commit 42b68a6.</p>
<p dir="auto">Part 2 — what else did I miss?</p>
<p dir="auto">Closing the issue could have been the end of it. But Rocket78’s request raised an uncomfortable question: I never used ecoMode in MMM-Pir myself, so I didn’t notice it was missing. What else did I overlook when reviving MMM-Pir?</p>
<p dir="auto">Three items jumped out as actual gaps that other modules in the ecosystem could legitimately depend on:</p>
<ol>
<li>
<p dir="auto">MMM_PIR-USER_PRESENCE — MMM-Pir broadcasts this notification on presence transitions. Other modules (Remote-Control, voice assistants, smart-home bridges) can listen for it.</p>
</li>
<li>
<p dir="auto">MMM_PIR-WAKEUP / LOCK / UNLOCK / END — incoming notifications that let other modules control the screen logic externally.</p>
</li>
<li>
<p dir="auto">MMM_PIR-SCREEN_POWERSTATUS — broadcast when the physical screen turns on or off.</p>
</li>
</ol>
<p dir="auto">Without these, anyone migrating from MMM-Pir to my fork would suddenly find their automations dead — because they’d be listening for MMM_PIR-USER_PRESENCE and nothing was coming through. Even worse, they wouldn’t know why it stopped working; the screen-on/off behavior would seem fine, but cross-module integration would be silently broken.</p>
<p dir="auto">So I built a parallel notification API, namespaced MMM_PSC-* rather than impersonating MMM-Pir’s MMM_PIR-*:</p>
<p dir="auto"><strong>Outgoing notifications — emitted on state transitions only:</strong></p>
<pre><code>MMM_PSC-USER_PRESENCE       payload: true / false
                            fires when combined presence changes

MMM_PSC-SCREEN_POWERSTATUS  payload: true / false
                            fires when physical screen turns on/off
</code></pre>
<p dir="auto">Both fire only on actual transitions — no spam every poll cycle.</p>
<p dir="auto"><strong>Incoming notifications — consumed by the module</strong></p>
<pre><code>MMM_PSC-WAKEUP   wake screen, reset timer (equivalent to a touch)

MMM_PSC-END      force screen off immediately

MMM_PSC-LOCK     freeze presence handling — sensors are still tracked internally, but no longer change screen state

MMM_PSC-UNLOCK   resume normal presence handling and re-evaluate the current sensor state
</code></pre>
<p dir="auto">Implementation detail worth flagging: the LOCK guard sits in updatePresence(), which is the single funnel through which all sensor inputs (PIR, MQTT, touch, external wakeup socket) eventually pass. So whatever the trigger source, it’s correctly suppressed while locked. UNLOCK calls updatePresence() again, which re-evaluates the current sensor state — so if you’ve unlocked while a person is still in front of the PIR, the screen comes back on immediately. No need for the caller to send a WAKEUP after UNLOCK.</p>
<p dir="auto">Useful patterns this enables:</p>
<pre><code>// Wake the mirror when a doorbell event arrives:
this.sendNotification("MMM_PSC-WAKEUP");

// Force-off cleanly from outside (smart-home rule, etc.) without
// bypassing the module and going straight to the screen command:
this.sendNotification("MMM_PSC-END");

// Take exclusive control of the display for a video call,
// then hand it back when done:
this.sendNotification("MMM_PSC-LOCK");
// ... your module is showing its full-screen content ...
this.sendNotification("MMM_PSC-UNLOCK");
</code></pre>
<p dir="auto">END is the clean way to force-off the screen from outside without touching offCommand directly — the module’s internal state stays consistent, all the right outgoing notifications still fire, and any other listeners (logging, analytics, smart home) see the transition.</p>
<p dir="auto">Tested live end-to-end via MMM-Remote-Control’s notification API:</p>
<pre><code>curl -X GET "http://localhost:8080/api/notification/MMM_PSC-LOCK"
curl -X GET "http://localhost:8080/api/notification/MMM_PSC-END"
    → screen off, stays off
curl -X GET "http://localhost:8080/api/notification/MMM_PSC-WAKEUP"
    → ignored (locked)
curl -X GET "http://localhost:8080/api/notification/MMM_PSC-UNLOCK"
    → screen back on
</code></pre>
<p dir="auto">All four routes verified, log trace clean, outgoing notifications fired in the right order on every transition.</p>
<p dir="auto">→ Commit 10000ca.</p>
<p dir="auto"><strong>Update / install</strong></p>
<p dir="auto">If you’re already on the module:</p>
<pre><code>cd ~/MagicMirror/modules/MMM-PresenceScreenControl
rm -rf node_modules
git pull
npm install
</code></pre>
<p dir="auto">Both changes are backwards-compatible. ecoMode is opt-in (default false), and the new notifications are additive — nothing existing is modified. So you can update without touching your config and pick up only what you need.</p>
<p dir="auto">A genuine thank-you to Rocket78 for the well-reasoned issue and the ddcutil tip — it triggered the full audit, which in turn closed a much bigger latent gap.</p>
<p dir="auto">Exactly the kind of feedback that improves a fork. If you’ve migrated from MMM-Pir and notice anything else missing that you’d consider load-bearing, please open an issue.</p>
<p dir="auto">Hope you find it useful.<br />
Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/131059</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131059</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Tue, 05 May 2026 11:40:15 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Fri, 13 Mar 2026 10:46:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
That’s correct!<br />
At the end, because it currently just works with MMM-OnSpotify, it was not so difficult.</p>
<p dir="auto">I Will look into this in the near future to support other Player also.</p>
]]></description><link>https://forum.magicmirror.builders/post/130368</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130368</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Fri, 13 Mar 2026 10:46:21 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Fri, 13 Mar 2026 08:57:40 GMT]]></title><description><![CDATA[<p dir="auto">I’ve just seen that you had invented a solution for your problem - MMM-HideModulesOnSpotify :-)<br />
Cool!</p>
<p dir="auto">Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130367</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130367</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Fri, 13 Mar 2026 08:57:40 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Fri, 13 Mar 2026 08:13:02 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a>,</p>
<p dir="auto">Yes, I Like your garbage module - it’s really great - thanks for this!<br />
I’m using MMM-NowPlayingOnSpotify …<br />
This has exactly the behavioour as described.<br />
Shows a spotify logo - which I had replaced with Volumio logo (which is my favourite spotify player)  and only expands if something is played.<br />
In this case the left corner looks like</p>
<p dir="auto"><img src="/assets/uploads/files/1773389447632-screen2.jpg" alt="screen2.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Warm regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130365</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130365</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Fri, 13 Mar 2026 08:13:02 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Wed, 11 Mar 2026 13:29:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
I see you’re even using one of my Modules (MMM-MyGarbage)</p>
<pre><code>My MusicPlayer (Volumio) is on the left side, too but is spreading the region if cover-art is appearing…
</code></pre>
<p dir="auto">Did you do something special for this, or is this an option in de Module?<br />
Because when MMM-OnSpotify appears, it just go over everything that is standing there.<br />
So for now I’ve disabled it and looking for a solution.</p>
]]></description><link>https://forum.magicmirror.builders/post/130341</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130341</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Wed, 11 Mar 2026 13:29:29 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Wed, 11 Mar 2026 11:04:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a> <img src="/assets/uploads/files/1773226944806-screen.jpg" alt="screen.jpg" class=" img-fluid img-markdown" /><br />
I have a quite similar layout.<br />
My MusicPlayer (Volumio) is on the left side, too but is spreading the region if cover-art is appearing…<br />
Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130339</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130339</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Wed, 11 Mar 2026 11:04:04 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Tue, 10 Mar 2026 21:33:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
<strong>My current mirror</strong><br />
This is why I have it on the right. For me this feels better.<br />
On the left side there comes the Spotify information, when I play music.</p>
<p dir="auto"><img src="/assets/uploads/files/1773178259801-eac1a738-526d-4d3f-8ad7-4103a12bc910-image.jpeg" alt="eac1a738-526d-4d3f-8ad7-4103a12bc910-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/130337</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130337</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Tue, 10 Mar 2026 21:33:17 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Tue, 10 Mar 2026 14:18:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a> cool!<br />
happy, that you are satisfied!</p>
<p dir="auto">Warm regards,<br />
Ralf</p>
<p dir="auto">interesting that you are poistion this counterbar on thr right side of the screen.<br />
For me it feels/looks more natural on the left side.<br />
May this is the reason for my “acceptance” of the colorFrom / colorTo - “mismatch” you had reported …</p>
]]></description><link>https://forum.magicmirror.builders/post/130331</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130331</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Tue, 10 Mar 2026 14:18:49 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Sat, 14 Mar 2026 20:38:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
Hi Ralf, I implemented the new version and parameter.<br />
It works great!</p>
<p dir="auto">I’m now playing with the CSS.<br />
Made the bar smaller (50%) rounded edges and alligned the counter at the left of my screen.</p>
<p dir="auto"><img src="/assets/uploads/files/1773090730175-1dcea511-66b9-4002-82e8-a3d2bec2652b-image.jpeg" alt="1dcea511-66b9-4002-82e8-a3d2bec2652b-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">For those who like this setup, just add following in ~/MagicMirror/css/custom.css</p>
<pre><code>/* MMM-PresenceScreenControl */

.psc-linebar {
  width: 50%;
  height: 5px;
  background: #222;
  border-radius: 4px;
  margin: 6px 0 6px 0;
  overflow: hidden;
  margin-left: auto;
  margin-right: 0;
}

.psc-bar {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
  box-shadow: 0 0 6px currentColor;
}

.psc-timer {
  font-size: 16px;
  margin-top: 4px;
  margin-bottom: 2px;
  letter-spacing: 1px;
  text-align: right !important;
}
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/130328</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130328</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Sat, 14 Mar 2026 20:38:50 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 19:27:55 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a> <a href="/post/130324">said</a>:</p>
<p dir="auto">I’m looking forward for the startupGracePeriod parameter and think this is going to make the module fully as I like it.</p>
</blockquote>
<p dir="auto"><strong>Good news —</strong> your wish came true faster than expected! 😊</p>
<p dir="auto">v1.5.0 is released and includes the startupGracePeriod parameter you were looking forward to.</p>
<p dir="auto">How to update:</p>
<pre><code>cd ~/MagicMirror/modules/MMM-PresenceScreenControl
rm -rf node_modules
git pull
npm install
</code></pre>
<p dir="auto">Then add to your config:</p>
<pre><code>startupGracePeriod: 30,  // seconds to keep screen on after startup
</code></pre>
<p dir="auto">Set it to however many seconds you want the screen to stay on after a restart — enough time to<br />
verify everything came up correctly. After the grace period, normal presence logic kicks in. If<br />
your PIR detects you during the grace period, it seamlessly switches to the regular countdown<br />
timer.</p>
<p dir="auto">Also included in v1.5.0:</p>
<ul>
<li>logFileName parameter — debug output now goes to pm2 logs by default (no more hidden log file)</li>
<li>Several internal fixes found during a code quality review</li>
</ul>
<p dir="auto">Full changelog in the README.</p>
<p dir="auto">Enjoy! 🎉</p>
<p dir="auto">Warm regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130327</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130327</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Mon, 09 Mar 2026 19:27:55 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 19:00:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a> your welcome…;-)</p>
]]></description><link>https://forum.magicmirror.builders/post/130326</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130326</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Mon, 09 Mar 2026 19:00:15 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 19:26:45 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a></p>
<p dir="auto">YES, IT IS WORKING!!!</p>
</blockquote>
<p dir="auto">I’m SO happy.<br />
Great news - congratulations…<br />
So at least your stubborn issue leds to several code enhancements - during my investigation regarding your symptoms I had the chance to identify some optimization potential, so code is much cleaner now.<br />
Thanks for this gentle “push”.</p>
<p dir="auto">Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130325</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130325</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Mon, 09 Mar 2026 19:26:45 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 18:48:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
Oke, done some testing:<br />
With the ‘new’ strings, I get:</p>
<pre><code>onCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270",
offCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off",
</code></pre>
<pre><code>[ERROR] [MMM-PresenceScreenControl] [updateScreen] ERROR: Error: Command failed: WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270
unknown output HDMI-A-1
</code></pre>
<p dir="auto">Why this message, I don’t know.<br />
After a reboot this message didn’t show again.</p>
<p dir="auto">Then I stopped MagicMirror and did the same command from the commandline <code>WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off</code></p>
<p dir="auto">After 6 seconds my display comes on again.<br />
So it isn’t coming from MagicMirror, but from my system.<br />
I created a simple Python3 script to turn off and on my monitor. Same problem.</p>
<p dir="auto">Next step:<br />
I took a new SD Card and installed a fresh copy of Trixie.<br />
Didn’t do anything else, no updates or something else and tried again with <code>WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off</code> from the command prompt.<br />
Display goes off and after 6 seconds back on again.<br />
So I excluded MagicMirror. What else can it be?</p>
<p dir="auto">Next step:<br />
I took an other RPI4b with the new SD Card from previous step. Repeated the test, but still same result. Monitor goes on after 6 seconds. So it is not MagicMirror, not the RPI. But why it works with MMM-PIR and not with MMM-PresenceScreenControl. It is still a riddle for me.</p>
<p dir="auto">Next step:<br />
Original RPI with original SD Card and installed MMM-Universal-Pir. Same result, after 6 seconds screen on.<br />
So I excluded MagicMirror, SD Card, Trixie installation and RPI. It must have something to do with my monitor?!?<br />
Did something happen? Not that I know.</p>
<p dir="auto">After doing a search on the big WWW, I found an interesting article that described exact the same issue I was having.<br />
<a href="https://forums.raspberrypi.com/viewtopic.php?t=363966" target="_blank" rel="noopener noreferrer nofollow ugc">https://forums.raspberrypi.com/viewtopic.php?t=363966</a></p>
<p dir="auto">So I searched for my RemoteControl and search for a setting<br />
that automatically scan its input sources (not easy if your MagicMirror screen is rotated 270° ;-)<br />
And I found this setting and indeed it was standing on auto scan. I put it on HDMI as only source and tried it again:</p>
<p dir="auto"><strong>YES, IT IS WORKING!!!</strong></p>
<p dir="auto">And even better than before, now my monitor turns completly off after 15 min. of no signal. So instead of using 75W when on, 26W in standby, it now uses 0W after 15 minutes (it’s a setting on the monitor).<br />
Activating the PIR, it turns back on!</p>
<p dir="auto">So with this I hope that if somebody else has this problem, they can solve it to.</p>
<p dir="auto">Ralf, thanks for all the help and trying to solve it with me.<br />
I’m looking forward for the startupGracePeriod parameter and think this is going to make the module fully as I like it.<br />
Thank you for your great work with this module and a grownup replacement for MMM-Pir!!!</p>
]]></description><link>https://forum.magicmirror.builders/post/130324</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130324</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Mon, 09 Mar 2026 18:48:29 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 16:08:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a> :-) OK, nearby - Germany …<br />
Thanks for testing/feedback!</p>
<p dir="auto">Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130323</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130323</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Mon, 09 Mar 2026 16:08:04 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 13:34:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
I live in the Netherlands.</p>
<p dir="auto">I’m Currently at the office, but I Will test it this evening and give you the results.</p>
]]></description><link>https://forum.magicmirror.builders/post/130321</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130321</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Mon, 09 Mar 2026 13:34:11 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 11:41:58 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/htilburgs" aria-label="Profile: htilburgs">@<bdi>htilburgs</bdi></a>,<br />
it seems, we are in the same time-zone :-) wouldn’t be surpised even same mother-tongue …</p>
<p dir="auto">Nevertheless,  thank you for your patience and the detailed logs — they were extremely helpful in tracking this down.</p>
<p dir="auto">What we found</p>
<p dir="auto">The module works perfectly on my system (Pi 5, Debian Trixie, Wayland/labwc, MagicMirror 2.34.0), so we did an intensive<br />
deep-dive comparing your setup, your MMM-Pir configuration, and your MMM-PresenceScreenControl configuration to understand why<br />
the screen comes back after ~6 seconds on your system.</p>
<p dir="auto">The key clue came from your own working MMM-Pir config:</p>
<pre><code>mode: 3
waylandDisplayName: "wayland-0"
</code></pre>
<p dir="auto">MMM-Pir mode 3 uses wlr-randr — the same tool you configured for MMM-PresenceScreenControl. But there’s a critical difference:<br />
MMM-Pir internally sets WAYLAND_DISPLAY=wayland-0 (from your waylandDisplayName parameter) before calling wlr-randr.</p>
<p dir="auto">Your MMM-PresenceScreenControl config, on the other hand, uses:</p>
<pre><code>onCommand: "DISPLAY=:0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270",
offCommand: "DISPLAY=:0 wlr-randr --output HDMI-A-1 --off",
</code></pre>
<p dir="auto">wlr-randr is a Wayland tool — it communicates with the Wayland compositor via the WAYLAND_DISPLAY environment variable.<br />
DISPLAY=:0 is an X11 variable and is meaningless to wlr-randr. Without the correct WAYLAND_DISPLAY, wlr-randr falls back to<br />
guessing the socket, which results in the unstable behavior you’re seeing: the screen turns off but comes back after ~6<br />
seconds.</p>
<p dir="auto">This also explains why your system info shows WAYLAND_DISPLAY: undefined — MagicMirror/Electron doesn’t have it set, so any<br />
screen command executed from the module needs to provide it explicitly.</p>
<p dir="auto">The fix</p>
<p dir="auto">Replace DISPLAY=:0 with WAYLAND_DISPLAY=wayland-0 in your config. You have two options:</p>
<p dir="auto">Option A: wlr-randr (matching your working MMM-Pir setup)</p>
<pre><code>onCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270",
offCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off",
</code></pre>
<p dir="auto">This is the minimal change — same tool, same parameters, just the correct environment variable.</p>
<p dir="auto">Option B: wlopm (recommended, more robust)</p>
<p dir="auto">wlopm is purpose-built for display power management on Wayland. Unlike wlr-randr --off (which removes the output from the<br />
compositor layout), wlopm --off uses the Wayland power management protocol (DPMS-level) — it turns the display hardware off<br />
without affecting window layout. This is what I use on my system.</p>
<p dir="auto">First install it (it’s in the Trixie repos):</p>
<pre><code>sudo apt install wlopm
</code></pre>
<p dir="auto">Then configure:</p>
<pre><code>onCommand: "wlopm --on HDMI-A-1",
offCommand: "wlopm --off HDMI-A-1",
</code></pre>
<p dir="auto">Note: wlopm doesn’t need WAYLAND_DISPLAY explicitly — the default fallback to wayland-0 works reliably on Trixie. And since<br />
wlopm controls hardware power state, it doesn’t need --mode or --transform on the on command — the display simply wakes up with<br />
its previous settings intact.</p>
<p dir="auto">For reference, the <a href="https://github.com/Jopyth/MMM-Remote-Control/blob/master/docs/guide/monitor-control.md" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Jopyth/MMM-Remote-Control/blob/master/docs/guide/monitor-control.md</a> documents wlr-randr<br />
as the recommended Wayland screen control option, including the hint to set WAYLAND_DISPLAY if needed.</p>
<p dir="auto">About the startup behavior (screen stays on)</p>
<p dir="auto">You mentioned the screen stays on after MagicMirror starts until you trigger the PIR. The startup fix from commit 39d28d6 does<br />
work — it turns the screen off ~1 second after startup. But since your offCommand wasn’t working correctly (the DISPLAY=:0<br />
issue), the screen appeared to “stay on.” Once you fix the command, the screen should turn off shortly after startup if nobody<br />
is in front of the PIR.</p>
<p dir="auto">You also asked: “Why not the time from counterTimeout?” — That’s a fair point. On my system, counterTimeout is 600 (10<br />
minutes), so turning off after 1 second is the desired behavior — I want to see that the restart worked, but not wait 10<br />
minutes. For your setup with counterTimeout: 30, having 30 seconds of screen-on after startup would make more sense.</p>
<p dir="auto">I’m planning a new config parameter startupGracePeriod that lets you define how long the screen stays on after module start<br />
before the presence logic kicks in. This way each user can choose independently of their counterTimeout. I’ll include this in a<br />
future release.</p>
<p dir="auto">Upcoming improvement: cronMonitor efficiency</p>
<p dir="auto">While investigating your issue, I discovered that the internal cron monitor (which checks for always-on/ignore time windows)<br />
sends updates to the frontend every second, even when nothing has changed and the screen is off. This causes unnecessary DOM<br />
rebuilds and is inefficient, though it’s not the cause of your screen-comes-back problem. I’ll fix this in the next release to<br />
make the module quieter after screen-off.</p>
<p dir="auto">About the debug logging</p>
<p dir="auto">Now that we’ve identified the root cause, you can set debug: “off” in your config again. The debug output you saw (gpiomon<br />
lines in pm2 logs) comes from the PIR library and goes to the console. The module’s own debug logging (updatePresence,<br />
startCounter, updateScreen, etc.) intentionally writes to a separate log file (MMM-PresenceScreenControl_local.log in the<br />
module directory) rather than to pm2 logs. This keeps the debug output focused and separated from the noise of all other<br />
modules — much easier to analyze when troubleshooting a specific issue. If you ever need to debug the module again, check that<br />
file instead of pm2 logs.</p>
<p dir="auto">Summary</p>
<ol>
<li>Screen comes back after 6 seconds: Replace DISPLAY=:0 with WAYLAND_DISPLAY=wayland-0 (Option A), or switch to wlopm (Option<br />
B)</li>
<li>Screen stays on after startup: Should be fixed once Option A or B is applied. A startupGracePeriod parameter is planned for<br />
a future release.</li>
<li>Log prefix [MMM-Pir]: Already fixed in your version ✓</li>
</ol>
<p dir="auto">Please let me know if Option A or B resolves the screen-comes-back issue!</p>
<p dir="auto">Warm regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130315</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130315</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Mon, 09 Mar 2026 11:41:58 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 07:26:40 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> Thanks.<br />
I’ve excluded this file from git tracking so the pull should work.<br />
Warm regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/post/130314</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130314</guid><dc:creator><![CDATA[rkorell]]></dc:creator><pubDate>Mon, 09 Mar 2026 07:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Mon, 09 Mar 2026 06:01:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
I did a git pull so I’m sure I’ve the latest version:</p>
<ul>
<li>Screen stays on until I trigger the sensor, so that is not changed.</li>
<li>Screen goes off after 30 sec (my setting for testing) and after 6 seconds it comes on again, saying 00:00</li>
</ul>
<p dir="auto">I had set debug:“complex” and this is what it gave</p>
<pre><code>[2026-03-09 06:53:11.320] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30488.576057914     rising  gpiochip0 17 "GPIO17" 
[2026-03-09 06:53:12.466] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30489.724051868     falling gpiochip0 17 "GPIO17" 
[2026-03-09 06:53:14.974] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30492.232041526     rising  gpiochip0 17 "GPIO17" 
[2026-03-09 06:53:16.122] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30493.380045941     falling gpiochip0 17 "GPIO17" 
[2026-03-09 06:55:15.350] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30612.608045172     rising  gpiochip0 17 "GPIO17" 
[2026-03-09 06:55:16.498] [LOG]   [MMM-PresenceScreenControl] [PresenceScreenControl] [PIR] gpiomon output: 30613.756051231     falling gpiochip0 17 "GPIO17"
</code></pre>
<p dir="auto">I only have a message when I trigger the PIR, but further no messages. For being complete, my config:</p>
<pre><code>{
                        module: "MMM-PresenceScreenControl",
                        position: "bottom_right",
                        disabled: false,
                        config: {
                                mode: "PIR",
                                pirGPIO: 17,
                                onCommand: "DISPLAY=:0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270",
                                offCommand: "DISPLAY=:0 wlr-randr --output HDMI-A-1 --off",
                                counterTimeout: 30,
                                autoDimmer: false,
                                autoDimmerTimeout: 60,
                                style: 2,
                                colorFrom: "red",
                                colorTo: "lime",
                                colorCronActivation: "cornflowerblue",
                                showPresenceStatus: false,
                                debug: "complex",
                                resetCountdownWidth: false
                        }
                },
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/130313</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130313</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Mon, 09 Mar 2026 06:01:49 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Sun, 08 Mar 2026 21:38:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a> you could set a preinstall script in<br />
package.json to erase the lock file</p>
]]></description><link>https://forum.magicmirror.builders/post/130312</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130312</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 08 Mar 2026 21:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to PIR / MQTT - Presence sensor(s) revived on Sun, 08 Mar 2026 21:23:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a><br />
First of all, thank you for your time!</p>
<pre><code>You were right about the startup behavior — I’ve fixed it. The screen now turns off after ~1
second if no presence is detected at startup. No more waiting for the first sensor event.
</code></pre>
<p dir="auto">Ok, nice. But why ~1 second?<br />
Why not the time from <code>counterTimeout</code>?<br />
Just my thoughts ;-)</p>
<pre><code>Could you please set debug:
“complex” and share the complete log output from the moment the screen turns off until it comes
back on?
</code></pre>
<p dir="auto">I will do this, but it will be tommorow.<br />
I have to get up early and it’s already late.</p>
]]></description><link>https://forum.magicmirror.builders/post/130310</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130310</guid><dc:creator><![CDATA[htilburgs]]></dc:creator><pubDate>Sun, 08 Mar 2026 21:23:41 GMT</pubDate></item></channel></rss>