absalom-muc / MHI-AC-Ctrl

Reads and writes data (e.g. power, mode, fan status etc.) from/to a Mitsubishi Heavy Industries (MHI) air conditioner (AC) via SPI controlled by MQTT
MIT License
270 stars 61 forks source link

Added Energy used in kWH #135

Closed glsf91 closed 1 year ago

glsf91 commented 1 year ago

Hi I discovered the { 0xc0, 0x94} is used for retrieving the used energy in kWh. So I changed the code to add this. There will be a new topic 'OpData/KWH' for this. Important: This item is counting the kWh from the point where the AC is powered On (for example On/Off on the RC). When you power off the AC, it will keep the last value when the AC was on. When you power on the AC again, the counter will start from 0 again. The resolution will be increments in 0.25 kWh. This is the same behavior as when using the MHI APP en WF-RAC module.

I'm powering of the AC every day. So I could not test what happens if the counter will reach > 64kWh. I expect the high byte (MOSI_frame[DB12]) will be increased with 1 for every additional 64 kWh. I will create an issue and will ask if somebody (which is using the AC 24 hours a day) can test this.

I also noticed when using high power (Watt) for a longer time there is a difference between this counter and using a separate energy meter. With low power it is more accurate. Same as with the MHI App.

I think also https://github.com/absalom-muc/MHI-AC-Trace/blob/main/SPI.md should be changed to include this.

glsf91 commented 1 year ago

@absalom-muc Thanks for merging. Sorry, I see now I forgot to change to change #define VERSION "2.7R1" to change to #define VERSION "2.7R2" in support.h.

absalom-muc commented 1 year ago

no problem, is fixed