Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEC-off before shutdown #24

Open
DeeWeezzz opened this issue Jul 8, 2021 · 0 comments
Open

CEC-off before shutdown #24

DeeWeezzz opened this issue Jul 8, 2021 · 0 comments

Comments

@DeeWeezzz
Copy link

DeeWeezzz commented Jul 8, 2021

Hi,

I'm generally new to the Pi and it's features.
What I try to do is to insert a subprocess before the shutdown, to turn the tv off.

What I tried:
Create a monitor_off.sh-file with command: echo 'standby 0' | cec-client -s -d 1
Edit listen-for-shutdown-file to:

subprocess.call("sh monitor_off.sh", shell=True)
time.sleep(5)
subprocess.call(['shutdown', '-h', 'now'], shell=False)

Yet even if I delete the shutdown entirely, the Pi just reboots somehow.

Do you have a better Idea or a fix for my problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant