JanM321 / esphome-lg-controller

Wired controller for LG HVAC units using ESPHome and ESP32
BSD Zero Clause License
89 stars 21 forks source link

Current power consumption #3

Open drbugfinder opened 1 year ago

drbugfinder commented 1 year ago

This isn't really an issue, more of a question: Is the current power consumption of the air conditioning unit also sent via the protocol (as it can also be seen in the app)? Or is this data not transmitted over the bus?

Thank you for the great work πŸ‘ - I am facing the same problem of local control of three S12ET air conditioners and would like to connect them via MQTT. This is a great base to build on! PCBs are already ordered... πŸ˜ƒ

drbugfinder commented 1 year ago

My bad... looks like it's being transmitted, as you wrote:

https://github.com/JanM321/esphome-lg-controller/blob/main/protocol.md#type-0xc-0xac0xcc

Type 0xC (0xAC/0xCC) bytes 3-5: energy usage 06:49, 12.9 kWh

In the app it is reported to the exact Watt. Are you sure about the field length / additional scaler field etc.?

JanM321 commented 1 year ago

My bad... looks like it's being transmitted, as you wrote:

Yes the protocol supports it, but my unit doesn't use that message type at all. At least not with my custom controller (I haven't sniffed what gets transmitted to the official LG controller but I suspect it's similar). This might be because I have a multi-split system and reporting power consumption is only supported for single-split (it's the same with the ThinQ app and the LG wired controller).

That part of my notes is based on me sending random data to the LG controller from my laptop and checking how it affects things.

Thank you for the great work πŸ‘ - I am facing the same problem of local control of three S12ET air conditioners and would like to connect them via MQTT. This is a great base to build on! PCBs are already ordered... πŸ˜ƒ

Nice! It will be interesting to see if your unit sends 0xCC messages to the controller. Please let me know if you find out more πŸ˜„

drbugfinder commented 1 year ago

That's good news! I couldn't find any information about the power consumption information in any of the adjacent repos... (But it's important information for me - otherwise I could simply use an IR blaster)

That part of my notes is based on me sending random data to the LG controller from my laptop and checking how it affects things.

Do you maybe have more information to share? I wonder how you were able to interpret the data - did you then see the consumption in the app that you sent on the bus?

I will keep you updated about that feature and the overall support for the S12ET units. I can't wait to get my hands on that project.

P.S. I did order TSR1-2433 instead of the TSRN1-2433 for availability and cost reasons. As I could see in the datasheet, they should be almost identical and the "old" version also seem to have a better efficiency

JanM321 commented 1 year ago

For measuring power consumption of my AC I use a HomeWizard socket. It integrates with Home Assistant and is similar to a Shelly plug.

I just checked the LG PREMTB001 manual and I think 06:49, 12.9 kW might be 64912.9 kWh? If I have some time the coming weeks I could look into this a bit more if needed. I can still connect the LG PREMTB001 to my laptop so it should be pretty easy to figure this out if you see these messages on the bus.

drbugfinder commented 1 year ago

I see. I wasn't aware of the feature of the PREMTB001 to display the total power consumption. I'm rather looking for the momentary consumption, but it's better than nothing. Maybe there is more? What's with bytes 6-11 for example... πŸ€”

I don't really like to add another component for power measuring, if the unit itself already has this built-in, so that's one reason why I want to go this road.

JanM321 commented 11 months ago

@drbugfinder did you make any progress on this?

drbugfinder commented 11 months ago

Hi @JanM321,

I apologize for my delayed response; I've been quite busy lately and haven't had the opportunity to delve deeper into the topic. However, shortly after my last message, all the necessary components and PCBs arrived, and I painstakingly hand-soldered everything together for my three AC units.

As a side note, I recommend using a larger format C1 capacitor to have at least a fair chance for hand-soldering :-)

The TSR1-2433 has been performing well on all units.

What I've observed in the past few weeks of use is that when you turn the unit off, it often automatically turns back on due to the last set or last known state from the ESP module. So, in my case, I can only reliably control them via the ESP module.

I will keep you updated. Groß (IMG_9352) Groß (IMG_9405)

JanM321 commented 11 months ago

I apologize for my delayed response; I've been quite busy lately and haven't had the opportunity to delve deeper into the topic. However, shortly after my last message, all the necessary components and PCBs arrived, and I painstakingly hand-soldered everything together for my three AC units.

No worries :)

The TSR1-2433 has been performing well on all units.

Nice. I was expecting this but it's good to have confirmation.

What I've observed in the past few weeks of use is that when you turn the unit off, it often automatically turns back on due to the last set or last known state from the ESP module. So, in my case, I can only reliably control them via the ESP module.

I haven't seen this yet with my units. When you turn the unit off, it should almost immediately send a message to the controller which will then update its state. I wonder if your S12ET units have more of a delay before sending.

drbugfinder commented 11 months ago

I haven't seen this yet with my units. When you turn the unit off, it should almost immediately send a message to the controller which will then update its state. I wonder if your S12ET units have more of a delay before sending.

It appears to be a timing issue to me. I've noticed a delay with the PREMTB001 as well. Interestingly, when I use the PREMTB001, the delay is present (~ 1-4 seconds), but the unit maintains the last set state without any problems. This is not a major issue for me since I intend to solely use the ESP modules for individual control. However, there is certainly something different.

drbugfinder commented 7 months ago

@JanM321 Is there polling needed to get CC or CF messages? https://github.com/JanM321/esphome-lg-controller/blob/main/protocol.md#type-f-0xaf0xcf Or will they be regularly send by the AC, if it supports them? I think I have seen CC messages in the past, but I cannot find the old logs at the moment. I'm still interested in getting the power consumption from the units...

JanM321 commented 7 months ago

@JanM321 Is there polling needed to get CC or CF messages? https://github.com/JanM321/esphome-lg-controller/blob/main/protocol.md#type-f-0xaf0xcf Or will they be regularly send by the AC, if it supports them? I think I have seen CC messages in the past, but I cannot find the old logs at the moment. I'm still interested in getting the power consumption from the units...

The AC should send them regularly. There's no way to request them as far as I know. Unfortunately my units don't send these messages, even if I send 0xAC messages from the controller.

landrysik commented 6 months ago

Hi I have single-split LG Standard Plus PC12SK. I just got the hardware up and running and was interested in seeing the power consumption aswell. Do I understand correctly that if I don't see any CC or CF message in a log (checked last 20minutes), there is no chance of getting the power consumption? I only see messages A8... and C8.... I was naively thinking that the wired remote will show at least all the data the wifi module transmitts over to LG Thinq app...

JanM321 commented 6 months ago

Do I understand correctly that if I don't see any CC or CF message in a log (checked last 20minutes), there is no chance of getting the power consumption?

That's correct, as far as I know.

I was naively thinking that the wired remote will show at least all the data the wifi module transmitts over to LG Thinq app...

No that's not true unfortunately. Two very different protocols and both support a different set of features. To support all the features, the controller would have to connect to the WIFI port too...

dzungpv commented 1 month ago

Any update on this? @drbugfinder you find something new?