Closed hllhll closed 3 years ago
UDP Communication alaysis update: Device->Cloud only (over UDP) unsigned shorts - 2 bytes; MSByteF
Heartbeat
packets - starts with 00 01
total len: 0x14 bytesData
packets - starts with 01 03
total len: 0x15 bytes. These are the same as the data that comes from the Websocket JSON requestBytes
Data packet format:
01 03 ?? 00 <on> 00 ?? 00 <hvac> 00 <fan> 00 00 <ct> <ct> <tt> <tt> ?? ?? <cs> <cs>
on
: Same as the code EKON_VALUE_ON=0x55; EKON_VALUE_OFF=0xAAhvac
: Same as EKON_VALUE_MODE_X
EKON_VALUE_MODE_COOL = 17 = 0x11
EKON_VALUE_MODE_HEAT = 34 = 0x22
EKON_VALUE_MODE_AUTO = 51 = 0x33
EKON_VALUE_MODE_FAN = 68 = 0x44
EKON_VALUE_MODE_DRY = 85 = 0x55
fan
: 01 02 03 fan speedtt
: target_temp*10ct
: current_temp*10cs
- Checksum(?)Official UDP Servers addresses and ports:
Deprecated:
Server->Device
01 03 <uint32?> <cs?> <cs?>
01 10 <uint32> <f1> 00 <on> 00 ?? 00 <hvac> 00 <fs> 00 00 <ct> <ct> <tt> <tt> ?? ?? <cs> <cs>
The development of server interface has moved to a different repo pyekonlib - Python EKON Server emulator library https://github.com/hllhll/pyekonlib
When HVAC Is turned in off STATE, EKON Conisdered the state As Off, Cool, fanspeed 1, target temp 25.
Server has also "turn on" "turn off" commands / or it is "change mode" Turn to on: 01 06 xx xx 00 55 cs cs Will revert to the last HVAC state (not as reported by EKON, but the actual last one) 01 06 xx xx 00 AA cs cs Will turn the AC off, keeping the last state in the controller. From now ekon will report Off, Cool, fan 1, target temp 25 altough it's not the actual HVAC state
You should not yet try the commands below, this was only confirm to not-brick the device by me, but there's a really small bricking chance, reset with the button should solve everything in case of issues, also in case of issues I Have managed to reclaim the device using ESPTouch SmartConfig app, but if you are no expert you shouldn't be doing this)
I'll document here some info I've gathered regarding how it might be possible to redirect traffic to local LAN server and implement locally without cloud.
First, app uses ESP Smart config/ESP Touch to add the ESP device into the wifi network. This can also be done without the original app, using ESPTouch SmartConfig app. After the device is in the wifi LAN the app goes on to configure the server it will be using, this is done by POSTing to the device (ip address: Airconet+ server, activate-ac.com)
If you want to remove the device and disconnect from Wifi (I'm not sure if it restores factory settings):
As seen above the device communicates using udp datagrams to the server. I Have tested switching the server to my pc address and I'm able to record messages sent from the device.