Tasmota MQTT IRHVAC Controller

I am completely new in this home assistant , try to setup Hitachi_AC IR remote for couple days, could someone give me some direction to fix it, Thanks you…

*firmware --Project tasmota Tasmota_307034 Version 9.1.0.2(ir)-2_7_4_7
*HAssio version-- 0.118.2

*configration
climate:

  • platform: tasmota_irhvac
    name: Panasonic_AC_LivingRoom
    command_topic: “tasmota_307034/cmnd/irhvac”
    state_topic: “tasmota_307034/tele/RESULT”
    protocol: “HITACHI_AC”
    temperature_sensor: sensor.kitchen_temperature #optional this sensor is used to display current temp on the AC card
    min_temp: 16 #optional - default 16 int value
    max_temp: 30 #optional - default 32 int value
    target_temp: 26 #optional - default 26 int value
    initial_operation_mode: “off” # optional - default “off” string value
    supported_modes:
    • “heat”
    • “cool”
    • “dry”
    • “fan_only”
    • “auto”
    • “off” #Turns the AC off - Should be quoted and should be always included here
      supported_fan_speeds:
    • “low”
    • “medium”
    • “high”
    • “min”
    • “auto”
      hvac_model: “-1” # string value
  • console msg
    20:11:32 MQT: tasmota_307034/stat/RESULT = {“IRHVAC”:{“Vendor”:“HITACHI_AC”,“Model”:-1,“Mode”:“Cool”,“Power”:“On”,“Celsius”:“On”,“Temp”:19,“FanSpeed”:“Low”,“SwingV”:“Off”,“SwingH”:“Off”,“Quiet”:“Off”,“Turbo”:“Off”,“Econo”:“Off”,“Light”:“Off”,“Filter”:“Off”,“Clean”:“Off”,“Beep”:“Off”,“Sleep”:-1}}
    20:12:36 MQT: tasmota_307034/tele/RESULT = {“IrReceived”:{“Protocol”:“UNKNOWN”,“Bits”:3,“Hash”:“0xFEAC02E4”,“Repeat”:0}}

*error log
2020-11-30 12:11:30 INFO (MainThread) [homeassistant.components.mqtt] Ignoring unchanged update for: sensor.tasmota_307034_status

2020-11-30 12:11:31 ERROR (MainThread) [homeassistant.helpers.event] Error while processing state changed for climate.panasonic_ac_livingroom

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/event.py”, line 257, in _async_state_change_dispatcher

hass.async_run_hass_job(job, event)

File “/usr/src/homeassistant/homeassistant/core.py”, line 434, in async_run_hass_job

hassjob.target(*args)

File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 404, in async_update_event_state_callback

self.async_update_state_callback(event.data.get(“new_state”))

File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 426, in async_update_state_callback

self.async_update_state(new_state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py”, line 403, in async_update_state

self._async_update_state(new_state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py”, line 427, in _async_update_state

homekit_hvac_action = HC_HASS_TO_HOMEKIT_ACTION[hvac_action]

KeyError: ‘cool’

I have DHT that is pluged to GPIO5, It shows the temp and humidity in tasmota web admin panel but the can not set the temperature_sensor in the conf.yaml correctly, the climate card does not show current temp, the tasmota log shows the following

19:56:43 MQT: tele/test_ac2/SENSOR = {“Time”:“2020-12-13T19:56:43”,“DHT11”:{“Temperature”:22.8,“Humidity”:2.0,“DewPoint”:-25.9},“TempUnit”:“C”}

What is the right way to config the DHT?

Does the code run on a ESP32?

hi @gh0s7,
I just want to thank for your grate work, I have just tried this today and every things worked perfectly.
and after that I have tested all things with newest version (tasmota-ircustom.bin v9.2 and Home Assistant 2020.12.) and again every things worked perfectly, I don’t know why in the first post you wrote “It is based on “tasmota-ircustom.bin” v8.1

1 Like

I assume as this was the version @gh0s7 tested with. It MAY work with every later version, but the committed one is 8.1.

1 Like

Could anyone help me with getting this to work, I’ve spent hours searching this thread and others for a solution, but I am coming up empty.

I have a Mirabella Genio IR Blaster flashed with Tasmota. I can successfully control my Panasonic AC unit by issuing commands from the Tasmota console. Also, after following this guide, I can control the aircon through Home Assistant: Mirabella Genio IR controller (Kmart) integration

However, the major issue I have is, whenever I issue a command to change one variable, it sets other variables back to their defaults. For example, if I change the Temperature from 18 to 19, it sets the correct temperature but the Mode is set back from Cool to the default of Auto. If I then change the Mode to Cool, it sets the Mode to Cool but the temperature is set back to the default of 21. Similarly, Fan always gets set to the default of Medium when changing any other variable.

Has anyone else experienced behaviour like this? The issue occurs in HA as well as directly from the Tasmota console.

Dear @gh0s7,
Thank you for the wonderful project and good description!
On the github page, you mention mounting the transceiver below your AC so that it has direct line-of-sight to the AC receiver AND it can be updated when using the standard remote unit.
Can you please elaborate on that or show an example? Are you powering the transceiver from the 110/220V power source used for the AC?

Thank you very much Hristo for your excellent work.

I have this working well with a Panasonic air con (CS‑Z20VKR and model 16330 remote). I had some trouble getting the lovelace widget to synch with actions inputted through the manufacturers’ remote. Changing the manufacturer to lower case seems to have worked for me.

Note that with one IR LED the air con unit it is picking up transmissions very easily in a modest sized bedroom, so probably not necessary to add extra IR LEDs for most purposes. However the IR sensor needs to be reasonably close to the air con unit to pick up the transmissions from the air con unit. I am about to 3D print a case and will put IR receiver and IR transmitter on the top so that the unit can sit on a table underneath the air con unit.

This would be an excellent update for the default IR component in ESPHome.

Note that I haven’t got the switches for the optional actions (quiet mode etc) to work, but assume that I have entered something wrong somewhere and will keep working on this.

  - platform: tasmota_irhvac
    vendor: "panasonic_ac"
    hvac_model: "6" 
    name: "Bedroom AC"
    command_topic: "cmnd/bedroom_aircon/irhvac"
    state_topic: "tele/bedroom_aircon/RESULT"
    temperature_sensor: sensor.lywsd03mmc_paul_bedroom_temperature_2
   # unique_id: 'panasonic_ac'
   # protocol: "PANASONIC_AC"
    away_temp: 24 #optional - default 24 int value
    supported_modes:
      - "cool"
      - "heat"
      - "dry"
      - "fan_only"
      - "auto"
      - "off"
    supported_fan_speeds:
      - "min"
      - "low"
      - "medium"
      - "high"
      - "max"
      - "auto"
    supported_swing_list:
      - "off"
      - "vertical" #up to down
      - "horizontal" # Left to right
      - "both"
    default_quiet_mode: "Off" #optional - default "Off" string value
    default_turbo_mode: "Off" #optional - default "Off" string value
    default_econo_mode: "Off" #optional - default "Off" string value
    default_light_mode: "Off" #optional - default "Off" string value
    default_filter_mode: "Off" #optional - default "Off" string value
    default_clean_mode: "Off" #optional - default "Off" string value
    default_beep_mode: "Off" #optional - default "Off" string value
    default_sleep_mode: "-1" #optional - default "-1" string value

@ddppddpp I have USB plug on my 220V outlet, that can power USB devices. This is how I power the device. :slight_smile:
Google Photos

@kiwipaul Not all functions from the original remote are supported by Tasmota. Also Home Assistant does not support all these functions to be added to the Thermostat card. Any way, I added them in the config, as if they are supported by Tasmota , you can find other ways to control them - scripts, buttons, switches etc. :slight_smile:

@stibbzy Does Tasmota recognise the IR commands from your remote as HVAC?

@sina Yes, I was planing to update the version each time Tasmota release new version, but I quit this idea. Now it just works. :slight_smile: I’ll have to update the first post. :slight_smile:

1 Like

@dedalusjinja Try with protocol/vendor in lower case. :slight_smile:

Hi! I did manage to get this working in the end, I just started from fresh with your custom component.

The only issue I have now is that Home Assistant’s HomeKit integration doesn’t map fan speed to HomeKit for HVAC devices. I’m trying to expose the fan speed services as a seperate fan entity to gain that control, but I’m new to HA and having trouble figuring out scripts etc. anyway, I’ll persevere.

1 Like

@stibbzy I’m glad to hear it is workig. :slight_smile: I just can’t help you with HomeKit. I’m not iPhone user. :slight_smile:

That’s ok. It’s not specifically an iPhone issue, I need to get a fan entity in Home Assistant that calls your component’s Fan services. Once the HA identity exists, it will flow through to HomeKit as do all other entities.

@stibbzy So may be you need something like this (change entity id with your Tasmota IRHVAC AC entity id and also the speeds):

fan:
  - platform: template
    fans:
      aircond_fan:
        friendly_name: "Aircond fan"
        value_template: >-
          {% if states('climate.daewoo_irhvac.state') != 'off' %}
             'on'
          {% else %}
             'off'
          {% endif %}
        speed_template: "{{ states('climate.daewoo_irhvac.fan_mode') }}"
        turn_on:
          service: climate.turn_on
          data:
            entity_id: climate.daewoo_irhvac
        turn_off:
          service: climate.turn_off
          data:
            entity_id: climate.daewoo_irhvac
        set_speed:
          service: climate.set_fan_mode
          data:
            entity_id: climate.daewoo_irhvac
            fan_mode: "{{ speed }}"
        speeds:
          - "min"
          - "low"
          - "medium"
          - "high"
          - "max"
          - "auto"
1 Like

@gh0s7 Thanks so much for that! I was working on something similar and this definitely helped! I had to end up using some scripts to translate Homekit speeds to TasmotaIR ones (eg Low in Homekit is Min). The only issue I have now is my Fan entity in HA doesn’t follow the state of the HVAC entity created from your plugin (e.g. turning off the HVAC entity doesn’t turn off the Fan entity). Is this something I should be able to fix with automations? The ones I’ve tried writing so far aren’t working:

- trigger:
  - entity_id: climate.owens_ac
    to: 'off'
    platform: state
  condition: []
  action:
  - service: script.turn_off_owens_ac_fan
  mode: single

script:

turn_off_owens_ac_fan:
    sequence:
      - service: climate.turn_off
        data:
          entity_id: climate.owens_ac

@stibbzy I think there is some problem with the fan integration. So far I havent found any way to turn it off or on using template fan. And as I see you can’t stop it with script and automation too, so I guess something is wrong with this fan integration. May be if you try with some custom fan integration (there might be some in github), it could work.

@gh0s7 Thanks for the advice, I’ll have a look around. Thanks for being so helpful :slight_smile:

1 Like