Hello!
Thanks to others on this forum, I just got an ESP8266 Node Mcu working with ESPHome and Home Assistant.
I am only able to get one code working.
I’ve tried adding extra lines of code with unique IDs and appropriate hex codes for buttons, but I am getting errors each time I validate.
Does anyone have any experience with getting a bunch of codes loaded into this?
I plan to use these as triggers for automation in home theater and other TV rooms with IR remotes.
Here is my code:
esphome:
name: ir_receiver_test
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "Casa"
password: "XXXXXXXXXX"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ir Receiver Test"
password: "ozjjE6Gc3J5A"
captive_portal:
# Enable logging
logger:
level: debug
# Enable Home Assistant API
api:
# Enable Over-the_air updates.
ota:
# Example configuration entry
remote_receiver:
pin:
number: GPIO14
inverted: True
dump: all
binary_sensor:
- platform: remote_receiver
id: samsung_tv_power_toggle
name: "Samsung TV Power"
samsung:
data: 0xE0E040BF
nickrout
(Nick Rout)
May 12, 2020, 2:17am
2
please post your code properly, It is a mess at present. See point 11 here How to help us help you - or How to ask a good question
1 Like
here’s my config for mine
esphome:
name: wifi_ir
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "XXXXXXX"
password: "XXXXXX"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Wifi Ir Fallback Hotspot"
password: "XXXXXXXX"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "XXXXXXXXX"
ota:
password: "XXXXXXXXX"
remote_receiver:
pin: GPIO15
dump: all
remote_transmitter:
pin: GPIO2
carrier_duty_percent: 50%
switch:
- platform: template
name: "Samsung TV Power"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E040BF
- platform: template
name: "Samsung TV Mute"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E0F00F
- platform: template
name: "Samsung TV Volume Up"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E0E01F
- platform: template
name: "Samsung TV Volume Down"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E0D02F
- platform: template
name: "Samsung TV Home"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E09E61
- platform: template
name: "Samsung TV Exit"
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xE0E0B44B
- platform: template
name: "Roomba Clean"
turn_on_action:
remote_transmitter.transmit_raw:
code: [2872,-999,897,-2872,897,-2872,897,-2872,2872,-999,897,-2872,897,-2872,897]
carrier_frequency: 39477
repeat:
times: 9
- platform: template
name: "Roomba Dock"
turn_on_action:
remote_transmitter.transmit_raw:
code: [2837,-988,912,-2837,912,-2837,912,-2837,912,-2837,2837,-988,912,-2837,2837,-18036]
carrier_frequency: 39477
repeat:
times: 9
i chose to set my receiver to output only in log view
1 Like
Thanks to the help here and the nice people on Discord, I will attempt to share the code that I found working:
binary_sensor:
- platform: remote_receiver
id: samsung_tv_power_toggle
name: "Samsung TV Power"
samsung:
data: 0xE0E040BF
- platform: remote_receiver
id: samsung_tv_mute
name: "Samsung TV Mute"
samsung:
data: 0xE0E0F00F
Thank you for the replies!