Closed lukasmalkmus closed 3 years ago
@lukasmalkmus
The polling only shows what the TV thinks it is displaying. The problem with CEC is that the TV only displays it correctly when the connection is established. Otherwise it is only e.g. HDMI 3.
Also during the installation the TV is switched on when configuring or reading the inputs because the CEC devices are not readable when switched off.
The plugin does NOT manipulate the output of the TV, but queries the endpoint getPlayingContent
and the TV responds. For example, if you have Apple TV turned on but the TV says HDMI 3, this is because the underlying API has not yet updated the state because CEC devices needs some time.
I have an Apple TV and a Playstation 4 attached to my Sony TV via HDMI. By utilizing CEC, the TV can control those devices. In the plugin config UI, there are two separate inputs listed: HDMI and CEC inputs separately. However, "under the hood", they are the same physical device. There is a major difference when configuring them for use in HomeKit: If I configure HDMI inputs, the TV will switch to them, but not start the attached devices. If I configure CEC inputs, this will actually work, which is kind of a nice feature IMHO. But there is one catch:
While the correct input is set, the polling reports the "wrong" one. While this could in theory be a bug, I don't think it is: The actual input returned is correct. But since HomeKit just knows about the configured CEC inputs, it doesn't know what to do with the response and doesn't show the selected input source.