Read the statement by Michael Teeuw here.
how to adjust brightness based on time on RPi3?
-
I want to adjust brightness to 100% during day time and 20% at night, how could I do that with RPi3?
-
@lkthomas
For official 7" LCD Screen,echo 32 > /sys/class/backlight/rpi_backlight/brightnesswill work.
For common monitors, as far as I know, debian hasxbacklightbut I’m not sure it will work on RPI also. -
@sean
pi@raspberrypi:~/MagicMirror/config $ xbacklight
RANDR Query Version returned error -1no, doesn’t work in RPi3
-
@lkthomas take a look at MMM=ModuleScheduler. It contains a method for dimming modules.
Once installed, adding something like this should to your
config.jsshould 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' }, } }, -
@ianperrin just tested, dimlevel at 20 and 80 also show black screen
-
@lkthomas okay, a couple of things to check
- Have you installed the module and its dependencies as per the instructions
- Did you restart MM after installing and changing the
config.jsfile.
With the config above place at the end of
modulessection 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.
-
all good! thanks, I missed the dependencies installation section.
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