Tasmota MQTT IRsend command difficulty

Hi I’ve loaded Tasmota onto an ESP-01 and am using GPIO3 (Rx) to connect to an Infrared diode to control my vacuum cleaner (clean, home etc). I can control it fine from the Tasmota console with the following command :
IRsend {“protocol”: “NEC”, “bits”: 32, “data”:44704477}

I’ve tried to set up the HASSIO configuration.yaml as follows:

ESP01 - IR sender

  • platform: mqtt
    name: “Vacuum”
    command_topic: “esp01b/irsend”
    payload: ‘{“protocol”: “NEC”, “bits”: 32,“data”:44704477}’
    optimistic: true
    qos: 0
    retain: true

Checking configuration , its says its fine… but the ESP-01 doesn’t receive the command when sent and hence it doesn’t work, but if issued from Tasmota console it all works fine.

Please can someone provide some guidance… Thanks

There is no on/off command. Here is my working code using a wemos

-     platform: mqtt
      name: "Humax Channel Down"
      state_topic: "home/IRtoMQTT/" # defined by subjectGTWIRtoMQTT in User_config.h
      command_topic: "home/commands/WEMOS/IR_NEC"
      payload_on: "585743"
      payload_off: "585743"
      optimistic: false
      retain: true

Hi, your comments made me do some further digging about payload_on, also proper formatting for json…the new code below now works a treat.

ESP01 - IR sender

  • platform: mqtt
    name: “Vacuum”
    state_topic: “stat/esp01b”
    command_topic: “cmnd/esp01b/IRsend”

    turning switch on sets vacuum to clean

    payload_on: >-
    {
    “protocol”: “NEC”,
    “bits”: 32,
    “data”: 44704477
    }

    turning switch off sets vacuum to go home

    payload_off: >-
    {
    “protocol”: “NEC”,
    “bits”: 32,
    “data”: 44730487
    }
    optimistic: true
    qos: 0
    retain: true
1 Like

Does this only work with the vacuum component? I’d like to be able to send other devices commands, but I can’t find anything that integrates easily with Tasmota IRsend for generic remote codes.

This is using MQTT. Comment after me mentioned a vacuum cleaner. I use mine to control my set top box.