adaasch / AC-hack

Reverse engineered UART protocol of the WIFI module for several airconditioner units (AC) / heat pumps from makes like Kesser, TCL, and others.
13 stars 2 forks source link

identical board in the ACONEE branded mini splits #3

Open jazzmonger opened 2 months ago

jazzmonger commented 2 months ago
image

iI'm trying to get it to work with ESPHome... no luck yet. The TYWE1S chip flashed ok, and it's communicating with HA, but Tuya won't initialize.

adaasch commented 2 months ago

Can you give me more information? If you flashed the MCU there should be no more Tuya component involved. The MCU talks directly to the AC via the serial protocol I reversed engineered.

jazzmonger commented 2 months ago

Yeah unfortunately I'm coming to that same conclusion. That is very different from how my other HVAC unit with a TYWE1S chip operates & I wrongly assumed it would be the same.
a couple years ago I wrote a 1000 line ESPHome control app for that Pellet Stove using Tuya MCU integration https://github.com/jazzmonger/wood-pellet-stove-with-TYWE1S-Tuya-chip

I also had to reverse engineer the byte sequences in that unit so I really do appreciate just how much time you put into it! VERY Tedious work.

The Tuya protocol was implemented in the MCU in that unit and just fed datapoints to the ESP. This unit is completely different.

I'm thinking it might be easier to use local Tuya... there are a slew of extended commands that I want to access. See my post here: https://community.home-assistant.io/t/anyone-have-a-decent-mini-split-control-card-with-all-options/762834

Do you have the Tasmota binary you used to flash the chip? I might play with it, although Im NOT a fan of Tasmota. IMHO, It's overly complicated and ESPHome is my preferred platform for granular control of devices like this. I'd be interested to see how you actually control the unit? It seems like your repository is missing a bunch of the final stuff u actually used in your solution & I read in another thread that some folks might using something different? I have 5 of these Mini Splits and want to remove all of them from the Virus Cloud. Admittedly, I'm retired, so I went overboard in documenting my implementation, but if you can share your final files/configs, it would be very helpful!

Jeff

adaasch commented 2 months ago

I use Tasmota just as a bridge between the serial protocol and mqtt. This functionality is included in the default binary. This should be also possible with ESPhome. I did not have time to implement the protocol directly on the MCU so the real magic happens in the python scripts I put in the repo. See comment https://github.com/adaasch/AC-hack/issues/1#issuecomment-2031340282. I would love to see the protocol implemented directly.

jazzmonger commented 2 months ago

Ok, got it. Where is the binary? I don't see it in your repo...

Oh, wait. So you're just using standard Tasmota, then an MQTT bridge to decode the serial msgs. I'm starting to see it now.

AC MCU <--Serial--> Tasmota <--Serial-over-MQTT--> MQTT Bridge <--MQTT--> MQTT Client (e.g. Hass)

the bridge is what's got me hung up. Where/how do you implement the bridge?

I'm a little bit familiar with mqtt bridges. I have one set up for Solar Assistant to talk to HA. That bridge is running on a dedicated Pi on my solar equipment and is built into Solar Assistant. Do I run yours on my HA Linux box (I run HA Supervised on Debian)? If so,how exactly? I've never done this.

you're a smart monkey to figure this out! Very creative. I think I can translate your python bridge code to ESPHome and implement the protocol directly as a climate device. It'll take some heavy lifting but I know a guy who can help. I did something VERY similar on my Pellet stove.

jazzmonger commented 2 months ago

Ok, so you wrote a python script like this guy explains http://www.steves-internet-guide.com/python-mqtt-bridge-project/

So I run both (?) python scripts on my HA server? Or does one script call the other? Can you give me the commands you use to start it? I'm not a python guy... but I get the gist of how this will work.

MQTTHOST = "192.168.0.1" - I see you use 192.168.0.0 as your subnet. I use 192.168.1.0 so I think I change this to my mosquito broker on ha which is 192.168.1.250.

do I need to modify my mosquito broker config files? I had to create a conf file when I set up the bridge for Solar Assistant

#solar_assistant.conf
connection SolarAssistant
address 192.168.1.80
topic # in
topic solar_assistant/# out

thanks for helping me stumble thru this. It's starting to all make sense. I just need a little help getting going.

htttito commented 2 months ago

Hi! Has anyone a good description to flash tasmota on this device? I hate cloud products, and I have 3 Kesser Climate to free from the cloud?

jazzmonger commented 2 months ago

I wrote about it how to flash a TYWE1S here and can confirm it worked on this board.
https://github.com/jazzmonger/wood-pellet-stove-with-TYWE1S-Tuya-chip BUT, I don't have anything working on my unit. I flashed mine with ESPHome tho, not Tasmota.

Dobie007 commented 2 months ago

I gave up the Tasmota scripting - it was not reliable enough. I simply wrote my own code - not nice but effective. Here it is if anyone wants to use it: grafik

You can still use the IR Remote - but that brings things out of sync. The update behavior is still rather strange since you have three control interfaces running at the same time: MQTT, IR, and the Web interface.

No complains about structure etc. accepted!! You will need to fill in your own details like SSID, Password, MQTT IP etc.

Klima04.txt