hristo-atanasov / Tasmota-IRHVAC

Home Assistant platform for controlling IR Air Conditioners via Tasmota IRHVAC command and compatible hardware
187 stars 64 forks source link

Devices state "unavailable" #79

Closed avishayil closed 2 years ago

avishayil commented 2 years ago

Hi, Not sure when it stopped working, but currently I can't get any of my air conditioners to work with home assistant The devices work just fine with the remote:

21:03:28.402 MQT: living-room-air/tele/RESULT = {"IrReceived":{"Protocol":"AMCOR","Bits":64,"Data":"0x0141340000320012","Repeat":0,"IRHVAC":{"Vendor":"AMCOR","Model":-1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":26,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}
21:05:11.602 MQT: bedroom-air/tele/RESULT = {"IrReceived":{"Protocol":"GREE","Bits":64,"Data":"0x1908605050400040","Repeat":0,"IRHVAC":{"Vendor":"GREE","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Auto","SwingH":"Right","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

My HA configuration looks as follows:

---

- platform: tasmota_irhvac
  name: "Living Room Air"
  command_topic: "living-room-air/cmnd/irhvac"
  state_topic: "living-room-air/tele/RESULT"
  temperature_sensor: sensor.living_room_temperature_sensor
  vendor: "AMCOR"
  hvac_model: "-1"
  supported_modes:
    - "heat"
    - "cool"
    - "off"
  supported_fan_speeds:
    - "min"
    - "max"
    - "auto"
  supported_swing_list:
    - "off"

- platform: tasmota_irhvac
  name: "Bedroom Air"
  command_topic: "bedroom-air/cmnd/irhvac"
  state_topic: "bedroom-air/tele/RESULT"
  temperature_sensor: sensor.living_room_temperature_sensor
  vendor: "GREE"
  hvac_model: "1"
  supported_modes:
    - "heat"
    - "cool"
    - "dry"
    - "fan_only"
    - "off"
    - "auto"
  supported_fan_speeds:
    - "min"
    - "medium"
    - "max"
    - "auto"
  supported_swing_list:
    - "off"
    - "vertical"
    - "horizontal"
    - "both"
  default_quiet_mode: "on"
  default_econo_mode: "on"
  default_light_mode: "on"
  default_filter_mode: "on"

No errors are showing in logs or anywhere so I can't really figure what the problem is. I tried to search for similar issues or debug it myself using the python code, but didn't come to any conclusion.

Hope you can help

avishayil commented 2 years ago

More logs from mosquitto for the relevant devices:

mosquitto               | 1654459077: New connection from 10.0.0.13:64404 on port 1883.
mosquitto               | 1654459077: New client connected from 10.0.0.13:64404 as DVES_DF4AC9 (p2, c1, k30, u'homeassistant').
mosquitto               | 1654459092: Client DVES_E0781D closed its connection.
mosquitto               | 1654459099: New connection from 10.0.0.12:53650 on port 1883.
mosquitto               | 1654459099: New client connected from 10.0.0.12:53650 as DVES_E0781D (p2, c1, k30, u'homeassistant').

I'm not sure if I supposed to see the mqtt messages on the mosquito logs, however the messages do appear on the home assistant logs:

2022-06-05 23:21:11 DEBUG (MainThread) [custom_components.tasmota_irhvac.climate] {'IrReceived': {'Protocol': 'AMCOR', 'Bits': 64, 'Data': '0x0141320000320010', 'Repeat': 0, 'IRHVAC': {'Vendor': 'AMCOR', 'Model': -1, 'Mode': 'Cool', 'Power': 'On', 'Celsius': 'On', 'Temp': 25, 'FanSpeed': 'Auto', 'SwingV': 'Off', 'SwingH': 'Off', 'Quiet': 'Off', 'Turbo': 'Off', 'Econo': 'Off', 'Light': 'Off', 'Filter': 'Off', 'Clean': 'Off', 'Beep': 'Off', 'Sleep': -1}}}

So I guess that the action did reach home assistant but the state is not updating whatsoever

avishayil commented 2 years ago

I had to add the correct availability_topic since I changed the mqtt prefix. Now it's working fine :)