LukeSkywalker92 / TeleFrame

TeleFrame - a digital picture frame for telegram
MIT License
92 stars 28 forks source link

Screen Switch-off / switch-on command executed 60*60 times #61

Closed mistau closed 4 years ago

mistau commented 4 years ago

current software executes the command to switch-off or -on the backlight every second for a full hour which depending on the style how the switch is done might lead to strange effects. It fills the log file as well.

chemical1979 commented 4 years ago

btw, the executed tvservice command does not seem to work with the raspberry pi foundation touch screen (not a hdmi device). As i'm not familiar with python (yet) I worked around by using a crontab for this. Maybe this could be integrated into the code also:

pi@teleframe:~/TeleFrame $ cat /etc/cron.d/display-onoff
# 0700 - on, 2300 - off
00  7 * * * root echo 0 >/sys/devices/platform/rpi_backlight/backlight/rpi_backlight/bl_power
00 23 * * * root echo 1 >/sys/devices/platform/rpi_backlight/backlight/rpi_backlight/bl_power

Might not be possible easily because the file is writeable by root only by default. Maybe there is some other way I do not know about.

EDIT: Just found this ;-) Thank you.