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.

    PIR-Sensor - put your mirror to sleep if not used

    Scheduled Pinned Locked Moved Troubleshooting
    126 Posts 37 Posters 218.2k Views 20 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.
    • MichMichM Offline
      MichMich Admin @KirAsh4
      last edited by

      @KirAsh4 Yeah, MM supports Node 6.1.0 @paviro apparently still live in the stone age with his modules … 😈

      KirAsh4K 1 Reply Last reply Reply Quote 0
      • KirAsh4K Offline
        KirAsh4 Moderator @MichMich
        last edited by

        @MichMich, I have a laser … let’s tie him up and put his hand under the beam. That’ll teach him!

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • MichMichM Offline
          MichMich Admin
          last edited by

          He is from the stone age. He doesn’t know what a laser is. 😱

          1 Reply Last reply Reply Quote 0
          • KirAsh4K Offline
            KirAsh4 Moderator
            last edited by

            0_1463677954464_paviro.jpg

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • paviroP Offline
              paviro Admin
              last edited by

              Ha, ha :laughing:
              Will change my dependencies when I have some spare time.

              We're all stories in the end. Just make it a good one, eh?

              – The Doctor

              1 Reply Last reply Reply Quote 0
              • P Offline
                Patrick
                last edited by

                At first: Thank you very much.
                This module is great and works fine for me.
                When it’s allowed to make some suggestion…
                you maybe could add a possibility to switch wireless sockets.
                The effort for this shouldn’t be much, when you can use xkonni’s remote control.
                https://github.com/xkonni/raspberry-remote
                This would be a great possibity for those, who don’t feel comfortable to use a 230V relais… (I studied Mechatronics, so i don’t care :P)

                1 Reply Last reply Reply Quote 0
                • paviroP Offline
                  paviro Admin
                  last edited by

                  Feel free to send a pull request! :)

                  We're all stories in the end. Just make it a good one, eh?

                  – The Doctor

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    MechMatt @paviro
                    last edited by

                    @paviro any suggestions on what relay to get for use with this? There are lots of choices on amazon

                    IngmarSwartI 1 Reply Last reply Reply Quote 0
                    • P Offline
                      Patrick
                      last edited by

                      Ok. When I’ve time, I will get a wireless transmitter.
                      Would be embarrasing if it wouldnt work because I’ve never tried :anguished:

                      1 Reply Last reply Reply Quote 0
                      • IngmarSwartI Offline
                        IngmarSwart @paviro
                        last edited by

                        @paviro I finally found some time to look into the problem I had some more. The exact origin is still unclear to me, but I did figure out that my problem, it is not related to your module, or the MM software in general. I got the same behaviour over ssh: tvservice -o switches the monitor connected to the Pi off, tvservice -p switches it back on, but the screen would appear black. After fiddling around a little bit, I found another solution that does not require root rights. Instead of using the sudo chvt 7 && sudo chvt 9 command, the problem can also be solved using fbset. My modified version of the activateMonitor function file node_helper.js:

                        activateMonitor: function () {
                            if (this.config.relayPIN != false) {
                              gpio.digitalWrite(this.config.relayPIN, this.config.relayOnState)
                            }
                            else if (this.config.relayPIN == false){
                              exec("/opt/vc/bin/tvservice -p", null);
                              exec("/bin/fbset -depth 8 && /bin/fbset -depth 16 ", null);
                              exec("/usr/bin/xrefresh",null);
                            }
                        

                        For the command xrefresh to work when given via ssh, the correct display variable has to be set (in my case):
                        export DISPLAY=:0 I have added this line to my .profile file in the /home/pi directory so that I don’t have to type it every time I log in via ssh.

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 8
                        • 12
                        • 13
                        • 6 / 13
                        • 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