OK I understood. As for the esphome and the firmware https://github.com/Oksion/esphaier I use, then I get such data, does this mean something? I can only guess that the rest of the bits are responsible for the rest of the functionality similar to the remote, right?
Iâve tried a lot, couldnât get any response with a Serial sniffer tool, tried setting it to COM5 instead of COM4 in the Device Manager, but nope. I did try USB sniffer from the same company which did find something every 5 seconds. So the default USB stick is sniffing every 5 seconds. Couldnât really detect any useful info from this, didnât look like it was consistently changing when changing the temperature.
I guess I bricked my ESP32 by setting the baud_rate to 9600 with the following:
logger:
level: VERBOSE
baud_rate: 9600
After this I cannot get it to do anything. It isnât available wirelessly anymore, and even when Iâm connecting it to a USB cable to my computer, or the Home Assistant computer it doesnât see it, also not after restarting HA (because of Docker). Tried âfactory resettingâ the ESP32 with holding the DU button, pressing Reset, wait a couple of seconds, and releasing the Reset button, but doesnât look like that is working.
Update: New day, new micro USB cable, somehow it not worked again, ESP32 is fine again.
If you search haier.h in Oksion repo for ie. HEALTH_MODE_BIT_ON you will find it only in DEF, but nowhere it is actually user âŚ
So basically as far as i know no one made firmware that has health, light etc. fuctionality for the ACs that use protocol version that MiguelAngelLV or Instalater did code for.
I do not even know how to implement those things, like what are limitations of esphome climate control, or HA climate control or how to add additional functionality to the esphome device. IE. the âlightâ can be âlight bulbâ device separate from the climate and same could be done for the position or health mode. But again, I do not know how to do such a thing or how to modify other firmwares, as they use ie. 0x40 for dry mode instead of 4 and i do not understand how that works.
Yes, I understand that it is difficult, good knowledge in reverse engineering, esphome and HA is required, it is unlikely that we have such guys in the chat. Maybe you have an example of air conditioners whose users have already revealed their functionality? And on their example, together we will come up with something
As an example of excellent implementation of an AC device with UART ESP<=>AC communication
I can recommend you midea AC implementation esphome/esphome/components/midea at dev ¡ esphome/esphome ¡ GitHub It is really great.
I am slowly trying to implement something similar in my small project but it will take some time.
So I finally started using MiguelAngelLVâs code, esphome and Home Assistant to control ACs, control does work, temperature updates, but when i turn off ac from HA it does actually turn off, but in HA last status is still shown.
Same thing as @mikekoumas later writes that 24 moves to 8 in time; from @instalator blog it seems that it might be some compressor idle state? (Iâm just guessing)
Here we can see that position 29 changed from 24 to 8 at 22:07, but there is no change in power usage by AC at that time
at the end of configuration.yaml, but I donât see ac_obyvak_current_temperature as sensor in ie. statistics graph
I can see the sensor in home assistant settings - entities and even see the value history, but even when manually added to statistics graph i does not show
Will it be possible to do something based on the haiersmartair2 protocol? Health mode, sleep, indication control, remote control lock?
Based on this https://github.com/Oksion/esphaier
I tried to understand your code but I have no idea how does it actually read or set the values from the UART data from AC. I only see the climate.get_data and HaierClimate.getSerialData(), but I do not understand where is definition ie. that if position 29 has value of 24 or 8 means that climate component should report AC as off (this is from the smartair2 controlled ac)? If it is in haier_packet.h then I do not understand how that works. So I wanted to switch to your code and I was curious if I can get it to compile. I could not because of some platfrom.io stuff. But I will order esp32 dev boards so i can try it out later.
Looks really great as I could see references to all the stuff like health positions, outside temp, light etc.
First about structure, it everything is in haier_packet.h I used c++ (actually even c) thing called bit field Bit-field - cppreference.com
About reading: you can define which uart port to use in yaml file. You need to define port in uart section (for uart0 of esp8266 you can use pin 1 for tx and pin 3 for rx.
You should be able to use my code with esp8266 and arduino framework but you will need to change yaml file. Keep in mind that I never tried it with real hardware. Once I will be back from my vacation I can write detailed instruction how to do it (difficult to write long posts from phone )
Can someone help - how to disable âSwingâ buttons - they are unreadable in HomeKit and making fault with âTurn Offâ for meâŚ
Want just leave the âMode / Temp / Speed + Autoâ options for homekit.
Has anyone managed to get the Haier air conditioning with hOn app / protocol working? I have the new version air conditioning where I got the wifi module. It says ESP32-For-Haier_V1.1
I havenât done anything with it yet to keep it intact.
Now I have tried several haier.hâs which were in this forum on both ESP8266 and ESP32. All connected to Vin, GND, TX and RX ports.
But unfortunately I canât get it to work yet.
Yes I tried this on a Wemos D1 Mini, here I set the uart ports to 1 & 3.
This is UART0 on the Wemos.
I only see the messages that are trying to be sent.
Unfortunately I donât get any feedback from the air conditioning.
This is the message what is sended:
[14:45:33][D][Haier:496]: Message sent: FF FF 0A 00 00 00 00 00 00 61 00 07 72
This is how my configuration file looks like:
esphome:
name: woonkamer-airco
esp32:
board: esp32dev
framework:
type: arduino
external_components:
source:
type: local
path: ./src
# Enable logging
logger:
level: DEBUG
baud_rate: 0
uart:
baud_rate: 9600
tx_pin: 1
rx_pin: 3
id: ac_port
# Enable Home Assistant API
api:
encryption:
key:
ota:
password:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Woonkamer-Airco Fallback Hotspot"
password: !secret wifi_fallback_password
captive_portal:
climate:
- platform: haier
name: "Woonkamer - Airco"
uart_id: ac_port
wifi_signal: true
outdoor_temperature: # Optional outdoor temperature sensor. Shows incorrect values when AC is not active for a long time
name: "Buiten - Airco temperatuur"
Do you have an idea what else I could try or will it not work with a Wemos D1 mini?
I got it working.
I switched the cables to the same GPIO as in the project.
I donât know why this made a difference, but the communication started working right away!
Thanks for the work