Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sending actions to AC #92

Closed
xjols opened this issue Jul 13, 2023 · 10 comments
Closed

Error sending actions to AC #92

xjols opened this issue Jul 13, 2023 · 10 comments
Assignees
Labels
air conditioner Air conditioner (AC) bug Something isn't working good first issue Good for newcomers

Comments

@xjols
Copy link

xjols commented Jul 13, 2023

Describe the bug
Error to sending actions to AC

To Reproduce
Steps to reproduce the behavior:

  1. Go to thermostat card created by this integration to AC
  2. Try to set any temperature by whell of thermostat
  3. Error calling climate.set_temperature.connection lost
  4. Any other actions also fails: Try to set Echo on
  5. Appears Error calling service swith.turn_on.connection lost

Expected behavior
They worked well in others olders versions, with problems like Echo that does not work in any versions. But now seems that I have others problems...

Screenshots
hon1

hon2

Environment (please complete the following information):

  • Home Assistant Version: 2023.7.1
  • hOn Integration Version: 0.9.0
  • pyhOn Versio: 0.14.9

Additional context

Home Assistant Logs

2023-07-13 17:14:36.347 ERROR (MainThread) [pyhon.connection.api] {"payload":{"resultCode":"1","errorCode":"1000","errorDescription":"Invalid parameter: parValue"},"authInfo":{}}
2023-07-13 17:14:36.356 ERROR (MainThread) [pyhon.connection.api] https://api-iot.he.services/commands/v1/send - Payload:
{'ancillaryParameters': {},
 'applianceOptions': {},
 'applianceType': 'AC',
 'attributes': {'channel': 'mobileApp',
                'energyLabel': '0',
                'origin': 'standardProgram'},
 'commandName': 'settings',
 'device': {'appVersion': '2.1.2',
            'deviceModel': 'exynos9820',
            'mobileId': 'xxxxxxxxxxxxx',
            'mobileOs': 'android',
            'osVersion': 31},
 'macAddress': 'xxxxxxxxxxxxx',
 'parameters': {'10degreeHeatingStatus': '0',
                'ch2oCleaningStatus': '0',
                'cleaningTimeStatus': '0',
                'echoStatus': '1',
                'electricHeatingStatus': '0',
                'energySavePeriod': '15',
                'energySavingStatus': '0',
                'filterChangeStatusCloud': '0',
                'freshAirStatus': '0',
                'halfDegreeSettingStatus': '0',
                'healthMode': '0',
                'heatAccumulationStatus': '0',
                'humanSensingStatus': '0',
                'humidificationStatus': '0',
                'humiditySel': '30',
                'intelligenceStatus': '0',
                'lightStatus': '0',
                'lockStatus': '0',
                'machMode': '1',
                'muteStatus': '0',
                'onOffStatus': '1',
                'operationName': '',
                'pm2p5CleaningStatus': '0',
                'pmvStatus': '0',
                'rapidMode': '0',
                'screenDisplayStatus': '1',
                'selfCleaning56Status': '0',
                'selfCleaningStatus': '0',
                'silentSleepStatus': '0',
                'specialMode': '0',
                'tempSel': '29',
                'tempUnit': '0',
                'voiceSignStatus': '0',
                'voiceStatus': '0',
                'windDirectionHorizontal': '0',
                'windDirectionVertical': '5',
                'windSensingStatus': '0',
                'windSpeed': '5'},
 'timestamp': '2023-07-13T15:14:36.156Z',
 'transactionId': 'xxxxxxx_2023-07-13T15:14:36.156Z'}
2023-07-13 17:14:36.358 ERROR (MainThread) [pyhon.commands] False
2023-07-13 17:14:36.361 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547808606480] Can't send command
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 845, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 889, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/hon/switch.py", line 409, in async_turn_on
    await self._device.commands["settings"].send()
  File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 125, in send
    raise ApiError("Can't send command")
pyhon.exceptions.ApiError: Can't send command





2023-07-13 17:14:42.190 ERROR (MainThread) [pyhon.connection.api] {"payload":{"resultCode":"1","errorCode":"1000","errorDescription":"Invalid parameter: parValue"},"authInfo":{}}
2023-07-13 17:14:42.196 ERROR (MainThread) [pyhon.connection.api] https://api-iot.he.services/commands/v1/send - Payload:
{'ancillaryParameters': {},
 'applianceOptions': {},
 'applianceType': 'AC',
 'attributes': {'channel': 'mobileApp',
                'energyLabel': '0',
                'origin': 'standardProgram'},
 'commandName': 'settings',
 'device': {'appVersion': '2.1.2',
            'deviceModel': 'exynos9820',
            'mobileId': 'xxxxxxxx',
            'mobileOs': 'android',
            'osVersion': 31},
 'macAddress': 'xxxxxxx',
 'parameters': {'10degreeHeatingStatus': '0',
                'ch2oCleaningStatus': '0',
                'cleaningTimeStatus': '0',
                'echoStatus': '0',
                'electricHeatingStatus': '0',
                'energySavePeriod': '15',
                'energySavingStatus': '0',
                'filterChangeStatusCloud': '0',
                'freshAirStatus': '0',
                'halfDegreeSettingStatus': '0',
                'healthMode': '0',
                'heatAccumulationStatus': '0',
                'humanSensingStatus': '0',
                'humidificationStatus': '0',
                'humiditySel': '30',
                'intelligenceStatus': '0',
                'lightStatus': '0',
                'lockStatus': '0',
                'machMode': '1',
                'muteStatus': '0',
                'onOffStatus': '1',
                'operationName': '',
                'pm2p5CleaningStatus': '0',
                'pmvStatus': '0',
                'rapidMode': '0',
                'screenDisplayStatus': '1',
                'selfCleaning56Status': '0',
                'selfCleaningStatus': '0',
                'silentSleepStatus': '0',
                'specialMode': '0',
                'tempSel': '29',
                'tempUnit': '0',
                'voiceSignStatus': '0',
                'voiceStatus': '0',
                'windDirectionHorizontal': '0',
                'windDirectionVertical': '5',
                'windSensingStatus': '0',
                'windSpeed': '5'},
 'timestamp': '2023-07-13T15:14:42.006Z',
 'transactionId': 'xxxxxxx_2023-07-13T15:14:42.006Z'}
2023-07-13 17:14:42.201 ERROR (MainThread) [pyhon.commands] False
2023-07-13 17:14:42.204 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547808606480] Can't send command
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 845, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 889, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/hon/switch.py", line 418, in async_turn_off
    await self._device.commands["settings"].send()
  File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 125, in send
    raise ApiError("Can't send command")
pyhon.exceptions.ApiError: Can't send command

NOTE: The sensible information like MAC was deleted from log and reemplaced by "xxxx"

Device Log

data:
  additional_data:
    dictionaryId: 180
  appliance:
    PK: user#eu-west-1:XXXXXXXXX
    SK: app#xx-xx-xx-xx-xx-xx
    SK_Secondary: AC#selfClean56#2021-09-08
    applianceId: xx-xx-xx-xx-xx-xx#1970-01-01T00:00:00.0Z
    applianceModelId: 397
    applianceStatus: 1
    applianceTypeId: 11
    applianceTypeName: AC
    attributes:
      acuVersion: 0.0.0
      chipset: 1
      dictionaryId: 180
      eppParserSet: 1
      fwLabel: iotfw_epp
      idfVersion: 4.4.4
      kernelVersion: 10.4.3
      lang: it-IT
      uiVersion: 06.26.00
    brand: haier
    code: AAANW2E0000
    connectivity: wifi|ble
    eepromId: 41
    eepromName: no_eeprom
    enrollmentDate: 1970-01-01T00:00:00.0Z
    fwVersion: 5.15.0
    id: 397
    lastUpdate: 1970-01-01T00:00:00.0Z
    macAddress: xx-xx-xx-xx-xx-xx
    modelName: AS35TEDHRA(M1)
    nickName: Cuina
    sections:
      chatbot: True
      double_pairing_hidden: True
      epp_enabled: False
    series: tundra
    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
    unitConfiguration: 1to2
  attributes:
    activity:
      activityExecutionStarted: 2023-07-13 14:41:50
      activityStarted: 1970-01-01T00:00:00.0Z
      applianceTypeName: AC
      attributes:
        10degreeHeatingStatus: 0
        acType: 0
        airQuality: 0
        appVersion: 2.1.2
        ch2oCleaningStatus: 0
        ch2oValueIndoor: 0
        channel: mobileApp
        cleaningTimeStatus: 0
        co2ValueIndoor: 0
        compressorCurrent: 51.10
        compressorFrequency: 0
        compressorStatus: 0
        defrostStatus: 0
        deviceModel: exynos9820
        echoStatus: 0
        ecoMode: 0
        electricHeatingStatus: 0
        electricHeatingStatusIndoor: 0
        energySavePeriod: 15
        energySavingStatus: 0
        errAckFlag: 0
        expansionValveOpenDegree: 102
        fanStatusIndoor: 1
        fanStatusOutdoor: 2
        filterChangeStatusCloud: 0
        fourWayValveStatus: 2
        freshAirStatus: 0
        halfDegreeSettingStatus: 0
        healthMode: 0
        heatAccumulationStatus: 0
        humanSensingStatus: 0
        humidificationStatus: 0
        humidityIndoor: 0
        humiditySel: 30
        intelligenceStatus: 0
        lightStatus: 0
        lockStatus: 0
        machMode: 1
        machineModeHK: 0
        mobileOs: android
        muteStatus: 0
        operationSource: 3
        origin: standardProgram
        osVersion: 31
        pm2p5CleaningStatus: 0
        pm2p5LevelIndoor: 0
        pm2p5ValueIndoor: 0
        pm2p5ValueOutdoor: 0
        pmvStatus: 0
        power: 0
        principalUserId: XXXXXXXXX
        programFamily: [standard]
        rapidMode: 0
        screenDisplayStatus: 1
        selfCleaning56Status: 0
        selfCleaningStatus: 0
        sensingResult: 0
        silentSleepStatus: 0
        specialMode: 0
        tempAirOutdoor: 78
        tempCoilerIndoor: 8.00
        tempCoilerOutdoor: 32
        tempDefrostOutdoor: 32
        tempInAirOutdoor: 13
        tempIndoor: 28.50
        tempOutdoor: 31.00
        tempSel: 22
        tempUnit: 0
        vocValueIndoor: 0
        windDirectionHorizontal: 0
        windDirectionVertical: 5
        windSpeed: 5
      category: CYCLE
      macAddress: xx-xx-xx-xx-xx-xx
      resultCode: 0
      ttl: 1697035311
    commandHistory:
      command:
        ancillaryParameters:
          ecoMode: 0
          programFamily: [standard]
          remoteActionable: 1
          remoteVisible: 1
        applianceOptions:
        applianceType: AC
        attributes:
          channel: mobileApp
          energyLabel: 0
          origin: standardProgram
        commandName: startProgram
        device:
          appVersion: 2.1.2
          deviceModel: exynos9820
          mobileId: XXXXXXXXX
          mobileOs: android
          osVersion: 31
        macAddress: xx-xx-xx-xx-xx-xx
        parameters:
          10degreeHeatingStatus: 0
          ch2oCleaningStatus: 0
          cleaningTimeStatus: 0
          echoStatus: 0
          electricHeatingStatus: 0
          energySavePeriod: 15
          energySavingStatus: 0
          filterChangeStatusCloud: 0
          freshAirStatus: 0
          halfDegreeSettingStatus: 0
          healthMode: 0
          heatAccumulationStatus: 0
          humanSensingStatus: 0
          humidificationStatus: 0
          humiditySel: 30
          intelligenceStatus: 0
          lightStatus: 0
          lockStatus: 0
          machMode: 1
          muteStatus: 0
          onOffStatus: 1
          operationName: grSetDAC
          pm2p5CleaningStatus: 0
          pmvStatus: 0
          rapidMode: 0
          screenDisplayStatus: 1
          selfCleaning56Status: 0
          selfCleaningStatus: 0
          silentSleepStatus: 0
          specialMode: 0
          tempSel: 22
          tempUnit: 0
          voiceSignStatus: 0
          voiceStatus: 0
          windDirectionHorizontal: 0
          windDirectionVertical: 5
          windSensingStatus: 0
          windSpeed: 5
        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: 1689257958187
    parameters:
      10degreeHeatingStatus: 0
      acType: 0
      airQuality: 0
      ch2oCleaningStatus: 0
      ch2oValueIndoor: 0
      co2ValueIndoor: 0
      compressorCurrent: 51.10
      compressorFrequency: 41
      compressorStatus: 1
      debugEnabled: 0
      defrostStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      electricHeatingStatusIndoor: 0
      energySavePeriod: 15
      energySavingStatus: 0
      errAckFlag: 0
      errors: 00
      expansionValveOpenDegree: 96
      fanStatusIndoor: 1
      fanStatusOutdoor: 2
      filterChangeStatusLocal: 0
      fourWayValveStatus: 2
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      highTransRate: 1
      humanSensingStatus: 0
      humidificationStatus: 0
      humidityIndoor: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 1
      machineModeHK: 0
      muteStatus: 0
      onOffStatus: 1
      operationName: 
      operationSource: 3
      pm2p5CleaningStatus: 0
      pm2p5LevelIndoor: 0
      pm2p5ValueIndoor: 0
      pm2p5ValueOutdoor: 0
      pmvStatus: 0
      power: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaningStatus: 0
      sensingResult: 0
      silentSleepStatus: 0
      specialMode: 0
      statusSyncRate: 1440
      stdTransRate: 3600
      tempAirOutdoor: 70
      tempCoilerIndoor: 10.00
      tempCoilerOutdoor: 30
      tempDefrostOutdoor: 30
      tempInAirOutdoor: 8
      tempIndoor: 28.50
      tempOutdoor: 30.00
      tempSel: 29.00
      tempUnit: 0
      totalElectricityUsed: 0
      totalWorkTime: 0
      transMode: 0
      vocValueIndoor: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSpeed: 5
    resultCode: 0
  settings:
    ancillaryParameters:
      programRules: {'tempSel': {'ecoMode': {'1': {'machMode': {'1': {'typology': 'fixed', 'fixedValue': '26'}, '4': {'typology': 'fixed', 'fixedValue': '20'}}}}}, 'windSpeed': {'ecoMode': {'1': {'machMode': {'1|4': {'typology': 'enum', 'defaultValue': '1', 'enumValues': '1|2|3|5'}}}}}, 'windDirectionVertical': {'ecoMode': {'1': {'machMode': {'1|4': {'typology': 'fixed', 'fixedValue': '3'}}}}}}
    custom:
      category: setParameters
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 0
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 1
      muteStatus: 0
      onOffStatus: 1
      operationName: 
      pm2p5CleaningStatus: 0
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 29
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
  startProgram:
    ancillaryParameters:
      ecoMode: 0
      programFamily: [standard]
      programRules: {'tempSel': {'ecoMode': {'1': {'machMode': {'1': {'typology': 'fixed', 'fixedValue': '26'}, '4': {'typology': 'fixed', 'fixedValue': '20'}}}}}, 'windSpeed': {'ecoMode': {'1': {'machMode': {'1|4': {'typology': 'enum', 'defaultValue': '1', 'enumValues': '1|2|3|5'}}}}}, 'windDirectionVertical': {'ecoMode': {'1': {'machMode': {'1|4': {'typology': 'fixed', 'fixedValue': '3'}}}}}}
      remoteActionable: 1
      remoteVisible: 1
    custom:
      program: iot_cool
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 0
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 1
      muteStatus: 0
      onOffStatus: 1
      operationName: grSetDAC
      pm2p5CleaningStatus: 0
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 22
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
  statistics:
    mostUsedPrograms:
      - count: 30
        prCode: None
        programName: PROGRAMS.AC.HOME_ASSISTANT
      - count: 3
        prCode: None
        programName: PROGRAMS.AC.IOT_COOL
    mostUsedRecipes:
    programsCounter: 0
  stopProgram:
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 0
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 0
      muteStatus: 0
      onOffStatus: 0
      operationName: grSetDAC
      pm2p5CleaningStatus: 0
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 22
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
commands:
  settings:
    10degreeHeatingStatus:
      max: 0
      min: 0
      step: 1
    category:
      - setConfig
      - setParameters
    echoStatus:
      max: 1
      min: 0
      step: 1
    machMode:
      - 1
    muteStatus:
      max: 1
      min: 0
      step: 1
    rapidMode:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 0
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
  startProgram:
    10degreeHeatingStatus:
      max: 1
      min: 0
      step: 1
    echoStatus:
      max: 1
      min: 0
      step: 1
    ecoMode:
      max: 1
      min: 0
      step: 1
    machMode:
      - 0
      - 1
      - 2
      - 4
      - 6
    muteStatus:
      max: 1
      min: 0
      step: 1
    program:
      - iot_10_heating
      - iot_auto
      - iot_cool
      - iot_dry
      - iot_fan
      - iot_heat
      - iot_self_clean
      - iot_simple_start
    programFamily:
      - maintenance
      - health
      - maintenance_health
    rapidMode:
      max: 1
      min: 0
      step: 1
    remoteActionable:
      max: 1
      min: 0
      step: 1
    remoteVisible:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 1
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 7
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
  stopProgram:
    10degreeHeatingStatus:
      max: 1
      min: 0
      step: 1
    echoStatus:
      max: 1
      min: 0
      step: 1
    machMode:
      - 0
      - 1
      - 2
      - 4
      - 6
    muteStatus:
      max: 1
      min: 0
      step: 1
    rapidMode:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 1
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 7
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
rules:
  startProgram:
    ecoMode:
      1:
        machMode:
          1:
            tempSel: 26
            windDirectionVertical: 3
            windSpeed: 1
          4:
            tempSel: 20
            windDirectionVertical: 3
            windSpeed: 1
versions:
  hon: 0.9.0
  pyhOn: 0.14.9

Data Archive

@xjols xjols added the bug Something isn't working label Jul 13, 2023
@Andre0512 Andre0512 added good first issue Good for newcomers air conditioner Air conditioner (AC) labels Jul 13, 2023
@xjols xjols changed the title Error to sending actions to AC Error sending actions to AC Jul 15, 2023
@salvatoremaietta89
Copy link

Hi, i like this integration but have same problema...any command return connection Lost. Can you help me? Thanks

@xjols
Copy link
Author

xjols commented Jul 18, 2023

Today I see this error in log. I don't know if it's the same bug....

Detalls del registre (ERROR)
Aquest error té origen en una integració personalitzada.
Logger: custom_components.hon.hon
Source: custom_components/hon/hon.py:92
Integration: Haier hOn (documentation, issues)
First occurred: 04:28:07 (1 occurrences)
Last logged: 04:28:07

Unexpected error fetching xx-xx-xx-xx-xx-data: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hon/hon.py", line 92, in _async_update_data
await self._device.update()
File "/usr/local/lib/python3.11/site-packages/pyhon/appliance.py", line 198, in update
await self.load_attributes()
File "/usr/local/lib/python3.11/site-packages/pyhon/appliance.py", line 174, in load_attributes
for name, values in attributes.pop("shadow", {}).get("parameters", {}).items():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

@Andre0512
Copy link
Owner

Andre0512 commented Jul 18, 2023

Hi, I have an idea what could be the problem here, maybe the empty operationName of the parameters gets synced to the settings command and causes probably the issue. Can you provide your Data Archive zip? Than it's much more easy for me to test 🙂

@xjols
Copy link
Author

xjols commented Jul 19, 2023

This is the zip. Thank you!
ac_397.zip

@developerGM
Copy link

developerGM commented Jul 19, 2023

Hi, I have the same problem.
If I try to change some attributes, at 80% times receive "connection lost"
I solve selecting a value from program menu and than I can choice for example "fan velocity" or can use other switch succesfully

For example, this is the last log...I used "screen display" switch and turn to OFF

2023-07-19 18:22:50.775 ERROR (MainThread) [pyhon.connection.api] https://api-iot.he.services/commands/v1/send - Payload: {'ancillaryParameters': {}, 'applianceOptions': {}, 'applianceType': 'AC', 'attributes': {'channel': 'mobileApp', 'energyLabel': '0', 'origin': 'standardProgram'}, 'commandName': 'settings', 'device': {'appVersion': '2.1.2', 'deviceModel': 'exynos9820', 'mobileId': 'xxxx', 'mobileOs': 'android', 'osVersion': 31}, 'macAddress': 'xxxx', 'parameters': {'10degreeHeatingStatus': '0', 'ch2oCleaningStatus': '0', 'cleaningTimeStatus': '0', 'echoStatus': '0', 'electricHeatingStatus': '0', 'energySavePeriod': '15', 'energySavingStatus': '0', 'filterChangeStatusCloud': '0', 'freshAirStatus': '0', 'halfDegreeSettingStatus': '0', 'healthMode': '0', 'heatAccumulationStatus': '0', 'humanSensingStatus': '0', 'humidificationStatus': '0', 'humiditySel': '30', 'intelligenceStatus': '0', 'lightStatus': '0', 'lockStatus': '0', 'machMode': '6', 'muteStatus': '0', 'onOffStatus': '1', 'operationName': '', 'pm2p5CleaningStatus': '0', 'pmvStatus': '0', 'rapidMode': '0', 'screenDisplayStatus': '1', 'selfCleaning56Status': '0', 'selfCleaningStatus': '0', 'silentSleepStatus': '0', 'specialMode': '0', 'tempSel': '22', 'tempUnit': '0', 'voiceSignStatus': '0', 'voiceStatus': '0', 'windDirectionHorizontal': '0', 'windDirectionVertical': '5', 'windSensingStatus': '0', 'windSpeed': '2'}, 'timestamp': '2023-07-19T16:22:50.594Z', 'transactionId': 'c4-dd-57-51-7a-38_2023-07-19T16:22:50.594Z'}

you can see that I have operationName empty

@Andre0512
Copy link
Owner

Thanks, please try v0.9.1-beta.1

@developerGM
Copy link

It seems to be all resolved. I'll try again tomorrow and let you know. Thank you very much for your work

@Andre0512
Copy link
Owner

Thanks @developerGM 🙂

@developerGM
Copy link

I am testing and for me this bug is fixed

@xjols
Copy link
Author

xjols commented Jul 21, 2023

Hello, I tested this new beta version and solves this bug. Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
air conditioner Air conditioner (AC) bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants