Midea branded AC’s with ESPhome (no cloud)

Modbus exception 2 is an “illegal address/register” message. Do you have the modbus mapping overview for your specific Heatpump model, if so, check in there if a different register address should le used

the register are identical to Midea, Ferroli, Kosner, EAS, etc… I’ve already reviewed it 4 times.
I have also looked at all the reserved addresses and I have not seen those two values.


debug mode register 0x10B error!!!

0x109
[19:22:39][D][modbus.number:023]: Number new state : 35.00
[19:22:39][D][number:012]: 'Heatpump T1SetH1': Sending state 35.000000
[19:27:41][D][uart_debug:114]: <<< 01:03:02:00:23:F9:9D
[19:27:51][D][uart_debug:114]: >>> 01:03:01:09:00:01:55:F4

0x10A
[19:34:08][D][modbus.number:023]: Number new state : 28.00
[19:34:08][D][number:012]: 'Heatpump T1SetH2': Sending state 28.000000
[19:34:08][D][uart_debug:114]: <<< 01:03:02:00:1C:B9:8D
[19:34:18][D][uart_debug:114]: >>> 01:03:01:0A:00:01:A5:F4

0x10B
[19:39:15][D][uart_debug:114]: >>> 01:03:01:0B:00:01:F4:34
[19:39:15][D][modbus:119]: Modbus error function code: 0x83 exception: 2
[19:39:15][E][modbus_controller:068]: Modbus error function code: 0x3 exception: 2 
[19:39:15][E][modbus_controller:077]: Modbus error - last command: function code=0x3  register address = 0x10B  registers count=1 payload size=0
[19:39:15][D][uart_debug:114]: <<< 01:83:02:C0:F1

Any idea to try?

For now I don’t have anything that you could try, especially since I get decent numbers from those 2 registers. I find it very strange that you get a error code 2 back, I assume for now that is more a “you are sending me the wrong data” then a missing register.

Maybe I have this weekend a bit of time to debug it on my own Heatpump, so we can compare some data.

Thanks Mosibi, the truth is that it is a very strange thing that only happens with those 2 registers

Update:
I have discovered that the record following the two problematic ones also gives an erroneous reading.
Register 269: Heatpump Power Input Limitation Type
It should have a value between 0 and 8, (0 by default)
267 (PLC:40268) T4H1
268 (PLC:40269) T4H2
269 (PLC:40270) Heatpump Power Input Limitation Type

That’s indeed very strange. I will do some testing this weekend, if time allows, but it will be hard without having the issue myself.

Are the values for register 270, 271 and 272 readable/okay ? The values you have issues with, are all at the end of the modbus register list and if the last 3 (as far as I know) also don’t work, it could be that your Heatpump exposes until 266 for some strange reason

270 HB Heatpump t_T4 FRESH_C 0.0 hr
270 LB Heatpump t_T4 FRESH_H 0.0 hr
271 Heatpump Built-in Circulating Pump Delay 6665 hr
272 Heatpump Zone 1 End Cooling Mode Emission Type 10
Heatpump Zone 1 End Heating Mode Emission Type 11
Heatpump Zone 2 End Cooling Mode Emission Type 11
Heatpump Zone 2 End Heating Mode Emission Type 10

It was a long shot, but these values seems to be okay. So not an issue with a limit until 266

Just to share an exerience with dudanovs gerber and dom/csp files.
Ordering at jclsp was flaw less, straight forward and so far cheap. Including shipping to the us if was 20 bucks for 5 (minimum order amount) iot sticks.
When ever they arrive, it will be just some esp chip and usb port soldering and dudanovs stick will be alive

I just updated my heatpump configuration with some extra values. Now the “current fault”, “fault 1”, “fault 2” and “fault 3” are mapped to the right error code. Next to that I also added a description entity for the “current fault” which gives a nice error description so that you do not need to dive into the heatpump manual.

In a Midea manual I found the following overview

I think that you should contact your heat pump manufacturer and ask why that register is not working

I’m glad to see you keep updating your settings.
You’re right, maybe the best thing I can do is ask the technical service about the problem with those 3 modbus addresses. But I’m afraid that something so technical is going to be complicated.
Update:
I have seen it, I had not noticed all the code you have added, good job.
I’m not used to the Yaml language. I mainly control Basic and Python, although it is also a scripting language, it is hard for me.

The first line support of Kosner will probably not be able to help you with this issue indeed. But hopefully they will pick it up seriously. In the Netherlands we have a saying that translates to “you already have a ‘no’, you can still get a ‘yes’” (nothing ventured, nothing gained).

I hope you get a decent answer and of course I am curious regarding the outcome!

I’ll try.
I don’t know if it will be too much to ask, but would it be possible to implement the climate component in the esphome code? with the 3 modes Auto/Heat/Cold. I currently use the thermostat that creates the Midea AC integration (ethernet), but I only use the integration for that. It is the only thing missing from your Modbus integration (Esphome). Internet integration is much slower

I have some more questions about two topics that I will ask later, I will just post them for now.

  • Actual consumption of the unit in standby
  • Modbus pin 5 flow pin.

What entity’s are used for the climate controls? In other words, if you switch to heating and set the temperature to 21, which values on the heatpump are changed?

I am currently using a specific Midea integration, it is in HACS, it is called Midea AC, it adds some values and a thermostat, like the one in the mobile application. It work for tcp/ip commands, i think. like mobile app.
I am not physically using any thermostat that activates the HL(Hot) or CL(cold) switches.
I use an internal thermostat that has the controller (Ta). The controller itself works like a thermostat.
Ta = room temperature
Ts = Target Temperature
id: “${devicename}_operational_mode” 1:Auto/2:Cool/3:Heat Other: unknown.

Since you are already using

Why switch to Modbus if it will already work with the current esphome solution?
And i think it will, as you are allready using wifi :wink:

One integration has nothing to do with another.
Midea AC LAN has very few reading parameters and is quite slow to react to any changes.
Mosibi’s solution is practically complete and very fast in responding to changes, much more control.

I am not talking about MideaLAN, I am talking about ESPHome Midea Climate…

And that is what this topic was about in the 1st place (not ModBus)

I am not sure that this integration works in the heat pumps we are talking about, this is serial communication and what we are talking about is modbus. But something similar to the climate component is what would be missing in the modbus integration