jwillemsen / daikin_onecta

Home Assistant Integration for devices supported by the Daikin Onecta App
https://github.com/jwillemsen/daikin_onecta
GNU General Public License v3.0
303 stars 9 forks source link

[Issue]: Entities suddenly disappeared, getting errors in log #318

Closed MJLHThomassen closed 1 month ago

MJLHThomassen commented 1 month ago

Version: 4.1.16

I installed the plugin a few days ago. Set everything up with the Daikin developer account, and everything was working. Suddenly, somewhere today, everything stopped working and HA reported almost all entities where not reported by the plugin anymore. I removed the credentials, the plugin, reinstalled everything again, added new credentials, but the problem remains. The only entities the plugin now reports are:

Altherma ClimateControl Is Holiday Mode Active Altherma ClimateControl Is In Emergency State Altherma ClimateControl Is In Error State Altherma ClimateControl Is In Installer State Altherma DomesticHotWaterTank Is Holiday Mode Active Altherma DomesticHotWaterTank Is In Error State Altherma DomesticHotWaterTank Is In Installer State Altherma Gateway Is Firmware Update Supported

It used to report temperatures, i was able to set my heating temperature etc.

I am getting the following errors:

Logger: homeassistant.components.water_heater
Source: helpers/entity_platform.py:361
integration: Water Heater (documentation, issues)
First occurred: 17:10:47 (6 occurrences)
Last logged: 19:42:27

Error while setting up daikin_onecta platform for water_heater
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/daikin_onecta/water_heater.py", line 34, in async_setup_entry
    async_add_entities([DaikinWaterTank(device, coordinator, management_point_type, management_point["embeddedId"])])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/water_heater.py", line 55, in __init__
    self.update_state()
  File "/config/custom_components/daikin_onecta/water_heater.py", line 61, in update_state
    self._attr_supported_features = self.get_supported_features()
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/water_heater.py", line 103, in get_supported_features
    dht = self.domestic_hotwater_temperature
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/water_heater.py", line 92, in domestic_hotwater_temperature
    temp_control = self.hotwatertank_data["temperatureControl"]["value"]
                   ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'temperatureControl'
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:361
integration: Sensor (documentation, issues)
First occurred: 17:10:47 (6 occurrences)
Last logged: 19:42:27

Error while setting up daikin_onecta platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/daikin_onecta/sensor.py", line 111, in async_setup_entry
    operation_modes = management_point["operationMode"]["values"]
                      ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'operationMode'
Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:361
integration: Climate (documentation, issues)
First occurred: 17:10:47 (6 occurrences)
Last logged: 19:42:27

Error while setting up daikin_onecta platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/daikin_onecta/climate.py", line 100, in async_setup_entry
    [DaikinClimate(device, mode, coordinator, embedded_id)],
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/climate.py", line 125, in __init__
    self.update_state()
  File "/config/custom_components/daikin_onecta/climate.py", line 138, in update_state
    self._attr_hvac_mode = self.get_hvac_mode()
                           ^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/climate.py", line 348, in get_hvac_mode
    if cc["onOffMode"]["value"] != "off":
       ~~^^^^^^^^^^^^^
KeyError: 'onOffMode'

My diagnostics data is attached daikin_onecta-01JA3FJW92ZAXQY11V0B581NY9-Altherma-5e9369170b0e0c28104508645ee2ea2e.json

pkrix commented 1 month ago

same here..

jwillemsen commented 1 month ago

A lot of data is not there in your json, what does the onecta app show?

pkrix commented 1 month ago

really interessting.. my app shows INACTIVE.. but i didn't change anything.. maybe daikin is changing something?

jwillemsen commented 1 month ago

Can you add a screenshot of the onecta app?

MJLHThomassen commented 1 month ago

The onecta app just shows what it has always shows, i have a home screen with "Climate control" and "Hot water tank". It shows the currently set temperatures of both, the current actual temperatures of both, the modes (auto/cool/heat), current outside temperature. Insights tab shows power usage (which i had in HA aswell). Everything is there.

There is 1 thing which -might- be interfering, but ive had this for as long as ive had the unit, that it mentions "wifi signal is weak". But its had that since the beginning, and the integration worked before.

Mabye i can perform a manual api call to see if there is an issue there?

jwillemsen commented 1 month ago

Can you control the device through onecta? I will need to add some more code to skip the data which is not there in your json

MJLHThomassen commented 1 month ago

Here is a screenshot. The warnings are about the wifi signal mentioned above. Screenshot_20241014_093921_ONECTA - Daikin

jwillemsen commented 1 month ago

Can you download and add the integration diagnostics again, maybe now more data is there

pkrix commented 1 month ago

I solved my problem. I restarted the wireless gateway manually and now everything seems to be fine.. really strange..

jwillemsen commented 1 month ago

Daikin performed some maintenance last Friday on their cloud setup, maybe your device didn't recover correctly from some timeouts @pkrix, good to hear that it works now again.

pkrix commented 1 month ago

but i got new entity id's. sensor.climatecontrol_outdoor_temperature changed to sensor.altherma_climatecontrol_outdoor_temperature

MJLHThomassen commented 1 month ago

I solved my problem. I restarted the wireless gateway manually and now everything seems to be fine.. really strange..

This solved it for me aswell! Thanks for the help!

jwillemsen commented 1 month ago

but i got new entity id's. sensor.climatecontrol_outdoor_temperature changed to sensor.altherma_climatecontrol_outdoor_temperature

No idea why there was first no altherma in the same, did you rename the devices in the onecta app?

pkrix commented 1 month ago

nope, i didn't. but now all automations and dashboards are changed. no more errors. I hope that this will not change again ^^

jwillemsen commented 1 month ago

I have extended the code to handle the json with this minimal data, not sure why Daikin didn't expose all data in your use case, but the latest release can now handle it, see https://github.com/jwillemsen/daikin_onecta/releases/tag/v4.1.17

jwillemsen commented 1 month ago

Daikin reports this now as problem on their status page, it is something at their side which causes the missing data, which caused my code to give errors

Investigating - We have recently been informed about issues with the Onecta app. For example, some users reported the “Domestic Hot Water” screen being greyed out. Other customers reported the climate control to be inactive. We are still investigating this issue and will post an update soon.

MJLHThomassen commented 1 month ago

Nice that we were quick to discover this thanks to your integration and get it to work again with a simple reset :). From the app itself i wouldnt have guessed my pump was offline.