Midea A/C via local XYE

This is working for me! So - it’s a bit silly, but with the 2nd gen MR Cool Hyper Heat r454b, the SW1 dip switches go the opposite way that I expected. So for ‘auto discovery’ mode, you but the SW1 switches all to the left.

Additionally I wired S1/S2 with 18/2 wire from the air handler to the outdoor unit.

The SW1 dip switch settings definitely confused me a lot because I had the dip switches set backwards for each one.

edit: I’m also getting the 122 temperature same as above, but it was working before

edit2: rebooting (or possibly reflashing it - seems to resolve it). One thing I note - my log is showing the temperature in celsius for the sensor.ecobee that is being passed along. In the log above, seems like sometimes it gets flipped to Fahrenheit which then messes up the conversion resulting in a high temp

Are you powering this off the 5V XYE port supply or a separate 12V supply? I thought that 485tail board needs more than 5V.

My wall controller is a 12V variant connected to a “CN40” port on the indoor unit, so I have the Tail 485 wired straight in.

The 12V input is immediately regulated down to 5V which is used internally for the RS485 interface. I think it’d work fine if you left 12V disconnected and instead supplied 5V from the other direction.

From: m5-docs

Full schematic from a related variant: m5-docs

Looking for anything to do with defrost. I have discovered that field 25 shows 02 during defrost, It appears only during the heating phase. My real interest is looking for ways to control defrost. My unit (2T ducted Panasonic-Midea) defrosts often with no frost on the coil. These defrosts, while short (~1 minute), don’t appear to serve any function but waste energy.

I highly doubt you can control the defrost algorithm in the outdoor unit from the common connection ports. For the RS485 port (not XYE), Midea sells a diagnostic/test unit that can control the compressor’s output and run a defrost test, but I never saw any defrost reprogramming.

Your best bet might be to hack the signal from the outdoor unit’s coil/ambient temp sensors. They’re simple thermistors, so you could fake a given temperature by increasing/decreasing the resistance.

I noticed that some of the recent 454b Midea units (Pioneer rebadge) have some DIP switches to change defrost settings, but I think they move it towards more-frequent defrost cycles, not less.

Curious about setting up this way. My wall controller is using the 2-wire HA/HB connector. I’m guessing i’d set it up using the XYE ports in the Air Handler instead. I’m currently running wrahler’s code and at least receiving more information on what my system is doing.

My problem is that my wall controller doesn’t seem to update the house temperature very often, so I find that the system runs for too long or not long enough. I’m hoping with this updated code I can put more ‘follow me’ temperature updates.

The ATOM device makes it look much sleeker (and I could probably leave it inside the AHU.

Also does anyone have temperature probe recommendations for intake air temp and exhaust?

I use the 1-Wire DS18B20 probes with the stainless steel sensor tip. They’re cheap, accurate, waterproof, have Arduino/ESPHome support, and multiple sensors can all share just one IO pin (they have unique addresses from factory.)

I’ve had most other sensors randomly die on me at least once, but I can’t think of a DS18B20 ever failing, even the cheap (likely clone) units from Amazon. I usually order these for about $2/each: Amazon.com: HiLetgo 5pcs DS18B20 Temperature Sensor Temperature Probe Stainless Steel Package Waterproof 1M : Industrial & Scientific

Are you just setting the thermostat to off in between cycles, or power cycling the unit? I’m using an ecobee for the moment, I’m waiting on my atom to arrive. I’ve noticed similar behavior and wonder if this could resolve that for me too.

Could you explain a bit about why you’d want to change the static pressure setting and what is did to the air handler?

Also, I was trying to figure out how to change this on my wall controller. I go into the query functions by holding copy for 3 seconds. But I can’t find the SP p setting.

The static pressure adjusts the base indoor fan speed across a wide range. At runtime low/medium/high adds a small offset to the base speed defined by the static pressure setting. I normally run it on a lower static pressure so I can run a single zone at low compressor speed without over pressurising the ductwork. At higher inferred compressor speed I increase the fan speed, opening extra zone dampers if needed to manage pressure. And if that still isn’t enough and it doesn’t reach my target temperature after some timeout, my script will stop the unit, switch to higher static pressure and start back up to try and move as much air as possible across the indoor coil.

The SP setting is only available in the wall controller menu when the system is off.

It also can only be set via the wall controller interface, not via XYE. Likewise the follow me commands cannot be sent via XYE.

I suspect that HA/HB supports the same command set as my “CN40” 12V/RS485 wall controller, just a different electrical interface. If you have access to an oscilloscope it would be interesting to understand that.

The static pressure adjusts the base indoor fan speed across a wide range. At runtime low/medium/high adds a small offset to the base speed defined by the static pressure setting. I normally run it on a lower static pressure so I can run a single zone at low compressor speed without over pressurising the ductwork. At higher inferred compressor speed I increase the fan speed, opening extra zone dampers if needed to manage pressure. And if that still isn’t enough and it doesn’t reach my target temperature after some timeout, my script will stop the unit, switch to higher static pressure and start back up to try and move as much air as possible across the indoor coil.

This sounds like something I want to understand more. I should probably consult my installer, but I’ve always thought that the fan runs way too fast for the ducts I have and the heat that is produced at a certain time.

The SP setting is only available in the wall controller menu when the system is off.

I just tried this on my wall controller, using the wall controller’s power button, then accessed the query menu by holding ‘copy’, when I scroll with the arrows I can’t find SP, but I see all the sensor temperatures. Do I need to completely power off the air handler with the breakers?

It also can only be set via the wall controller interface, not via XYE. Likewise the follow me commands cannot be sent via XYE.

I have whalter’s esphome script running right now, hooked to the green XYE connector in the air handler. Would I have to connect my (shipped) ATOM to the CN40 port to use the scripts mentioned here? No oscilloscope, unfortunately, I wish I did though!

Just turning off by wall controller was sufficient for me. Maybe not supported via HA/HB.

I am attempting to set this up… I am having some Celsius / Fahrenheit issues. The home assistant sensor I want to pass in is in Celsius. I seem to have to:

Leave
use_fahrenheit: true

And modify:

- platform: homeassistant
    entity_id: sensor.average_house_temperature
    id: hallway_thermostat_follow_me
    name: "Average House Temperature"
    filters:
      - throttle: 10s
      - heartbeat: 1min
      - debounce: 1s
      - lambda: return x;
    on_value:
      midea_ac.follow_me:
        temperature: !lambda "return x;"

This doesn’t seem right - the Wall Controller is now in F. An I get an inital decrease in target temp to -47c. When I remove use_fahrenheit: true the climate entity in HA gets set to +79c (initially) then for some reason 21 constantly gets changed to ~21 (3ish deg above where I want it) but the wall controller is in C. This also repeats in my log non-stop:

[23:24:50.715][D][uart_debug:114]: >>> AA:C4:00:00:00:00:00:00:00:00:00:00:00:3B:01:55
[23:24:50.746][I][midea_xye:437]: DEBUG C4: AA:C4:00:00:00:00:00:00:00:30:88:00:00:00:01:20:81:80:52:BC:D6:2E:00:00:00:00:80:80:80:80:50:55
[23:24:50.859][D][uart_debug:114]: <<< AA:C4:00:00:00:00:00:00:00:30:88:00:00:00:01:20:81:80:52:BC:D6:2E:00:00:00:00:80:80:80:80:50:55
[23:24:51.722][D][uart_debug:114]: >>> AA:C0:00:00:00:00:00:00:00:00:00:00:00:3F:01:55
[23:24:51.863][D][uart_debug:114]: <<< AA:C0:00:00:00:00:30:14:81:84:12:4E:4E:3D:2E:FF:00:00:00:00:00:00:00:00:00:00:00:14:E0:01:EA:55

@rymo any ideas?

Additionally, the HEAT_COOL mode seems to just set the heat pump to cooling, rather than the Auto mode that I had when using whatler’s older config.

I made a repo with an up-to-date esphome version (2025.11.0).

The fix-temp-issue branch seems to be working well and consistently now.

Just a fun note, I somehow completely messed up my branches and the git index files so I had to delete the repo and restart…

I may have seen something similar and worked around with: Mask bits to avoid 64C offset · rmounce/esphome@74aba32 · GitHub

Lots of interesting discussion but I would really like to see the effect on actual system performance. Just a simple power input chart would be very useful…

I tried the wired controller for about 2 days. I saw crazy fan speeds and temp swings. Switched back to the Ecobee. I have an atom in route… What benefits have you seen over the included controller? Is the unit modulating properly in heat/cool mode, or does that only happen in auto mode?

While I have the included controller I really don’t use it other than to initially adjust the settings to match actual room temperature (T1) I have some limited experience in both COOL and HEAT mode but none in AUTO. In COOL I found that the load was insufficient so the unit just cycled on/off at what I think was the minimum modulation. This was very frequent and I found that I could use DRY mode and control through HA which worked well. In HEAT I did see modulation as the heating load increased. I did not see any unusual fan issues and temperature control was good. The fan speed was well controlled running mostly in low (50W) with increases to medium (80W) when the output increased to a certain level. I think that the system will run as a basic 2 stage unit using a 24V thermostat with limited modulation. The real problem is the poor defrost strategy that is being used. My unit enters defrost every 90 minutes as long as the outside coil is <-3C - a very common condition. This causes some system disturbances that I think reduces overall efficiency. The 24V stat may have an advantage in this respect in that run times will be shorter as the system runs at a higher output. Overall, the advantage of the XYE connection is remote control and access to system data - a great help in understanding what is going on. If you see a different defrost pattern, I would like to hear about it! Some data - see increase in modulation (power) in red.

Thank you for the detailed info. I’ve got mine running now with the Atom through HA, and it’s mostly working well so far.

For defrost behavior, I’ve noticed the unit tracks a run timer. As soon as the outdoor coil temp drops below 26.6 F (about -3 C) for 30 seconds, it goes into defrost. On my system the defrost only lasts about a minute.

In my climate, this only happens at startup. The coil dips below that threshold right as the system begins running, which triggers a defrost almost every other cycle after the first minute of run time.

I’m testing an automation that briefly sets the unit to off between heat cycles to clear the run timer. Others have reported success with this approach, so I’m giving it a shot.

I often see defrosts at the start of a heating cycle without T3 ever going under -3. I am trying to source the actual defrost logic from the distributor but I have little hope of actually seeing anything useful. Good luck with your trials.