Stuck with ir-protocol

hi all

I’m trying to integrate a ceiling fan, which is controlled by ir-remote, into home assistant.
Using the irmp-project, to analyse the ir-protocol, I’ve got the data like this:
P=FAN | 0x2C A=0x0 C=0x410
P=FAN | 0x2C A=0x0 C=0x410 R
P=FAN | 0x2C A=0x0 C=0x410 R
P=FAN | 0x2C A=0x0 C=0x410 R

The ir-protocol is identified as ‘FAN’ (had to enable it first, before it was recognized as ‘NUBERT’))
IRMP FAN-Protocol

Now, I’m stuck with, how to send it with ESPhome. I’ haven’t found an option for the FAN-protocol for the ‘remote transmitter’ component.

The ceiling fan manufacturer is Westinghouse and the remote is a model named ‘ID6’.
Maybe someone has done this before? Any help is welcome.

Kind regards
Chris.

What happens if you set the debug level to raw instead of all.
Maybe the raw code can be sent?

I’m afraid you won’t have any other solutions than to capture them ! What ESP device do you plan to use to control the FAN ?

Hi there
After some thinking and comparing different ir-codes from different remotes, I finally found the error.

Below is the config for receiving the ir-codes.
Using a ESP32-Board.

# IR-Receiver Config
remote_receiver:
  pin:
    number: GPIO03
    inverted: false
    mode:
      input: true
      pullup: false
  dump: all

First I used the ‘inverted: true’ option, but this gave me a code which did not work when I send it to fan-device. I changed the option to ‘false’ and then I received the ir-codes in raw-format.

-1277, 414, -1274, 414....

But these raw-codes didn’t work either, when I sent them to the device.
Then I recognized, that the first value is a negative one, which looked wrong to me.
So I gave it a try, by inverting all the values

1277, -414, 1274, -414…

Well, it worked since then
If someone is interested I can post the send-config too.

It was the first time for me to work with ir-codes, and it is still a steep learning curve.
I have to say that ESPhome is such a mighty tool and absolute fun to automate things with.

Hi there

Tested a little more, today.
I think with this receiver-config the raw-code is listed the correct way

# IR-receiver config
remote_receiver:
  pin:
    number: GPIO03
    inverted: true
    mode:
      input: true
      pullup: false
  dump: raw
2 Likes

you’re a rock star, thanks this worked for me with my Westinghouse ceiling fan, I was getting strange pronto hex values rather than RAW

Could you share your working transmitter configuration? I’m trying to emit IR signals to a Westinghouse ceiling fan, but I’ve had no luck so far.

FYI, there’s a great set of IR code for ESPHome at the following post:

no problem, hope it helps? Westinghouse ceiling fan

switch:

  • platform: template

    name: Bedroom Two Ceiling Light On

    icon: “mdi:ceiling-fan-light”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1378, -334, 1352, -334, 539, -1153, 1345, -336, 1351, -309, 561, -1151, 536, -1126, 533, -1178, 1350, -335, 536, -1151, 538, -1148, 509, -7922, 1350, -335, 1350, -312, 559, -1152, 1350, -335, 1351, -339, 532, -1153, 507, -1152, 559, -1127, 1375, -308, 563, -1151, 536, -1126, 533, -7922, 1376, -260, 1375, -360, 535, -1126, 1376, -335, 1351, -310, 561, -1152, 508, -1177, 509, -1154, 1374, -335, 537, -1149, 535, -1152, 508, -7899, 1348, -337, 1375, -334, 535, -1152, 1351, -334, 1352, -334, 536, -1152, 508, -1153, 559, -1128, 1374, -335, 535, -1152, 508, -1153, 533, -7923, 1350, -334, 1327, -359, 536, -1152, 1350, -334, 1352, -335, 535, -1127, 533, -1153, 558, -1153, 1350, -335, 537, -1150, 534, -1152, 534, -7872, 1375, -335, 1349, -337, 534, -1153, 1350, -335, 1351, -335, 535, -1152, 534, -1152, 509, -1177, 1351, -334, 536, -1152, 533, -1126, 561]

  • platform: template

    name: Bedroom Two Ceiling Light Off

    icon: “mdi:ceiling-fan-light”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1405, -299, 1387, -301, 541, -1152, 1378, -299, 1387, -299, 516, -1179, 1379, -298, 542, -1129, 557, -1129, 559, -1130, 530, -1178, 535, -7895, 1378, -299, 1388, -297, 517, -1156, 1402, -299, 1386, -299, 519, -1177, 1378, -298, 517, -1179, 508, -1178, 534, -1127, 558, -1129, 558, -7897, 1350, -338, 1374, -301, 541, -1154, 1377, -299, 1387, -299, 542, -1154, 1378, -300, 515, -1179, 508, -1178, 534, -1126, 559, -1153, 534, -7871, 1402, -301, 1387, -298, 516, -1180, 1377, -301, 1386, -298, 517, -1179, 1378, -299, 516, -1179, 507, -1179, 534, -1152, 508, -1155, 557]

  • platform: template

    name: Bedroom Two Fan Speed 0

    icon: “mdi:ceiling-fan”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1404, -299, 1388, -299, 543, -1152, 1378, -299, 1387, -261, 581, -1127, 534, -1181, 1374, -299, 517, -1155, 532, -1153, 561, -1150, 509, -7896, 1403, -299, 1387, -299, 516, -1180, 1377, -299, 1387, -299, 517, -1179, 508, -1154, 1401, -299, 543, -1128, 561, -1126, 559, -1127, 558, -7897, 1350, -333, 1380, -300, 543, -1126, 1403, -300, 1386, -300, 516, -1154, 560, -1153, 1375, -300, 517, -1178, 509, -1158, 528, -1177, 508, -7899, 1374, -307, 1408, -297, 543, -1153, 1377, -303, 1383, -300, 542, -1128, 533, -1178, 1377, -300, 543, -1130, 557, -1127, 559, -1152, 508, -7897, 1403, -301, 1384, -299, 517, -1179, 1377, -299, 1387, -300, 543, -1152, 509, -1152, 1403, -299, 516, -1155, 586, -1128, 504, -1178, 509, -7896, 1407, -296, 1360, -334, 509, -1154, 1401, -300, 1386, -300, 543, -1153, 533, -1130, 1400, -256, 560, -1178, 535, -1152, 534, -1151, 509]

  • platform: template

    name: Bedroom Two Fan Speed 1

    icon: “mdi:ceiling-fan”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1408, -296, 1387, -299, 543, -1153, 1379, -302, 1382, -300, 516, -1179, 535, -1151, 534, -1152, 509, -1177, 534, -1152, 509, -1178, 1381, -7026, 1374, -335, 1378, -299, 516, -1154, 1403, -298, 1387, -300, 542, -1127, 535, -1153, 559, -1128, 532, -1178, 508, -1177, 509, -1178, 1377, -7053, 1377, -300, 1387, -298, 517, -1179, 1382, -295, 1387, -301, 541, -1152, 509, -1177, 535, -1128, 532, -1178, 508, -1153, 537, -1174, 1377, -7029, 1401, -300, 1387, -299, 516, -1179, 1351, -334, 1379, -299, 516, -1179, 509, -1154, 532, -1177, 509, -1178, 508, -1177, 509, -1178, 1377, -7054, 1349, -335, 1352, -334, 535, -1152, 1351, -334, 1352, -334, 535, -1152, 534, -1128, 559, -1151, 509, -1177, 509, -1178, 508, -1178, 1350, -7081, 1325, -359, 1352, -336, 533, -1153, 1350, -334, 1351, -335, 537, -1127, 559, -1151, 534, -1152, 508, -1178, 509, -1177, 508, -1178, 1351]

  • platform: template

    name: Bedroom Two Fan Speed 2

    icon: “mdi:ceiling-fan”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1377, -334, 1352, -335, 536, -1123, 1378, -335, 1351, -336, 539, -1123, 532, -1182, 504, -1178, 509, -1152, 1376, -307, 563, -1152, 534, -7896, 1325, -363, 1348, -335, 535, -1152, 1350, -336, 1350, -335, 535, -1152, 509, -1178, 533, -1152, 509, -1178, 1349, -335, 535, -1153, 508, -7922, 1327, -358, 1351, -335, 535, -1127, 1375, -335, 1352, -334, 536, -1151, 509, -1151, 535, -1156, 530, -1153, 1375, -334, 536, -1152, 534, -7872, 1374, -335, 1352, -334, 536, -1124, 1377, -335, 1352, -334, 536, -1152, 508, -1178, 534, -1151, 509, -1178, 1350, -335, 535, -1152, 508]

  • platform: template

    name: Bedroom Two Fan Speed 3

    icon: “mdi:ceiling-fan”

    turn_on_action:

    • remote_transmitter.transmit_raw:

      carrier_frequency: 38kHz

      code: [1379, -309, 1377, -334, 535, -1152, 1350, -335, 1351, -309, 1377, -306, 564, -1152, 534, -1128, 533, -1152, 534, -1153, 1374, -307, 1380, -7057, 1373, -335, 1351, -336, 534, -1127, 1352, -359, 1351, -335, 1328, -358, 534, -1127, 533, -1179, 508, -1152, 537, -1177, 1323, -360, 1351, -7056, 1349, -361, 1350, -336, 534, -1153, 1328, -358, 1350, -335, 1350, -310, 561, -1151, 509, -1178, 508, -1178, 508, -1178, 1325, -360, 1352, -7080, 1324, -362, 1349, -336, 534, -1128, 1375, -335, 1326, -360, 1351, -335, 535, -1155, 531, -1151, 535, -1153, 508, -1153, 1374, -335, 1330]