osk2 / panasonic_smart_app

🔛 Panasonic Smart App integration for Home Assistant.
https://osk2.github.io/panasonic_smart_app/
MIT License
93 stars 33 forks source link

HA 無法取得目前裝置狀態 #122

Open Darric-Lu opened 1 month ago

Darric-Lu commented 1 month ago

冷氣設備可以透過 panasonic smart app (帳號密碼) 實裝進 HA 但是 HA 無法持續取得裝置狀態 不過還是可以控制 開機或是關機

以下 error logs

自行安裝整合產生錯誤。

記錄器: custom_components.panasonic_smart_app
來源: helpers/debounce.py:137
整合: Panasonic Smart App (相關文件, 問題)
首次發生: 2024年10月13日 下午7:22:28 (2 事件)
最後紀錄: 2024年10月13日 下午7:22:51

Unexpected exception from <bound method DataUpdateCoordinator.async_refresh of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7f92732360>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 137, in _handle_timer_finish
    await task
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/panasonic_smart_app/sensor.py", line 372, in state
    _current_status = list(
                      ^^^^^
IndexError: list index out of range
自行安裝整合產生錯誤。

記錄器: custom_components.panasonic_smart_app.smartApp
來源: custom_components/panasonic_smart_app/smartApp/__init__.py:308
整合: Panasonic Smart App (相關文件, 問題)
首次發生: 上午3:07:57 (1 事件)
最後紀錄: 上午3:07:57

Failed to access #332 API. Returned 417: {"State":"fail","StateMsg":"CSHECPToken2:已超過連接逾時的設定。在取得集區連接之前超過逾時等待的時間,可能的原因為所有的共用連接已在使用中,並已達共用集區大小的最大值。"}
自行安裝整合產生錯誤。

記錄器: homeassistant
來源: custom_components/panasonic_smart_app/smartApp/__init__.py:317
整合: Panasonic Smart App (相關文件, 問題)
首次發生: 上午8:15:59 (1 事件)
最後紀錄: 上午8:15:59

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/panasonic_smart_app/__init__.py", line 92, in async_reload_entry
    await async_setup_entry(hass, entry)
  File "/config/custom_components/panasonic_smart_app/__init__.py", line 40, in async_setup_entry
    await client.login()
  File "/config/custom_components/panasonic_smart_app/smartApp/__init__.py", line 81, in login
    response = await self.request(
               ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/panasonic_smart_app/smartApp/__init__.py", line 60, in wrapper_call
    results = await asyncio.gather(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/panasonic_smart_app/smartApp/__init__.py", line 317, in request
    raise PanasonicExceedRateLimit
custom_components.panasonic_smart_app.smartApp.exceptions.PanasonicExceedRateLimit: Reached API rate limit. Please try again later.
自行安裝整合產生錯誤。

記錄器: homeassistant
來源: custom_components/panasonic_smart_app/sensor.py:372
整合: Panasonic Smart App (相關文件, 問題)
首次發生: 2024年10月13日 下午5:12:29 (992 事件)
最後紀錄: 下午9:35:49

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/panasonic_smart_app/sensor.py", line 372, in state
    _current_status = list(
                      ^^^^^
IndexError: list index out of range
osk2 commented 1 month ago

請再附上裝置型號及 debug log

Darric-Lu commented 1 month ago

型號 : https://github.com/osk2/panasonic_smart_app/discussions/42#discussioncomment-10937241

Panasonic Smart App v2.8.4

Home Assistant


更新: log 檔含有個人資訊代為隱藏 home-assistant_panasonic_smart_app_2024-10-20T06-17-38.640Z.log