Last active
January 12, 2020 17:49
-
-
Save saerdnaer/fa7ecee3f16007385bcdb66770d33fe3 to your computer and use it in GitHub Desktop.
control hdmi display via cec from raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# see https://www.screenly.io/blog/2017/07/02/how-to-automatically-turn-off-and-on-your-monitor-from-your-raspberry-pi/#cec-client | |
# and crontab -e (of user "pi") --Andi | |
case "$1" in | |
on) | |
echo 'on 0' | cec-client -s -d 1 | |
;; | |
off) | |
echo 'standby 0' | cec-client -s -d 1 | |
;; | |
status) | |
echo 'pow 0' | cec-client -s -d 1 | |
;; | |
*) | |
echo $"Usage: $0 {on|off|status}" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment