A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
how to adjust brightness based on time on RPi3?
-
@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.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' }, } },
-
@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.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.
-
all good! thanks, I missed the dependencies installation section.