PiotrMachowski / Home-Assistant-custom-components-Tauron-AMIplus

This sensor uses unofficial API to get energy usage and generation data from https://elicznik.tauron-dystrybucja.pl.
MIT License
131 stars 34 forks source link

Wyjątek w Home Assistant 2023.3.5 #117

Closed barpod closed 1 year ago

barpod commented 1 year ago

Dodałem integrację używając HACS. Skonfigurowałem używając UI. Widzę w historii encji, że przynajmniej raz się udało dobić do eLicznik, ale w tej chwili wszystkie encje są niedostępne, a w logach mam wyjątek:

Logger: aiohttp.server
Source: custom_components/tauron_amiplus/connector.py:254
Integration: Tauron AMIplus (documentation, issues)
First occurred: 19:41:49 (2 occurrences)
Last logged: 19:43:12
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 67, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, 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/ban.py", line 80, in ban_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/view.py", line 146, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 246, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
  File "/config/custom_components/tauron_amiplus/diagnostics.py", line 14, in async_get_config_entry_diagnostics
    return await hass.async_add_executor_job(get_config_entry_diagnostics, entry)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tauron_amiplus/diagnostics.py", line 30, in get_config_entry_diagnostics
    raw_data = connector.get_raw_data()
  File "/config/custom_components/tauron_amiplus/connector.py", line 103, in get_raw_data
    data.consumption = self.get_data_set(generation=False)
  File "/config/custom_components/tauron_amiplus/connector.py", line 125, in get_data_set
    dataset.json_configurable_hourly = self.get_raw_values_daily_for_range(start, end, generation)
  File "/config/custom_components/tauron_amiplus/connector.py", line 219, in get_raw_values_daily_for_range
    "from": TauronAmiplusConnector.format_date(day_from),
  File "/config/custom_components/tauron_amiplus/connector.py", line 254, in format_date
    return date.strftime(CONST_DATE_FORMAT)
AttributeError: 'NoneType' object has no attribute 'strftime'
PiotrMachowski commented 1 year ago

Jakie opcje masz włączone w konfiguracji? Czy jesteś w stanie pobrać dane diagnostyczne?

barpod commented 1 year ago

obraz

Tak wygląda konfiguracja. Ten wyjątek poleciał tylko raz, po kolejnym restarcie HA wszystko wygląda ok. Niestety nie mogę pobrać danych diagnostycznych - po próbie pobrania mam pusty plik.

tomkolp commented 1 year ago

Mam ten sam problem, encje niedostępne najnowsza wersja HAOS dwie różne instalację, ale te samo konto taurona. Przycisk pobierz diagnostykę nie działa.

PiotrMachowski commented 1 year ago

Tauron teraz coś robi w eLiczniku, możliwe, że przez to nie działa. Na stronie wszystko jest ok?

tomkolp commented 1 year ago

Tauron teraz coś robi w eLiczniku, możliwe, że przez to nie działa

Dostałem info na maila że będą robić coś przez 18 dni , czekam cierpliwie

GithubHomeA commented 1 year ago

Informacja dotyczy serwisu MójTauron; prace mają się dopiero rozpocząć 31 marca. Appka na iOS działa poprawnie, ostatni odczyt eLicznika w HA - yesterday; pozdro

tomkolp commented 1 year ago

U mnie już dzisiaj działa wczytały się zaległe dane do zakładki energy (4dni).