ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.04k stars 149 forks source link

Installation fails (HA 2021.9.7 @ Synology DSM 6.2.4) #334

Closed IngwiePhoenix closed 1 year ago

IngwiePhoenix commented 2 years ago

Describe the bug I followed the instructions and copied the extension into it's proper folder. After the reboot, I saw it and hit the button to install it. However, watching the logs, that failed.

Expected behavior An installed integration.

Screenshots Not a screenshot, but this:

2022-06-01 02:38:09 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware
    return await handler(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 128, in post
    return await super().post(request)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 63, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 72, in post
    result = await self._flow_mgr.async_init(
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 153, in async_init
    flow, result = await task
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 171, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/config_entries.py", line 710, in async_create_flow
    integration.get_platform("config_flow")
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/loader.py", line 524, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/loader.py", line 529, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/var/packages/python38/target/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/__init__.py", line 10, in <module>
    from .wideq import (
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/wideq/__init__.py", line 7, in <module>
    from .factory import get_lge_device
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/wideq/factory.py", line 2, in <module>
    from .ac import AirConditionerDevice
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/wideq/ac.py", line 16, in <module>
    from .device import Device, DeviceStatus
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/wideq/device.py", line 61, in <module>
    class Monitor(object):
  File "/volume1/@appstore/homeassistant/var/config/custom_components/smartthinq_sensors/wideq/device.py", line 285, in Monitor
    def decode_json(data: bytes) -> dict[str, Any]:
TypeError: 'type' object is not subscriptable

Environment details:

Output of HA logs Paste the relavant output of the HA log here.

See above.

Additional context Potentially interesting:

admin@DiskStation:/volume1/@appstore/homeassistant$ ./env/bin/python --version
Python 3.8.12
admin@DiskStation:/volume1/@appstore/homeassistant$ ./env/bin/python ./bin/wheel  version
wheel 0.37.0

I suck at working with Python so all I can do is provide the error logs, really. Sorry!

Kind regards, Ingwie

ollo69 commented 2 years ago

Python 3.8 is deprecated from HA 2022.1. You must upgrade to Python 3.9. And last version of this integration require at least HA 2022.5. If you cannot upgrade Python and HA, you can try using older version of this integration, but for sure I will not provide any support in case of issues.

ollo69 commented 1 year ago

Closing this issue because no feedback received.