michaelarnauts / cec-mqtt-bridge

A HDMI-CEC to MQTT bridge for connecting HDMI-CEC-devices to your Home Automation system.
150 stars 48 forks source link

[Bug] Vendor and physical address broadcasts set power status to 'on' #35

Closed caraar12345 closed 1 year ago

caraar12345 commented 1 year ago

Within bridge.py, it seems the decision was made to set power status to on when a device broadcasts its vendor ID or physical address. This invalidates the actual Report power status routine just above!

I can't see any reason for either of those two routines to exist at all so I'd propose removing them. I just have in my own install and it means the power status can actually be trusted again! Before, it was just constantly flapping to on every time it broadcasted itself, and then back off once it broadcasted its power status.

michaelarnauts commented 1 year ago

Thanks for your feedback!

Not sure anymore why that is in the code, the code is old, but I'm still using it daily with my AVR, and I don't notice any problem.

I assume my device doesn't send the report power status somehow, and I'm using the vendor id as an indication that the device turned on? Not sure though...

I suggest to tweak with the code untill it works fine for your devices. CEC is implemented differently by every vendor, so I'm not sure it's possible to find a solution here that works for everyone...

caraar12345 commented 1 year ago

Ahhhh that makes sense!

I should have guessed it'd be a "devices be weird" thing; my soundbar doesn't even let me control it over CEC despite it "supporting ARC"/

What a weird, weird protocol 😆 (thanks for the bridge - it's genuinely very useful!)

michaelarnauts commented 1 year ago

@caraar12345 it seems I was running on my rework branch all this time. I just merged this to master. Maybe I've changed something there that also helps you?