Tasmota MQTT IRHVAC Controller

So I did a fresh git pull today, and am running the tasmota-ir.bin firmware (can send commands manually just fine)

With the aircon in an Off state:
If I move the temperature slider the aircon beeps
If I hit the heat button the temperature goes back to 16 and the aircon beeps twice and comes on (and seems to be in auto. or fan only)
If I move the temperature back up to 26 it beeps but then the temperature drops to 16 again
If I hit the heat button again it goes back to auto, if I move the temperature it drops to 16 again.

  - platform: tasmota_irhvac
    name: Loungeroom Samsung IRHvac
    command_topic: "cmnd/LoungeIR/irhvac"
    state_topic: "tele/LoungeIR/RESULT"
    temperature_sensor: "sensor.dummy_temperature"
    protocol: "SAMSUNG_AC"
    target_temp: 26 #optional - default 26 int value
    initial_operation_mode: "auto" # optional - default "off" string value
    away_temp: 24 #optional - default 24 int value
    precision: 1.0 #optional - default 1.0 float 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:
      - max
      - medium
      - min
      - auto
    supported_swing_list:
      - "off"
      - vertical #up to down
      - horizontal # Left to right - remove if your AC does not support it
      - both # remove if your AC does not support horizontal

List of commands sent

Message 7 received on cmnd/LoungeIR/irhvac at 11:52 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "off",
    "Mode": "off",
    "Celsius": "on",
    "Temp": 16,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 6 received on cmnd/LoungeIR/irhvac at 11:51 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "auto",
    "Celsius": "on",
    "Temp": 26,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 5 received on cmnd/LoungeIR/irhvac at 11:51 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "heat",
    "Celsius": "on",
    "Temp": 16,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 4 received on cmnd/LoungeIR/irhvac at 11:48 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "off",
    "Mode": "off",
    "Celsius": "on",
    "Temp": 16,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 3 received on cmnd/LoungeIR/irhvac at 11:48 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "auto",
    "Celsius": "on",
    "Temp": 26,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 2 received on cmnd/LoungeIR/irhvac at 11:47 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "heat",
    "Celsius": "on",
    "Temp": 16,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 1 received on cmnd/LoungeIR/irhvac at 11:47 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "off",
    "Celsius": "on",
    "Temp": 26,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}
QoS: 0 - Retain: false
Message 0 received on cmnd/LoungeIR/irhvac at 11:47 AM:
{
    "Vendor": "SAMSUNG_AC",
    "Model": "-1",
    "Power": "on",
    "Mode": "off",
    "Celsius": "on",
    "Temp": 25,
    "FanSpeed": "auto",
    "SwingV": "off",
    "SwingH": "off",
    "Quiet": "off",
    "Turbo": "off",
    "Econo": "off",
    "Light": "off",
    "Filter": "off",
    "Clean": "off",
    "Beep": "off",
    "Sleep": -1
}

Log Details (WARNING)

Logger: homeassistant.helpers.service
Source: helpers/service.py:258
First occurred: 5:39:30 AM (1 occurrences)
Last logged: 5:39:30 AM

Unable to find services.yaml for the tasmota_irhvac integration

Log Details (ERROR)

Logger: homeassistant.setup
Source: setup.py:178
First occurred: 5:39:19 AM (1 occurrences)
Last logged: 5:39:19 AM

Setup failed for tasmota_irhvac: No setup function defined.

@Iq85k I mean the “home-assistant.log” file in the “config” directory. Restart HA and search in the log for “tasmota_irhvac”. You will find an error. Copy the all error block (usually about 7 - 10 lines) and paste them here. :slight_smile: Also, copy and paste your “climate:” config from “configuration.yaml”. :slight_smile:
EDIT: Also … What version of Home Assistant are you using? I’m starting to suspect, that you are using the beta versions, and there are some changes, that I’m not aware of… :slight_smile:

@Freman Scan your real AC remote IR codes on 25C and 26C and paste me the “IrReceived” result from Tasmota console. What I can tell you right now is that you’ve missed the “model:” key in your config and “tasmota_irhvac” component sends its default value of “-1” for that key, which is invalid for “SAMSUNG_AC” protocol and when Tasmota receive it, it actually sends temperature key with default value of 16. So you have to scan your original IR remote to see what the actual “model:” value should be and populate it in the config. :slight_smile: Most probably it will be “1”, but test your IR code, to be shure. :slight_smile: If the problem is solved by populating the “model” key, there is no need to paste the codes here. And … Keep us posted with the results. :slight_smile:

Hi Hristo, I am very happy using your component.

I want to make a small contribution to your great job.
I saw there is a file missing on the component, so I created a “services.yaml” file to avoid the warning message on the log of home assistant and also to provide examples on the service page of home assistant.
This file should be added to the folder “custom_components/tasmota_irhvac/services.yaml”

the content of the file is:

set_beep:
  description: Sets Beep mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    beep:
      description: Sets Beep mode
      example: "on"

set_clean:
  description: Sets Clean mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    clean:
      description: Sets Clean mode
      example: "on"

set_econo:
  description: Sets Econo mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    econo:
      description: Sets Econo mode
      example: "on"

set_filters:
  description: Sets Filters mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    filters:
      description: Sets Filters mode
      example: "on"

set_light:
  description: Sets Light mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    light:
      description: Sets Light mode
      example: "on"

set_quiet:
  description: Sets Quiet mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    quiet:
      description: Sets Quiet mode
      example: "on"

set_sleep:
  description: Sets Sleep mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    sleep:
      description: Sets Sleep mode
      example: "0"

set_turbo:
  description: Sets Turbo mode.
  fields:
    entity_id:
      description: Name(s) of the entities to set
      example: "climate.ac_living"
    turbo:
      description: Sets Turbo mode
      example: "on"

Thanks again for your great job.

1 Like

@artuditu Thank you! Added! :slight_smile:

Hi @gh0s7

I tried tossing a 1 in there (tasmoa-ir said the field was optional) but that didn’t help, UI is still bouncing around

{
    "IrReceived": {
        "Protocol": "SAMSUNG_AC",
        "Bits": 112,
        "Data": "0x0x02920F000000F001C2FE71900DF0",
        "Repeat": 0,
        "IRHVAC": {
            "Vendor": "SAMSUNG_AC",
            "Model": -1,
            "Power": "On",
            "Mode": "Auto",
            "Celsius": "On",
            "Temp": 25,
            "FanSpeed": "Auto",
            "SwingV": "Off",
            "SwingH": "Off",
            "Quiet": "Off",
            "Turbo": "Off",
            "Econo": "Off",
            "Light": "On",
            "Filter": "Off",
            "Clean": "Off",
            "Beep": "Off",
            "Sleep": -1
        }
    }
}
{
    "IrReceived": {
        "Protocol": "SAMSUNG_AC",
        "Bits": 112,
        "Data": "0x0x02920F000000F001C2FE71A00DF0",
        "Repeat": 0,
        "IRHVAC": {
            "Vendor": "SAMSUNG_AC",
            "Model": -1,
            "Power": "On",
            "Mode": "Auto",
            "Celsius": "On",
            "Temp": 26,
            "FanSpeed": "Auto",
            "SwingV": "Off",
            "SwingH": "Off",
            "Quiet": "Off",
            "Turbo": "Off",
            "Econo": "Off",
            "Light": "On",
            "Filter": "Off",
            "Clean": "Off",
            "Beep": "Off",
            "Sleep": -1
        }
    }
}

Edit:
I re-copy-pasta’d the config and changed it and now it’s working fine. Just have to do all the other cool things (turn on/off the light, beep, swing, etc)

Thanks

1 Like

OK, I think that it is a bless for my Midea HVAC to HA integration :slight_smile: Thanks…
One quick question- in Tasmota console every 2-4 seconds pops up a message with unknown protocos- is that normal and does not hog MQTT?
Best, JR
Edit: unknown packets were from dodgy (oversensitive?) IR receiver (Vellemann VMA317) :frowning:
Sorry for panic…

1 Like

Hristo, thank for you job

I tested in HA 0.109.3 with docker and tasmota 8.2.0 in an air model Daewoo DWT5BINV-3400FC and works with protocol TCL112AC, great !

But with LG, Houston, I have a problem :slight_smile:

The real value that I can see in an mqtt is

{“Protocol”:“LG2”,“Bits”:28,“Data”:“0x8808743”,“DataLSB”:“0x1001E1C2”,“Repeat”:0}

and I send with lg_climate componet library

{“Protocol”: “LG”, “Bits”: 28, “Data”: “0x8808743”, “Repeat”: 0}

Thanks in advance!

1 Like

@dborsnich I’m not surprised, that with LG protocol it is not working well. :slight_smile: My implementation of LG protocol is … just … my implementation for just one of the models. :slight_smile:
One of my friends had this model (I don’t even know what model it is, he sent me a few codes, and I was able to reverse engineer the hex code). I made this for him, and as it isn’t supported by Tasmota, it is a different kind of custom component. :slight_smile: Anyway … I’m glad that you have found a good way to use my component, and this can help other users to control their ACs. :slight_smile:

The air is an LG model USNW186CSG3

and thanks again for your time and dedication !!!

regards

Hi, tried it with Tasmota 8.2 as my Midea with COOLIX protocol is not supported in 8.1 :frowning:
HA log says:

Logger: custom_components.tasmota_irhvac.climate
Source: custom_components/tasmota_irhvac/climate.py:891
Integration: tasmota_irhvac ([documentation](https://www.home-assistant.io/integrations/tasmota_irhvac))``

Unable to update from sensor: could not convert string to float: 'unknown'

Is this because of 8.2 usage? Maybe I have to compile my own ir_custom ?
I see that it is related to this:

    async def _async_sensor_changed(self, entity_id, old_state, new_state):
        """Handle temperature changes."""
        if new_state is None:
            return

        self._async_update_temp(new_state)
        await self.async_update_ha_state()

Any ideas welcome :slight_smile:
Best, JR
Edit: Can report back that all works under HA 0.109.x and Tasmota 8.2.0.5 tasmota-ir :slight_smile:
Made 2 stupid errors: as usual swapped MQTT topic/prefix used to not paying attention to config.yaml entries for climate :frowning: And I was well aware of Tasmota 8.2 breaking change on Setoption19 behavior… just thought as I always swap them it is OK— rookie again.
Another error was very stupid- as Arduino for years: GPIO vs D pin- of course managed to connect IRSend to wrong pin- and wondered why my Wemos D1 Mini LED is lit all the time despite LedPower etc. commands :slight_smile:
And thanks Hristo for this yet simple but worldsaving project! I think this startup error log is not very relevant.

1 Like

@Foxxy this is because when HA starts, it waits few minutes, until temp sensor send the temperature. Until then it is ‘Undefined’ or something like this. And as expected a word is not a number, and this is why this error appears … May I’ll fix it on next commit … :slight_smile:

I have an integrated air conditioning with Tasmota MQTT IRHVAC and another with smartir, both in home assistant work perfectly
but in the google home app it doesn’t give me the option to control the fan speeds
any ideas?

@otravex this is a question for Home Assistant or Google Home devs. We do what we can, but some things does not depend on us. :slight_smile: May be some googleling can help. :slight_smile:

Finally had time to build this project. Only issue I am having is the codes from the remote are only received correctly every so often.

07:11:36 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"PANASONIC_AC","Bits":216,"Data":"0x0x0220E004000000060220E00400003C803F00000EE0000081000070","Repeat":0,"IRHVAC":{"Vendor":"PANASONIC_AC","Model":4,"Power":"Off","Mode":"Off","Celsius":"On","Temp":30,"FanSpeed":"Min","SwingV":"Auto","SwingH":"Auto","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}
07:12:01 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0xBCF80326","Repeat":0}}
07:12:09 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":220,"Hash":"0x2C065E5C","Repeat":0}}
07:12:11 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0xAF13B1B3","Repeat":0}}
07:12:13 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":218,"Hash":"0x3E4170BB","Repeat":0}}
07:12:15 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"PANASONIC_AC","Bits":216,"Data":"0x0x0220E004000000060220E004003928804F0A000EE00000810000AF","Repeat":0,"IRHVAC":{"Vendor":"PANASONIC_AC","Model":0,"Power":"On","Mode":"Cool","Celsius":"On","Temp":20,"FanSpeed":"Low","SwingV":"Auto","SwingH":"Left","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}
07:12:16 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":218,"Hash":"0xCAEFAA36","Repeat":0}}
07:12:20 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0x19321EFD","Repeat":0}}
07:12:24 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":218,"Hash":"0xD392F549","Repeat":0}}
07:12:27 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0x11E467A2","Repeat":0}}
07:12:34 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0x85C27BA3","Repeat":0}}
07:12:36 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0x5FCD867B","Repeat":0}}
07:12:37 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":219,"Hash":"0x79BE71E3","Repeat":0}}
07:12:40 MQT: tele/loungeroomac/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":132,"Hash":"0x18BA6848","Repeat":0}}

I was able to get enough required information to get it to work via HA so I am happy there.

Also my remote gives a model of 0 but when I use 0 in the config it still shows as -1. It works but just thought I would mention it.

Any ideas about the receiving codes issue tho?

Disregard the above, I changed the IR receiver diode and moved the wires on the bread board away more and now it works. (Turns out it was the IR receiver diode that was the issue)

I’m on 0.109.6 with 8.1 tasmota

I suppose the problem is from google home, in the home assistant card everything works fine.
I put it here in case someone could confirm that it was not a fault in my configuration.
Thank you

1 Like

Since 0.110b4 (beta release) I get an error in logs:

ClimateDevice is deprecated, modify TasmotaIrhvac to extend ClimateEntity

All works as expected, any insight?
Best, JR

It is due to a change in Home Assistant.
@gh0s7 , Can you please update climate.py and change “ClimateDevice” to “ClimateEntity”?
There are only 2 entries on lines 10 and 389.

Edit: more on this article: https://developers.home-assistant.io/blog/2020/05/14/entity-class-names

Thanks.

1 Like

Yep, found it out too yesterday and modded all my local custom_components to Device->Entity name change. All good and thanks to pointing once again :slight_smile:
Best, JR