Command to detect if SPDIF link or HDMI source is active

Hello,

On a Vero4k/4k+, is there a command to check if an audio receiver connected via SPDIF is active / powered on?

Or alternatively, if the Vero’s HDMI connection is currently set as the source on a TV?

Thx.

No.

It ought to be available through CEC. What is your objective?

I’d like to create a script to start/stop Kodi, based on the HDMI source selected on the TV. I can check if the TV is on, using the disp_cap file, but not if the source selected on it is the HDMI port which the Vero is connected to.

You may be able to do it using cec-client

Thx for the hint. It indeed provides some info, but in case of my TV not enough unfortunately. So I want to try a different approach; is there a command/api that activates OSMC’s Suspend mode?

You could invoke Kodi’s Suspend via JSON-RPC.