mill1000 / midea-ac-py

Home Assistant custom integration to control Midea (and associated brands) air conditioners via LAN.
MIT License
145 stars 14 forks source link

Discrepancy between integration Power and Midea app power #204

Closed sltelitsyn closed 1 week ago

sltelitsyn commented 1 month ago

Hi.

I've found a discrepancy between AC power consumption in the Midea app and HA Integration: IMG_0501 IMG_0500

Overall home power consumption sensor shows that the app is correct.

mill1000 commented 1 month ago

Probably due to https://github.com/mill1000/midea-msmart/issues/154

mill1000 commented 1 month ago

Can you provide debug logs for your device?

sltelitsyn commented 1 month ago

Here they are: MideaDebugLogs.zip

mill1000 commented 1 month ago

Thanks. Yeah looks like this is the same.

The alternate decode puts the power at approx. 249 W

sltelitsyn commented 1 month ago

This is closer to be true, yes

mill1000 commented 1 month ago

Ok thanks. I haven't decided how I want to handle this yet.

I don't know if anyone has confirmed the current power number as valid yet on their device.

LeSpocky commented 3 weeks ago

Using a Midea PortaSplit here.

I can confirm power and energy I see in HomeAssistant are 1. different to values in the SmartHome app and 2. different to values measured by a Shelly PlusPlugS. (Values from SmartHome app are more or less the same as measured by Shelly.)

Even worse: the energy curves in HomeAssistant jump backwards which makes them completely useless in the HA Energy Dashboard.

Screenshot_20240822_152239

mill1000 commented 3 weeks ago

Even worse: the energy curves in HomeAssistant jump backwards which makes them completely useless in the HA Energy Dashboard.

This could be due to improper parsing of the data.

Can you provide debug logs from your device along with a snapshot of the energy usages from the SmartHome app and/or Shelly.

LeSpocky commented 3 weeks ago

Can you provide debug logs from your device along with a snapshot of the energy usages from the SmartHome app and/or Shelly.

Here you go, hope that helps: midea (1).zip

mill1000 commented 3 weeks ago

Thanks. Here's two possible interpretations

Existing BCD decoding

BCD Energy Total 4.31, Current 0.33, Power 97.5

Binary decoding

Bin Energy Total 971, Current 51, Power 2415

Power should be divided by 10 to get Watts.

It would be really interesting to get a debug log when the total energy jump backwards.

LeSpocky commented 2 weeks ago

It would be really interesting to get a debug log when the total energy jump backwards.

There are two types of backward jumps.

First happens roughly every hour if the device is on, looks like small sawtooths in the graph, jumping back around 0.05 kWh each time.

Second type is that big jump, which does happen roughly once a day, jumping back around 0.65 kWh. I attach the debug log and screenshot from yesterday including such a jump between 14:15 and 14:25 (CEST). Note: The total value is also wrong. While in HA it is at 6.46 kWh it is at 12.07 kWh in the SmartHome app.

Hope you find it in the logs, quite big this time.

2024-08-27.zip

karlbeecken commented 1 week ago

Hi, I am also experiencing this issue. Is there a way to switch over to Binary encoding yet? I installed the feature/alternate_energy branch and enabled the alternate energy feature, but the reported energy is still not correct

mill1000 commented 1 week ago

Branch hasn't been tested yet, so probably just a bug

LeSpocky commented 1 week ago

Screenshot_20240904_122848

Power looks good now. 🥳

Total Energy is still wrong, and current energy probably wrong too. Shall we create a new ticket for that?

karlbeecken commented 1 week ago

Power also looks good now on my installation, energy seems to be off by factor 10 (A/C was running for an hour with ~320 W power, but reports 3.2 kWh for this period)

mill1000 commented 1 week ago

Total Energy is still wrong, and current energy probably wrong too. Shall we create a new ticket for that?

Sure lets track that separately. What does the energy look like now and what do you expect instead?

trzenaro commented 1 week ago

Thanks for the fix @mill1000 I was about to open an issue, but I found this fix and it worked perfectly after updating to 2024.9.0 image

image

image