jbree / homebridge-cec-accessory

Homebridge support for CEC devices over HDMI
MIT License
19 stars 6 forks source link

Tv has unknown powerstate when off #11

Open jac4e opened 6 years ago

jac4e commented 6 years ago

When my current tv is in its 'standby' mode, it does not respond to any ven/pow commands in cec-client, however, it does respond to the on command. This has caused a bit of problems with this plugin as when the tv does not report a power state the plugin will timeout on getOn and not continue to turn the tv on and then reports the switch as unresponsive. I believe this can be solved by adding a toggle under the accessory in config.json to make the off state of the tv be whenever the tv does not return an on power state. (i.e. if tv power state is not on therefore tv must be off)

jbree commented 6 years ago

Thanks for the report. I don't have a way to test this, but try installing this branch: https://github.com/jbree/homebridge-cec-accessory/tree/branch-timeout-fix

Your accessory config needs to include "timeoutFix": true for it to work.

It does as you suggested: when timeoutFix is enabled, timeouts cause the device to report back as being off.

ersan commented 6 years ago

It's a few months later but I wanted to report that this workaround does work with my TV.

Unfortunately my TV sucks and will stop responding to CEC commands for no reason, I'll have to stick with my Harmony setup for now I think.

jbree commented 6 years ago

CEC is pretty inconsistent and terrible. Don't tell anyone, but I don't even use it myself anymore. Thanks for validating it, though!