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.

    UPDATE: Replaced my PIR-Sensor with a Doppler Microwave Sensor.

    Scheduled Pinned Locked Moved Tutorials
    103 Posts 17 Posters 108.2k Views 25 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.
    • FoziF Offline
      Fozi Project Sponsor @lavolp3
      last edited by

      @lavolp3 great!

      HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

      1 Reply Last reply Reply Quote 0
      • hedmikH Offline
        hedmik
        last edited by

        More or less the same problem for me…
        I’m using a velleman VMA314 connected to GPIO pin 11 (BCM GPIO 17) and module MMM-PIR-Sensor.
        I’ve updated wiringPi for Pi 4 (wiringPi updated to 2.52 for the Raspberry Pi 4B)
        I see that state changes using “gpio readall” but nothing happens…or to start with, connected screen does not even turn off after time set in config:

        		{
        			module: 'MMM-PIR-Sensor',
        			config: {
        			// See 'Configuration options' for more information.
        				sensorPin: 17, // The pin (BCM numbering, NOT pin number itself) your PIR-sensor is connected to.
        				powerSaving: true, // Should the monitor be turned off if no user is present? (via HDMI or relay)
        				powerSavingDelay: 5, // Additional software side delay (in seconds) before the monitor will be turned off.
        				powerSavingNotification: true, // To display a notification before to switch screen off
        				powerSavingMessage: "Skärmen stängs av på grund av inaktivitet..." // Message notification to display before to switch screen off
        				
        			}
        		},
        
        hedmikH 1 Reply Last reply Reply Quote 0
        • hedmikH Offline
          hedmik @hedmik
          last edited by

          @hedmik sorry, my bad, i was editing config in another pi…
          Now it’s working now as it should :-)

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @hedmik
            last edited by

            @hedmik said in UPDATE: Replaced my PIR-Sensor with a Doppler Microwave Sensor.:

            i was editing config in another pi

            doesn’t that drive u crazy?! I have 5 devices running, and all have open editors and file managers…
            in the editor I can’t tell where the file came from…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            hedmikH 2 Replies Last reply Reply Quote 0
            • FoziF Offline
              Fozi Project Sponsor
              last edited by

              You made my day, guys! 🤣

              HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

              1 Reply Last reply Reply Quote 0
              • hedmikH Offline
                hedmik @sdetweil
                last edited by hedmik

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • hedmikH Offline
                  hedmik @sdetweil
                  last edited by

                  @sdetweil :rolling_on_the_floor_laughing:
                  Yes, i’ve built two mirrors and now working on my third bathroom mirror and with x number of files open in Notepad++ it’s getting messy…and even if you can see the file name and it’s location (host name) you end up editing elsewhere :dizzy_face:

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    devmil
                    last edited by

                    What type of mirror glass do you all have?

                    I have a Pilkington Mirropane Chrome Spy and to me it seems that this type of Mirror glass interferes with the RCWL-0516.

                    When doing tests (mirror glass taken off) the sensor works as expected but as soon as I put the mirror glass back it stops working through the glass.
                    Waving my hand at the side still works.

                    Greetings
                    Michael

                    FoziF hedmikH 2 Replies Last reply Reply Quote 0
                    • FoziF Offline
                      Fozi Project Sponsor @devmil
                      last edited by Fozi

                      @devmil I have the same mirror, but 4mm thick, and it works really well. Thickness shouldn’t be an issue, because the sensor is easily able to detect motions in adjacent rooms separated by stone walls. I‘d suggest to increase slightly the sensitivity by increasing the trimmer value.

                      Further check the soldering joints between trimmer and sensor. Maybe they need to be reworked so that the solder provides a proper connection.

                      HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                      1 Reply Last reply Reply Quote 0
                      • hedmikH Offline
                        hedmik @devmil
                        last edited by

                        @devmil Hi Michael, i’ve been testing with d-c-fix mirror-effect privacy film and acrylic oneway mirror and both is interfering the PIR sensor so i had to put in a small box above the frame. Not a fancy design though…
                        For the acrylic i have spare place beneath the screen so i drilled a hole.
                        For the upcoming bath mirror i’ve ordered a Pilkington MirrorView. Don’t know yet if it will work with the sensor behind that glass though…otherwise i’ll put in a separate place/box. Hard to drill the glass and wouldn’t dare trying :-|

                        1 Reply Last reply Reply Quote 0
                        • uros76U Offline
                          uros76
                          last edited by

                          This is just amazing and pity I didn’t see it before I went into PIR usage.
                          If I put aluminum insulation on one side of sensor, can anyone confirm this can be used as 180-degree use?

                          My magicmirror projects: https://forum.magicmirror.builders/post/79889, https://forum.magicmirror.builders/post/93241 and https://forum.magicmirror.builders/post/94586

                          FoziF 1 Reply Last reply Reply Quote 0
                          • FoziF Offline
                            Fozi Project Sponsor @uros76
                            last edited by

                            @uros76 the detection range will very likely be more than 180 degree, as the emission characteristic is more or less spherical. Further, the detection range depends also on the layout of your rooms, walls etc. Just give it a try and see what the result is.

                            HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                            1 Reply Last reply Reply Quote 1
                            • cowboysdudeC Offline
                              cowboysdude Module Developer @bachoo786
                              last edited by cowboysdude

                              @bachoo786 I have discovered that in the newer versions of the operating software for the PI that my scripts do NOT work any longer as the commands to turn the monitor on and off have changed… I have as of yet to find the correct command lines to make it work. I tested for 3 days and couldn’t get it to turn back on… It’s not MM…

                              uros76U 1 Reply Last reply Reply Quote 0
                              • uros76U Offline
                                uros76 @cowboysdude
                                last edited by uros76

                                @cowboysdude scripts works fine with my pi3.

                                It seems pi4 has different way of putting a monitor to sleep, I never figured out how to do it on pi4.
                                Instead, I tested lubuntu on pi4 and managed to put it out of sleep with this mouse click script linked to PIR motion:

                                xdotool click 1
                                

                                I can share more details on lubuntu setup if needed.

                                My magicmirror projects: https://forum.magicmirror.builders/post/79889, https://forum.magicmirror.builders/post/93241 and https://forum.magicmirror.builders/post/94586

                                cowboysdudeC 1 Reply Last reply Reply Quote 1
                                • cowboysdudeC Offline
                                  cowboysdude Module Developer @uros76
                                  last edited by cowboysdude

                                  @uros76 said in UPDATE: Replaced my PIR-Sensor with a Doppler Microwave Sensor.:

                                  @cowboysdude scripts works fine with my pi3.

                                  It seems pi4 has different way of putting a monitor to sleep, I never figured out how to do it on pi4.
                                  Instead, I tested lubuntu on pi4 and managed to put it to sleep with this mouse click script linked to PIR motion:

                                  xdotool click 1
                                  

                                  I can share more details on lubuntu setup if needed.

                                  Yes it works great on a Pi3… :) I am still using it for that…

                                  Yes please… I’d like to update the script for Pi4 but haven’t been able to get it working…
                                  Thank you!

                                  1 Reply Last reply Reply Quote 0
                                  • uros76U Offline
                                    uros76
                                    last edited by

                                    Ok.
                                    So, for a pi4 I managed to get PIR waking up MM screen with these steps:

                                    • Install latest Lubuntu with gdm3 environment
                                    • Edit /etd/gdm3/custom.conf. This will set autologin so that desktop environment loads every reboot
                                    # Enabling automatic login
                                      AutomaticLoginEnable = true
                                      AutomaticLogin = yourusername
                                    
                                    • Follow these steps to create wakeup script https://www.ketzler.de/2017/12/exit-screensaver-on-raspberry-pi-with-motion-sensor/
                                    • Create file “/etc/xdg/autostart/motion.desktop” with the following contents. This runs PIR sensing in the background after every reboot
                                    [Desktop Entry]
                                    Name=motion
                                    Exec=sudo gpio-watch -e rising 4
                                    
                                    • Set screensaver blank screen to desired timeout, 1min in my case. Lubutu knows how to handle pi4 blanking and puts to sleep my hdmi monitor

                                    This way I got pi4 waking up with PIR sensing. Not ideal setup but it works.
                                    I spent too much time trying to get pi4 work properly with Rapsberian, I simply had too many issues with it.
                                    At the end I am using pi3 for my first production MM and the pi4 is waiting for the next project.

                                    My magicmirror projects: https://forum.magicmirror.builders/post/79889, https://forum.magicmirror.builders/post/93241 and https://forum.magicmirror.builders/post/94586

                                    cowboysdudeC 1 Reply Last reply Reply Quote 1
                                    • cowboysdudeC Offline
                                      cowboysdude Module Developer @uros76
                                      last edited by

                                      @uros76 same here. I tried the Pi4 and had issues so I went back to the 3 and all the issues went away… so mine also sits waiting for the next project ;)

                                      Thank you for the info!!!

                                      1 Reply Last reply Reply Quote 1
                                      • uros76U Offline
                                        uros76
                                        last edited by

                                        Update on my MM setup. I finally took the time and now I have a working microwave sensor using the MMM-NewPIR module to automatically turn off and on LCD screen. For testing, I set the trimpot to 160ohms and it works ok through the normal glass. And this is all working on pi4 (2GB ram) using Rapsberrian. I have no clue why now all the sudden pi4 works just fine. Last week when I was testing I gave up :).

                                        Anyway, so far good and happy with the setup. Now waiting for mirror glass and then setting up the sensor sensitivity and assembly.

                                        My magicmirror projects: https://forum.magicmirror.builders/post/79889, https://forum.magicmirror.builders/post/93241 and https://forum.magicmirror.builders/post/94586

                                        FoziF 1 Reply Last reply Reply Quote 0
                                        • FoziF Offline
                                          Fozi Project Sponsor @uros76
                                          last edited by

                                          @uros76 Great to hear that it’s working now!

                                          HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                                          1 Reply Last reply Reply Quote 0
                                          • P Offline
                                            Philly @Fozi
                                            last edited by

                                            @Fozi Hi I was following the steps and everything is working fine I’m using the same pir module as you with the same configuration. But TV when I launch the mirror the screen is blank and at first it meant that the mirror was working and started moving my hand in front of the sensor and nothing. Is it necessary to solder the pins to the sensor for it to activate? If so then that must be my problem. I haven’t seen many other sources of a microwave sensor with raspberry pi only PIR and I would be greatly appreciate for your input.

                                            uros76U FoziF 2 Replies Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 3 / 6
                                            • 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