Closed titou4307 closed 1 day ago
Hi :)
I use these button commands:
button:
- platform: template
name: "Turn all HDMI devices off"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 0xF # Broadcast
data: [0x36] # "Standby" opcode
- platform: template
name: "Turn TV on"
on_press:
hdmi_cec.send:
source: 1 # can optionally be set, like if you want to spoof another device's address
destination: 0
data: [0x04]
- platform: template
name: "Turn TV off"
on_press:
hdmi_cec.send:
source: 1 # can optionally be set, like if you want to spoof another device's address
destination: 0
data: [0x36]
- platform: template
name: "Volume up"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 0x5
data: [0x44, 0x41]
- platform: template
name: "Volume down"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 0x5
data: [0x44, 0x42]
- platform: template
name: "Mute"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 0x5
data: [0x44, 0x43]
- platform: template
name: "Turn on Playback device 1"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x44, 0x6D]
- platform: template
name: "Turn off Playback device 1"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x36]
- platform: template
name: "Playback device 1 home button"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x44, 0x09]
- platform: template
name: "Playback device 1 select/ok"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x44, 0x00]
- platform: template
name: "Playback device 1 exit/back"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x44, 0x0D]
- platform: template
name: "Playback device 1 play/pause"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 4
data: [0x44, 0x44]
- platform: template
name: "Turn on Playback device 2"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 8
data: [0x44, 0x6D]
- platform: template
name: "Turn off Playback device 2"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 8
data: [0x36]
- platform: template
name: "Playback device 2 play/pause"
on_press:
hdmi_cec.send:
# "source" can optionally be set, like if you want to spoof another device's address
destination: 8
data: [0x44, 0x46]
Re Hello @DIYtechie Thanks for your YAML
I will made connection properly and add the YAML
You connect where your HDMI Cec ? I have connect mine to HDMI 2 of my TV and code YAML like this :
# Physical address of the device. In this case: 4.0.0.0 (HDMI4 on the TV)
# DDC support is not yet implemented, so you'll have to set this manually.
physical_address: 0x2000 # Required
Does it good ?
May be you use a switch ?
This is slightly off topic, but mine is connected to an AVR, so my physical adress is 4200. It sounds about right that yours should be 2000. I think this issue about buttons can be closed.
@DIYtechie Thanks for your response.....
I trying to solve the issue near me of button who not function in my home (I think my TV #2000 is to old to communicate with other peripheral I close this issue If needeed I open new issue Thanks for all
Solded for the principal subject (YAML)
The problem
Hello
I create an new issue :
How find the other template button ? In the YAML there only the button "Turn everything off" In video youtube of @DIYtechie there is more buttons ???
These template button are done with code Hex it seems but how to find this code ?
I share here my YAML but only the first button was OK....The other don't do anything...
Many thanks at @Palakis for the Github and the @DIYTechie for research and complement on this project...
Which version of ESPHome was used when this happened?
2024.11.1
What platform are you using?
ESP8266
Board
NodemCU 12F AZ Delivery
Example YAML snippet
Anything in the logs that might be useful?
No response
Additional information
No response