uvejota / homeassistant-edata

Home Assistant integration for spanish energy data providers (e.g., datadis)
GNU General Public License v3.0
264 stars 22 forks source link

FALTA de datos dedde el w de Marzo. #226

Closed JaVier-Lloret closed 8 months ago

JaVier-Lloret commented 8 months ago

Desde el 2 de marzo de 2024 no tengo datos diarios. ¿ Es mi instalación o es algo común para todos achacable a la plataforma? Gracias por vuestras respuestas.

dmi97 commented 8 months ago

A mi desde el 8 de marzo no me aparecen los consumos, en datadis y en e-distribución aparecen hasta el 16 de marzo. No he tocado nada y llevaba ya bastante tiempo funcionando bien, no se que habrá pasado.

divemasterjm commented 8 months ago

yo estoy igual, desde el 15 de Marzo

jiribar68 commented 8 months ago

yo igual. 2 de marzo último día. Igual tiene que ver con el cambio de unidades Copio log. No tengo claro si este es el sitio correcto, pero ahí va:

Registrador: homeassistant.const Fuente: helpers/deprecation.py:205 ENERGY_KILO_WATT_HOUR was used from edata, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/uvejota/homeassistant-edata/issues POWER_KILO_WATT was used from edata, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.KILO_WATT instead, please create a bug report at https://github.com/uvejota/homeassistant-edata/issues TEMP_CELSIUS was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues TEMP_FAHRENHEIT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues

uvejota commented 8 months ago

No sois sólo vosotros, a mi me faltan desde el 15.

No parece cosa de la integración, sino de Datadis o de la distribuidora.

Si descubro lo contrario, os digo.

uvejota commented 8 months ago

yo igual. 2 de marzo último día. Igual tiene que ver con el cambio de unidades

Copio log. No tengo claro si este es el sitio correcto, pero ahí va:

Registrador: homeassistant.const

Fuente: helpers/deprecation.py:205

ENERGY_KILO_WATT_HOUR was used from edata, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/uvejota/homeassistant-edata/issues

POWER_KILO_WATT was used from edata, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.KILO_WATT instead, please create a bug report at https://github.com/uvejota/homeassistant-edata/issues

TEMP_CELSIUS was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues

TEMP_FAHRENHEIT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues

Esos warnings estarán resueltos próximamente, pero no están relacionados con la falta de datos.

drufoval commented 8 months ago

Hola, yo tengo el mismo problema desde el 2 de marzo. Por otro, lado si intento recrear las estadísticas se produce el siguiente error:

_Failed to call service edata.recreate_statistics. Unknown error_

LOGGER

Logger: custom_components.edata.stats Source: custom_components/edata/stats.py:158 integration: edata integration ([documentation](https://github.com/uvejota/homeassistant-edata/), [issues](https://github.com/uvejota/homeassistant-edata/issues)) First occurred: 19:00:04 (1 occurrences) Last logged: 19:00:04 Clearing statistics for ['edata:372xd_consumption', 'edata:372xd_p1_consumption', 'edata:372xd_p2_consumption', 'edata:372xd_p3_consumption', 'edata:372xd_maximeter', 'edata:372xd_p1_maximeter', 'edata:372xd_p2_maximeter']


Logger: homeassistant.components.recorder.util Source: components/recorder/util.py:140 integration: Recorder (documentation, issues) First occurred: 19:00:04 (1 occurrences) Last logged: 19:00:04 Error executing query: Detected unsafe call not in recorder thread Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 140, in session_scope yield session File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 725, in clear_statistics instance.statistics_meta_manager.delete(session, statistic_ids) File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 329, in delete self._assert_in_recorder_thread() File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 123, in _assert_in_recorder_thread raise RuntimeError("Detected unsafe call not in recorder thread") RuntimeError: Detected unsafe call not in recorder thread


Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:485 First occurred: 19:00:04 (1 occurrences) Last logged: 19:00:04 websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Detected unsafe call not in recorder thread Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 485, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 723, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_run_long_action return long_task.result() ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/edata/sensor.py", line 222, in service_recreate_statistics await self._coordinator.statistics.clear_all_statistics() File "/config/custom_components/edata/stats.py", line 162, in clear_all_statistics await get_db_instance(self.hass).async_add_executor_job( File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 725, in clear_statistics instance.statistics_meta_manager.delete(session, statistic_ids) File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 329, in delete self._assert_in_recorder_thread() File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 123, in _assert_in_recorder_thread raise RuntimeError("Detected unsafe call not in recorder thread") RuntimeError: Detected unsafe call not in recorder thread

davidru85 commented 8 months ago

En mi caso (no sé si será el vuestro) me meto en la propia web de datadis y no me muestra ninguna información del 2024, solo del 2023 hacia atrás. Y en la sección principal veo esta alerta.

Captura de pantalla 2024-03-23 a las 11 33 38
mmorenocab commented 8 months ago

No sois sólo vosotros, a mi me faltan desde el 15.

No parece cosa de la integración, sino de Datadis o de la distribuidora.

Si descubro lo contrario, os digo.

Sería posible que la integración hiciera la petición a la API cada 24 horas y no como creo que lo hace cada hora? Quizás Datadis esté penalizando por la "insistencia". Es solo una sugerencia. Aprovecho para felicitarte por tu gran trabajo.

mcrodriguezb commented 8 months ago

He contactado con Datadis y me han indicado esto:

image

Espero os ayude y que pronto esten disponibles los datos. Desconozco el mensaje al que hacen referencia

jlpdiez commented 8 months ago

Lo mismo, por si pudiera ser de utilidad el primer error que da el plugin es este:

`Logger: edata.connectors.datadis Source: /usr/local/lib/python3.12/site-packages/edata/connectors/datadis.py:211 First occurred: 22 March 2024 at 14:37:21 (9 occurrences) Last logged: 14:01:26

500 at https://datadis.es/api-private/api/get-supplies. Query temporary disabled. Future 500 code errors for this query will be silenced until restart
500 at https://datadis.es/api-private/api/get-contract-detail?cups=ES002100000XXXXXXXXX&distributorCode=8&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart
500 at https://datadis.es/api-private/api/get-max-power?cups=ES002100000XXXXXXXXX&distributorCode=8&startDate=2023/08&endDate=2023/11&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart
500 at https://datadis.es/api-private/api/get-max-power?cups=ES002100000XXXXXXXXX&distributorCode=8&startDate=2024/01&endDate=2024/03&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart
403 No authorized supplies at https://datadis.es/api-private/api/get-supplies?authorizedNif=XXXXXXXXX&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart

`

Habla de "Query temporary disabled" así que parece que es cosa de Datadis, a ver si lo arreglan por su parte.

JaVier-Lloret commented 8 months ago

Hoy he comprobado que se han recibido todos los datos atrasados hasta el 26 de marzo.

Mirad como os ha ido a los demás.

Un saludo

Enviado desde Outlook para Androidhttps://aka.ms/AAb9ysg


From: Juan L. Pérez Díez @.> Sent: Monday, March 25, 2024 2:13:14 PM To: uvejota/homeassistant-edata @.> Cc: JaVier-Lloret @.>; Author @.> Subject: Re: [uvejota/homeassistant-edata] FALTA de datos dedde el w de Marzo. (Issue #226)

Lo mismo, por si pudiera ser de utilidad el primer error que da el plugin es este:

`Logger: edata.connectors.datadis Source: /usr/local/lib/python3.12/site-packages/edata/connectors/datadis.py:211 First occurred: 22 March 2024 at 14:37:21 (9 occurrences) Last logged: 14:01:26

500 at https://datadis.es/api-private/api/get-supplies. Query temporary disabled. Future 500 code errors for this query will be silenced until restart 500 at https://datadis.es/api-private/api/get-contract-detail?cups=ES002100000XXXXXXXXX&distributorCode=8&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart 500 at https://datadis.es/api-private/api/get-max-power?cups=ES002100000XXXXXXXXX&distributorCode=8&startDate=2023/08&endDate=2023/11&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart 500 at https://datadis.es/api-private/api/get-max-power?cups=ES002100000XXXXXXXXX&distributorCode=8&startDate=2024/01&endDate=2024/03&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart 403 No authorized supplies at https://datadis.es/api-private/api/get-supplies?authorizedNif=XXXXXXXXX&. Query temporary disabled. Future 500 code errors for this query will be silenced until restart

`

Habla de "Query temporary disabled" así que parece que es cosa de Datadis, a ver si lo arreglan por su parte.

— Reply to this email directly, view it on GitHubhttps://github.com/uvejota/homeassistant-edata/issues/226#issuecomment-2017981516, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQDISEQO53W7M4LOY6P4QD3Y2APGVAVCNFSM6AAAAABE5OIP3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXHE4DCNJRGY. You are receiving this because you authored the thread.Message ID: @.***>

uvejota commented 8 months ago

A mi igual, parece ser que ha vuelto a la vida.

Cierro esto ya que no es cosa de la integración (y por tanto no puedo arreglarlo) y me despista :)