Skip to content

Incorrect "powerStatus" values when switching with the IR remote control #2

@Markkuuss

Description

@Markkuuss

Very nice work. I use the module cec-web-api and it works really great. Only when I switch my devices on/off with the remote control, the powerStatus value is not correct.

My problems:

  1. Switching the soundbar on/off with the remote control is not recognized at all. The "powerStatus" always keeps its last state. The state does not change.
  2. When switching on the TV with the remote control, the "powerStatus" remains in the status "in transition from standby to on" and does not change to "on" later.

Regarding 1:

Here is the debug output when switching on the soundbar:

  cec-client TRAFFIC: [          378250]        >> 5f:84:30:00:05 +21s
  cec-controller Received report address request on broadcast +21s
  cec-controller Running command: pow 5 +1ms
  cec-controller dev5 powerStatus is: standby +28ms
  cec-client TRAFFIC: [          378759]        >> 5f:84:30:00:05 +509ms
  cec-controller Received report address request on broadcast +480ms
  cec-controller Running command: pow 5 +1ms
  cec-controller dev5 powerStatus is: standby +21ms

If a device sends the broadcast with the physical address, would it be possible to additionally check the "powerStatus" and set it correctly?

Here is the debug output when switching off the soundbar:

cec-client TRAFFIC: [           62951]        >> 5f:72:00 +32s

I think this would be relatively easy to solve by evaluating the traffic. The broadcast command "...f:72:00" seem not to be evaluated at the moment. If an audio device sets the System Audio Mode to Off, the "powerStatus" is also off.

Regarding 2:

Here is the debug output when switching on the TV:

cec-client TRAFFIC: [          779364]        >> 0f:84:00:00:00 +38s
cec-controller Received report address request on broadcast +41s
cec-controller Running command: pow 0 +1ms
cec-client TRAFFIC: [          779364]        << 4f:84:20:00:04 +3ms
cec-client TRAFFIC: [          779514]        << 40:8f +148ms
cec-client TRAFFIC: [          779698]        >> 0f:87:00:90:3e +183ms
cec-client TRAFFIC: [          779698]        << 4f:87:00:15:82 +1ms
cec-client TRAFFIC: [          780575]        << 40:8f +877ms
cec-controller Updated dev0 powerStatus using stdout to: in transition from standby to on +2s
cec-controller dev0 powerStatus is: in transition from standby to on +1ms
cec-client TRAFFIC: [          780956]        >> 04:90:02 +383ms
cec-client TRAFFIC: [          781171]        >> 04:90:02 +213ms
cec-client TRAFFIC: [          787750]        >> 0f:80:00:00:10:00 +7s
cec-client TRAFFIC: [          789818]        >> 5f:84:30:00:05 +2s
cec-controller Received report address request on broadcast +9s

Similar to the soundbar, the TV probably doesn't report power status automatically when it is turned on with the remote control. It only reports "04:90:02" once, but no "04:90:00" afterwards. This would probably have to be actively requested.

Possible solution

The simplest solution to always guarantee an up-to-date "powerStatus" for all devices would probably be the active cyclic request of the "Device Power Status" (8F) across all devices. Would it be possible to run a thread that queries the "Device Power Status" e.g. every 5 seconds?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions