• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

face recognizes display ON/OFF

Scheduled Pinned Locked Moved General Discussion
9 Posts 5 Posters 1.6k Views 5 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.
  • D Offline
    DJBOOB66
    last edited by Jul 17, 2021, 9:08 PM

    I want a more securer way so My work Calander is not visible for other users this is why I’m going down the Face recognition .
    GAv3 can turn the screen ON OFF but anyone how to know the command can do so.

    S 1 Reply Last reply Jul 17, 2021, 11:07 PM Reply Quote 0
    • S Offline
      sdetweil @DJBOOB66
      last edited by Jul 17, 2021, 11:07 PM

      @djboob66 look at his code, he uses the same commands

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        suvan @DJBOOB66
        last edited by Aug 10, 2021, 3:49 PM

        @djboob66 Hey, have you found any code yet? I’m looking for the same thing as well. Really need help with this.

        S 1 Reply Last reply Aug 10, 2021, 4:25 PM Reply Quote 0
        • S Offline
          sdetweil @suvan
          last edited by Aug 10, 2021, 4:25 PM

          @suvan looking for what?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil
            last edited by Aug 10, 2021, 4:33 PM

            as I said before, look at the GA code that does this… its the same 4 commands as always

            https://github.com/bugsounet/screen/blob/master/index.js

            and

             async setPowerDisplay (set) {
                log("Display " + (set ? "ON." : "OFF."))
                this.screen.power = set
                this.SendScreenPowerState()
                if (this.screen.awaitBeforeTurnOff && !set) await this.sleep(this.screen.awaitBeforeTurnOffTime)
                // and finally apply rules !
                switch (this.config.mode) {
                  case 1:
                    if (set) exec("/usr/bin/vcgencmd display_power 1")
                    else exec("/usr/bin/vcgencmd display_power 0")
                    break
                  case 2:
                    if (set) exec("DISPLAY=:0 xset dpms force on")
                    else exec("DISPLAY=:0 xset dpms force off")
                    break
                  case 3:
                    if (set) exec("tvservice -p && sudo chvt 6 && sudo chvt 7")
                    else exec("tvservice -o")
                    break
                  case 4:
                    if (set) exec("echo 'on 0' | cec-client -s")
                    else exec("echo 'standby 0' | cec-client -s")
                    break
                  case 5:
                    if (set) exec("xset dpms force on")
                    else exec("xset dpms force off")
                    break
                }
              }
            

            you should try each command to see what the results are
            do this from and ssh connection to your pi, so you don’t have to fight getting the screen back on to work…

            note that most of these turn off the HDMI port, and NOT the actual monitor.
            many newer displays (since 2016) are energy star compliant and will display an upgly no input signal when the hdmi port is turned off… no way to override that

            (and these displays will NOT turn back on when the hdmi port is turned back on)

            ps… none of my displays will work with any of these commands

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            C 1 Reply Last reply Aug 11, 2021, 11:44 PM Reply Quote 0
            • C Offline
              cowboysdude Module Developer @sdetweil
              last edited by Aug 11, 2021, 11:44 PM

              @sdetweil on the PI3… I just got mine working again this is the commands that work:

              ON:
              #! /bin/bash
              sudo vcgencmd display_power 1

              OFF:
              #! /bin/bash
              sudo vcgencmd display_power 0

              S 1 Reply Last reply Aug 12, 2021, 12:45 AM Reply Quote 0
              • S Offline
                sdetweil @cowboysdude
                last edited by Aug 12, 2021, 12:45 AM

                @cowboysdude cool. what monitor is that with?

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                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