@cruunnerr said in {HowTo} turn on/off your monitor (Time based, PIR/Button, App):
@chandra said in {HowTo} turn on/off your monitor (Time based, PIR/Button, App):
Screen goes off after 120sec, But when it sense the motion, the screen is black.
Hint from the main post:
To check if it works just go into terminal via ssh and type:
sudo tvservice -o to turn off
sudo tvservice -p to turn onedit: for some monitors the following commands work better. Please use them if your monitor needs it:
vcgencmd display_power 0 to turn off
vcgencmd display_power 1 to turn onedit:
also check this:
https://forum.magicmirror.builders/topic/6291/howto-turn-on-off-your-monitor-time-based-pir-button-app/11
A Big Thanks to all. Gone through all the posts.
I split up the things.
First, checked the screen on and off (by editing the script). Tried the steps. screen on was the problem. so skipped that.
second, checked the led lights on and off alone. It worked like a charm.
Then gone back to screen on to work together. The problem was with monitor,old one,connected by hdmi-vga adapter.
Found a solution:
Added
sudo tvservice -p
sudo chvt 9 && sudo chvt 7
This worked :smiling_face_with_heart-eyes: .
Now , both working together. I used your lights_on.sh and lights_off.sh and modified as per my liking.