<?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-NearCompliments and HC-SR04]]></title><description><![CDATA[<p dir="auto">Long story short: I had my MagicMirror working until the SD card got corrupted. After rebuilding the mirror, I cannot use my HC-SR04 sensor to display the hidden compliments.</p>
<p dir="auto">I have verified that the HC-SR04 is in fact working by using a python script:</p>
<pre><code>pi@MagicPicture:~ $python3 ultrasonic_distance.py
Measured Distance = 124.3 cm
Measured Distance = 122.6 cm
Measured Distance = 0.4 cm
Measured Distance = 122.6 cm
Measured Distance = 122.1 cm
Measured Distance = 123.0 cm
^CMeasurement stopped by User
</code></pre>
<p dir="auto">MMM-NearCompliments hides the compliments upon mirror restart but interacting with the sensor does nothing. I have been unsuccessful in configuring it to directly access the sensor, trying multiple iterations of its configuration settings. This is how I left its config:</p>
<pre><code>config: {
                               echoPin: 4,
                               triggerPin: 17,
                               delay: 20,
                               autoStart: true,
                               usePIR: false,
                               calibrate: false,
                               position: 'bottom_left'
                       }
</code></pre>
<p dir="auto">I also have tried (separately) using both MMM-Pir and MMM-GPIO-Notifications in order to use their USER_PRESENCE notifications for sensor interaction…</p>
<p dir="auto">When I set the MMM-NearCompliments config to  usePIR:true when using MMM-Pir the sensor does not work, plus I cannot stop the monitor from shutting down…from which I am unable to recover.</p>
<p dir="auto">When I use MMM-GPIO-Notifications with MMM-NearCompliments. I get complaints that the usePIR:true config setting requires MMM-PIR.</p>
<p dir="auto">I would like to know if anyone has MMM-NearCompliments working directly with an HC-SR04 sensor (i.e. without using MMM-Pir), and request that you share your configuration settings.</p>
<p dir="auto">Barring that, any information or assistance would be appreciated.<br />
Take care.<br />
rrslssr</p>
]]></description><link>https://forum.magicmirror.builders/topic/19487/mmm-nearcompliments-and-hc-sr04</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 01:56:35 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19487.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Mar 2025 16:45:39 GMT</pubDate><ttl>60</ttl></channel></rss>