Multiple remote transmitter

Hi everyone I want to realize two remote controllers in one project.One 433Mhz transmitter and one IR diode. The 433Mhz works, only the IR diode doesn’t. I guess it’s the syntax. Can someone help me? Thanks a lot

esphome:
  name: wohnzimmer
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "XXXX"
  password: "XXXXX"

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "XXXX"

ota:
  password: "XXXX"

# BME280 Temperature+Pressure+Humidity Sensor 
i2c:
  scl:  D5
  sda:  D4
  scan: true

# 433Mhz Steckdose
remote_transmitter:
  - id: Mhz
    pin: D3
    # RF uses a 100% carrier signal
    carrier_duty_percent: 100%
  - id: IR
    pin: D2
    # RF uses a 100% carrier signal
    carrier_duty_percent: 100%    

sensor:
  - platform: bme280
    temperature:
      name: "Wohnzimmer Temperature"
      oversampling: 16x
    pressure:
      name: "Wohnzimmer Druck"
    humidity:
      name: "Wohnzimmer Feuchte"
    address: 0x76
    update_interval: 60s

switch:
  # Relaise
  - platform: gpio
    pin: D1
    name: "Garage Door Open Switch"
    id: open_switch
  - platform: gpio
    pin: D6
    name: "Garage Door Close Switch"
    id: close_switch
  - platform: gpio
    pin: D7
    name: "Garage Door Stopp"
    id: stopp_switch   
  #Steckdosen
  - platform: template
    name: Funk A
    id: A
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110101001111110100110000'
          repeat: 
            times: 10
    turn_off_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110111101000101100100000'
          repeat: 
            times: 10
  - platform: template
    name: Funk B
    id: B    
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110101001111110100110100'
          repeat: 
            times: 10
    turn_off_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110110101101111100010100'
          repeat: 
            times: 10            
  - platform: template
    name: Funk C
    id: C
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110101001111110100111100'
          repeat: 
            times: 10
    turn_off_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110110101101111100011100'
          repeat: 
            times: 10             
  - platform: template
    name: Funk D
    id: D
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110110101101111100010010'
          repeat: 
            times: 10
    turn_off_action:
      - remote_transmitter.transmit_rc_switch_raw:
          protocol: 4
          code: '110101001111110100110010'
          repeat: 
            times: 10  
#IR Fernbedienung
  - platform: template
    name: Samsung AN/AUS
    id: IR_ON
    turn_on_action:
      - remote_transmitter.transmit_samsung:
          data: 0xE0E040BF

  #//Samsung AN/AUS
#irsend.sendSAMSUNG(0xE0E040BF, 32);
#delay(50);}
#void TVLauter(){
#  //Samsung Lauter
#  irsend.sendSAMSUNG(0xE0E0E01F, 32);
#  delay(50); }
#void TVLeiser(){
#  //Samsung Leiser
#  irsend.sendSAMSUNG(0xE0E0D02F, 32);
#  delay(50);}
#void TVSmart(){
#  //Samsung Smart 
#irsend.sendSAMSUNG(0xE0E09E61, 32);
#delay(3000);
#//Samsung Rechts
#irsend.sendSAMSUNG(0xE0E046B9, 32);
#delay(3000); 
#//Samsung Enter
#irsend.sendSAMSUNG(0xE0E016E9, 32);
#delay(50);  }
#void TVBack() {
#  //Samsung Internet Zurück
#  irsend.sendSAMSUNG(0xE0E008F7, 32);
#  delay(50); }  
  
 
    
cover:
  # Relaise
  - platform: template
    name: "Rollade"
    open_action:
      # Cancel any previous action
      - switch.turn_on: close_switch
      # Turn the OPEN switch on briefly
      - switch.turn_off: open_switch
      - switch.turn_on: stopp_switch
      - delay: 0.1s
      - switch.turn_on: open_switch
    close_action:
      - switch.turn_on: open_switch
      - switch.turn_off: close_switch
      - switch.turn_on: stopp_switch
      - delay: 0.1s
      - switch.turn_on: close_switch
    stop_action:
      - switch.turn_on: close_switch
      - switch.turn_on: open_switch
      - switch.turn_off: stopp_switch      
      - delay: 0.1s
      - switch.turn_on: stopp_switch
    optimistic: true
    assumed_state: true
    # Steckdose
  - platform: template
    name: "Steckdose A"
    open_action:
      - switch.turn_on: A
    close_action:
      - switch.turn_off: A
    optimistic: true
    assumed_state: true  
  - platform: template
    name: "Steckdose B"
    open_action:
      - switch.turn_on: B
    close_action:
      - switch.turn_off: B
    optimistic: true
    assumed_state: true 
  - platform: template
    name: "Steckdose C"
    open_action:
      - switch.turn_on: C
    close_action:
      - switch.turn_off: C
    optimistic: true
    assumed_state: true 
  - platform: template
    name: "Steckdose D"
    open_action:
      - switch.turn_on: D
    close_action:
      - switch.turn_off: D
    optimistic: true
    assumed_state: true
1 Like

I am a complete novice - just reading the docs - but I wonder if you copy pasted the RF for IR and need to change a value. Reading the ESPHome documentation for remote_transmitter it says:

Carrier_duty_percent (Optional, int): ... Set this is 50% if you’re working with IR leds and to 100% if working with a other things like 433MHz transmitters.

I haven’t worked with these devices are all yet, but a simple check would be to change the percentage for the IR to 50% per the documents on ESPHome.io and see if that is the culprit.

Cheers!
DeadEnd

Thank you so much for pointing that out. I have set the value to 50%. IR is still not working. I don’t know how to access the different ID´s at the remote_transmitter. I assume that only the first ID Mhz is processed.

Ah good point!

here it is:

  • transmitter_id ( Optional , ID): The remote transmitter to send the remote code with. Defaults to the first one defined in the configuration.

So I think this will fix it:

#IR Fernbedienung
  - platform: template
    name: Samsung AN/AUS
    id: IR_ON

    turn_on_action:
      - remote_transmitter.transmit_samsung:
          transmitter_id: IR
          data: 0xE0E040BF

I think that is in the correct place :slight_smile:

Cheers!
DeadEnd

2 Likes

That’s it. Thank you very much.