Aohzan / ipx800v5

IPX800 V5 integration for Home-Assistant
Apache License 2.0
10 stars 0 forks source link

Erreur ajout de l'IPX800 v5 dans Home Assistant #19

Open RodMoran opened 2 days ago

RodMoran commented 2 days ago

Bonjour,

j'ai une erreur lors de l'installation avec erreur inconnu

2024-09-26_13h40_43

est-ce que quelqu'un a une idée ?

Bonne journée.

Aohzan commented 2 days ago

Il faut les logs

RodMoran commented 2 days ago

ok, voila ce que j'ai trouvé, dit moi si il faut plus. Merci ;)

2024-09-26_14h11_46

Enregistreur: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433
S'est produit pour la première fois: 14:10:02 (2 occurrences)
Dernier enregistrement: 14:10:05

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 366, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v5/config_flow.py", line 108, in async_step_user
    return await self.async_step_params()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v5/config_flow.py", line 117, in async_step_params
    await _build_param_schema(session, self.base_config, {}, "user")
  File "/config/custom_components/ipx800v5/config_flow.py", line 222, in _build_param_schema
    await ipx.init_config()
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 169, in init_config
    await self.update_objects_config()
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 230, in update_objects_config
    for obj in await self._request_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 144, in _request_api
    sleep(self._request_retries_delay)
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 192, in protected_loop_func
    raise_for_blocking_call(
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 158, in raise_for_blocking_call
    raise RuntimeError(
RuntimeError: Caught blocking call to sleep with args (0.5,) inside the event loop by custom integration 'ipx800v5' at custom_components/ipx800v5/config_flow.py, line 222: await ipx.init_config(). (offender: /usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py, line 144: sleep(self._request_retries_delay)), please create a bug report at https://github.com/Aohzan/ipx800v5/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep

Enregistreur: homeassistant.util.loop
Source: util/loop.py:136
S'est produit pour la première fois: 14:10:02 (1 occurrences)
Dernier enregistrement: 14:10:02

Detected blocking call to sleep with args (0.5,) inside the event loop by custom integration 'ipx800v5' at custom_components/ipx800v5/config_flow.py, line 222: await ipx.init_config() (offender: /usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py, line 144: sleep(self._request_retries_delay)), please create a bug report at https://github.com/Aohzan/ipx800v5/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 366, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/ipx800v5/config_flow.py", line 108, in async_step_user return await self.async_step_params() File "/config/custom_components/ipx800v5/config_flow.py", line 117, in async_step_params await _build_param_schema(session, self.base_config, {}, "user") File "/config/custom_components/ipx800v5/config_flow.py", line 222, in _build_param_schema await ipx.init_config()
Aohzan commented 2 days ago

oui merci, je regarde ça dès que possible

hcouplet commented 2 days ago

j'ai le même soucis depuis qq semaines. image

Voici ma config :

ipx800v5:
  - name: IPX800 V5
    host: 192.168.11.4
    api_key: api_key_hidden
    push_password: push-pass-hidden
    devices_auto:
      - ipx
      - x8r
    devices:
      - name: PH Run
        ext_type: ipx
        io_number: 1
        component: switch
      - name: Vanne No Ozone
        ext_type: ipx
        io_number: 2
        component: switch
      - name: Pompe Air Ozone
        ext_type: ipx
        io_number: 3
        component: switch
      - name: Chlore Run
        ext_type: ipx
        io_number: 4
        component: switch
      - name: Ozone Generator
        ext_type: ipx
        io_number: 5
        component: switch
      - name:  UV
        ext_type: ipx
        io_number: 6
        component: switch
      - name: Pompe Source
        ext_type: ipx
        io_number: 7
        component: switch
      - name: Vanne Ozone Injection
        ext_type: ipx
        io_number: 8
        component: switch
      - name: Pompe Circulation
        ext_type: x8r
        ext_number: 0
        io_number: 1
        component: switch
      - name: Lumière Cabane
        ext_type: x8r
        ext_number: 0
        io_number: 2
        component: switch
      - name: Lumière Terasse
        ext_type: x8r
        ext_number: 0
        io_number: 3
        component: switch
      - name: Lumière Piscine
        ext_type: x8r
        ext_number: 0
        io_number: 4
        component: switch
      - name: Electrolyse Chlore
        ext_type: x8r
        ext_number: 0
        io_number: 5
        component: switch
      - component: binary_sensor
        name: Circualtion
        ext_type: ipx
        io_number: 8
      - name: PH
        component: sensor
        ext_type: ipx
        type: ana
        id: 262197
      - name: ORP
        component: sensor
        ext_type: ipx
        type: ana
        id: 262198
      - name: Temperature
        component: sensor
        ext_type: ipx
        type: ana
        id: 327691

Voici mon log :

2024-09-27 07:19:32.213 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep with args (0.5,) inside the event loop by custom integration 'ipx800v5' at custom_components/ipx800v5/__init__.py, line 141: await ipx.init_config() (offender: /usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py, line 144: sleep(self._request_retries_delay)), please create a bug report at https://github.com/Aohzan/ipx800v5/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
    await self.async_setup(hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/ipx800v5/__init__.py", line 141, in async_setup_entry
    await ipx.init_config()

2024-09-27 07:19:32.213 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry IPX800 V5 (from yaml) for ipx800v5
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v5/__init__.py", line 141, in async_setup_entry
    await ipx.init_config()
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 169, in init_config
    await self.update_objects_config()
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 230, in update_objects_config
    for obj in await self._request_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py", line 144, in _request_api
    sleep(self._request_retries_delay)
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 192, in protected_loop_func
    raise_for_blocking_call(
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 158, in raise_for_blocking_call
    raise RuntimeError(
RuntimeError: Caught blocking call to sleep with args (0.5,) inside the event loop by custom integration 'ipx800v5' at custom_components/ipx800v5/__init__.py, line 141: await ipx.init_config(). (offender: /usr/local/lib/python3.12/site-packages/pypx800v5/ipx800.py, line 144: sleep(self._request_retries_delay)), please create a bug report at https://github.com/Aohzan/ipx800v5/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep
Aohzan commented 1 day ago

J'ai trouvé quand ça se déclenche, quand l'IPX800 V5 ne répond pas correctement à Home-Assistant, c'est pour ça que je n'avais pas eu le soucis

fixé dans https://github.com/Aohzan/ipx800v5/releases/tag/1.8.1 normalement, vous pouvez confirmer ?

hcouplet commented 1 day ago

Thanks. The 1.8.1 update resolved the issue on my side: image

RodMoran commented 1 day ago

Bonjour, merci pour votre retour. J'ai toujours la même erreur par contre je n'ai pas les même messages dans les journaux

2024-09-28_00h13_29

Cette erreur provient d'une intégration personnalisée

Enregistreur: pypx800v5.ipx800 Source: custom_components/ipx800v5/config_flow.py:222 intégration: GCE IPX800 V5 (documentation, problèmes) S'est produit pour la première fois: 00:11:07 (1 occurrences) Dernier enregistrement: 00:11:07

Error to get access_control object

Enregistreur: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433 S'est produit pour la première fois: 00:11:07 (1 occurrences) Dernier enregistrement: 00:11:07

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 366, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ipx800v5/config_flow.py", line 108, in async_step_user return await self.async_step_params() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ipx800v5/config_flow.py", line 117, in async_step_params await _build_param_schema(session, self.base_config, {}, "user") File "/config/custom_components/ipx800v5/config_flow.py", line 247, in _build_param_schema _LOGGER.debug("Found %s %s", len(extensions), ext_type) ^^^^^^^^^^^^^^^ TypeError: object of type 'itertools._grouper' has no len()

Merci d'avance :)