Hi everybody,
I tried following this page setting up an ESPHome capable of controlling my IR devices.
The infrared receiver works fine. This is the output for my OneConcept
fan IR remote ON/OFF button
[13:42:38][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=6 data='11011010000'
[14:18:13][D][remote.raw:041]: Received Raw: -1193, 552, -1143, 521, -322, 1374, -1165, 526, -1141, 576, -299, 1366, -1169, 549, -298, 1394, -296, 1370, -321, 1426, -1962
If I understand correctly, IR is not capable of using the binary code, so I have to use the raw data. However, at my first approach, I did use the binary data, and -of course- it didn’t work. But then I switched to using the raw data, and it won’t work, anyway.
I did some more testing and realized that my remote will send different IR data each time I press the button. Every now and then, it will at least start with -1193
, as the captured raw data above, but it’s about 4-5 cycles until then, and I didn’t check whether the entire raw data was identical then (only noticed the same beginning value).
Since I cannot see infrared light, I took my smartphone camera and pointed it at the IR led. When I trigger the button (code below), it will actually flash light for a short period of time. It looks like one single flash to me, but I assume it’s very quick intervals, correct?
It did, however, not trigger my fan. I thought why this might be, and had these thoughts
- not sufficient energy on the nodemcu (so later I disconnected the IR receiver from it and only kept the IR transmitter on)
- period too short for the fan to pick up the signal (so I configure the device to send it multiple times; however, I do not notice a change when testing with my smartphone camera, so I cannot tell whether this worked)
- incorrect wiring (but I mean, there are only two ways to connect it, and since I do get visual feedback from the IR led via camera, I assume it is wired correctly)
I have it wired like this
nodemcu D7 -> ir led -> resistor - nodemcu GND
Instead of a resistor, I also tried a regular (non-IR) led, which will turn on, then right back off, when I trigger the switch. So electricity is going the right way, I assume…
This is the relevant part of my yaml
remote_receiver:
pin: D6
dump: all
remote_transmitter:
pin: D7
carrier_duty_percent: 50%
switch:
- platform: template
name: 'On/Off'
turn_on_action:
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
- remote_transmitter.transmit_raw:
code: [-297, 1395, -297, 1394, -297, 1369, -325, 1449, -242, 8142, -1166, 552, -1143, 548, -298, 1372, -1142, 626, -1089, 527, -320, 1370, -1166, 554, -294, 1366, -325, 1423, -270, 1368, -325, 1370, -350]
I will now try and find different remotes, perhaps I have one that doesn’t require raw data (as some remotes should work out of the box with codes such as below)
- remote_transmitter.transmit_panasonic:
address: 0x4004
command: 0x8140DFA2
Are any of you using a DIY IR remote with ESPHome, and can help me configure mine so that it works?
I do have a boradlink rm_pro_phicomm
for an IR controlled AC, which works. A second one of these devices is on the way, but I don’t want to spend ~40 bucks per room that has anything IR controllable, especially not since some things don’t really need to be controlled (but it’d be nice you know how it is).
Thank you for your ideas