vincentwolsink / home_assistant_micronova_agua_iot

Home Assistant integration controlling heating devices connected via the Agua IOT platform of Micronova
Apache License 2.0
33 stars 15 forks source link

Download diagnostics failed #136

Closed 38decibel closed 8 months ago

38decibel commented 9 months ago

Hi,

I want to download the diagnostics files but it fails. This is the CORE log :

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 22:39:14 (1 occurrences)
Last logged: 22:39:14

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, 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 91, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 249, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/aguaiot/diagnostics.py", line 29, in async_get_config_entry_diagnostics
    devices[device.name][reg] = device.get_register(reg)
                                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/aguaiot/aguaiot.py", line 462, in get_register
    register["value"] = simple_eval(formula)
                        ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/simpleeval.py", line 748, in simple_eval
    return s.eval(expr)
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/simpleeval.py", line 428, in eval
    return self._eval(previously_parsed or self.parse(expr))
                                           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/simpleeval.py", line 410, in parse
    parsed = ast.parse(expr.strip())
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 52, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 1
    (1+1)Mod2
         ^^^^
SyntaxError: invalid syntax

Raspberry pi with HAOS Core 2024.2.4 Supervisor 2024.02.0 Operating System 12.0

vincentwolsink commented 8 months ago

Hi @38decibel. Can you please enable debug logging for the integration, reload it and then send me the debug log output?

38decibel commented 8 months ago

Hi,

This is some logs below

38decibel commented 8 months ago

error_log-5.txt error_log-4.txt

vincentwolsink commented 8 months ago

@38decibel please try v0.4.2-beta1

38decibel commented 8 months ago

Quick, efficient, perfect ! Thanks