Open MiningMarsh opened 2 years ago
I recently purchased one of these devices for this purpose. It is quite simple to use, but my priorities have been elsewhere lately. I'm glad to know that others are interested in this. I'll be sure to update this post once I've started the PR.
Actually a boot timer is already included in libcec itself. See here
I will try to see what works
Seems to be a duplicate of #149
Pulse-Eight sells a USB HDMI CEC adapter. It is the same one used in the raspberry pi as they provide the module for it. The adapter is cheap and can be used to do things like switch the TV input.
The following library includes a very simple to use command line client: https://github.com/Pulse-Eight/libcec. I believe an arch package exists for it.
I think it would greatly enhance the console experience if a command to turn the input active during bootup and a command to disable the input during shutdown was implemented. Additionally, turning the input off for suspend when pressing the power button and turning it on in resume would be desirable. This is similar to how Xbox implements their CEC so that you can turn a controller on and it wakes the console and turns the TV on. Waking the system with a USB Xbox wireless adapter already works, so cec-client is the only missing piece.
Turning the display off and on should be as simple as a systemd service that calls
echo as | cec-client -s
to turn it on andecho standby 0 | cec-client -s
to turn it off during boot and shutdown respectively. If no CEC dongle is available this just won't do anything and is safe.