-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDMI-CEC Component #3017
base: dev
Are you sure you want to change the base?
HDMI-CEC Component #3017
Conversation
Hey there @johnboiles, CODEOWNERS = ["@johnboiles"] And run (message by NeedsCodeownersLabel) |
2d07b8a
to
818f480
Compare
56eaf6b
to
b742f3b
Compare
Looks like the failure is some warnings treated as errors on ESP32 in the external s-moch/CEC library :/ I'll probably need to fork that library. |
Thanks @jesserockz! It's been a really busy season for me, sorry I haven't been able to get back to this. If someone else wants to get across the finish line that's fine with me. |
@quentinmit what's left before this is PR-ready? I'll take a look when I have a minute. Thanks for your work so far |
I would love to experiment with this soon. Can this pull the volume level status from a known audio device and pass that back to an apple tv so the remote knows what relative level it is controlling? |
@quentinmit I've tried to copy your changes into my existing esphome container and test but I've run into a few issues:
Any ideas? Thanks |
I have test this on my TV with an ESP8266, the example works great. Thanks. |
@Minims are using the version from this PR or quentinmit's repo? |
I use the repo from @johnboiles branch hdmi-cec
|
@johnboiles my TV always recognize my esp as a Audio Receiver even if I set the address to |
@johnboiles This PR is not working for me on an ESP32-C3FN4 using GPIO3 (pin 8) on an Seeed XIAO. While I can see that transmitting CEC commands seem to work on my oscope, once this is connected to an HDMI source/sink, receiving any CEC commands appears to hang the MC and then the watchdog timer resets.
and
My config yaml is such: esp32:
board: seeed_xiao_esp32c3
variant: esp32c3
external_components:
- source: github://pr#3017
components: [ hdmi_cec ]
hdmi_cec:
address: 0x05
promiscuous_mode: true
physical_address: 0x4000
pin: 3 # GPIO3
on_message:
- data: [0x44, 0x42] # User control pressed: volume down
then:
- logger.log: "Volume down" Using esphome version |
I have similar issues, posted in the author's repo the issue: johnboiles/esphome-hdmi-cec#4 It would be so good if this would be finished! @johnboiles |
@quentinmit No success for me with your version on ESP32 and a Sony TV:
no communication with the TV. |
Trying to implement a switch to turn TV on or off: switch:
- platform: template
name: "TV Power"
id: tv_power
turn_on_action:
- hdmi_cec.send:
destination: 0x0
data: [0x44, 0x6d]
turn_off_action:
- hdmi_cec.send:
destination: 0x0
data: [0x44, 0x6c] This works. However I'd like to periodically update the state of the switch with: - hdmi_cec.send:
destination: 0x0
data: [0x8F] To what the TV responds, which is parsed by: hdmi_cec:
...
on_message:
- data: [0x90, 0x00] # Power status: On
then:
- logger.log: "Power state On"
- switch.template.publish:
id: tv_power
state: ON
- data: [0x90, 0x01] # Power status: Standby
then:
- logger.log: "Power state Standby"
- switch.template.publish:
id: tv_power
state: OFF However, template switch only allows for a - hdmi_cec.send:
destination: 0x0
data: [0x8F] in Of course, I know that this could be simply put in an |
|
It is indeed hardcoded; see https://github.com/johnboiles/esphome-hdmi-cec/blob/292632456f6e427b0e957299c11b93b3e07f14f5/components/hdmi_cec/hdmi_cec.cpp#L97-101 - this might need to be changed. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
I've been holding my breath for months hoping this PR would be finished and merged. I'd be happy to pay a bounty to get this finished (including proper fixes for issues reported in this thread) and merged. |
Just to let you guys know, I did the clean porting to ESP8266/ESP32 for Tasmota. Now there is only one class with no virtual members, Receive is driven by interrupts for precise timing, and Transmit is using spin-loops. It is extremely reliable now. arendst/Tasmota#19434 |
I hope this will get merged soon, this should allow to set the channel of TV box (canalsat) for broadcasting football matchs in my bar, directly from a Calendar (the staff always forgot or loose the remote). |
then the PR owner need to fix the conflicts etc. |
@nielsnl68 @sduponch I think code need to be a bit cleaner too. |
@johnboiles I'm not a coder and wish I could help, but can I buy you a beer/coffee to get this across the finish line? :) |
This seems to be a good alternative |
@Minims wow!! Thank you so much for sharing that, this looks like a really good solution to an issue I've been trying to work around for years but have constantly been roadblocked by incomplete solutions. All I want to do is fake the presence of an AV receiver on the same CEC network as my Apple TV and have it route commands to a HiFiBerry to control the digital audio volume levels. I have found out the hard way that it's more complicated than expected to change digital volume and is best handled by a DSP. The web interface for HiFiBerry is quite good, and the home assistant integration works well, but I really want to be able to use my Apple TV remote to control and mute volume, without needing to use a separate device. It's such a simple dumb thing that has been very frustrating to implement. |
What does this implement/fix?
This PR adds a component to send and receive HDMI-CEC messages.
My use case: I already have an IR blaster built with ESPHome, but my new TCL TV has a Bluetooth remote. I want to control my older sound gear (connected over optical) with the TV remote but this TV only supports controlling sound gear via HDMI (typically for HDMI-ARC devices). This component allows me to intercept HDMI-CEC volume commands from the TV and transmit the IR codes to control the soundbar.
This should be handy for others with use cases like mine to modernize older equipment. You can also find monitor which source is selected, detect which HDMI devices are powered on, turn your TV on/off, send remote control commands. CEC-O-Matic is a good reference for possible HDMI-CEC commands.
Types of changes
Docs PR: esphome/esphome-docs#1789
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed:
See also, the README.md in my external component repo.