MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-NearCompliments and HC-SR04

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    1 Posts 1 Posters 159 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rrslssr
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy