IR transmit, how to send exactly this sequence?

Hi,

I’m trying to control an iffy window ventilation unit that has a IR remote control:

When I read the (3) commands like this:

#remote_receiver:
id: rcvr
  pin:
    number: GPIO5
    inverted: True
tolerance: 55%
dump: raw

it get:

### Alusta remote:
#open:
[10:45:30][D][remote.raw:041]: Received Raw: 857, -919, 1736, -1752, 900, -919, 850, -870, 898, -919, 851, -869, 902, -915, 852, -917, 852, -917, 849, -919, 855, -866, 897, -921, 849
[10:45:30][D][remote.raw:041]: Received Raw: 904, -918, 1734, -1803, 853, -942, 826, -869, 896, -920, 851, -919, 850, -870, 902, -915, 848, -872, 900, -943, 827, -917, 852, -868, 901
#Halfopen:
[10:46:13][D][remote.raw:041]: Received Raw: 858, -920, 850, -916, 852, -942, 829, -914, 848, -921, 852, -917, 852, -917, 850, -870, 902, -868, 900, -916, 853, -916, 1736, -1800, 855
[10:46:13][D][remote.raw:041]: Received Raw: 858, -869, 897, -921, 846, -872, 900, -919, 848, -871, 898, -920, 849, -920, 850, -870, 899, -919, 848, -920, 847, -874, 1786, -1798, 853
#Close:
[10:46:51][D][remote.raw:041]: Received Raw: 855, -872, 900, -917, 853, -916, 853, -915, 851, -919, 849, -870, 900, -869, 901, -868, 899, -918, 850, -919, 853, -916, 850, -871, 1784
[10:46:51][D][remote.raw:041]: Received Raw: 860, -867, 901, -917, 850, -920, 851, -915, 850, -870, 901, -917, 853, -866, 897, -873, 900, -918, 847, -874, 896, -921, 850, -869, 1785

It seems that (a slightly different variation of) each command is send twice.

When trying to control the unit like this:

switch:
  - platform: template     
    name: ${upper_devicename} open     
    turn_on_action:       
      remote_transmitter.transmit_raw:
        code: [857, -919, 1736, -1752, 900, -919, 850, -870, 898, -919, 851, -869, 902, -915, 852, -917, 852, -917, 849, -919, 855, -866, 897, -921, 849] 
        carrier_frequency: 38kHz
        repeat:
          times: 2
          wait_time: 50ms

          
  - platform: template     
    name: ${upper_devicename} half     
    turn_on_action:       
      remote_transmitter.transmit_raw:
        code: [858, -920, 850, -916, 852, -942, 829, -914, 848, -921, 852, -917, 852, -917, 850, -870, 902, -868, 900, -916, 853, -916, 1736, -1800, 855] 
        carrier_frequency: 38kHz
        repeat:
          times: 2
          wait_time: 50ms
          
  - platform: template     
    name: ${upper_devicename} dicht     
    turn_on_action:       
      remote_transmitter.transmit_raw:
        code: [855, -872, 900, -917, 853, -916, 853, -915, 851, -919, 849, -870, 900, -869, 901, -868, 899, -918, 850, -919, 853, -916, 850, -871, 1784] 
        carrier_frequency: 38kHz
        repeat:
          times: 2
          wait_time: 50ms

The unit only responds sometimes, most of the times it won’t respond.

How can I send exactly the (raw) commands I received?

Kind regards,

Michel

Nobody able to help me out?

Do you have an arduino or another esp8266 laying around? When yes, have a look at the arduino library “IRRemote” or “IRRemote esp8266” and use the IRdumpv2 example. I had issues decoding the protocols with my esphome config, but was able to decode nec commands with this. Sending nec works without problem on that node. Maybe your remote uses nec or another protocol esphome didnt decode, so it would be easier to work with nec or rc5 commands than with raw data.

I am not sure I understand what you are saying.

I need to receive the command’s using another esp running the IRdumpv2, then dump in NEC format and then use esphome to send these NEC commands?

Someone else already tried this library and had success, but I need these codes to work with esphome :frowning:

/*
The HEX codes:
open = 0xFFF again = off = 0x7FF
close = 0x7FF again = off = 0xFFE
auto = 0x7FD again = off = 0xFFD
program = 0x7FC again = off = 0xFFC

Decimal:
open = 2047 again = off = 4095
close = 2046 again = off = 4094
auto = 2045 again = off = 4093
program = 2044 again = off = 4092
*/

example:

{ irsend.sendRC5(0xFFF, 12); // Alusta code Open
Serial.println(" Alusta code OPEN");
delay(5000);}

Exactly. Try capturing the remote codes with the IRRemote esp8266 lib and the IRdumpv2 example. Then post the result of the button presses here.
Its easier to work with a protocol like nec or rc5 than sending raw values. For me, my audio amp remote is a bit bulky and im using another remote for my xbox that sends rc5 codes. The amp’s remote sends nec commands, but esphome cant decode the commands, so i only get the raw values. Sending these didnt work for me, so i had to capture them using the method above.