My projector won’t respond to my esphome infrared remote transmitter component, but it does work with a different firmware sending the exact same code.
I have successfully configured the esphome remote transmitter component running on a ESP9266 D1 mini to receive (learn) and transmit infrared codes for three different AV devices. My design is a simple IR led connected to 5V through a 10ohm resistor and turned on via pin D2 through a BC639 transistor. This works well to transmit across the room. I have tested the same three AV devices using IRremoteESP8266, which is an Arduino firmware that can perform the same function.
Unfortunately I have a fourth AV device (JVC X7000 Home Theatre Projector) which does respond to the exact code specified in the manual for the projector’s power on code sent using IRremoteESP8266, but does not repond to the same code sent using esphome. I am unsure as to the difference between the two methods and whether it is my configuration or something else. I don’t have an oscilloscope nor any way to analyse the output signal. I would very much prefer to use esphome for obvious reasons.
I am sending the exact code specified in the manual for the projector’s power on code. It also matches the code received (using either IRremoteESP8266 or esphome).
Please see below code for IRremoteESP8266 and esphome and let me now if you have any thoughts! Note that I have tested both of the below for different IR codes, and confirmed are working for three other devices. Esphome requires the ‘off’ period to be a negative number, whereas IRremoteESP8266 does not (as far as I can tell).
esphome
esphome:
name: infrared_1
platform: ESP8266
board: d1_mini
# (config removed for this post)
remote_transmitter:
carrier_duty_percent: 50%
pin:
number: D2
switch:
- platform: template
name: Projector Power On
turn_on_action:
- remote_transmitter.transmit_raw:
code: [8441, -4207, 526, -1578, 526, -1578, 526, -526, 526, -526, 526, -1578, 526, -1578, 526, -1578, 526, -526, 526, -1578, 526, -526, 526, -1578, 526, -526, 526, -526, 526, -526, 526, -526, 526, -526, 526, -21615, 526, -1578, 526, -1578, 526, -526, 526, -526, 526, -1578, 526, -1578, 526, -1578, 526, -526, 526, -1578, 526, -526, 526, -1578, 526, -526, 526, -526, 526, -526, 526, -526, 526, -526, 526]
carrier_frequency: 38kHz
IRremoteESP8266
#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2).
IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message.
// Example of data captured by IRrecvDumpV2.ino
uint16_t rawData[69] = {8441, 4207, 526, 1578, 526, 1578, 526, 526, 526, 526, 526, 1578, 526, 1578, 526, 1578, 526, 526, 526, 1578, 526, 526, 526, 1578, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 21615, 526, 1578, 526, 1578, 526, 526, 526, 526, 526, 1578, 526, 1578, 526, 1578, 526, 526, 526, 1578, 526, 526, 526, 1578, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526};
void setup() {
irsend.begin();
#if ESP8266
Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
#else // ESP8266
Serial.begin(115200, SERIAL_8N1);
#endif // ESP8266
}
void loop() {
Serial.println("a rawData capture from IRrecvDumpV2");
irsend.sendRaw(rawData, 69, 38); // Send a raw data capture at 38kHz.
delay(2000);