Do you see TX and RX lights on your RS485 adapter? Is it an auto flow control model? The code currently only works with auto flow control.
@exciton Dang thanks for the speedy reply!
I have not gotten any LED action, which is odd.
I don’t think it is auto flow model, it is this one: Amazon.com
I’ll try to find an auto flow version to order and maybe document what I am doing better tomorrow.
That one looks the same as mine.
Try swapping TX and RX.
Okay so I tried something different tonight and got some RX blinky lights.
A few notes:
- I did not have lights until I gave the ESP32 external power (was trying to run it all off the thermostat 5v power but that didnt have enough juice apparently.
- Once I added external power to esp32, I still had no lights until I re-attached the 5v wire (I assumed this was 5v output from the AC so I didnt see a need to connect it).
- Once I DID get RX lights, they were very dim, so since my RS485 was rated for 3.3 to 33V I swapped it from the 3.3v ACC to 5V acc.
- Now the RX light blinks a solid light as if activity is coming in. BUT, still receiving the exact same error code. Below is a diagram of my wiring.
-
After writing all of the above, I am still playing with the wires and realized even with my thermostat wiring unplugged completely, the RX light still blinks about once per second, so maybe that is just something to do with how the midea_xye lib is working?
-
Is it worth me crawling into my hotttt attic and wire directly into the XYE terminals on the board? Below is a couple photos to explain why I decided to try at the wired thermostat wires first. (My wired thermostat goes to the CN40 plug on the main board).
The top blue tag is a spare wire that came with the unit (not used) that shows clearly XYE. This mates up to the thermostat plug (bottom blue tag) which makes me think they include this pig tail in case you have a different unit that you need to manually splice into. OR do you guys think that this thermostat maybe isnt using XYE when plugged into my CN40 main board plug?
And here is a few photos of my main board.
Hi. I ordered and isntalled 2 SLWF-01 pro and they work just fine. Thanks for the help.
Great to hear yet another supported model
Maybe an idea to add it here Midea A/C and ESPHome component - list of all known working models and manufacturers ?
hi, can anyone help with my unit
no communication between esp and ac
is level shifter necessary
If you’re pulling 5V from the unit, you probably need to connect GND on your ESP to the GND on the unit (jump GND to E on your diagram). I believe the grounds are isloated on the RS485 boards.
You should see one RS485 light blink when ESP sends a message (regardless of whether it’s received), and the other light blink when you get a reply (which should be immediately after). If you have one light blinking, you’re half way there.
Might want to check your units are at address 0 (which is what the code expects). There are DIP switches to set the address.
If you have a wired controller, this will be very helpful to reverse engineer the protocol. Once you have it talking, we could set it up to listen to the wired controller commands and responses, then use that to figure out the parts of the protocol that are missing.
Hey guys,
my AC was working flawlessly. Unfortunately it doesn’t work anymore. The device wasn’t reachable. Because of this I deleted the device from HA. Now I can see the autodiscovered device, but when I try to add this to HA, I get the following error message:
Keine Verbindung zum ESP möglich. Achte darauf, dass deine YAML-Datei eine Zeile „api:“ enthält.
deepl translated:
No connection to the ESP possible. Make sure that your YAML file contains an “api:” line.
I haven’t changed anything. To I need to reflash the stick?
Best regards
I believe so…for sure can’t hurt.
Make sure to read about api:
Hey @exciton these are all great suggestions, but I think I already had tried them. The grounds I actually all have tied together on my breadboard, I am just bad at diagrams apparently. I didnt post a pic of the whole breadboard because I had some other IR sensors on there that just made it a confusing mess to see in a pic haha.
I did check the netaddress after your message, thank you for that idea. I think its already set to 0 by default. It was hard to see in my last pics due to the hot glue on top from factory. But here is a close up pic!
BTW, yes I have the KJR-120W wired controller (Senville branded).
I’ll keep tinkering with it this week as I have time. Thanks again!
Hello! I have a Midea window unit and it is working great with esphome.
One thing I just realized is that is doesn’t report when its actually running in anyway.
This that just a limit of the communication with the dongle or something I need to change in my config?
esphome:
name: midea
esp8266:
board: esp01
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
wifi:
ssid: !secret
password: !secret
use_address: 10.0.20.83
# Enable Web server.
web_server:
port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
# UART settings for Midea dongle (required)
uart:
tx_pin: 1 # hardware dependant
rx_pin: 3 # hardware dependant
baud_rate: 9600
# Main settings
climate:
- platform: midea
name: Midea Climate # Use a unique name.
period: 1s # Optional
timeout: 2s # Optional
num_attempts: 3 # Optional
autoconf: false # Autoconfigure most options.
beeper: false # Beep on commands.
visual: # Optional. Example of visual settings override.
min_temperature: 17 °C # min: 17
max_temperature: 30 °C # max: 30
temperature_step: 1 °C # min: 0.5
supported_modes: # All capabilities in this section detected by autoconf.
- FAN_ONLY # This capability is always used.
- COOL
- DRY
custom_fan_modes:
- SILENT
- TURBO
supported_presets: # All capabilities in this section detected by autoconf.
- ECO
- BOOST
- SLEEP # This capability is always used.
supported_swing_modes:
- VERTICAL # This capability is always used.
outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
name: Temp
Did anyone ever figure out what connector type that ‘usb with extra bits’ connector is?
My Dremel skills are… lacking. I don’t want to modify the minisplit itself. And I’m having a very difficult time finding USB connectors that can be disassembled to get e.g. a soldering iron in there.
yup, it is this one
I honestly don’t have a clue how they are called or where to find…
Luckily. mine also had a header plug which is easy to find
You can even use ordinary male-male dupont wires
if it doesn’t have the header plug i guess the ‘easiest’ is to just solder the wires directly on the print board, as few others did
or…just do it…like this guy, just with a sharp knife
Hi @petikeje
I am just trying to build my wifi dongle for my midea clone and struggling with the uncommon usb lookalike connector.
You are referring to delock. Can you be a little more specific, please?
(obviously anyone is welcome to answer)
thank you
Hi,
When I started this project I bought a delock usb to pin cable to connect a nodemcu to the climate unit (with an additional classic usb cable). But it was not working!!! As the guys mentioned here (maybe aceindy) I can’t connect a nodemcu with this method to the climate.
Finally I connected an esp01 with dupont cables through an 5V to 3.3V adapter to the climate exactly the same way as you can see above in the last post from (also ) aceindy.
By the way if you still interested in, the mentioned delock cable: https://kabelvilag.hu/Delock-Cable-USB-2-0-type-A-female-to-pin-header
Unfortunatelly it is from a Hungarian store, but maybe you can find one. One additional thing: it has a standard usb socket, it doesn’t fit to the official midea usb plug without modification.
Here is the 5V to 3.3V adapter: https://a.aliexpress.com/_EwqHJPj
Have a luck and best regards!
I’ve got Kaisai branded clone and it has normal standard USB and I’ve trimmed the ESP adapter a little and soldered USB plug onto it and it fits nicely in original spot.
Successfully connected to Home assistant. With a XIAO ESP32C3 and a Modbus converter XY-017 and the yaml from @Mosibi.
Hi!
Nice, this setup is based on esphome, isn’t it?
Everything works flawlessly for me as well except for the display, it is in Celsius instead of Fahrenheit. Have you found a way to not have Celsius at all?