Hey Guys -
I’m trying to set up a NodeMCU which includes an IR Transmitter & Receiver, but having some difficulty. I got the receiver working just fine as hitting a button on my fan IR remote yielded the below log:
[13:46:57][D][remote.jvc:048]: Received JVC: data=0x0CF3
[13:46:57][D][remote.lg:053]: Received LG: data=0x0CF331CE, nbits=32
[13:46:57][D][remote.nec:068]: Received NEC: address=0x0CF3, command=0x31CE
[13:46:57][D][remote.pioneer:144]: Received Pioneer: rc_code_X=0x0C8C
When putting the below info into the yaml, uploading it, and triggering it via dashboard button; nothing happens, though.
remote_transmitter:
pin: D0
# Infrared remotes use a 50% carrier signal
carrier_duty_percent: 50%
switch:
- platform: template
name: Tower Fan - Power
turn_on_action:
- remote_transmitter.transmit_nec:
address: 0x0CF3
command: 0x31CE
- platform: template
name: Tower Fan - Power2
turn_on_action:
- remote_transmitter.transmit_jvc:
data: 0x0CF3
As you can see, I tried both the NEC & JVC codes assigned to different templates for testing, but neither worked.
I also tried facing the IR transmitter & Receiver to each other, then triggering. Logging yielded the below in the log when I actually expected to see what was logged with the initial capture from the remote…
[13:51:39][D][remote_transmitter:066]: Sending remote code...
[13:51:39][D][remote.raw:041]: Received Raw: 229
Shouldn’t the above match the output the receiver displays when original remote is read?
Hardware wise, I have a 100ohm resistor between the IR LED’s anode and of course ground going to ground of the NodeMCU. Although I I couldn’t see the IR LED with my phone camera (even briefly) when triggered, I can see it when I connect the resistor to 5V. To ensure that something was coming across D0, I replaced the IR LED with a standard blue one which did briefly light when triggered. Aside from this, I’ve tried a couple different resistors, powering the NodeMCU via 5V battery instead of USB, + verified its not a range issue.
The IR LEDs are rated 1-1.5V and are linked here.
I’m at a loss. Any suggestions? Thanks!