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.

    how to adjust brightness based on time on RPi3?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 3 Posters 3.2k Views 4 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.
    • ? Offline
      A Former User @lkthomas
      last edited by A Former User

      @lkthomas
      For official 7" LCD Screen, echo 32 > /sys/class/backlight/rpi_backlight/brightness will work.
      For common monitors, as far as I know, debian has xbacklightbut I’m not sure it will work on RPI also.

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        lkthomas @Guest
        last edited by

        @sean

        pi@raspberrypi:~/MagicMirror/config $ xbacklight
        RANDR Query Version returned error -1

        no, doesn’t work in RPi3

        1 Reply Last reply Reply Quote 0
        • I Offline
          ianperrin @lkthomas
          last edited by

          @lkthomas take a look at MMM=ModuleScheduler. It contains a method for dimming modules.

          Once installed, adding something like this should to your config.js should work

              {
                  module: 'MMM-ModuleScheduler',
                  config: {
                      // SHOW ALL MODULES AT FULL BRIGHTNESS AT 06:00 AND DIM THEM TO 20% AT 22:00
                      global_schedule: {from: '0 6 * * *', to: '0 22 * * *', dimLevel: '20' },
                  }
              },

          "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            lkthomas @ianperrin
            last edited by

            @ianperrin just tested, dimlevel at 20 and 80 also show black screen

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              ianperrin @lkthomas
              last edited by

              @lkthomas okay, a couple of things to check

              1. Have you installed the module and its dependencies as per the instructions
              2. Did you restart MM after installing and changing the config.js file.

              With the config above place at the end of modules section you should see the following lines in the log.

              MMM-ModuleScheduler is removing all scheduled jobs
              MMM-ModuleScheduler received CREATE_GLOBAL_SCHEDULE
              MMM-ModuleScheduler is creating a global schedule for all modules using "0 6 * * *" and "0 22 * * *" with dim level 20
              MMM-ModuleScheduler has created the global schedule for all modules
              MMM-ModuleScheduler will next show all modules at Sun Jan 13 2019 06:00:00 GMT+0000 (UTC)
              MMM-ModuleScheduler will next dim all modules at Sat Jan 12 2019 22:00:00 GMT+0000 (UTC)
              

              Whilst testing, you could use the following config to toggle the brightness more frequently (i.e. every two minutes):

                      {
                          module: 'MMM-ModuleScheduler',
                          config: {
                              global_schedule: {from: '0-59/4 * * * *', to: '2-59/4 * * * *', dimLevel: '20' },
                          }
                      },
              

              Let us know how you get on.

              "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi

              1 Reply Last reply Reply Quote 1
              • L Offline
                lkthomas
                last edited by

                all good! thanks, I missed the dependencies installation section.

                1 Reply Last reply Reply Quote 1
                • 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