Tasmota MQTT IRHVAC Controller

I don’t know how your IR emmiter works, but I’m using cheap IR emiter diodes like these and the work good. But I’ve connected them to 5V. And the range is about 5-6 metters. I don’t know if they work on even longer distances as my longest toom is 6m. I also orient the IR LED emitting diode diagonally the room. I guess they would be working well on 3.3V and up to 5.2V, as they are rated for such voltages.
AliExpress - IR emitter LED Diodes 940nm

Thanks for your reply. At meanwhile, I did some research as well. The 1W IR emiter diodes I am using is 120 degree angle, so it might not be so concentrate at one direction. Also as my vbat is lower than 5V, the current limit resistor might be too big for my case. If I replace it as a smaller value, the power should increase as well.

PS, I bought TSAL6200 from Aliexpress last night. The angle is 20 degree, and current can up to 100mA. I guess this one should be very powerful if I place more in parallel and tuning the resistor values to get maximal current.

For you case, the current seems just 20-30mA. You don’t have 100ohm resistor might get the max current that might be the reason you got 5-6 meters. This is very good because the LED is not burnt.

Thanks for your reply and I will update my status later on.

I made a python script to guide Tasmota when to sleep and wakeup(I just don’t like Tasmota’s build-in RULE), when to send command to AC. I have a 3900mAH battery, it can work for one year without charging. And it also can work along with your component.

  1. default_light_mode: "on"
    But the lighting in the air conditioner is always off when it is on.
  2. default_swingv: "off"
    But it always works when I turn on the air conditioner. And it doesn’t let me change it inside the entity either. I change to “off” but nothing happens and it goes back to “vertical”.
  3. Also the fan speeds are stuck. Always when I turn on the air conditioner it is on “medium” and won’t let me change to another mode. When I choose another mode, nothing actually happens in the air conditioner and it says “medium” again.

When using the Thermostat card check in Tasmota console if the command received from HA contains 'SwingV': 'Off' and 'Light': 'On'. If you receive them with the same values as set in default_swingv and default_light_mode, and you haven changed them in from the card, but nothing changes probably your AC does not support these functions and/or values.
You can also provide the logs from Tasmota console, so we can see what is going on. Meanwhile You can check if your AC is supported by IRRemoteESP8266 library.

toggle_list is a list with a toggle properties. A toggled property is a setting that does not retain the On state. For some ACs these properties are toggle functions.

initial_operation_mode:
keep_mode_when_off:
ignore_off_temp:

initial_operation_mode - after HA restart, Tasmota (and HA too) doesn’t know if your AC is turned on or off. If there is no saved state in HA, before the restart, HA will display on or off state according this setting.
keep_mode_when_off and ignore_off_temp - some AC, when turned off by their IR remote are set for example to mode Cold, 16C degrees … Using these 2 settings we can save the last mode and temperature, before the AC was turned off by its remote, and show them on the card and in the same time indicate that the AC is off. For example, lets say you’re using you AC on Heat, 26C and you turn it off by its IR remote, and you see on the card Cold, 16C, Off. You can set keep_mode_when_off and ignore_off_temp to true and next time when you use the AC on Heat, 26C and you turn it off by its IR remote the card will show heat, 26C, off.

For you case, the current seems just 20-30mA. You don’t have 100ohm resistor might get the max current that might be the reason you got 5-6 meters. This is very good because the LED is not burnt.

Yes, I decided to try using it without the resistor, just to see if the IR LED diode will burn and it survived. But this is in my case. Other diodes might burn. And it is recommended to use resistor. Mine is working without burning for more than 4 years. And if it burns - I’ll change it as last time I bought 50 pieces.

PS, I bought TSAL6200 from Aliexpress last night. The angle is 20 degree, and current can up to 100mA. I guess this one should be very powerful if I place more in parallel and tuning the resistor values to get maximal current.

Definitely narrower angle and more current will help increase the range a lot.

I made a python script to guide Tasmota when to sleep and wakeup(I just don’t like Tasmota’s build-in RULE), when to send command to AC. I have a 3900mAH battery, it can work for one year without charging. And it also can work along with your component.

That is a good idea. In the begining I was thinking for the same, but then I just put AC outlet with integrated USB power supply next to each AC at home. This way I power all my boards via USB and I attach them with hot glue under the ACs. :slight_smile: But now you inspire me again. I can make a few running on batteries soon. Can you show me your python script? It would be helpfull for other people too. :slight_smile: Actually you can also give the parts needed, some scheme and instructions to build battery powered IR transmitter. :slight_smile:

Yep, of couse I can share the python script soon(after some tidy up).
Before that, here are some findings:
prebuild tasmota-ir.bin doesn’t support deep sleep while stard tasmota.bin supports deep sleep but IRHVAC is NOT supported.
So I have to use customer build with hack. Becase the owner of tasmota told me can’t enable features into existing pre-build versions.
Now I am using tasmota-ir build + force enable deep sleep. It is just a few MACROs replacement among some files.

The hardware side, to use deep sleep:

  1. make sure GPIO16 is connected to EXT_RETB.
  2. check you board, make sure USB-Serial chip is not powered from 3.3V. I found it consumed 9mA from my ESP32Devkit board, and the LED 1.7mA. see this ESP32 FireBeetle DFR0478 real current consumption in deep sleep mode |. Now I removed it. My sleep current is less than 1mA.
  3. Each wakeup might last 5-6 sec talk with mqtt with 80mA running current.

Here is my estimation:


Battery capacity: 3900 mAH
Sleep current: 60.00 uA.
Daily wakeup: 10 time, each time 6.5 sec.
Daily consumption: 2.88 mAH.
Total: 1352.59 days, 3.71 years.

1 Like

Got it. Thanks for your help.

I checked it. My configuration is:

default_light_mode: "On"
default_swingv: "Off"

and in the console is this when I used the Thermostat card:

07:22:26.682 MQT: stat/office_ac_ir/RESULT = {"IRHVAC":{"Vendor":"GREE","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":0}}

So it isn’t the same as it should be. My AC supports those functions as I can change them from my remote and it’s indeed changed on the AC.

When I pressed manually to change the Swing mode in the entity it actually changed and same in through the service:

07:44:58.709 MQT: stat/office_ac_ir/RESULT = {"IRHVAC":{"Vendor":"GREE","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":0}}

When I pressed manually through the service tasmota_irhvac: set_light it actually changed the light on:

07:51:41.083 MQT: stat/office_ac_ir/RESULT = {"IRHVAC":{"Vendor":"GREE","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":0}}

This log is when I press my remote:

07:42:32.471 MQT: tele/office_ac_ir/RESULT = {"IrReceived":{"Protocol":"GREE","Bits":64,"Data":"0x19086050000000B0","Repeat":0,"IRHVAC":{"Vendor":"GREE","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

There is another logs you need me to send?
My AC is Gree-Tadiran Tosot 10A if it can help somehow.


How can I check it or how can I configure it in HA?


The modes can differ each time. Once it can be “cold”, other time “heat” or “off” and etc. So how can I configure it in HA?

@zombie6 What is your IR Remote model? If you are not shure what it is, you can post pictures of all numbers written on your remote.

How can I check it or how can I configure it in HA?

Tasmota IRHVAC Example Configuration

Here:


I mean where in the HA UI besides the configuration?
For example, where can I find those toggle functions from the toggle_list?

These toggle functions should be in the AC firmware, not in the HA. But I think this is not your case. The problem is that your AC is not fully supported. Actually it not supported at all, but just because your remote’s protocol is very similar to another Gree remote’s protocols it works for you for some basic functions.
This is a list with the supported remote models. Search in the following page for Gree. You will see a list of remotes that are supported.
IRRemoteESP8266 Supported Protocols

Your remote (“YT1F”) is not supported yet, but a very similar to yours is being in development currently. Aniway … As you wait you can do very few things.
First, you can try switching the vendor from GREE to KELVINATOR as it is know to have some compatibility with many Gree IR protocols. A restart of HA is required after vendor change.
Second you can try with vendor set to “GREE” and hvac_model set to “2” which I think might be more compatible with your AC. Restart after the change too.
And third - you can open issue on IRRemoteESP8266 Github repository and help/contribute to them to include it. They have Arduino sketch called IRrecvDumpV3 wich can extract data from your remote (by pressing buttons and reading the IR codes from it) and give it to the developers so they can add it in future versions.

Thanks for the answer, but my compatibility question is more like if there is any reason why the can’t coexist. I have both projects installed, but only one works at a time, the one comes last in my configuration.yaml file.

OK. What a bummer. At least luckily it’s similar.

How can I know when a new update is out and my remote will also be included?


Anyway, I tried your suggestions but none of them changed anything.
Regarding the third, can you explain to me how to do it or maybe you have a guide?


BTW, I discovered a kind of partial solution to the swingv part. It turns out that the reset to vertical and not to off happened because of the presses from the remote itself. When the swing feature is turned off on the remote, in HA it appears vertical but if I select some mode, for example highest, only then in HA does it appear as off.

How can I know when a new update is out and my remote will also be included?
The only way is looking in their repository, their releases, their issues and Tasmota releases. Once IRRemoteESP8266 include your remote, they will make a new release, the Tasmota will include it and make new release too.

Regarding the third, can you explain to me how to do it or maybe you have a guide?

On IRRemoteESP8266 repository there should me a guide how to contribure and a link to download IRrecvDumpV3 .

but if I select some mode, for example highest , only then in HA does it appear as off

Yes, we made it work this way. If you choose option that is not valid it defaults to off

Hm … Interesting. I’m not sure why they can’t coexist at the same time, as I haven’t used SmartIR. It could be a problem with the naming of the entity. If you set 1 AC in both components with the same name there would be a problem. Just a speculation.
Maybe I should try SmartIR some day. I don’t have any of these IR transmitters at home (mine are all home made). I have to order one and try it. :slight_smile:

If you are willing to try, you don´t need to have a broadlink, but just install the custom component of SmartIR, and add a mock configuration to your configuration.yaml, just make sure the SmartIR comes last, even if you don´t have a working broadlink(as it would be offline), all yours IRHVAC should stop working. Then just switch making the configuration of IRHVAC the last one and it should go back to work.

1 Like

OK, thanks! I will check it out.

try downgrading tasmota ir to 12.5
i had many issues with 13.0 and 13.1 and went back to 12.5 and everything works
dont know what the problem is with the new version but for me older version fix everything

Good to know. Anyway, I’m actually on version 9.5 of ircustom if it make any difference.

mine installation
hw ESP02 IR buy from aliexpress with remoted ir tx led
220vac-5v power supply aliexpress
working with original remote irReceived, and controlled by MQTT irhvac command
image

2 Likes