johnboiles / esphome-hdmi-cec

ESPHome component to send and receive HDMI-CEC messages.
63 stars 10 forks source link

Samsung UE50AU7102 (2021) #3

Open nagyrobi opened 2 years ago

nagyrobi commented 2 years ago

Congrats for this project.

With the Samsung model above it looks like it doesn't connect automatically the ARC device. I need to issue the commands manually. Made a button with all commands from your on_message section and if I trigger them manually, it will connect.

- platform: template
  name: Connect speakers to TV
  on_press:
    - hdmi_cec.send:
        destination: 0x0
        data: [ 0xC1 ]
    - hdmi_cec.send:
        destination: 0xF
        data: [ 0x72, 0x01 ]
    - hdmi_cec.send:
        destination: 0x0
        data: [ 0x7A, 0x7F ]
    - hdmi_cec.send:
        destination: 0x0
        data: [ 0x7A, 0x7F ]
    - hdmi_cec.send:
        destination: 0x0
        data: [ 0x7E, 0x01 ]
    - hdmi_cec.send:
        destination: 0x0
        data: [0x47, 0x65, 0x73, 0x70, 0x68, 0x6F, 0x6D, 0x65] # esphome
    - hdmi_cec.send:
        destination: 0x0
        data: [0x87, 0x00, 0x13, 0x37]

After I turn off and back on the TV again, connection is lost with ARC device and volume commands don't come through anymore. Since I have to connect the ESP to the USB port of the TV, which is powered down when the TV is off, they boot up together. I tried to add these commands to on_boot section of esphome with some delay but that's very unstable. Looks like it connects, but looses connection again. After I press the button, it stays connected.

Also, I don't see the OSD name being set by the command.

nagyrobi commented 2 years ago

Here's what can be seen with promiscuous set to true after turning on the TV (logged for 3 minutes, with on_message section removed):

[21:28:03][D][hdmi_cec:145]: Ran 39810 times in 10000ms (every 0.251193ms)
[21:28:08][D][hdmi_cec:064]: RX: (0->5) 05:83
[21:28:08][D][hdmi_cec:125]: TX: (5->15) 5F:84:40:00:05
[21:28:08][D][hdmi_cec:064]: RX: (0->5) 05:70:00:00
[21:28:08][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:09][D][hdmi_cec:064]: RX: (0->5) 05:83
[21:28:09][D][hdmi_cec:125]: TX: (5->15) 5F:84:40:00:05
[21:28:11][D][hdmi_cec:064]: RX: (0->5) 05:7D
[21:28:13][D][hdmi_cec:064]: RX: (0->15) 0F:80:30:00:20:00
[21:28:13][D][hdmi_cec:145]: Ran 39783 times in 10000ms (every 0.251364ms)
[21:28:13][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:14][D][hdmi_cec:064]: RX: (0->15) 0F:32:68:75:6E
[21:28:18][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:22][D][hdmi_cec:064]: RX: (0->3) 03:9F
[21:28:22][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:28:22][D][hdmi_cec:064]: RX: (0->5) 05:A4:0A
[21:28:23][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:23][D][hdmi_cec:145]: Ran 39983 times in 10000ms (every 0.250106ms)
[21:28:23][D][hdmi_cec:064]: RX: (0->5) 05:A4:0A
[21:28:25][D][hdmi_cec:064]: RX: (0->5) 05:A4:0A
[21:28:27][D][hdmi_cec:064]: RX: (0->3) 03:8C
[21:28:27][D][hdmi_cec:064]: RX: (0->3) 03:8F
[21:28:27][D][hdmi_cec:064]: RX: (0->5) 05:8C
[21:28:27][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:28][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:32][D][hdmi_cec:064]: RX: (0->3) 03:83
[21:28:32][D][hdmi_cec:064]: RX: (0->5) 05:83
[21:28:32][D][hdmi_cec:125]: TX: (5->15) 5F:84:40:00:05
[21:28:33][D][hdmi_cec:064]: RX: (0->5) 05:8F
[21:28:33][D][hdmi_cec:145]: Ran 39602 times in 10000ms (every 0.252512ms)
[21:28:37][D][hdmi_cec:064]: RX: (0->3) 03:46
[21:28:37][D][hdmi_cec:064]: RX: (0->5) 05:46
[21:28:42][D][hdmi_cec:064]: RX: (0->3) 03:A0:00:00:F0:23
[21:28:42][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:28:43][D][hdmi_cec:145]: Ran 39870 times in 10000ms (every 0.250815ms)
[21:28:47][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:28:52][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:28:53][D][hdmi_cec:145]: Ran 39816 times in 10000ms (every 0.251155ms)
[21:28:57][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:02][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:03][D][hdmi_cec:145]: Ran 39836 times in 10000ms (every 0.251029ms)
[21:29:07][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:12][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:13][D][hdmi_cec:145]: Ran 39917 times in 10000ms (every 0.250520ms)
[21:29:18][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:23][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:23][D][hdmi_cec:145]: Ran 39876 times in 10000ms (every 0.250777ms)
[21:29:28][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:33][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:33][D][hdmi_cec:145]: Ran 39826 times in 10000ms (every 0.251092ms)
[21:29:38][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:43][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:43][D][hdmi_cec:145]: Ran 39917 times in 10000ms (every 0.250520ms)
[21:29:48][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:53][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:29:53][D][hdmi_cec:145]: Ran 39903 times in 10000ms (every 0.250608ms)
[21:29:58][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:03][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:03][D][hdmi_cec:145]: Ran 39990 times in 10000ms (every 0.250063ms)
[21:30:08][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:13][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:13][D][hdmi_cec:145]: Ran 39843 times in 10000ms (every 0.250985ms)
[21:30:18][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:23][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:23][D][hdmi_cec:145]: Ran 39917 times in 10000ms (every 0.250520ms)
[21:30:28][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:33][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:33][D][hdmi_cec:145]: Ran 39901 times in 10000ms (every 0.250620ms)
[21:30:38][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:43][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:43][D][hdmi_cec:145]: Ran 39948 times in 10000ms (every 0.250325ms)
[21:30:48][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:53][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:30:53][D][hdmi_cec:145]: Ran 39914 times in 10000ms (every 0.250539ms)
[21:30:58][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:31:03][D][hdmi_cec:145]: Ran 39886 times in 10000ms (every 0.250715ms)
[21:31:03][D][hdmi_cec:064]: RX: (0->5) 05:9F
[21:31:08][D][hdmi_cec:064]: RX: (0->5) 05:9F