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.

    MM current version on Raspberry Pi 5 cannot turn off monitor

    Scheduled Pinned Locked Moved Solved Troubleshooting
    53 Posts 9 Posters 36.6k Views 9 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.
    • J Offline
      jbat66 @JohnGalt
      last edited by

      @JohnGalt Side note, I will buy someone a pizza, if I can get working commands to actually turn off and turn on my HDMI display. I think I have tried everything on the internet with no luck. I’m serious about the pizza!
      :-)

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

        @jbat66 you have to use the CEC client and have a CEC enabled display/monitor/tv.

        the energy star standard forces the big blue screen when u turn off the HDMI port output.

        all of the monitors since 2016 support the energy star std

        I can turn off my TV, but it won’t turn on. so the CEC support is broken.

        I hide all the modules. I use a web cam for motion detection

        I consider the glow to be the nightlight

        my pi3 doesn’t support using CEC client. nor odroid, Jetson nano, or my amd desktop or my Mac mini , or Chromebox running ubuntu

        pi 4 and 5 do
        haven’t tried on pi0w2

        HDMI port has to be bidirectional

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        BKeyportB J 2 Replies Last reply Reply Quote 0
        • BKeyportB Offline
          BKeyport Module Developer @sdetweil
          last edited by

          By the way - I do this with my monitors (One CEC, one not using bookworm):

          Off:

          pm2 stop all
          DISPLAY=:0 xrandr --output HDMI-1 --off
          DISPLAY=:0 xrandr --output HDMI-2 --off
          echo 'standby 0' | cec-client -s -d 1
          

          On:

          echo 'on 0' | cec-client -s -d 1 
          sleep 20
          DISPLAY=:0 xrandr --output HDMI-1 --auto
          sleep 1
          DISPLAY=:0 xrandr --output HDMI-2 --auto --right-of HDMI-1
          sleep 1
          pm2 restart all
          

          I have to stop and start the mirror(s) because if I don’t, they’ll move on top of each other.

          The "E" in "Javascript" stands for "Easy"

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jbat66 @sdetweil
            last edited by

            @sdetweil I’m just dimming all my modules and doing with the ‘nightlight’ effect. lol
            The Vilros Magic Mirror is using hdmi, but looks like CEC doesn’t work.
            https://www.amazon.com/gp/product/B0BJXD68JV

            S 1 Reply Last reply Reply Quote 0
            • J Offline
              jbat66 @BKeyport
              last edited by

              @BKeyport Thanks. I tried these on my Vilros Magic Mirror, and nothing happened, just errors. I tried them on my Raspberry PI 4 running older rasbian, and it work on there. except my monitor just went to flashing blue white pink. I guess that is the default no input screen. lol

              I think turning off the monitors have more to do with the version of rasbian, than with the hardware. IMHO

              S BKeyportB 2 Replies Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @jbat66
                last edited by

                @jbat66 yeh, probably the monitor they use behind the glass doesn’t support CEC

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @jbat66 said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                  I guess that is the default no input screen. lol

                  just unlug the hdmi cable, then u should see the default no input screen

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • BKeyportB Offline
                    BKeyport Module Developer @jbat66
                    last edited by

                    @jbat66 Oh, Wait, I just realized - I switched bookworm into X11 mode rather than Wayland - you may need to do that as well (I couldn’t get some operations I wanted to do to work in Wayland, yet - setting in raspi-config/advanced if you’re using RasOS)

                    If you don’t mind the monitor running but just want a blank screen, turn off the background picture, set the color to black, and remove the taskbar, then turn off MM and let it be. Might still get a mouse cursor, but there’s tools for that (Unclutter?)

                    The "E" in "Javascript" stands for "Easy"

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jbat66 @BKeyport
                      last edited by jbat66

                      @BKeyport Thanks, I’m already turning off my background pictures, and just dimming (could also just hide all) modules. The problem is that I want to turn off the screen but leave the pi running, because one of my MM will be in an RV and when boondocking (running on batteries) you want to use as little power as you can, so it is silly to run the screen at night.

                      I am using wayland, didn’t know I could goto X11, and not have a problem with MM. I may look into that, thanks!!

                      As a side note I couldn’t get unclutter to remove the mouse in wayland as it does in X, but I found ydotool using this command works well in wayland to move the mouse to the bottom right corner, so it only shows one pixel. :-)
                      ydotool mousemove -x 5000 -y 5000

                      right now, I have installed physical buttons, so I can shut the screen and pi down manually. I may crontab a shutdown of the pi, and then use yo-link (home automation switch) to kill the power after the crontab shutdown is done.

                      S BKeyportB 2 Replies Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @jbat66
                        last edited by

                        @jbat66 the mouse pointer should not show on the mm screen by default.

                        the main.css sets cursor to display:none;

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        BKeyportB 1 Reply Last reply Reply Quote 0
                        • BKeyportB Offline
                          BKeyport Module Developer @sdetweil
                          last edited by

                          @sdetweil Should is the key word. Some bug somewhere is causing the system to come up background to various things - sometimes mouse is on screen, sometimes the pi menubar is in front of the window (rare, but does happen). I had to use unclutter to fix one, and hide the menubar to fix the other. I know it’s not us, so it’s not reported to MM github issue.

                          The "E" in "Javascript" stands for "Easy"

                          1 Reply Last reply Reply Quote 0
                          • BKeyportB Offline
                            BKeyport Module Developer @jbat66
                            last edited by

                            @jbat66 not sure how much power the pi+power supply takes and if it would be worth it to shut it down overnight. Could rig a button to do a graceful shutdown, then use the power down button to shut down both the pi and the monitor. Interesting ideas here. Let me know what you come up with.

                            The "E" in "Javascript" stands for "Easy"

                            S J 2 Replies Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @BKeyport
                              last edited by sdetweil

                              @BKeyport i have been transitioning to Home Assistant for my home austomation platform.

                              and interesting idea being described for integrating older devices, like washing machine, is to monitor the power consumption with a smart plug… (I don’t know which do that in the US)

                              I wonder if the ps also has a lower consumption that can be measured and used as a trigger to turn off the smart switch when the power drops after pi shuts down…

                              i’ll have to try to find one of these outlets
                              maybe
                              https://www.amazon.com/gp/product/B08TNF4835/ref=ox_sc_act_title_4?smid=ATVPDKIKX0DER&psc=1

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              J 1 Reply Last reply Reply Quote 0
                              • J Offline
                                jbat66 @sdetweil
                                last edited by

                                @sdetweil Get a Yo-Link Plug. They have an API, you get your API key from an advanced menu in their app. Their plugs do grab usage, I have not used the API to grab usage, just to turn on and off, and to get temperatures from their sensors. I then use the API in MM to display the temperatures.
                                https://www.amazon.com/s?k=yolink+smart+plug
                                The whole Yo-Link echo system is great for DIY folks in home automation.

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

                                  @jbat66 trying to find devices without host connections… get more/all local

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  J 2 Replies Last reply Reply Quote 0
                                  • J Offline
                                    jbat66 @BKeyport
                                    last edited by

                                    @BKeyport the physical Mirror’s Power supply is the only thing I plug in, and the PI gets its power from USB from the display, so no extra power source to monitor.

                                    I will probably just do a bash script to shut down the pi at some time say 10:00pm, then I will have Alexa shut down the mirror’s power (thus the pi as well) via a Yo-Link smart plug at 10:05pm. Then at sunrise via Amazon Alexa, I will just turn on mirror.

                                    I already do this for my RV Starlink, since I have cell modem as a backup, I can use the internet to turn on and off my internet. lol

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      jbat66 @sdetweil
                                      last edited by

                                      @sdetweil said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                                      @jbat66 trying to find devices without host connections… get more/all local

                                      While the Yo-Link is great it is cloud and you can’t do local yet. They have been talking about it in their forums, however.

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jbat66 @sdetweil
                                        last edited by

                                        @sdetweil
                                        I looked it up and you can get power readings via the API.
                                        http://doc.yosmart.com/docs/yolinkapi/Outlet

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

                                          @jbat66 yeh gotta get a token for each I think

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          karsten13K 1 Reply Last reply Reply Quote 0
                                          • karsten13K Offline
                                            karsten13 @sdetweil
                                            last edited by

                                            @sdetweil

                                            and interesting idea being described for integrating older devices, like washing machine, is to monitor the power consumption with a smart plug… (I don’t know which do that in the US)

                                            thats exactly what I plan for my washing machine

                                            I wonder if the pi also has a lower consumption that can be measured and used as a trigger to turn off the smart switch when the power drops after pi shuts down…

                                            I ordered a smart plug from TuYa for this and tested this now with a raspberry pi 4.

                                            When the pi is running:
                                            pi_on.png

                                            After shutdown of the pi but red light of pi still on:
                                            pi_off_red_light.png

                                            S 1 Reply Last reply Reply Quote 1

                                            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
                                            • 2 / 3
                                            • 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