Custom Component: GCE Eco-Devices

hello les frenchies :slight_smile:

je dĂ©bute ici, et je vois pas comment intĂ©grer l 'ecodevice
 c’est bien dans le fichier sensors.yaml ?
on ne doit pas installer qqe chose avant ?

Merci

  • platform: ecodevices
  host: "192.168.1.138"
  scan_interval: 5
  t1_name: Electricite
  c1_name: Compteur Electricite
  c1_icon: mdi:solar-panel
  c1_unit_of_measurement: VA
  c1_device_class: power

bon, faut télécharger et installer dans config\custom_components

voilu, intégré, merci à @Mati24.

Par contre, de mon cotĂ©, j’ai 3 compteurs actif sur les 4.

j’ai tentĂ© ce qui suit, mais ca n a pas l air de fonctionner :

- platform: ecodevices
  host: "192.168.1.138"
  scan_interval: 5
  t1_name: Electricite
  c1_name: Compteur Electricite
  # c1_icon: mdi:solar-panel
  c1_unit_of_measurement: VA
  c1_device_class: power
  t3_name: Eau Froide
  c3_name: Compteur Eau Froide
  # c3_icon: mdi:solar-panel
  c3_unit_of_measurement: m3
  c3_device_class: None  
  t4_name: Eau Chaude
  c4_name: Compteur Eau Chaude
  # c4_icon: mdi:solar-panel
  c4_unit_of_measurement: m3
  c4_device_class: None

Invalid config for [sensor.ecodevices]: [t3_name] is an invalid option for [sensor.ecodevices]. Check: sensor.ecodevices->t3_name. (See ?, line ?).

Merci.

Salut !

Dans le README, j’ai mis les paramùtres disponibles. Du coup tu peux voir que t3_name et t4_name n’existent pas. Pareil pour c3 et c4, remplace les par c1 et c2.

En fait il y a deux entrées téléinfo (t1 et t2) et deux entrées compteur (c1 et c2).

1 Like

shame on me :slight_smile:

Merci !

par contre, ca se mĂ©lange un peu j’ai l impression. et manque le compteur c2 dans la liste :slight_smile:

avec ca comme conf

- platform: ecodevices
  host: "192.168.1.138"
  scan_interval: 5
  t1_name: compteur_electricite
  # c1_icon: mdi:solar-panel
  t1_unit_of_measurement: VA
  #t1_device_class: power
  
  c1_name: compteur_eau_froide
  c1_unit_of_measurement: m3
  c1_device_class: None  
  c2_name: compteur_eau_chaude
  c2_unit_of_measurement: m3
  c2_device_class: None

le compteur elec correspond a la valeur du compteur eau froide
image

et le compteur eau froide HA, Ă  l’eau chaude de l’écodevice.

en effet y’a un soucis :hushed:
est-ce que tu peux supprimer la conf, restart hass, supprimer les entitĂ©s via l’interface web, puis tout remettre ?

j ai tout viré, sensors, répertoire, design, restart hass, remis tout, restart hass, idem.
vidé le cache, idem

je vais regarder ça

est-ce que tu peux me donner les logs en debug en ajoutant :slight_smile:

logger:
  logs:
    custom_components.ecodevices: debug

Je vais tester ça https://www.home-assistant.io/integrations/derivative/
C’est de la conf hass classique

Bonjour Mati24
Avez vous continuĂ© a amĂ©liorer le plugin. Surtout sur la conso journaliĂšre. Car pour le moment, la conso instantanĂ©e fonctionne bien, mais impossible d’avoir la conso au jour le jour.
Merci pour se super travail.

J’ai essayĂ© avec les derivative et autres outils fournis par Home-Assistant mais rien de concluant. Il faudrait voir niveau code si je peux faire quelque chose. Il faudrait que je vois avec GCE si on peut rĂ©cupĂ©rer les statistiques enregistrĂ©es dans l’eco devices

Aprùs quelques recherche, j’ai une piste au niveau des automatisations qui permettraient de stocker les valeurs en continu. Ce site: https://www.canaletto.fr/post/home-assistant-and-energie est une piste, il utilise des shelly au lieu d’un ecodevices, mais je pense que le principe est presque identique.
Je bute pour le moment sur les 1ere valeurs a enregistrer
<T1_HCHC>53184694</T1_HCHC>
<T1_HCHP>82323785</T1_HCHP>
Il y a aussi ce site: Integration of water/electricity/gaz gce-electronics Eco-device
mais ce ne sont que les valeurs instantannées

Il y a Ă©galement le fichier d’export que l’on peut obtenir ici : http://IP/protect/download/xdata.csv si on soustrait la date X avec la date X-1, on obtient logiquement la consommation pour une journĂ©e, mais j’ai des valeurs bizarres parfois, donc peut ĂȘtre pas trĂšs fiable

Je vais regarder tes liens, j’ai testĂ© les utility_meter mais je n’avais pas rĂ©ussi Ă  avoir des donnĂ©es correctes

Dsl pour la réponse tardive


2021-03-26 17:47:42 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.compteur_electricite fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.8/http/client.py", line 950, in send
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 200, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7fc763e7a550>, 'Connection to 192.168.1.138 timed out. (connect timeout=2)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.138', port=80): Max retries exceeded with url: /api/xdevices.json?cmd=10 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc763e7a550>, 'Connection to 192.168.1.138 timed out. (connect timeout=2)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ecodevices/sensor.py", line 188, in update
    self._state = self._controller.get(self._request)
  File "/config/custom_components/ecodevices/ecodevicesapi/__init__.py", line 40, in get
    return self._request({"cmd": 10}).get("T1_PAPP")
  File "/config/custom_components/ecodevices/ecodevicesapi/__init__.py", line 17, in _request
    r = requests.get(self._api_url, params=params, timeout=2)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 504, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.1.138', port=80): Max retries exceeded with url: /api/xdevices.json?cmd=10 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc763e7a550>, 'Connection to 192.168.1.138 timed out. (connect timeout=2)'))
2021-03-26 17:47:46 WARNING (MainThread) [homeassistant.components.sensor] Updating rest sensor took longer than the scheduled update interval 0:00:02
2021-03-26 17:47:46 WARNING (MainThread) [homeassistant.components.sensor] Updating ecodevices sensor took longer than the scheduled update interval 0:00:05
2021-03-26 17:47:50 WARNING (MainThread) [homeassistant.components.media_player] Updating russound_rnet media_player took longer than the scheduled update interval 0:00:10
2021-03-26 17:47:53 WARNING (MainThread) [homeassistant.components.sensor] Updating ecodevices sensor took longer than the scheduled update interval 0:00:05
2021-03-26 17:47:53 WARNING (MainThread) [homeassistant.components.sensor] Updating rest sensor took longer than the scheduled update interval 0:00:02
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["c0day"]}}")' for attribute '_state' in entity 'sensor.water_today'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["c1day"]}}")' for attribute '_state' in entity 'sensor.gaz_today'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["meter2"]}}")' for attribute '_state' in entity 'sensor.water_flow_now'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["meter3"]}}")' for attribute '_state' in entity 'sensor.gaz_usage_now'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["count0"] | multiply(0.001)}}")' for attribute '_state' in entity 'sensor.water_total'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_status.attributes["count1"] | multiply(0.001)}}")' for attribute '_state' in entity 'sensor.gaz_total'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_teleinfo1.attributes["T1_PTEC"] }}")' for attribute '_state' in entity 'sensor.electricity_tarfi'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_teleinfo1.attributes["T1_PPAP"] }}")' for attribute '_state' in entity 'sensor.power_usage_now'
2021-03-26 17:47:55 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.eco_devices_teleinfo1.attributes["T1_BASE"] | multiply(0.001) | round(0.001)}}")' for attribute '_state' in entity 'sensor.electricity_total'
2021-03-26 17:48:04 WARNING (MainThread) [homeassistant.components.sensor] Updating rest sensor took longer than the scheduled update interval 0:00:02
2021-03-26 17:48:28 WARNING (MainThread) [homeassistant.components.sensor] Updating rest sensor took longer than the scheduled update interval 0:00:02

autre chose :

Logger: homeassistant.loader
Source: loader.py:802
First occurred: 18:25:54 (1 occurrences)
Last logged: 18:25:54

No 'version' key in the manifest file for custom integration 'ecodevices'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'ecodevices'

J’ai sorti une nouvelle version avec pas mal d’amĂ©lioration, fix et ajout de la clĂ© version
@acognard si tu peux tester

Platform error sensor.ecodevices - Integration ‘ecodevices’ not found.

Il semblerait que tu ais mal copié les fichiers ?