Skip to content

Instantly share code, notes, and snippets.

@TheGroundZero
Last active November 13, 2024 13:31
Show Gist options
  • Save TheGroundZero/74035123938ecb13c8864ff1e65dc4d3 to your computer and use it in GitHub Desktop.
Save TheGroundZero/74035123938ecb13c8864ff1e65dc4d3 to your computer and use it in GitHub Desktop.
LG infrared codes captured using ESPHome Remote Receiver

ESPHome Remote Receiver

LG remote (AKB74475481)

See: https://esphome.io/components/remote_receiver.html
To be used with: https://esphome.io/components/remote_transmitter.html

remote_receiver:
  pin:
    number: 23
    inverted: True
    mode: INPUT_PULLUP
  dump: lg

remote_transmitter:
  pin: 22
  carrier_duty_percent: 50%
Button Data nbits
Power 0x20DF10EF 32
TvRad 0x20DF0FF0 32
Input 0x20DFD02F 32
QMenu 0x20DFC23D 32
Ratio 0x20DF9E61 32
Subttl 0x20DF9C63 32
1 0x20DF8877 32
2 0x20DF48B7 32
3 0x20DFC837 32
4 0x20DF28D7 32
5 0x20DFA857 32
6 0x20DF6897 32
7 0x20DFE817 32
8 0x20DF18E7 32
9 0x20DF9867 32
Guide 0x20DFD52A 32
0 0x20DF08F7 32
QView 0x20DF58A7 32
VolUp 0x20DF40BF 32
VolDwn 0x20DFC03F 32
Fav 0x20DF7887 32
Info 0x20DF55AA 32
Mute 0x20DF906F 32
ChUp 0x20DF00FF 32
ChDwn 0x20DF807F 32
App* 0x20DFF906 32
Home 0x20DF3EC1 32
MyApps 0x20DF42BD 32
Text 0x20DF04FB 32
TOpt 0x20DF847B 32
Up 0x20DF02FD 32
Down 0x20DF827D 32
Left 0x20DFE01F 32
Right 0x20DF609F 32
OK 0x20DF22DD 32
Back 0x20DF14EB 32
Exit 0x20DFDA25 32
AD 0x20DF8976 32
List 0x20DFCA35 32
Stop 0x20DF8D72 32
Rew 0x20DFF10E 32
Play 0x20DF0DF2 32
Pause 0x20DF5DA2 32
Fwd 0x20DF718E 32
Red 0x20DF4EB1 32
Green 0x20DF8E71 32
Yellow 0x20DFC639 32
Blue 0x20DF8679 32

LG AKB74475481

@twanjaarsveld
Copy link

Do you have any idea how i can get the data i recief to trigger a automation
i saw on the esphome website that its posible to make a binary sensor but whatever i try i don't get it to work

my config for the sensor looks like this:

binary_sensor:
  - platform: remote_receiver
    name: "Magicremote volime up"
    LG: 
    data:0x20DF40BF
    nbits:32

i want the data "data:0x20DF40BF" to trigger a scene i made to turn up the volume, it would be awesome if you would't mind helping me

@TheGroundZero
Copy link
Author

TheGroundZero commented Apr 4, 2022

@twanjaarsveld
Did you add the code to your ESP's config?
Did you match the indentation?

What does the ESPHome validator say?

https://esphome.io/components/remote_receiver.html#binary-sensor

# Example configuration entry
remote_receiver:
  pin: GPIO32
  dump: all

binary_sensor:
  - platform: remote_receiver
    name: "Panasonic Remote Input"
    panasonic:
      address: 0x4004
      command: 0x100BCBD

@twanjaarsveld
Copy link

I got it working

remote_receiver:
pin:
number: D2
inverted: true
mode:
input: true
pullup: true
dump: lg

binary_sensor:

  • platform: remote_receiver
    name: Magicremote_volume_up_detected
    lg:
    data: 0x20DF40BF
    nbits: 32

The weird thing is that the magic remote sends different data when the tv is on then when its off

@twanjaarsveld
Copy link

Thank you so much for your time and help !!!!

@TheGroundZero
Copy link
Author

@twanjaarsveld

You're welcome.

Which command the remote sends depends on the device. It could be a simple alternation. E.g., if you point the remote away from the TV and press the button (without triggering the TV) and then point at the receiver again, it may have "swapped" the code.

@kylefmohr
Copy link

@TheGroundZero Thanks for this! These codes also appear to be the exact same as the Hisense 55H6D, I'm just including this comment in case it helps people googling for Hisense 55H6D NEC InfraRed Codes. I recorded a subset, but not all of the codes, so this is helpful to have.

@TheGroundZero
Copy link
Author

@TheGroundZero Thanks for this! These codes also appear to be the exact same as the Hisense 55H6D, I'm just including this comment in case it helps people googling for Hisense 55H6D NEC InfraRed Codes. I recorded a subset, but not all of the codes, so this is helpful to have.

I'm glad you found this useful!

@finipini
Copy link

Yes, that happens to me to. I Guess that with the TV off the remote operates um IR, and with the TV on it changes to bluetooth.

@fragtion
Copy link

fragtion commented Nov 10, 2023

These codes work great for AKB72914209 remote also (for LG TV model 47LE5300 in my case)

@dimsha111
Copy link

Friend, add this code. Many TVs have a function, but there is no button on the remote
ENERGY SAVING 0x20DFA956

@fragtion
Copy link

fragtion commented Nov 13, 2024

Friend, add this code. Many TVs have a function, but there is no button on the remote ENERGY SAVING 0x20DFA956

AKB72914209 has an energy saving button, but it is 0x20DF807F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment