Midea branded AC’s with ESPhome (no cloud)

Sooo, have the soldering done, have the code in and when i try to start it, i get an unavailable on the ha ac card and the ac does not react…
Not sure what the buton or switch in the code are supposed to do, but ac card did not change look after uplaoding the code changes…
Should i see any buttons or switches?

Edit 1:
Just found out that i am blond…soldered to reset instead of IO2…
Keep you posted…
Edit2:
Corrected soldering and stay connected to ac now, but no signs of follow me function or swing step or display toggle on ac.
Will try to get logs and go from there

Edit3:
So, all soldered and now editing lambda…
And of course…error on compiling…
And reasons obvious? Maybe i am using it wrong?

Compiling /data/bedroom-ac/.pioenvs/bedroom-ac/src/main.cpp.o
/config/esphome/bedroom-ac.yaml: In lambda function:
/config/esphome/bedroom-ac.yaml:85:20: error: expected primary-expression before '.' token
   85 |         temperature: !lambda "return sensor.ble_temperature_schlafzimmer_a4c13888d685;"
      |                    ^
*** [/data/bedroom-ac/.pioenvs/bedroom-ac/src/main.cpp.o] Error 1

Code looks like this:

sensor:
  - platform: homeassistant
    id: follow_me_sensor
    entity_id: sensor.ble_temperature_schlafzimmer_a4c13888d685
    internal: true
    filters:
      - throttle: 10s
      - heartbeat: 2min       
      - debounce: 1s
    on_value:
      midea_ac.follow_me:
        temperature: !lambda "return sensor.ble_temperature_schlafzimmer_a4c13888d685;"
        beeper: false

Edit 4:
Reverted back to lambda return x and do see now

[14:32:56][D][button:013]: 'Swing Step' Pressed.
[14:32:56][D][remote_transmitter:075]: Sending remote code...
[14:32:57][D][sensor:126]: 'follow_me_sensor': Sending state 20.60000  with 1 decimals of accuracy
[14:32:57][D][remote_transmitter:075]: Sending remote code...
[14:32:57][D][ApplianceBase:063]: RX: AA 23 AC 00 00 00 00 00 03 03 C0 01 87 66 7F 7F 00 30 00 00 00 5D 32 00 00 00 00 00 00 00 00 00 00 00 73 4D 
[14:32:57][D][AirConditioner:205]: New status data received. Parsing...
[14:32:57][D][ApplianceBase:154]: Destroying the request...

in logs…
How can i tell if this is working now or not…

Soo…some more testing.
As soon i connect the GPIO2, the wifi connection gets lost, disconnect restores wifi again.
Is it important how the pin i called in esphome?
GPIO01 or pin 2 or IO2?
Cant find a refference stating anything about it.
And can pinouts from the esp8266 actually be use straight or do they need to pass some kind of amplifying or such? cause right now my IO2 is directly soldered via disconnectable wire to the signal pin of the IR receiver as shown in danudovs pictures

Thx in advance…

I personally flash the SLWF-01pro through ESPHome in HA.

There’s a warning in their Question and Answer area that OTA might not work and make it unresponsive: Air conditioner Wi-Fi module for Midea, Idea, Neoclima, Electrolux, Beko and many more. Model SMARTLIGHT SLWF-01pro (v.1.0)

So worked for me to do OTA, but not everyone it seems.

One problem I did notice is sometimes a flash would make the unit stop working until I hit the reset button on the dongle. I think that might be causing their problems. But I don’t know and YMMV.

has anyone ran into an issue were humidity sensor isn’t reading anything? everything else so far seems to work…here is my yaml

wasnt aware that the units have a humidity sensor…so you have any info about it?
I actually have


these in every room with hacked firmware and try to use those as my info source…
HA sees them and reads them just like a charm…

Ok…i am at someones mercy here now who has some more knowledge.
Got following state:

remote_transmitter:
  pin: GPIO14
  carrier_duty_percent: 100%

#new added for test
sensor:
  - platform: homeassistant
    id: follow_me_sensor
    entity_id: sensor.ble_temperature_schlafzimmer_a4c13888d685
    internal: true
    filters:
      - throttle: 10s
      - heartbeat: 2min       
      - debounce: 1s
    on_value:
      midea_ac.follow_me:
        temperature: !lambda "return x;"
        beeper: false
  • Logs show follow me does know the temperature and tries to send it
    BUT
    I cannot use the remote; meaning no beep no control nothing as long cables is connected and while cable is connected it seems like wall unit is kinda frozen state but does not react on HA commands that are directed to the remote part like swing state, beeper on off or Display toggle.
    As soon i disconnect the wire, remote works, frozen state of wall unit frees up and i can do remote follow me, dispaly toggle and swing state.

Does that sound anywhere logic to anyone?
Do i need a diode in the communication line? or amplified signal?
HELP…

That makes sense. I don’t think there is a Relative Humidity Sensor in my Mr Cool Unit.

Any updates with this USB to RS485 test? I also have a system without H1 and H2 I think. Did Midea give you any documentation?
I’m guessing they won’t unfortunately. You’ll need to get in touch with one of their engineers, not tech support.

Does anyone have information on what unit’s support tracking their energy usage And reporting relative humidity? On the models I have now, HA either shows 0 or random values that don’t make sense, and it’s not shown in the official app either.

As far as I know, one ESPhome project uses UART over the USB dongle pins and another Modbus ESPhome project uses H1/H2 for external integration and XYE, (which also carry line voltage) for communication between the units.
Is this correct?

Hello everyone! I have an HA server on my home, using it already a half of year with no problems, but actually i am not really advanced user, and i am really bad with all this code that people writing in a .yamls.
I am able to flash esp device via UART, but i am not able to wtite my own config from zero, for now at least.
I have a couple of Royal Clima TMN09HN which are works fine i suppose click, but i cant find in this topic where i should start from. What controller should i buy and what image i should flash it before connecting to USB connector under the capony of my A/C. And then - what should i do further to add a A/C into my HA?
I will really appreciate any help.

All is in the 1st topic :wink:

Also the yamls you can just copy and paste (maybe edit some lines like wifi details/name/hotspot etc)

Hi I’m new here and just new in general :). I plan to look at all the rest of the posts above tonight. I was reading and I saw someone “kokuo81” get success with their esp board controller. And I am wondering if I can do this with the factory esp dongle? If not I would enjoy building my own esp board based controller. But programming is not something I do much is there a repository of the code?

does anyone know if there is away to have the LED always off on the inside unit. my MRCOOL remote has an LED button, was wondering if there is a away to add this parameter to HA? the midea esphome component is working great other than that i guess its a niche request…

I check this usb on esp home and it shows up and is easily flashed but fails on internet connection. her is the log. INFO Reading configuration /config/esphome/senville.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing senville (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
`HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3````````````````
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf``````````````
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/senville/.pioenvs/senville/src/main.cpp.o
Linking /data/senville/.pioenvs/senville/firmware.elf
RAM:   [=         ]  12.4% (used 40520 bytes from 327680 bytes)
Flash: [=====     ]  49.0% (used 898561 bytes from 1835008 bytes)
Building /data/senville/.pioenvs/senville/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin(["/data/senville/.pioenvs/senville/firmware.bin"], ["/data/senville/.pioenvs/senville/firmware.elf"])
Wrote 0xecc90 bytes to file /data/senville/.pioenvs/senville/firmware-factory.bin, ready to flash to offset 0x0`
========================= [SUCCESS] Took 5.12 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of senville.local
ERROR Error resolving IP address of senville.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname
What might I do next?`

I have also removed the wifi credentials ssid and password to attempt to get this to create its own hotspot. not sure if the esp32 pico v3 zero can do that.

Apparently there is something wrong with your mDNS (which is something common happening on many routers).
Easiest way around it is to use a fixed static IP address :wink:

There’s a toggle to turn it off, but it looks like you need an IR blaster maybe? You could try putting it in your yaml and see if it works. Unfortunately it’s a toggle, so doesn’t an explicit off if it does work. I personally couldn’t get it to work on mine.

# Example configuration entry

remote_transmitter:
  pin: GPIO13                       # For iot-uni-stick.
  carrier_duty_percent: 100%        # 50% for IR LED, 100% for direct connect to TSOP IR receiver output.

sensor:
  - platform: homeassistant
    entity_id: sensor.room_sensor   # Sensor from HASS
    internal: true
    filters:
      - throttle: 10s
      - heartbeat: 2min             # Maximum interval between updates.
      - debounce: 1s
    on_value:
      midea_ac.follow_me:
        temperature: !lambda "return x;"
        beeper: false               # Optional. Beep on update.

# template buttons for sending display control command and swing step actions
button:
  - platform: template
    name: Display Toggle
    icon: mdi:theme-light-dark
    on_press:
      midea_ac.display_toggle:
  - platform: template
    name: Swing Step
    icon: mdi:tailwind
    on_press:
      midea_ac.swing_step:

Esphome makes a guess about the device’s network, and sometimes it guesses wrong. You can fix this by using:

use_address (Optional, string): Manually override what address to use to connect to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the previously configured IP address.

Example:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: <your devices IP or DNS name here>
  ap:
    ssid: "${friendly_name} Fallback"
    password: !secret wifi_password
  power_save_mode: HIGH # for ESP8266 LOW/HIGH are mixed up, esphome/issues/issues/1532

More info:

ah, ill give it a try, i suppose technically Icould get the bond bridge and integrate that into HA to get the those parameters in maybe? A bit silly for just one or two buttons at the Bond’s price point.