Converting remote.xiaomi_miio commands to esphome Remote Transmitter component

Hi

I have a Rinnai gas heater and no longer have the remote. I want to try and get it working with the esphome Remote Transmitter component.
https://esphome.io/components/switch/remote_transmitter.html

I may have found some config to integrate the heater into home assistant but in the example its using the remote.xiaomi_miio component.
https://forums.whirlpool.net.au/archive/2537825

This component uses a base 64 encoding to store the IR codes (https://www.home-assistant.io/components/remote.xiaomi_miio/#command-types). Done any one know how i may be able to convert those codes to work with the esphome Remote Transmitter component remote codes (https://esphome.io/components/switch/remote_transmitter.html#remote-codes)?

Thanks in advance!

I am not sure if these will work, but these are the codes for my Rinnai gas heater.

On 0x416649B6
Off 0x4166B14E
Temperature Up 0x4166916E
Temperature Down 0x4166619E

Or is ESP Home

address 0x4166

On 0x49B6
Off 0xB14E
Temperature Up 0x916E
Temperature Down 0x619E

And this is all NEC 32 bits long.

That said, I haven’t got the sending working properly as yet, but these are the codes that work with other nodemcu programs.

Thanks so much for the info!
I’ll give this a try and see if it works. I have also bought a broadlink RM because i was having issues with the Wemos and IR Shield so i’ll see if i can get it to work with either. I’m also not 100% sure if my Rinnai heater supports IR. It has a remote holder but I can’t locate a receiver or a mention of it in the heater manuals.

If anyone comes across this looking for Rinnai IR codes, they need to be converted for newer versions of ESPHome due to the NEC bit order change mentioned in the docs. Unfortunately the method used by the examples in the docs doesn’t work, so you need to use the method described here.

Updated Rinnai heater codes for anyone looking for them:

  • Address: 0x6682
  • Turn On: 0x6D92
  • Turn Off: 0x728D
  • Temperature Up: 0x7689
  • Temperature Down: 0x7986

Relevant part of my config that works:

switch:
  - platform: template
    name: "Heater"
    optimistic: true
    turn_on_action:
      - remote_transmitter.transmit_nec:
          address: 0x6682 
          command: 0x6D92
    turn_off_action:
      - remote_transmitter.transmit_nec:
          address: 0x6682
          command: 0x728D
button:
  - platform: template
    name: "Heater Temp Up"
    on_press:
      - remote_transmitter.transmit_nec:
          address: 0x6682
          command: 0x7689
  - platform: template
    name: "Heater Temp Down"
    on_press:
      - remote_transmitter.transmit_nec:
          address: 0x6682
          command: 0x7986

Has anyone used these codes with Tasmota IR? I use a rechipped Blitzwolf IR sender. The code I send over mqtt is: {"Protocol":"EPSON","Bits":32,"Data":"0xA55A38C7","DataLSB":"0xA55A1CE3","Repeat":1}
Thats to power on my old Pioneer amp.