jourdant / esphome-lgap

16 stars 2 forks source link

PI485 LGAP + ATOM Lite & ATOMIC RS485 BASE not communicating with the PI485: need help with the settings #10

Open TerryFrench opened 1 month ago

TerryFrench commented 1 month ago

TL;DR: I'm looking for help with my uart config - most likely

Hi Jourdan, Your project is awesome, and I picked some LG heat pump based on the availability of your code :-) (and the price vs. Mitsubishi I also control using esphome). I'm DIY, so self install. outdoor unit: A4UW30GFH0 = LMU300HHV in the USA. and 3 indoor units: two AMNW12GQA0 = LQN120HV4 and one AMNW09GQA0 = LQN090HV4. All units work fine using the IR remote controls.

I installed a PI-485 board today, and the dipswitch settings should be fine here - and are set to enable the LGAP protocol. I connected the Atom-RS485 gnd to gnd on the PI-485, 12V to the 10V on the PI-285 (about 10.8 V really), A to A on the Atom, and B to B on the Atom. Note: I have not twisted A&B wires yet as I just found out they should be twisted so there might be some 60Hz noise at least there given the proximity to the mains' power wires. The wires length is about 15 cm / 6 inches.

I do not think I have the uart settings correct, so I don't see any real data going. I also tried changing the settings in homeassistant to set the temperature... but while the settings are sent, likely nothing really happens.

I tried various pins, although TX on GPIO22 and RX on GPIO19 seem that they should be ok. I tried 9600 bauds and 115200 bauds, but only get some warnings that it's not compatible with the integration, no differences. I tried using "inverted: true" for the TX and RX pins, no difference. I added dummy_receiver: true to the uart debug section, but saw no data displayed.

The PI-485 green led (RS-485 data) is steady / not blinking, so likely not getting data it can recognize.

Relevant logs examples showing nothing is received.
[01:38:21][C][logger:186]: Level: DEBUG [01:38:21][C][logger:188]: Log Baud Rate: 0 [01:38:21][C][logger:189]: Hardware UART: UART0 [01:38:21][C][uart.arduino_esp32:151]: UART Bus 0: [01:38:21][C][uart.arduino_esp32:152]: TX Pin: GPIO22 [01:38:21][C][uart.arduino_esp32:153]: RX Pin: GPIO19 [01:38:21][C][uart.arduino_esp32:155]: RX Buffer Size: 256 [01:38:21][C][uart.arduino_esp32:157]: Baud Rate: 4800 baud [01:38:21][C][uart.arduino_esp32:158]: Data Bits: 8 [01:38:21][C][uart.arduino_esp32:159]: Parity: NONE [01:38:21][C][uart.arduino_esp32:160]: Stop bits: 1 [01:38:21][C][uptime.sensor:034]: Type: Seconds

[01:38:21][C][lgap:019]: Flow Control Pin: [01:38:21][C][lgap:026]: Flow control pin not set. [01:38:21][C][lgap:029]: Loop wait time: 500ms [01:38:21][C][lgap:030]: Receive wait time: 4000ms [01:38:21][C][lgap:031]: Child devices: 3 [01:38:21][C][lgap:034]: Debug: true [01:38:21][C][lgap.climate:018]: LGAP HVAC: [01:38:21][C][lgap.climate:019]: Zone Number: 0 [01:38:21][C][lgap.climate:020]: Mode: 0 [01:38:21][C][lgap.climate:021]: Swing: 0 [01:38:21][C][lgap.climate:022]: Temperature: 0 [01:38:21][C][lgap.climate:018]: LGAP HVAC: [01:38:21][C][lgap.climate:019]: Zone Number: 1 [01:38:21][C][lgap.climate:020]: Mode: 0 [01:38:21][C][lgap.climate:021]: Swing: 0 [01:38:21][C][lgap.climate:022]: Temperature: 0 [01:38:21][C][lgap.climate:018]: LGAP HVAC: [01:38:21][C][lgap.climate:019]: Zone Number: 2 [01:38:21][C][lgap.climate:020]: Mode: 0 [01:38:21][C][lgap.climate:021]: Swing: 0 [01:38:21][C][lgap.climate:022]: Temperature: 0 ... [01:38:21][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:21][D][lgap.climate:221]: Generating READ request message for zone 0... [01:38:21][D][uart_debug:114]: >>> 00:00:FA:00:00:00:F1:BE [01:38:25][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:25][D][lgap.climate:221]: Generating READ request message for zone 1... [01:38:25][D][uart_debug:114]: >>> 00:00:FA:01:00:00:F1:B9 [01:38:29][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:29][D][lgap.climate:221]: Generating READ request message for zone 2... [01:38:29][D][uart_debug:114]: >>> 00:00:FA:02:00:00:F1:B8 [01:38:33][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:33][D][lgap.climate:221]: Generating READ request message for zone 0... [01:38:33][D][uart_debug:114]: >>> 00:00:FA:00:00:00:F1:BE [01:38:37][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:37][D][lgap.climate:221]: Generating READ request message for zone 1... [01:38:37][D][uart_debug:114]: >>> 00:00:FA:01:00:00:F1:B9 [01:38:41][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:41][D][lgap.climate:221]: Generating READ request message for zone 2... [01:38:41][D][uart_debug:114]: >>> 00:00:FA:02:00:00:F1:B8 [01:38:45][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:45][D][lgap.climate:221]: Generating READ request message for zone 0... [01:38:45][D][uart_debug:114]: >>> 00:00:FA:00:00:00:F1:BE [01:38:49][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:49][D][lgap.climate:221]: Generating READ request message for zone 1... [01:38:50][D][uart_debug:114]: >>> 00:00:FA:01:00:00:F1:B9 [01:38:53][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:53][D][lgap.climate:221]: Generating READ request message for zone 2... [01:38:54][D][uart_debug:114]: >>> 00:00:FA:02:00:00:F1:B8 [01:38:57][E][lgap:127]: Last receive time exceeded. Clearing buffer... [01:38:57][D][lgap.climate:221]: Generating READ request message for zone 0... [01:38:58][D][uart_debug:114]: >>> 00:00:FA:00:00:00:F1:BE

yaml file (renamed .txt for github) lg-lmu300hhv.yaml.txt

Thanks in advance for any help you, or someone else might provide!

kkrankall commented 1 month ago

I'm will be starting my install this week. Have a multi F max with PI-485 board. I had the same questions about the uart settings. Good luck let m know how it goes.

TerryFrench commented 1 month ago

I'm will be starting my install this week. Have a multi F max with PI-485 board. I had the same questions about the uart settings. Good luck let m know how it goes.

I will post any updates. My is the Multi-F "not max" :-) i.e. 4 sets of pipes exiting the ODU instead of 1 set like yours (likely), and the Branch distribution unit(s) you are likely using with it.

I might get another RS-485 to Wifi/TCP device I use for a solar controller (but I hate changing its settings, it was a bear to get working...) and send some of the query packets that should be good based on the protocol and logs I have to see if I get any response, and what settings seem to work. No esphome/homeassistant involved.

TerryFrench commented 1 month ago

small update: still no success. Although I can confirm 4800bps should be the right speed. I'll receive a USB-RS485 adapter today, hoping to find some time this week to use it (PC far from the ODU, need to borrow wife's laptop). I tried swapping A/B, no differences, back to proper connection. I did twist the A&B cables, and also added some 120 Ohm resistors across A&B at both ends (tests with all powered off had high resistance, so not terminated and no jumper to terminate either.

I see pretty much no differential voltage with a multimeter, but that's likely because the bus is set in slave on the PI-485 side, and I likely do not send / switch to send mode on the M5-stack side. - or at least I think that's one hypothesis. Also unless there's a lot of transmissions, the average voltage differential might not be visible on a multimeter. If the USB-RS485 doesn't work, I'll plug my old&cheap digital oscilloscope - ODU location is not great for that.

kkrankall commented 1 month ago

Terry, how are you making out?

TerryFrench commented 1 month ago

I connected my digital oscilloscope but did not manage to capture any signal, even with a low trigger. So I temporarily gave up on the outdoor unit - I will have to try RS-485 between 2 devices first. The PI-485 has the most left led (orange) blinking non stop, and overall I believe that the board is not happy the way it is set with the motherboard. If I had to guess, I'd say the firmware on the MB might not have the functionalities turned on to communicate with the Pi-485, being a "LG Multi F" (residential) but not "LG Multi F Max" (more for apartment complex...) I did try multiple dip switches settings, even some that should not be relevant to my model, but the model names for the PI-485 and my outdoor model are really different/not really matching.

Note that the motherboard has a RS-485 port that has no connector soldered in, but I wouldn't bet on the firmware to work well.

Anyway, I ordered 20 PCB boards for the indoor units to be made from the design on https://github.com/JanM321/esphome-lg-controller and I should receive them today :-) So I hope to try that out tonight, and if that works, keep 5 and sell the rest more or less at cost + shipping (+gas to get to the post office, but you get the idea: super cheap.)

I do really like the idea of communicating with the external unit, but I'm disappointed in the PI-485 documentation from LG. (ok, I really do Not like any doc from LG vs. Mitsubishi that lets you access their docs).

I might buy a cheap logic analyzer and use that as a better / more sure way to analyze what is going on with the output of the PI-485, but really I will need to build a cable to put in between the motherboard and the PI-485 board to see if they are at least communicating with each-other. Last ditch: I will buy one of the LG troubleshooting tools (LG Sims I think, or the other one), to access all sensor values and other settings once in a while, because I think maintenance-wise, that'd be pretty neat to monitor how the unit is doing.

Note: for the Mitsubishi, I use https://github.com/unixko/MitsuCon

ChriD commented 1 month ago

@TerryFrench If those are the "tiny" designs i may want to get them from you :-)

TerryFrench commented 1 month ago

@TerryFrench If those are the "tiny" designs i may want to get them from you :-)

tiny yes. Not received yet (DHL delays).

kkrankall commented 1 month ago

I bought 5 pcb and have 4 connected. They work great. Wanted this project to work as I have two wall units where the remote ports are fried and get a CH03 error when hooking up a wired remote. I dont feel like replacing the main PCB and wanted local control.

TerryFrench commented 1 month ago

The boards work well. I have 3 indoor units ("wall console" type), built 3 cables, and had no issues. esphome config is as https://github.com/JanM321/esphome-lg-controller has it. I'll have to dig what the fan settings mean, as I changed the values (100% seems to be the full speed with the natural breeze mode) And the vanes direction is opposite (close vs open as my unit is low on the wall and LG decided something not compatible ;-) Initial connection showed some CRC errors for one unit, but they have since disappeared.

I've included photos of the boards and a rough installation location. My new 3D printer is not yet functional (Voron 2.4, built, but I have some SW config to fix), so I used electrician tape at the bottom, then cardboard, and hot glue to get all that in.

I still want to get the ODU RS-485 to work, but getting some form of remote control was my first priority, so I can get some rooms at the right temperature before coming from work.

IMG_6167 IMG_6168 IMG_6169 IMG_6170 IMG_6171 IMG_6172 IMG_6173 IMG_6175 IMG_6176 IMG_6177 IMG_6178 IMG_6180 IMG_6166

TerryFrench commented 1 month ago

@TerryFrench If those are the "tiny" designs i may want to get them from you :-)

Same reply as here https://github.com/JanM321/esphome-lg-controller/issues/31#issuecomment-2264593521 How many boards, and to what country? (so I can figure out the shipping cost) These are just the boards and 1 cable. I don't have more ESP boards to go with them, but they are easy to buy from China or other places like Amazon in most countries, I believe.

ChriD commented 1 month ago

@TerryFrench Looks great! I'd take 6 of them and the Shipping would be to Austria (not to be confused with Australia)

ChriD commented 4 weeks ago

@TerryFrench Have you had time to check the shipping costs?

TerryFrench commented 4 weeks ago

sorry not yet. Price will be $15 per board + shipping

On Thu, Aug 8, 2024 at 11:02 PM Christian @.***> wrote:

@TerryFrench https://github.com/TerryFrench Have you had time to check the shipping costs?

— Reply to this email directly, view it on GitHub https://github.com/jourdant/esphome-lgap/issues/10#issuecomment-2277209480, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK4I2OABOXX2L2O6MG7MOTZQRLQNAVCNFSM6AAAAABLFYTG5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXGIYDSNBYGA . You are receiving this because you were mentioned.Message ID: @.***>

ChriD commented 2 weeks ago

@TerryFrench If you want to sell,. I 'l be there waiting ;-)