core: Adax integration - devices becomes unavailable

The problem

I have 4 units of Adax Neo series with bluetooth and WiFi. Using the Adax integration without cloud-connection. I have had the devices and the integration installed since the beginning of february 2022. Recently (last couple of months) the devices has become unavailable at random times. I have to reload each of the devices in order to read status or change temperature + get them back working in the UI.

I have found no pattern as to what’s causing the devices to become unavailable or when it happens (updates, restarts, etc). One week can go without any device going AWOL, other weeks it might happen 1-3 times. The last 7 days, the devices has become unavailable 5 times. It happens to all of the devices each time.

I have attached a screendump of the historygraph showing the gaps in availability. Also an error found in the logs that relates to the Adax integration.

History - Gap in timeline

What version of Home Assistant Core has the issue?

Home Assistant 2022.11.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Adax

Link to integration documentation on our website

https://www.home-assistant.io/integrations/adax

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Source: components/adax/climate.py:155
Integration: Klima (documentation, issues)
First occurred: 05:00:25 (2 occurrences)
Last logged: 05:00:25

adax: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update
    await task
  File "/usr/src/homeassistant/homeassistant/components/adax/climate.py", line 155, in async_update
    self._attr_target_temperature = data["target_temperature"]
TypeError: tuple indices must be integers or slices, not str



Also I found this...
2022-12-04 05:00:25.972 ERROR (MainThread) [homeassistant.components.climate] adax: Error on device update!
File "/usr/src/homeassistant/homeassistant/components/adax/climate.py", line 155, in async_update
2022-12-04 05:00:25.998 ERROR (MainThread) [homeassistant.components.climate] adax: Error on device update!
File "/usr/src/homeassistant/homeassistant/components/adax/climate.py", line 155, in async_update

Additional information

Not sure if this is related to the issue, but reading the log, I can see that the errors is related to some sort of update. Not sure if this is updating/reporting of status or if it’s updates as in “looking for firmware update”. Going into the system settings of the device, one option that is checked is the second option relating to whether or not Home Assistant should be looking for updates for the device. As I just found this, I have not yet tried to disable this option, but if anyone believes this is related, I would like to know. System settings

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 17

Most upvoted comments

Still having issues with it, but I’m using the “Reload Config Entry”-service to automatically reload the Adax-integrations if any of them is unavailable, that makes it a lot easier to deal with the problem anyway.

@dustrat - can you share your automation?

Sure, it’s made up of two parts, a script for reloading and an automation after startup checking if any of the devices are unavailable:

The script:

alias: "Ladda om: Element"
sequence:
  - service: homeassistant.reload_config_entry
    target:
      device_id:
        - 1e4d1326cbeae49589f0bc07bf0c426e
        - 6f6a904157f11a55fc77357688c15d86
        - 70ef3cf5fc345fff18f3a48c15e5c88f
    data: {}
mode: single
icon: mdi:radiator

The automation:

alias: "HA Startat: Ladda om element"
description: Laddar om ADAX-integrationen för varje element
trigger:
  - platform: homeassistant
    event: start
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: climate.kontor
        state: unavailable
      - condition: state
        entity_id: climate.tvattstuga
        state: unavailable
      - condition: state
        entity_id: climate.tv_rum
        state: unavailable
action:
  - service: script.ladda_om_element
    data: {}
mode: single