jourdant / esphome-lgap

16 stars 2 forks source link

LG Therma V before 2019. #2

Open nedyarrd opened 4 months ago

nedyarrd commented 4 months ago

I have THERMA V, ODU - HU071MR.U44 and IDU - HN0916M.NK4. For some time I try to connect them to my HA server but without any result. That IDU have onboard modbus port and even two dip for control it's behaviour. But still without success. I found in some documents on LG site that version of IDU have some issues and modbus communication doesnt work with that. So I have some questions about Your project:

If You help me connect to my IDU or ODU i will try to help You to document LGAP protocol side.

With regards Nedyarrd

jourdant commented 4 months ago

Thanks for reaching out! You have a couple of options for integration. If you want to interface with the ODU then this project is likely for you, if you want to integrate with an IDU, then check this project out: https://github.com/JanM321/esphome-lg-controller.

I've pulled up the installation manual (https://gscs-b2c.lge.com/downloadFile?fileId=4qXYBRCQT7VWO8sw2Pg) and it seems like you have the following options for integration:

nedyarrd commented 4 months ago

It doesn't matter what type of unit will I use, main goal is to at beginning monitor whole heatpump. JanM321 is one things I want to try, but Your project is more interesting, because:

Here are some photos of my PCB's

20240304_205029 20240304_205020 20240301_213425 20240303_113603

So I have some questions:

Some additional findings:

Additional photos of display PCB. 20240304_213739 20240304_213929 20240304_213754 20240304_213459

jourdant commented 3 months ago

Apologies for the delay in my response. This is a lot of great information you've collected here. The photos are especially interesting. Just coming back to your questions:

I thought Your project is to connect directly to ODU omitting PI-485 board? Do I need PI-485 then?

My project is supposed to work with any LGAP interface. In my particular case (Multi-V S), I have an LGAP interface on-board which is labelled as "Central Control A/B". I'll grab a photo of my PCB next time I open the unit. My understanding regarding the PI-485 board is where you have a unit that is older or doesn't have an RS485 interface, the PI-485 provides a bridge to these older devices. The PI-485 can speak both LGAP and non LGAP protocols depending on the DIP switches you select.

It is possible to run RS485 with 5V only? as it is seen on stickers on my PCB? Maybe that is my communication problem I think that when Modbus function is broken on this board it is possible that RS485 interface in IDU speaks some of LGAP protocol

I haven't measured the voltage on my central control pins yet. I will do this and let you know next time I open the unit.

-

I also noticed in your images that you have some wires attached to the 3rd party controller A/B terminals with a resistor across them. Was that installed by you or by the installer that you mentioned? I re-watched the youtube video I had linked earlier to check the label that's on his terminals and it actually matches the same as what you're seeing on yours. That does make me suspect that this is actually a modbus interface rather than LGAP especially given his unit was also a Therma V unit.

Just to be clear, are those the main integration pins you're observing? or are you also looking at some other pins as potentially carrying the LGAP signal?

To your point around IDUs also potentially using LGAP protocol, I do think you're right. There are also indoor specific SKUs of the PI-485 also.

nedyarrd commented 2 months ago

No proble, spring is in way, so I have many work outside house ;-) I didn't look here either.

Apologies for the delay in my response. This is a lot of great information you've collected here. The photos are especially interesting. Just coming back to your questions:

I thought Your project is to connect directly to ODU omitting PI-485 board? Do I need PI-485 then?

My project is supposed to work with any LGAP interface. In my particular case (Multi-V S), I have an LGAP interface on-board which is labelled as "Central Control A/B". I'll grab a photo of my PCB next time I open the unit. My understanding regarding the PI-485 board is where you have a unit that is older or doesn't have an RS485 interface, the PI-485 provides a bridge to these older devices. The PI-485 can speak both LGAP and non LGAP protocols depending on the DIP switches you select.

It is possible to run RS485 with 5V only? as it is seen on stickers on my PCB? Maybe that is my communication problem I think that when Modbus function is broken on this board it is possible that RS485 interface in IDU speaks some of LGAP protocol

I haven't measured the voltage on my central control pins yet. I will do this and let you know next time I open the unit.

Yeah I attached wires to simply terminate RS485 line. It didn't helped anyway. I also noticed in your images that you have some wires attached to the 3rd party controller A/B terminals with a resistor across them. Was that installed by you or by the installer that you mentioned? I re-watched the youtube video I had linked earlier to check the label that's on his terminals and it actually matches the same as what you're seeing on yours. That does make me suspect that this is actually a modbus interface rather than LGAP especially given his unit was also a Therma V unit.

On dip switch there are two settings: 1st - master - slave 2nd - Exclusive/General (protocol selection)

That same connector is used for ie. Power meter interface.

I did try some other things with this connector, but I might have a RS485 problem. Because sometimes I have responses that I don't see. So at beginning:

I wrote python script to use my EW11A modbus/WiFi converter it does:

I found that:

Just to be clear, are those the main integration pins you're observing? or are you also looking at some other pins as potentially carrying the LGAP signal?

Yep there are some more pins, that I think can be useful.

To your point around IDUs also potentially using LGAP protocol, I do think you're right. There are also indoor specific SKUs of the PI-485 also.

jourdant commented 2 months ago

There's some interesting insights there. I've made some pretty significant progress since my last update too.

I found that a number of people were also having issues with the LILYGO T-RSC3 and the manufacturer has been silent on the subject. With that in mind I decided to try a different board M5Stack Atom Lite (which I had on-hand) and I added on ATOMIC RS485 Base.

This setup uses a different RS485 chip that doesn't require a flow control pin and the other nice thing is that it has 4 pins in a row - GND, 12V, A, B and can power the board using the 12V pin. That's perfect for my use case plugging into my outdoor unit as I have an internal 12V and GND pin right next to the central control pins.

IMG_4049

After putting everything together, changing the target in esphome to use this the Atom Lite instead, the custom driver I wrote worked! I was able to send requests and get bytes back, decode the bytes and enable the Climate entities to show up within HA. I'm now working on optimising the driver as there are a couple of timing issues, but my main worry of comms is all resolved.

To your point about finding data at very slow speeds, JanM321's project speaks the wall controller protocol at 104bps, perhaps that's what you're seeing there?