paveldn / haier-esphome

Haier ac integration for ESPHome
92 stars 14 forks source link

Issue with quiet mode. #63

Open Jeroen2006 opened 6 days ago

Jeroen2006 commented 6 days ago

Hello, I'm running a few Haier units running the hon protocol in my house. It has been working perfectly (thanks for the great work). I am running into one issue though. I cannot seem to get the quiet mode on the unit activated from my esphome controller. I have the switch configured as the examples I was able to find.

switch:
  - platform: haier
    quiet_mode:
      name: Quiet mode

But when I toggle the switch in homeassistant it doesn't seem to do anything. I had a look at the incoming packets from the airconditioner, and when i changed the state I wasn't able to see any bytes change. However, when I used the included remote and enabled the quiet mode from there I was able to see something change (I tried it a few times to make sure it wasn't anything else). When I used the remote I was able to hear the unit make less noise, but the switch in homeassistant did not change state.

Running in normal mode: Frame found: type 02, data: 6D 01 08 06 85 00 00 01 00 00 00 00 32 00 4D 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Running in quiet mode: Frame found: type 02, data: 6D 01 08 06 85 00 00 11 00 00 00 00 32 00 4C 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Also when I toggle the quiet mode switch in homeassistant I don't see the message 'Sending control packet, queue size 1' printed in the log, but when I change the display for example I do see that message, Is this something I missed somewhere or is the quiet mode broken?

Here is my config for the climate device:

climate:
  - platform: haier
    id: haier_ac
    protocol: hon
    name: Haier hOn Climate
    uart_id: haier_uart
    wifi_signal: true
    visual:
      min_temperature: 16 °C
      max_temperature: 30 °C
      temperature_step: 
        target_temperature: 1
        current_temperature: 0.5
    supported_modes:
      - 'OFF'
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
      - FAN_ONLY
    supported_swing_modes:
      - 'OFF'
      - VERTICAL
    supported_presets:
      - AWAY
      - BOOST
      - SLEEP
    on_status_message:
      then:
        - output.turn_on: haier_led
        - delay: 100ms
        - output.turn_off: haier_led
        - delay: 250ms
        - output.turn_on: haier_led
        - delay: 100ms
        - output.turn_off: haier_led
    on_alarm_start:
      then:
        - homeassistant.service:
            service: logbook.log
            data:
              domain: climate
              name: Haier hOn Climate
            data_template:
              message: "Alarm activated ({{ alarm_code }}): {{alarm_message}}" 
            variables:
              alarm_message: !lambda "return message;"
              alarm_code: !lambda "return code;"
        - homeassistant.service:
            service: notify.persistent_notification
            data:
              title: "Haier hOn Climate: alarm activated"
            data_template:
              message: "Code: {{ alarm_code }}, message: \"{{ alarm_message }}\""
            variables:
              alarm_message: !lambda "return message;"
              alarm_code: !lambda "return code;"
    on_alarm_end:
      then:
        - homeassistant.service:
            service: logbook.log
            data:
              domain: climate
              name: Haier hOn Climate
            data_template:
              message: "Alarm deactivated ({{ alarm_code }}): {{alarm_message}}" 
            variables:
              alarm_message: !lambda "return message;"
              alarm_code: !lambda "return code;"

Kind regards Jeroen

paveldn commented 5 days ago

Hi Jeroen,

Can you please record logs for me with 15-20 seconds of messages before and 15-20 seconds after action:

Jeroen2006 commented 5 days ago

Yes, no problem! I turned on silent mode with the IR remote @ 17:11:59, and turned it off again @ 17:12:21

haier-log-toggle-ha.txt haier-log-toggle-ir.txt

paveldn commented 4 days ago

I see you are using it in FAN mode. Can you try using quiet in another mode, like heat or cool? I am blocking quiet mode for fan mode. It is not working with my AC, so I thought it was not allowed.