GuyKh / iec-custom-component

HomeAssistant Custom Component for IEC
MIT License
130 stars 5 forks source link

V0.0.32 Failed setup, will retry: list index out of range #155

Closed ElmanIzia closed 2 months ago

ElmanIzia commented 2 months ago

System Health details

System Information

version core-2024.8.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.44-haos
arch x86_64
timezone Asia/Jerusalem
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4927 Installed Version | 1.34.0 Stage | running Available Repositories | 1386 Downloaded Repositories | 11
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.0 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 109.3 GB disk_used | 15.1 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Studio Code Server (5.15.0), ESPHome (2024.7.3), Terminal & SSH (9.14.0), Cloudflared (5.1.17), Samba Backup (5.2.0), Piper (1.5.2), Whisper (2.1.2), openWakeWord (1.10.0), Mosquitto broker (6.4.1)
Dashboards dashboards | 4 -- | -- resources | 3 views | 3 mode | storage
Recorder oldest_recorder_run | August 16, 2024 at 11:55 AM -- | -- current_recorder_run | August 20, 2024 at 8:30 PM estimated_db_size | 89.04 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

Can not complete setup. After entering password received by mail, setup is stuck. image It is problematic to share full debug log because it contains personal info. Sharing startup log, hope it helps. If not, I can provide a full debug log via private email.

Reproduction steps

  1. Install IEC integration via HACS
  2. In devices add Integration
  3. Enter ID
  4. Enter password ...

Debug logs

2024-08-20 21:06:57.665 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration network_scanner which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.666 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo_control which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.667 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.667 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.668 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration samsungtv_smart which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.668 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration iec which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:06:57.669 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-20 21:07:01.456 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/themes", "/config/themes", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1182: self.hass.http.register_static_path(f"{URL_BASE}/themes", self.hass.config.path("themes")), please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:01.463 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/frontend", "/config/custom_components/hacs/hacs_frontend", False)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 54: hass.http.register_static_path(f"{URL_BASE}/frontend", locate_dir(), cache_headers=False), please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:01.468 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/iconset.js", "/config/custom_components/hacs/iconset.js", True)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 57: hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:01.471 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:01.474 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles", "/config/www/community", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1162: self.hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:03.487 ERROR (SyncWorker_1) [zhaquirks] Unexpected exception importing custom quirk 'prev_ts1201'
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/zhaquirks/__init__.py", line 459, in setup
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_zha_quirks/prev_ts1201.py", line 372, in <module>
    class ZosungIRBlaster(CustomDevice):
  File "/config/custom_zha_quirks/prev_ts1201.py", line 377, in ZosungIRBlaster
    last_learned_ir_code = t.CharacterString()
                           ^^^^^^^^^^^^^^^^^^^
TypeError: CharacterString.__new__() missing 1 required positional argument: 'value'
2024-08-20 21:07:03.492 WARNING (SyncWorker_1) [zhaquirks] Loaded custom quirks. Please contribute them to https://github.com/zigpy/zha-device-handlers
2024-08-20 21:07:05.771 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp32-mic-speaker @ 192.168.0.41: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.0.41', port=6053))]: [Errno 113] Connect call failed ('192.168.0.41', 6053) (SocketAPIError)
2024-08-20 21:07:12.023 WARNING (MainThread) [zigpy.application] Zigbee channel 25 utilization is 78.25%!
2024-08-20 21:07:12.023 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.
2024-08-20 21:07:19.487 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 423, in _async_update_data
    total_kva_price, estimated_kwh_consumption = await self._estimate_bill(contract_id, device.device_number,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 652, in _estimate_bill
    connection_size = await self._get_connection_size(account_id)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 186, in _get_connection_size
    self._connection_size = await self.api.get_masa_connection_size_from_masa(account_id)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/iec_client.py", line 671, in get_masa_connection_size_from_masa
    connection_size = equipment.items[0].connections[0].power_connection_size
                      ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-08-20 21:07:19.528 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:20.043 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:20.282 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:20.453 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:20.668 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:20.909 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.382 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.628 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.648 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.721 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.736 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.824 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.845 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.881 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:22.931 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.076 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.135 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.233 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.254 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.322 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.375 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:23.410 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:24.026 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:24.343 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-08-20 21:07:45.715 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 423, in _async_update_data
    total_kva_price, estimated_kwh_consumption = await self._estimate_bill(contract_id, device.device_number,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 652, in _estimate_bill
    connection_size = await self._get_connection_size(account_id)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 186, in _get_connection_size
    self._connection_size = await self.api.get_masa_connection_size_from_masa(account_id)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/iec_client.py", line 671, in get_masa_connection_size_from_masa
    connection_size = equipment.items[0].connections[0].power_connection_size
                      ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-08-20 21:08:02.293 WARNING (MainThread) [homeassistant.components.gree.coordinator] Device gree-502cc6bdb801 is unresponsive for 0:01:02.405119 seconds
2024-08-20 21:08:10.597 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 423, in _async_update_data
    total_kva_price, estimated_kwh_consumption = await self._estimate_bill(contract_id, device.device_number,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 652, in _estimate_bill
    connection_size = await self._get_connection_size(account_id)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 186, in _get_connection_size
    self._connection_size = await self.api.get_masa_connection_size_from_masa(account_id)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/iec_client.py", line 671, in get_masa_connection_size_from_masa
    connection_size = equipment.items[0].connections[0].power_connection_size
                      ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-08-20 21:08:48.391 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 423, in _async_update_data
    total_kva_price, estimated_kwh_consumption = await self._estimate_bill(contract_id, device.device_number,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 652, in _estimate_bill
    connection_size = await self._get_connection_size(account_id)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 186, in _get_connection_size
    self._connection_size = await self.api.get_masa_connection_size_from_masa(account_id)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/iec_client.py", line 671, in get_masa_connection_size_from_masa
    connection_size = equipment.items[0].connections[0].power_connection_size
                      ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Diagnostics dump

No response

GuyKh commented 2 months ago

Thanks. Will look at it when I'll get back from holiday

GuyKh commented 2 months ago

I'd appreciate DEBUG logs

Gugulator commented 2 months ago

looks like same problem described in issue 154

GuyKh commented 2 months ago

@ElmanIzia - please verify it's fixed with latest 0.0.33-beta. Closing for now