Andre0512 / hon

Home Assistant integration for Haier hOn: support for Haier/Candy/Hoover home appliances like washing machines and air conditioners in 28 languages.
MIT License
1.22k stars 2.5k forks source link

currentElectricityUsed parameter - kWh vs kW #158

Closed Benniepie closed 1 month ago

Benniepie commented 3 months ago

Priorities This issue is low priority compared to everything else that is happening right now, but needed to log it otherwise I would forget. No hurry from my POV.

Describe the bug The currentElectricityUsed parameter has been created as a power (kW) sensor in HA, however it appears to be measuring energy usage (in kWh) for the current wash cycle (resetting to zero once finished) and not power.

To Reproduce 1) Hook-up the washing machine to a smart plug that measures power consumption. Do a load of laundry and plot the power consumption from Hon and the smart plug and compare the data:

Screenshot_20240121_110826_Home Assistant

2) check the Hon app and note that the statistics page is contradictory with terms such as: "Instant consumption" - suggests power (kW) "energy consumption of the running cycle" - suggesting energy (kWh) Colour coded key in in Watts (power) A warning of blackouts (!) for higher values (power possibly)

Screenshot_20240121_111905_Home Assistant

3) Note that at the beginning of a cycle when the smart plug indicates high power consumption (2000W heating water) the Hon app and sensor indicate a low value:

Screenshot_20240121_112218_Home Assistant

And at the end of a cycle during the final spin when power consumption is low (~200W) the Hon app shows a high value (900-1500W) , as does the Hon power sensor. (1000W)

Screenshot_20240121_124605_hOn

It seems fairly clear that the sensor is reporting energy in kWh and that the Hon app description/key to the statistics page is nonsense.

Expected behavior I'd expect the Hon power sensor to roughly track the smart plug power sensor if they were both measuring power. As the Hon sensor only increases and never drops (except for resets) it must be measuring energy usage in kWh, so please could the unit of measure for the currentElectricityUsed sensor be changed to kWh.

Additional context The Hon app is a bag of spanners.

Home Assistant Logs Can be included if it will help

Device Log Washing Machine Device Info

data:
  additional_data:
    dictionaryId: 150
    options: haier_SoakPrewashSelection
  appliance:
    PK: user#eu-west-1:42e94baf-73f6-44a1-a8db-399cd10b48b3
    SK: app#xx-xx-xx-xx-xx-xx
    applianceId: xx-xx-xx-xx-xx-xx#1970-01-01T00:00:00.0Z
    applianceModelId: 954
    applianceStatus: 1
    applianceTypeId: 1
    applianceTypeName: WM
    attributes:
      acuVersion: 22.02.12
      chipset: ESP32D0WDQ5
      dictionaryId: 150
      eppParserSet: 1
      fwLabel: iotfw_epp
      lang: it-IT
    brand: haier
    code: CEAAHUE0200
    connectivity: wifi|ble
    defaultWarrantyYears: 1
    eepromId: 41
    eepromName: no_eeprom
    enrollmentDate: 1970-01-01T00:00:00.0Z
    firstEnrollment: True
    firstEnrollmentTBC: True
    fwVersion: 4.1.0
    id: 954
    lastUpdate: 1970-01-01T00:00:00.0Z
    macAddress: xx-xx-xx-xx-xx-xx
    modelName: HW90-B14959S8U1_UK
    nickName: Washing Machine
    purchaseDate: 1970-01-01T00:00:00.0Z
    sections:
      chatbot: True
      double_pairing_hidden: True
      ecoDelayStart: True
      epp_enabled: False
      guided_washing: False
      snap_wash: True
    series: 959
    topics:
      publish:
      subscribe:
        - $aws/events/presence/disconnected/xx-xx-xx-xx-xx-xx
        - $aws/events/presence/connected/xx-xx-xx-xx-xx-xx
        - haier/things/xx-xx-xx-xx-xx-xx/event/appliancestatus/update
        - haier/things/xx-xx-xx-xx-xx-xx/event/discovery/update
    waterHard: 3
  attributes:
    active: True
    activity:
      activityExecutionStarted: 2024-01-21 12:01:46
      activityStarted: 1970-01-01T00:00:00.0Z
      applianceTypeName: WM
      attributes:
        antiWrinkle: 1
        autoDetergentStatus: 0
        autoSoftenerStatus: 0
        channel: appliance
        delayStatus: 0
        dirtyLevel: 0
        dryProgFlag: 0
        liquidDetergentDose: 1
        nightWashStatus: 0
        origin: dashboard
        permanentPressStatus: 0
        powderDetergentDose: 1
        prCode: 72
        programCluster: quick
        programFamily: [dashboard]
        programIntensity: standard
        programName: HQD_QUICK_15
        programType: W
        remainingTimeMM: 21
        remoteCtrValid: 1
        spinSpeed: 1200
        suggestedLoadW: RL20
        temp: 40
      category: CYCLE
      macAddress: xx-xx-xx-xx-xx-xx
      resultCode: 0
      ttl: 1713614507
    commandHistory:
      command:
        ancillaryParameters:
          antiWrinkle: 1
          energyLabel: 4
          liquidDetergentDose: 4
          powderDetergentDose: 4
          prPosition: 1
          programCluster: traditional
          programFamily: [dashboard|smart]
          programIntensity: standard
          programType: W
          remoteActionable: 1
          remoteVisible: 1
          suggestedLoadW: 9
          tempContribution: 1
        applianceOptions:
          haier_SoakPrewashSelection: haier_SoakPrewashSelection
        applianceType: WM
        attributes:
          channel: mobileApp
          energyLabel: 0
          origin: standardProgram
        commandName: startProgram
        device:
          appVersion: 2.4.7
          deviceModel: exynos9820
          mobileId: 3e7f95967e196019
          mobileOs: android
          osVersion: 31
        macAddress: xx-xx-xx-xx-xx-xx
        parameters:
          antiAllergyStatus: 0
          autoDetergentStatus: 0
          autoDisinfectantStatus: 0
          autoSoftenerStatus: 0
          cloudProgId: 255
          cloudProgSrc: 2
          creaseResistSoakStatus: 0
          delayStatus: 0
          delayTime: 0
          detergentBStatus: 0
          dryLevel: 0
          dryProgFlag: 0
          dryTime: 0
          energySavingStatus: 0
          haier_ConstantTempStatus: 1
          haier_MainWashRotateTime: 15
          haier_MainWashSpeed: 50
          haier_MainWashStopTime: 0
          haier_MainWashWaterLevel: 3
          haier_RinseRotateTime: 15
          haier_RinseSpeed: 50
          haier_RinseStopTime: 0
          haier_SoakPrewashRotateTime: 15
          haier_SoakPrewashSelection: 0
          haier_SoakPrewashSpeed: 45
          haier_SoakPrewashStopTime: 0
          haier_SoakPrewashTemperature: 30
          haier_SoakPrewashTime: 0
          highWaterLevelStatus: 0
          intelligenceStatus: 0
          lockStatus: 0
          mainWashTime: 20
          nightWashStatus: 0
          operationName: grOnlineWash
          permanentPressStatus: 0
          prCode: 72
          rinseIterationTime: 3
          rinseIterations: 3
          soakWashStatus: 0
          speedUpStatus: 0
          spinSpeed: 1200
          strongStatus: 0
          temp: 40
          texture: 20
          uvSterilizationStatus: 0
          voiceStatus: 0
          washerDryIntensity: 1
          weight: 2
        programName: PROGRAMS.WM_WD.HQD_SMART
        timestamp: 1970-01-01T00:00:00.0Z
        transactionId: xx-xx-xx-xx-xx-xx_1970-01-01T00:00:00.0Z
      timestampAccepted: 1970-01-01T00:00:00.0Z
      timestampExecuted: 1970-01-01T00:00:00.0Z
    lastConnEvent:
      category: CONNECTED
      instantTime: 1970-01-01T00:00:00.0Z
      macAddress: xx-xx-xx-xx-xx-xx
      timestampEvent: 1705835411768
    parameters:
      actualWeight: 0
      airWashTempLevel: 0
      airWashTime: 0
      antiAllergyStatus: 0
      autoDetergentStatus: 0
      autoDisinfectantStatus: 0
      autoSoftenerStatus: 0
      buzzerDisabled: 1
      buzzerDisabledCurrent: 0
      clothesAnionStatus: 0
      cloudProgId: 255
      cloudProgSrc: 2
      creaseResistSoakStatus: 0
      currentElectricityUsed: 0.93
      currentWashCycle: 1
      currentWaterUsed: 44
      debugEnabled: 0
      defSetAllowed: 0
      delayStatus: 0
      detWarn: 0
      detergentBStatus: 0
      detergentPercent: 0
      detergentType: 1
      dirtyLevel: 0
      doorLockStatus: 1
      doorStatus: 0
      dryCleaningNeeded: 0
      dryLevel: 0
      dryProgFlag: 0
      dryStatus: 0
      dryTime: 0
      energySavingStatus: 0
      errors: 00
      forceDelete: 0
      haier_DetergentWeight: 0
      haier_SoftenerWeight: 0
      highTransRate: 1
      highWaterLevelStatus: 0
      intelligenceStatus: 0
      laundryCycleStatus: 1
      lockStatus: 0
      loosenStatus: 0
      machMode: 2
      message: 0
      nightWashStatus: 0
      operationName: 
      pause: 0
      permanentPressStatus: 0
      prCode: 72
      prPhase: 4
      program1: 135
      program10: 2
      program11: 0
      program12: 0
      program13: 0
      program14: 51
      program15: 0
      program16: 1
      program17: 2
      program18: 12
      program19: 0
      program2: 54
      program20: 0
      program21: 0
      program22: 0
      program23: 0
      program24: 6
      program25: 0
      program3: 0
      program4: 0
      program5: 0
      program6: 4
      program7: 4
      program8: 12
      program9: 0
      programStats: 87;36;;;;4;4;c;;2;;;;33;;1;2;c;;;;;;6
      purifiedWashStatus: 0
      remainingMainWashTime: 0
      remainingRinseIterations: 3
      remainingStandbyTime: 1385
      remainingTimeMM: 16
      remoteCtrValid: 1
      shoesAnionStatus: 0
      soakWashStatus: 0
      softWarn: 0
      speedUpStatus: 0
      spinSpeed: 1200
      stainType: 0
      standbyTimeExtended: 1
      stdTransRate: 1
      steamStatus: 0
      strongStatus: 0
      temp: 40
      temp0to30: 188
      temp40: 110
      temp60to90: 7
      testCmdReceiveStatus: 0
      texture: 20
      totalElectricityUsed: 1.88
      totalWashCycle: 1
      totalWaterUsed: 125
      transMode: 0
      uvSterilizationStatus: 0
      voiceModuleDataDef: 130
      voiceModuleOnOffStatus: 1
      voiceModuleVolume: 0
      voiceModuleWakeStatus: 0
      voiceModuleWakeUp: 0
      voiceStatus: 0
      washSpeed: 0
      washerDryIntensity: 1
      weight: 2.00
    pause: False
    programName: No Program
    resultCode: 0
  pauseProgram:
    parameters:
      pause: 1
  resumeProgram:
    parameters:
      pause: 0
  settings:
    custom:
      category: setConfig
    parameters:
      httpEndpoint: 0
      mqttEndpoint: 0
  startProgram:
    ancillaryParameters:
      antiWrinkle: 1
      energyLabel: 4
      liquidDetergentDose: 4
      powderDetergentDose: 4
      prPosition: 1
      programCluster: traditional
      programFamily: [dashboard|smart]
      programIntensity: standard
      programType: W
      remoteActionable: 1
      remoteVisible: 1
      suggestedLoadW: 9
      tempContribution: 1
    custom:
      favourite: 1
      program: AI 3x20min 40c 1200rpm
    parameters:
      antiAllergyStatus: 0
      autoDetergentStatus: 0
      autoDisinfectantStatus: 0
      autoSoftenerStatus: 0
      cloudProgId: 255
      cloudProgSrc: 2
      creaseResistSoakStatus: 0
      delayStatus: 0
      delayTime: 0
      detergentBStatus: 0
      dryLevel: 0
      dryProgFlag: 0
      dryTime: 0
      energySavingStatus: 0
      haier_ConstantTempStatus: 1
      haier_MainWashRotateTime: 15
      haier_MainWashSpeed: 50
      haier_MainWashStopTime: 0
      haier_MainWashWaterLevel: 3
      haier_RinseRotateTime: 15
      haier_RinseSpeed: 50
      haier_RinseStopTime: 0
      haier_SoakPrewashRotateTime: 15
      haier_SoakPrewashSelection: 0
      haier_SoakPrewashSpeed: 45
      haier_SoakPrewashStopTime: 0
      haier_SoakPrewashTemperature: 30
      haier_SoakPrewashTime: 0
      highWaterLevelStatus: 0
      intelligenceStatus: 0
      lockStatus: 0
      mainWashTime: 20
      nightWashStatus: 0
      operationName: grOnlineWash
      permanentPressStatus: 0
      prCode: 72
      rinseIterationTime: 3
      rinseIterations: 3
      soakWashStatus: 0
      speedUpStatus: 0
      spinSpeed: 1200
      strongStatus: 0
      temp: 40
      texture: 20
      uvSterilizationStatus: 0
      voiceStatus: 0
      washerDryIntensity: 1
      weight: 2
    remainingTimes:
      remainingTime: 68
  statistics:
    drawerCleaning:
      count: 304
      percentage: 338
      remaining: -214
      tot: 90
    drumCleaning:
      count: 212
      percentage: 236
      remaining: -122
      tot: 90
    filterCleaning:
      count: 213
      percentage: 213
      remaining: -113
      tot: 100
    lastCheckup: None
    loadingPercentage:
      - current: 0
        date: 1970-01-01T00:00:00.0Z
        max: 0.2
      - current: 0
        date: 1970-01-01T00:00:00.0Z
        max: 9
      - current: 0
        date: 1970-01-01T00:00:00.0Z
        max: 0.2
      - current: 0
        date: 1970-01-01T00:00:00.0Z
        max: 0.2
      - current: 0
        date: 1970-01-01T00:00:00.0Z
        max: 0.2
    mostUsedPrograms:
      - count: 97
        prCode: 124
        prPosition: 1
        programName: PROGRAMS.WM.HQD_SMART
        programType: W
      - count: 53
        prCode: 72
        prPosition: 2
        programName: PROGRAMS.WM_WD.HQD_QUICK_15
        programType: W
      - count: 21
        prCode: 72
        prPosition: 1
        programName: PROGRAMS.WM_WD.HQD_SMART
        programType: W
      - count: 16
        prCode: 69
        prPosition: 1
        programName: PROGRAMS.WM_WD.undefined
        programType: W
      - count: 6
        prCode: 90
        prPosition: 24
        programName: PROGRAMS.WM_WD.HQD_DELICATE_CRADLE
        programType: W
    programsCounter: 281
    resultCode: 0
    temperatureUsage:
      temp0to30: 61.71617161716172
      temp40: 35.973597359735976
      temp60to90: 2.31023102310231
  stopProgram:
    parameters:
      onOffStatus: 0
commands:
  settings:
    category:
      - setConfig
  startProgram:
    delayStatus:
      max: 1
      min: 0
      step: 1
    delayTime:
      max: 1410
      min: 0
      step: 30
    energyLabel:
      max: 5
      min: 3
      step: 1
    haier_SoakPrewashSelection:
      max: 2
      min: 0
      step: 2
    mainWashTime:
      max: 120
      min: 5
      step: 5
    nightWashStatus:
      max: 1
      min: 0
      step: 1
    permanentPressStatus:
      max: 1
      min: 0
      step: 1
    program:
      - AI 2x15min 30c 1200rpm
      - AI 3x20min 0c 1200rpm
      - AI 3x20min 20c 1200rpm
      - AI 3x20min 30c 1200rpm
      - AI 3x20min 40c 1200rpm
      - Backpacks
      - Hand-wash 2x10min 20c 600rpm
      - Pets 3x20min 60c 1400rpm
      - Trainers
      - hqd_20_degrees
      - hqd_allergy
      - hqd_autoclean
      - hqd_babycare
      - hqd_checkup
      - hqd_cottons
      - hqd_delicate_cradle
      - hqd_duvet
      - hqd_eco_40_60_degrees
      - hqd_handwash_wool
      - hqd_mix
      - hqd_quick_15
      - hqd_quick_wash_57
      - hqd_refresh
      - hqd_rinse
      - hqd_shirts
      - hqd_smart
      - hqd_spin
      - hqd_sport
      - hqd_synthetic_and_coloured
      - iot_wash_anti_mites
      - iot_wash_ariel_clean_cycle
      - iot_wash_ariel_cold_cycle
      - iot_wash_ariel_fresh_cycle
      - iot_wash_baby_sanitizer
      - iot_wash_backpacks
      - iot_wash_bathrobe
      - iot_wash_bed_linen
      - iot_wash_bleaching
      - iot_wash_blood_stains
      - iot_wash_cashmere
      - iot_wash_chocolate_stains
      - iot_wash_cold_wash
      - iot_wash_colored
      - iot_wash_colored_anti_stain
      - iot_wash_colored_delicate
      - iot_wash_coloured
      - iot_wash_cotton
      - iot_wash_cuddly_toys
      - iot_wash_curtains
      - iot_wash_dark
      - iot_wash_delicate
      - iot_wash_delicate_antiallergy
      - iot_wash_delicate_colors
      - iot_wash_delicate_dark
      - iot_wash_delicate_tablecloths
      - iot_wash_delicate_whites
      - iot_wash_denim_jeans
      - iot_wash_diving_suits
      - iot_wash_down_jackets
      - iot_wash_fruit_stains
      - iot_wash_handwash
      - iot_wash_handwash_colored
      - iot_wash_handwash_dark
      - iot_wash_lingerie
      - iot_wash_masks_refresh
      - iot_wash_masks_sanification
      - iot_wash_mats
      - iot_wash_men_s_trousers
      - iot_wash_mixed
      - iot_wash_new_clothes
      - iot_wash_perfect_white
      - iot_wash_pets
      - iot_wash_pets_hair_removal
      - iot_wash_pets_odours_stains_removal
      - iot_wash_rapid_14
      - iot_wash_rapid_30
      - iot_wash_rapid_44
      - iot_wash_rapid_59
      - iot_wash_resistant_colored
      - iot_wash_resistant_dark
      - iot_wash_resistant_whites
      - iot_wash_rinse
      - iot_wash_silk
      - iot_wash_ski_suit
      - iot_wash_spin
      - iot_wash_sport
      - iot_wash_sport_anti_odor
      - iot_wash_swimsuits_and_bikinis
      - iot_wash_synthetic
      - iot_wash_tablecloths
      - iot_wash_technical_fabrics
      - iot_wash_technical_jackets
      - iot_wash_trainers
      - iot_wash_whites
      - iot_wash_wine_stains
      - iot_wash_wool
    programCluster:
      - traditional
      - eco
      - traditional_eco
    programFamily:
      - hidden
      - guided
      - dashboard
      - hidden_guided_dashboard
    rinseIterations:
      max: 5
      min: 0
      step: 1
    spinSpeed:
      - 0
      - 400
      - 600
      - 800
      - 1000
      - 1200
      - 1400
    temp:
      - 0
      - 20
      - 30
      - 40
      - 60
      - 90
versions:
  hon: 0.11.0-beta.1
  pyhOn: 0.15.15

Data Archive Can be added if requested

Andre0512 commented 1 month ago

I fixed it now, thanks @Benniepie! :smiley: