jourdant / esphome-lgap

20 stars 2 forks source link

Nice Job - I will analyze #7

Open ChriD opened 5 months ago

ChriD commented 5 months ago

Nice job! I have tried to reverse the LGAP a few years ago but didn't finish it until now The write command i had nearly done and it nearly matches your analysis, image

But with the data i got from read i only managed to get the room temperature and the device address and maybe on/off ( i am not sure ) image

I checked the return values of my AirConditioner device and some of the bytes, eg. temperature, seems to match but it seems the value is off, i get 26 and the room control shows 22, i get 24 and the room control shows 23. Furthermore my indoor unit has 0.5 Temperature Steps. In your code you are using integer, so there seems to be a difference how temperatures are stored amongst devices? Other bytes as On/Off wont change in my setup on the position you have, but on others

I'll investigate that further,

jourdant commented 5 months ago

Hi @ChriD - that's so cool there's others who have been looking into this. I will dive deeper into understanding your spreadsheet. I had built out a similar one that I'm happy to share. I essentially broke down the request and response like the following:

LGAP Request: image

LGAP Response: image

Based on the data spec from the LG Modbus gateway I had used previously (which also uses LGAP), it had the following values that I wasn't able to accurately map, but must be contained within the packets:

Unmapped Request Values:

Description Possible Values Possible Byte
Filter Alarm Release 0-1


Unmapped Response Values:

Description Possible Values Possible Byte
Pipe In Temperature 0-255 response[9,10]
Pipe Out Temperature 0-255 response[9,10]
Target Temperature Limit Lower 0-255 response[9,10]
Target Temperature Limit Upper 0-255 response[9,10]
Indoor Unit Connected Status 0-1 response[1]
Alarm Code 0-255
Alarm Activated 0-1
Filter Alarm Activated 0-1
Lock Remote Controller 0-1
Lock Operate Mode 0-1
Lock Fan Speed 0-1
Lock Target Temperature 0-1
Lock Indoor Unit Address 0-1