AirCon icon indicating copy to clipboard operation
AirCon copied to clipboard

HA - power_command_topic causes issue on HVAC change

Open mobot95 opened this issue 3 years ago • 30 comments

Hi, I've updated to latest version of Home Assistant, i've noticed that, if I use the default MQTT Climate configuration (with MQTT Discovery), I cannot change the HVAC mode anymore

In logs, i try to set HVAC mode to 'fan_only' for two times, but every time it send also the POWER payload to ON, even if the climate it's already powered, and it doesn't change the HVAC mode, it stays always to 'heat'

To fix this issue, i have to create a custom climate configuration without power_command_topic parameter

aircon.txt

mobot95 avatar Feb 07 '22 08:02 mobot95

hi mobot95,

i have the same issue. Can you post your custom configuration?

thanks. DP

darpet75 avatar Feb 18 '22 10:02 darpet75

climate:
  - platform: mqtt
    name: Camera da letto
    availability:
      - topic: hisense_ac/LWT
      - topic: hisense_ac/ca2c4f95524a/available/status
    precision: 1
    temperature_unit: C
    current_temperature_topic: hisense_ac/ca2c4f95524a/f_temp_in/status
    fan_mode_command_topic: hisense_ac/ca2c4f95524a/t_fan_speed/command
    fan_mode_state_topic: hisense_ac/ca2c4f95524a/t_fan_speed/status
    fan_modes:
      - auto
      - lower
      - low
      - medium
      - high
      - higher
    mode_command_topic: hisense_ac/ca2c4f95524a/t_work_mode/command
    mode_state_topic: hisense_ac/ca2c4f95524a/t_work_mode/status
    modes:
      - "off"
      - fan_only
      - heat
      - cool
      - dry
      - auto
    swing_mode_command_topic: hisense_ac/ca2c4f95524a/t_fan_power/command
    swing_mode_state_topic: hisense_ac/ca2c4f95524a/t_fan_power/status
    swing_modes:
      - "on"
      - "off"
    temperature_command_topic: hisense_ac/ca2c4f95524a/t_temp/command
    temperature_state_topic: hisense_ac/ca2c4f95524a/t_temp/status
    max_temp: 30
    min_temp: 16
    send_if_off: false
  - platform: mqtt
    name: Cameretta
    availability:
      - topic: hisense_ac/LWT
      - topic: hisense_ac/ca2c4fa2b27d/available/status
    precision: 1
    temperature_unit: C
    current_temperature_topic: hisense_ac/ca2c4fa2b27d/f_temp_in/status
    fan_mode_command_topic: hisense_ac/ca2c4fa2b27d/t_fan_speed/command
    fan_mode_state_topic: hisense_ac/ca2c4fa2b27d/t_fan_speed/status
    fan_modes:
      - auto
      - lower
      - low
      - medium
      - high
      - higher
    mode_command_topic: hisense_ac/ca2c4fa2b27d/t_work_mode/command
    mode_state_topic: hisense_ac/ca2c4fa2b27d/t_work_mode/status
    modes:
      - "off"
      - fan_only
      - heat
      - cool
      - dry
      - auto
    swing_mode_command_topic: hisense_ac/ca2c4fa2b27d/t_fan_power/command
    swing_mode_state_topic: hisense_ac/ca2c4fa2b27d/t_fan_power/status
    swing_modes:
      - "on"
      - "off"
    temperature_command_topic: hisense_ac/ca2c4fa2b27d/t_temp/command
    temperature_state_topic: hisense_ac/ca2c4fa2b27d/t_temp/status
    max_temp: 30
    min_temp: 16
    send_if_off: false

mobot95 avatar Feb 18 '22 10:02 mobot95

thanks a lot.

thi worked for me too

darpet75 avatar Feb 18 '22 10:02 darpet75

Hi mobot95, is it possible to add fan speed and other information to the thermostat card? Thank you.

Marco from italy

mangio85 avatar Feb 21 '22 21:02 mangio85

Hi @mangio85, you should try mini-climate-card

Andrea Cattura

mobot95 avatar Feb 22 '22 13:02 mobot95

Ciao Andrea, grazie Riguardo ai sensori mancanti, come per esempio l'umidità, devo interrogarli con uno script? Scusa ma sono alle prime armi. Grazie

mangio85 avatar Feb 22 '22 19:02 mangio85

Hi Marco, Humidity data are not available from Hisense AC. I'm using a Zigbee sensor (Sonoff SNZB-02)

mobot95 avatar Feb 22 '22 21:02 mobot95

Many thanks Andrea!!!

mangio85 avatar Feb 23 '22 07:02 mangio85

Hi @mobot95, your workaround works but I still have an issue, when the AC is off, if a set a mode in order to switch-on/selectmode the ac turn on but the mode was the one selected before turn off, do you have any idea?

saveriospeziali avatar Apr 02 '22 10:04 saveriospeziali

Seems like #146 and #147 may be caused by the same issue. power_command_topic is sent AFTER a mode_command_topic, which overwrites whatever the selected mode was sent. Manually removing that line from the discovery topic payload fixed the issue; it's glitchy on mode selection when off sometimes but at least we can select a mode and not have it bounce back.

In fact, I've come to realize that power_command_topic isn't really required, as an "off" command just sends mode_command_topic = off which turns off the AC.

jsb5151 avatar Apr 06 '22 17:04 jsb5151

Seems like #146 and #147 may be caused by the same issue. power_command_topic is sent AFTER a mode_command_topic, which overwrites whatever the selected mode was sent. Manually removing that line from the discovery topic payload fixed the issue; it's glitchy on mode selection when off sometimes but at least we can select a mode and not have it bounce back.

In fact, I've come to realize that power_command_topic isn't really required, as an "off" command just sends mode_command_topic = off which turns off the AC.

Can you write how you manually removed this line? Where can I found it?

pbabilas avatar Apr 13 '22 08:04 pbabilas

climate:
  - platform: mqtt
    name: Camera da letto
    availability:
      - topic: hisense_ac/LWT
      - topic: hisense_ac/ca2c4f95524a/available/status
    precision: 1
    temperature_unit: C
    current_temperature_topic: hisense_ac/ca2c4f95524a/f_temp_in/status
    fan_mode_command_topic: hisense_ac/ca2c4f95524a/t_fan_speed/command
    fan_mode_state_topic: hisense_ac/ca2c4f95524a/t_fan_speed/status
    fan_modes:
      - auto
      - lower
      - low
      - medium
      - high
      - higher
    mode_command_topic: hisense_ac/ca2c4f95524a/t_work_mode/command
    mode_state_topic: hisense_ac/ca2c4f95524a/t_work_mode/status
    modes:
      - "off"
      - fan_only
      - heat
      - cool
      - dry
      - auto
    swing_mode_command_topic: hisense_ac/ca2c4f95524a/t_fan_power/command
    swing_mode_state_topic: hisense_ac/ca2c4f95524a/t_fan_power/status
    swing_modes:
      - "on"
      - "off"
    temperature_command_topic: hisense_ac/ca2c4f95524a/t_temp/command
    temperature_state_topic: hisense_ac/ca2c4f95524a/t_temp/status
    max_temp: 30
    min_temp: 16
    send_if_off: false
  - platform: mqtt
    name: Cameretta
    availability:
      - topic: hisense_ac/LWT
      - topic: hisense_ac/ca2c4fa2b27d/available/status
    precision: 1
    temperature_unit: C
    current_temperature_topic: hisense_ac/ca2c4fa2b27d/f_temp_in/status
    fan_mode_command_topic: hisense_ac/ca2c4fa2b27d/t_fan_speed/command
    fan_mode_state_topic: hisense_ac/ca2c4fa2b27d/t_fan_speed/status
    fan_modes:
      - auto
      - lower
      - low
      - medium
      - high
      - higher
    mode_command_topic: hisense_ac/ca2c4fa2b27d/t_work_mode/command
    mode_state_topic: hisense_ac/ca2c4fa2b27d/t_work_mode/status
    modes:
      - "off"
      - fan_only
      - heat
      - cool
      - dry
      - auto
    swing_mode_command_topic: hisense_ac/ca2c4fa2b27d/t_fan_power/command
    swing_mode_state_topic: hisense_ac/ca2c4fa2b27d/t_fan_power/status
    swing_modes:
      - "on"
      - "off"
    temperature_command_topic: hisense_ac/ca2c4fa2b27d/t_temp/command
    temperature_state_topic: hisense_ac/ca2c4fa2b27d/t_temp/status
    max_temp: 30
    min_temp: 16
    send_if_off: false

How to apply this custom configuration?

pbabilas avatar Apr 13 '22 09:04 pbabilas

How to apply this custom configuration?

Hi Include the script in configuration.yaml file remember to replace ca2c4fa2b27d with your mqtt id (I find it with mqttexplorer)

restart homeassistant

Regards

saveriospeziali avatar Apr 13 '22 12:04 saveriospeziali

gr8 working fine, thanks a lot for help!

pbabilas avatar Apr 13 '22 18:04 pbabilas

Ciao Saverio, a me continua a non andare pur cambiando ID del clima... dove sbaglio?

Hi Saverio, I changed AC mqtt ID but still not working, what I'm doing wrong?

giros79 avatar Jun 05 '22 14:06 giros79

How to apply this custom configuration?

Hi Include the script in configuration.yaml file remember to replace ca2c4fa2b27d with your mqtt id (I find it with mqttexplorer)

restart homeassistant

Regards

Savero scusami, ma non sono praticissimo e non ho capito come trovare il mio mqtt id...mi puoi aiutare? Ho lo stesso problema con il mio Hisense

kisjeth avatar Jun 05 '22 15:06 kisjeth

you can find mqtt id using a software like mqtt explorer connecting to the broker

mqtt id lo trovi utilizzando un programma tipo mqtt explorer e connettendoti con le credenziali al tuo broker. le trovi sotto HiSense_ac

giros79 avatar Jun 05 '22 15:06 giros79

you can find mqtt id using a software like mqtt explorer connecting to the broker

mqtt id lo trovi utilizzando un programma tipo mqtt explorer e connettendoti con le credenziali al tuo broker. le trovi sotto HiSense_ac

Si, infatti alla fine ho provato a girare e l'ho trovato. Grazie. L'unica cosa, non c'è qualcosa per l'oscillazione orizzontale? Ho solo il comando verticale ma nulla per l'orizzontale. C'è nulla?

kisjeth avatar Jun 05 '22 16:06 kisjeth

Hi and thanks for the solution, it worked but not completely: I can't change the temperature on the "Auto" and "Dry" modes. Using the remote, you can use the temperature buttons + and - to offset the desired baseline. (for Dry it is 21C and For Auto it is 23C). This is quite an inconvenience and it seems to me that it could possibly be done by altering (or adding) some detail in the mqtt config but I am not experienced enough to know which one. Could someone make a suggestion please? Also, does anyone else have this issue?

chrisrosenkreuz23 avatar Jun 06 '22 07:06 chrisrosenkreuz23

@chrisrosenkreuz23 you cannot change temperature in Auto and Dry modes, same as the official App. If you want this functionality, you can map the remote with SmartIR or similar

mobot95 avatar Jun 06 '22 08:06 mobot95

Hi and thanks for the solution, it worked but not completely: I can't change the temperature on the "Auto" and "Dry" modes. Using the remote, you can use the temperature buttons + and - to offset the desired baseline. (for Dry it is 21C and For Auto it is 23C). This is quite an inconvenience and it seems to me that it could possibly be done by altering (or adding) some detail in the mqtt config but I am not experienced enough to know which one. Could someone make a suggestion please? Also, does anyone else have this issue?

Mee too. I am not practical, at all, so I hope that someone can find the solution to this problem, as well as to that of the horizontal oscillation of the fins.

kisjeth avatar Jun 06 '22 08:06 kisjeth

@chrisrosenkreuz23 you cannot change temperature in Auto and Dry modes, same as the official App. If you want this functionality, you can map the remote with SmartIR or similar

Thanks for the reply @mobot95. I actually spent all morning doing that in every which way, and it can't be done because the way that the Hisense remote works is not like classic IR remotes, it doesn't just send the command for the specific button but sends the entire scene instead (e.g.: if you press "I FEEL" mode so as to have the temperature sensor in the remote turn on instead of the one from the AC unit, it doesn't just send I FEEL ON, it instead sends the whole mode, as well as fan speed, etc. so if you then wanna press I FEEL ON using the Heat mode it switches to the mode you were on when you saved the button) . So the SmartIR can only send the scene in the same way BUT to do that it switches On/Off (this also ties in with the initial issue of the payload power on somehow). Im no expert so I don't know why it does that but I can only tell you that when the SmartIR sends it the scene, it powers on to the default state (23 for Auto, and 21 for Dry) instead of the one you saved.

Mee too. I am not practical, at all, so I hope that someone can find the solution to this problem, as well as to that of the horizontal oscillation of the fins.

@kisjeth does that functionality appear inside your app for your specific model? I know I was upset when mine didnt show up in the app even though it was advertised.

chrisrosenkreuz23 avatar Jun 06 '22 08:06 chrisrosenkreuz23

Ok so I managed to find the solution (or workaround, rather). The SmartIR app (Broadlink in my case) does work as I described above - and it works nearly the same in HA as well, only it doesn't need to turn it on/off so the default values are avoided this way. The solution is then to just record the SmartIR command for each and every mode you need and call the script when you need it. It does require a bit of work (each successive temp up and down are fixed values this way and not just '+' and '-' so you'll need a script for each degree, on each mode) but at least it's functional. Thanks everyone.

chrisrosenkreuz23 avatar Jun 06 '22 09:06 chrisrosenkreuz23

Nothing, I cannot manage it from dashboard. Entity exists but is empty. No data displayed. Mqtt Explorer shows hisense_ac but mqtt integration in HA is empty too. Thanks In advance

giros79 avatar Jun 11 '22 07:06 giros79

@kisjeth does that functionality appear inside your app for your specific model? I know I was upset when mine didnt show up in the app even though it was advertised.

@chrisrosenkreuz23 no, I cannot control the horizontal oscillation from the application, although it can be activated with the remote control. This is very strange.

kisjeth avatar Jun 11 '22 07:06 kisjeth

@kisjeth can you literally see the blades moving in the unit horizontally from left to right? cos mine has that option too, on the remote, but can't actually move the blades by itself.

chrisrosenkreuz23 avatar Jun 18 '22 17:06 chrisrosenkreuz23

@giros79 use the above copypasta in your yaml, just make sure to get the serial from the mqtt explorer and replace the one above wherever it applies. It's the same repeating string of letters and numbers in the topics, you can't miss it. Then the entity will be created

chrisrosenkreuz23 avatar Jun 18 '22 18:06 chrisrosenkreuz23

@kisjeth can you literally see the blades moving in the unit horizontally from left to right? cos mine has that option too, on the remote, but can't actually move the blades by itself.

Yes I can. When i press on the remote the "horizontal swing" blades start to move left-right

kisjeth avatar Jun 18 '22 18:06 kisjeth

Many days it works, but new ha deprecated "send_if_off" param and need to delete it. Anyone has new solution for problem? :(

pbabilas avatar Sep 09 '22 09:09 pbabilas

I've deleted from configration mode_state_topic: hisense_ac/ca2c4f5ece77/t_work_mode/status, to disable optimistic mode: https://www.home-assistant.io/integrations/climate.mqtt/#optimistic-mode but it does not check state of the AC. Not ideal but working.

pbabilas avatar Sep 25 '22 10:09 pbabilas