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.
I have verified that the HC-SR04 is in fact working by using a python script:
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
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:
config: {
echoPin: 4,
triggerPin: 17,
delay: 20,
autoStart: true,
usePIR: false,
calibrate: false,
position: 'bottom_left'
}
I also have tried (separately) using both MMM-Pir and MMM-GPIO-Notifications in order to use their USER_PRESENCE notifications for sensor interaction…
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.
When I use MMM-GPIO-Notifications with MMM-NearCompliments. I get complaints that the usePIR:true config setting requires MMM-PIR.
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.
Barring that, any information or assistance would be appreciated.
Take care.
rrslssr