Start TV from command line with CEC?

Hi there,

I was just wondering if there’s a way to start my TV via the shell with the help of CEC? Plex is able to launch the TV if I put it on, so some kind of library or something exists…

Any help appreciated.
Regards,
Chris.

@SolykZ said:
Hi there,

I was just wondering if there’s a way to start my TV via the shell with the help of CEC? Plex is able to launch the TV if I put it on, so some kind of library or something exists…

Any help appreciated.
Regards,
Chris.

You need to change the CEC settings in Preferences.

Regards

@NedtheNerd said:
You need to change the CEC settings in Preferences.
Regards

Hello,

Could you please tell me where, in the CEC settings, I would be able to start my TV by command line? Some screenshots or something, maybe? All I see there is GUI related.

Regards,
Chris.

@SolykZ said:
Could you please tell me where, in the CEC settings, I would be able to start my TV by command line? Some screenshots or something, maybe? All I see there is GUI related.

Regards,
Chris.

Sorry misunderstood.

Try:

 echo "on 0" | cec-client -s

To put TV in standby use:

 echo 'standby 0' | cec-client -s

Regards

@NedtheNerd said:
Sorry misunderstood.
Try:
echo “on 0” | cec-client -s
To put TV in standby use:
echo ‘standby 0’ | cec-client -s
Regards

Okay, that’s a total answer. It works like a charm for the power on. Thank you! :slight_smile:
(I tried the standby as well but it didn’t worked, which is, in my case, not a real issue.)

Could you tell me if these commands were documented and where? I’m curious to know all the possibilities about this.

I’m sure they are documented somewhere, theses came out of my head, been using them for years.

Regards