#SamsungTV UN58H5203 UART EX-Link Control
21 messages · Page 1 of 1 (latest)
Can u explain a bit of what is going on here?
Sending commands to a Samsung TV via UART
It basically just lets you control the house TVs. It's a little nicer than IR, more stable, always works. I hardwire everything. I have a network rack in the middle of my house that everything goes to. This is the recent edition to it.
The EX-Link port of the TV plugs into a 3.5mm keystone wall jack, to 15m of Solid copper 4 core Station Wire, to a MAX232, to ESP32 PoE ESPHome module, mounted in a 42u rack.
Would be nice if there would be a way to read statuses from the TV. Eg. is it turned on or off. Or current volume level.
You can and it's in the YAML at the github link above.
I just have yet to do anything with it on the HA side any ideas?
# Get Command:
# TV Reaction
# Success / Fail ___ ___________
# Data Length ___
# Command ___ ___ ___ ___
# Data Value ___ ___ ___
# Category _______________
# Current State _______________
- platform: uart
uart_id: uart_bus
name: "Get Power"
data: [0x08, 0x22, 0xF0, 0x00, 0x00, 0x00, 0xE6]
- platform: uart
uart_id: uart_bus
name: "Get Volume"
data: [0x08, 0x22, 0xF0, 0x01, 0x00, 0x00, 0xE5]
- platform: uart
uart_id: uart_bus
name: "Get Mute"
data: [0x08, 0x22, 0xF0, 0x02, 0x00, 0x00, 0xE4]
- platform: uart
uart_id: uart_bus
name: "Get Channel"
data: [0x08, 0x22, 0xF0, 0x03, 0x00, 0x00, 0xE3]
- platform: uart
uart_id: uart_bus
name: "Get Source"
data: [0x08, 0x22, 0xF0, 0x04, 0x00, 0x00, 0xE2]
Looks like this:
# Get Command:
# TV Reaction
# Success / Fail _F1_ _Success_
# Data Length _8_
# Command _F0_ _0_ _0_ _0_
# Data Value _5_ _0_ _0_
# Category _Power_
# Current State _Normal Mode_
Get Power On
8 22 F0 0 0 0 E6
Return:
3 C F1 3 C F5 8 F0 0 0 0 F1 5 0 0
3 C F1 Command received (FF = fail)
3 C F5 Getting Data
8 Data Length
F0 0 0 0 Repeats back command you sent
F1 Success
5 Data output: Normal Mode
0 Dummy Data
0 Dummy Data
F1 Success
FF Fail
4 Stand-By
5 Normal Mode
8 Off
If the TV is fully powered off because of energy saving enabled then you can't get the off/standby information basically just assume off if no return or turn energy saving off. (You can still power the TV on though with it on)
Get Volume Return
3 C F1 3 C F5 8 F0 1 0 0 F1 C 0 0
C => Volume is at 12
With some ssieb assistance, we got get status parsing w00t. The full get stuff is in the GitHub Document now.
text_sensor:
- platform: template
id: "power_status"
name: "Power Status"
sensor:
- platform: template
id: "volume_status"
name: "Volume Status"
accuracy_decimals: 0
uart:
baud_rate: 9600
tx_pin: 17
rx_pin: 7
id: uart_bus
debug:
direction: BOTH
dummy_receiver: true
sequence:
- lambda: UARTDebug::log_hex(direction, bytes, ':');
- lambda: >
if (direction == uart::UART_DIRECTION_RX) {
if (bytes.size() == 16) {
if (bytes[8] == 0x00) {
if (bytes[12] == 0x05) {
id(power_status).publish_state("On");
} else if (bytes[12] == 0x04) {
id(power_status).publish_state("Stand-By");
} else if (bytes[12] == 0x08) {
id(power_status).publish_state("Off");
}
} else if (bytes[8] == 0x01) {
id(volume_status).publish_state(bytes[12]);
}
}
}
What about the QR-Codes on your labels?
What would you like to know about them? You just scan them with your phone and they tell you where they terminate in the house
If you see on the wall jack there it basically has that information in it JA03-FL0-PA01-D30 so Wall JAck 3 - FLoor 0 (Main Floor) - PAtch Panel 1 in the rack - Data port 30 Then on the wire QR Codes say similar things JA03-FL0-PA01-V01 then adds devices they are connected to if specific purpose EX-Link 58 SamsungTV Port Etc. The QR Codes fit a lot of info on a small wire.
I used the free version of this zebra designer https://www.zebra.com/us/en/support-downloads/printer-software/zebra-designer-3-downloads.html
Meant more for surface labels
Oh, where they terminate, neat idea!
Thank you, makes sense now. I think I'll integrate that when doing the next cable-labeling.