Open yauyauwind opened 7 months ago
Sorry, I was away on holidays. I just checked using your examples, not rebooting? Is your device getting hot? Did you add the correct files as per the guide?
Here's my log output while pressing random buttons:
18:28:31 [D] [switch:012]
'BedRoom LED OFF' Turning ON.
18:28:31 [I] [remote.raw:041]
Received Raw: 223, -1597, 117, -3241, 178, -4170, 72, -5066, 148, -4946, 127, -2075, 197, -6194, 164, -1466, 89, -2964, 128, -3754, 80, -4135, 71, -441, 427, -6721, 85, -7548, 102, -13276, 199
18:28:32 [D] [switch:012]
'BedRoom LED Night' Turning ON.
18:28:32 [I] [remote.raw:041]
Received Raw: 353, -3002, 96, -222, 100, -3102, 166, -6025, 187, -669, 302, -6494, 170, -307, 82, -1846, 318, -12583, 351, -2978, 338, -761, 109, -435, 78, -3409, 281
18:28:32 [D] [switch:012]
'BedRoom LED Night' Turning ON.
18:28:32 [I] [remote.raw:041]
Received Raw: 135, -1402, 72, -2474, 102, -3396, 364, -309, 229, -2413, 156, -2422, 168, -2356, 160, -2601, 286, -1300, 84, -16925, 206, -4946, 158, -12652, 117
18:28:33 [D] [switch:012]
'BedRoom LED Light' Turning ON.
18:28:34 [I] [remote.raw:041]
Received Raw: 171, -489, 462, -1212, 68, -992, 274, -13114, 170, -31302, 268, -13557, 179
18:28:34 [D] [switch:012]
'BedRoom LED Light' Turning ON.
18:28:34 [I] [remote.raw:041]
Received Raw: 547, -283, 742, -1734, 233, -5333, 194, -6909, 129, -2446, 117, -11354, 246, -4480, 219, -6558, 251, -382, 464, -5831, 84, -1637, 77, -2452, 134, -1322, 168
18:28:35 [D] [switch:012]
'BedRoom LED Night' Turning ON.
18:28:35 [I] [remote.raw:041]
Received Raw: 110, -22949, 164, -4925, 224, -407, 70
18:28:35 [D] [switch:012]
'BedRoom LED Night' Turning ON.
18:28:35 [I] [remote.raw:041]
Received Raw: 170, -4973, 160, -4141, 220, -9986, 177, -5907, 90, -2485, 76, -2041, 76, -2633, 117, -15504, 68, -10066, 71, -5765, 85
18:28:36 [D] [switch:012]
'BedRoom LED OFF' Turning ON.
18:28:36 [I] [remote.raw:041]
Received Raw: 166, -8334, 84, -4602, 101, -9300, 128, -4894, 189, -4500, 117, -7328, 80, -9140, 196, -494, 89, -9527, 83
18:28:36 [D] [switch:012]
'BedRoom LED OFF' Turning ON.
18:28:36 [I] [remote.raw:041]
Received Raw: 78, -25233, 437, -10841, 262, -3278, 104, -527, 319, -395, 401, -1470, 79, -6562, 150, -8733, 88
Hello AdamKGoddard,
Happy Holiday, and I have verified my config once, I confirm both pre_extra_script.py and remote_transmitter_esp32.cpp in config/esphome folder
and I just modify the xiaomi_ir.yaml for the token and leave the GPIO setting to default
I have no idea why the only 1st times shoot the transmit is work
Thanks~
I have the same issue. I manage to get switch working only one time after reboot. Did you manage to fix it?
This is what I get:
1``` 5:21:36 | [D] | [switch:012] | 'Power' Turning ON. |
---|---|---|---|
15:21:36 | [W] | [component:214] | Component web_server took a long time for an operation (0.07 s). |
15:21:36 | [W] | [component:215] | Components should block for at most 20-30ms. |
15:21:36 | [I] | [remote.jvc:049] | Received JVC: data=0x20DF |
15:21:36 | [I] | [remote.lg:054] | Received LG: data=0x20DF10EF, nbits=32 |
15:21:36 | [I] | [remote.nec:098] | Received NEC: address=0xFB04, command=0xF708 command_repeats=1 |
15:21:36 | [I] | [remote.pioneer:149] | Received Pioneer: rc_code_X=0x2008 |
15:21:36 | [I] | [remote.pronto:233] | Received Pronto: data= |
15:21:36 | [I] | [remote.pronto:235] | 0000 006D 0022 0000 0133 009B 0016 0016 0014 0018 0016 003F 0016 0016 0014 0018 0016 0017 0016 0016 0016 0016 0016 003F 0016 003F 0014 0018 0016 003F 0016 003F 0014 0041 0016 003F 0016 003F 0016 0017 0016 0016 0016 0016 0016 003F |
15:21:36 | [I] | [remote.pronto:235] | 0016 0017 0015 0016 0016 0016 0016 0017 0016 003F 0014 0041 0016 003F 0016 0016 0016 003F 0016 003F 0016 003F 0016 003F 001A 0181 06C3 |
15:21:40 | [D] | [switch:012] | 'Power' Turning ON. |
15:21:41 | [W] | [component:214] | Component web_server took a long time for an operation (0.07 s). |
15:21:41 | [W] | [component:215] | Components should block for at most 20-30ms. |
15:21:41 | [I] | [remote.pronto:233] | Received Pronto: data= |
15:21:41 | [I] | [remote.pronto:235] | 0000 006D 0029 0000 000C 0008 0019 000A 0060 000D 000F 000D 0022 0011 002F 0009 000A 009F 0012 0023 0009 001E 000F 003D 0008 0024 0017 0042 0015 0017 0016 0023 0009 0047 000D 0041 0015 001B 0010 0043 0013 003D 0017 003E 0007 000A |
15:21:41 | [I] | [remote.pronto:235] | 0006 003E 0017 003E 0017 0016 0014 001F 0006 0025 0010 003E 0016 0016 0017 0015 0017 0019 0004 000A 0007 0014 000E 0047 0017 003E 0017 003F 0015 0024 0008 003E 0018 003D 0016 003F 000C 0048 001F 0181 06C3 |
So remote.lg is used only once when first time pressed
Can you send the config? I couldn't replicate the other issue
esphome:
name: esphome-xiaomi-ir
friendly_name: ESPHome Xiaomi IR
platformio_options:
extra_scripts:
- pre:/config/esphome/pre_extra_script.py
esp32:
board: esp32doit-devkit-v1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:
ignore_efuse_mac_crc: true
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key:
ota:
password: "46d0d39267fe6ec26c27d5e1aeb19b4a"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xiaomi-Ir Fallback Hotspot"
password: "12344321"
captive_portal:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO32
inverted: False
name: ${friendly_name} Button A
- platform: gpio
pin:
number: GPIO33
inverted: False
name: ${friendly_name} Button B
- platform: gpio
pin:
number: GPIO34
inverted: False
name: ${friendly_name} Button C
- platform: gpio
pin:
number: GPIO35
inverted: False
name: ${friendly_name} Button D
status_led:
pin:
number: GPIO18 #Orange LED - flashes for status events
inverted: True
output:
- platform: gpio
pin: GPIO23 #Blue LED - Powered on always
id: PowerLED
inverted: False #Change to True to disable the power LED
sensor:
- platform: wifi_signal
name: ${friendly_name} WiFi Signal
- platform: uptime
name: ${friendly_name} Uptime
switch:
- platform: restart
name: ${friendly_name} Restart
- platform: template
name: "Power"
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x20DF10EF
nbits: 32
remote_receiver:
pin:
number: GPIO27
inverted: True
dump: all
remote_transmitter:
pin:
number: GPIO26
inverted: True
carrier_duty_percent: 50%
id: xiaomi
Works fine for me?
Or are you expecting to see exactly what you transmit on the receive? I wouldn't always consider that a reliable signal input whilst transmitting is occuring. I would consider receive as best effort and there are so many reflections and other IR noise to consider. It may bring it out of a guaranteed LG receive and Pronto or Raw would be close enough within a few ms timings to be fair.
Should there be any information in the log about what I transmit?
Hello AdamKGoddard,
I use with HA and ESPhome latest version, and I use to remote my Panasonic LED Lamp I use Receive RAW code to capture 3 button Power off, Night Mode, Light Mode
Here is my ESPHome Config file
remote_receiver: pin: number: GPIO27 inverted: True
dump: raw idle: 40ms
remote_transmitter: pin: number: GPIO26 inverted: True carrier_duty_percent: 50% id: xiaomi
switch:
platform: restart name: ${friendly_name} Restart
platform: template name: "BedRoom LED Night" turn_on_action:
platform: template name: "BedRoom LED OFF" turn_on_action:
platform: template name: "BedRoom LED Light" turn_on_action:
I found that, the Transmit button can be work only the once If I press the button on off then the Night and Light is not work after I reboot the XiaomiIR, then I can work only once on any button like: I press Night mode, then work, after that press Power off button is not work mean the IR can be only work once on the first times booted
I confirm the capture code is work, how can I fix this issue??
Many Thanks~