Cela m’a créé un nouveau dossier « enedisgateway2mqtt_dev » (Dans /config/enedisgateway2mqtt_dev/config.yaml).
J’ai mis mon config puis mon fichier enedisgateway.db et j’ai démarré l’app
hello
rajoute cela
myelectricaldata:
212XXXXXX2249:
name: Maison
regarde la j’ai mis mon config en image !
Bonjour, j’avoue être perdu dans toute cette discussion, quelqu’un pourrait m’expliquer les manipulations a effectuer pour migrer vers myelectricaldata s’il vous plait ?
j’étais avec enedisgateway2mqtt.
Merci d’avance.
Après ajout j’ai cette erreur maintenant :
Traceback (most recent call last):
File "/app/main.py", line 46, in <module>
DB.set_usage_point(usage_point_id, data)
File "/app/models/database.py", line 298, in set_usage_point
refresh_addresse=str2bool(data["refresh_addresse"]),
KeyError: 'refresh_addresse'
[10:50:54] FATAL: The app has crashed. Are you sure you entered the correct config options?
regarde bien ton message d erreur et mon fichier !!
tu as tout sous les yeux
rien d’etonnant .
J’ai demandé a @M4dm4rtig4n d’ouvrir un nouveau post sur la nouvelle passerelle , chose qui ne fait pas …
D’ou les soucis de compréhension maintenant et le mélangé de touts les fichiers
regarde la
Merci pour ton aide, et le fichier de configuration ressemble à quoi maintenant ? je vois du influxdb, est-ce obligatoire ?
Et la doc !!!
influxdb:
enable: true ( tu met false a la place )
hostname: influxdb
Le problème c’est que je suis reparti du fichier généré par la version dev et il manquait ces lignes…
J’ai dépassé mon quota journalier pour l’instant mais cela m’a l’air bon merci!
@Stef_42
Pas de souci
mais surtout bien regardé les lignes d’erreur ,
c’est comme un QCM dans la question tu as la réponse.
yes désolé là j’ai tellement mélangé les versions de config que je n’ai pas vu l’erreur de suite.
Merci encore pour ton aide et dsl à l’avenir je regarderais mieux que cela…
bon, je pense avoir bien configuré le fichier de configuration:
cycle: 14400 # 4H
debug: true
wipe_influxdb: false
home_assistant:
enable: true
discovery: true
discovery_prefix: homeassistant
influxdb:
enable: false
hostname: influxdb
port: 8086
token: myelectricaldata
org: myelectricaldata
bucket: myelectricaldata
# ATTENTION, L'activation de l'importation asynchrone va réduire fortement le temps d'importation dans InfluxDB
# mais va augmenter drastiquement la consommation mémoire & CPU.
# À activer uniquement sur un hardware robuste (et pas sur un Raspberry ou autre par exemple).
asynchronous: 'false'
mqtt:
enable: true
hostname: mosquitto
port: 1883
username: MON-USER
password: MON-PASSWORD
prefix: myelectricaldata
client_id: myelectricaldata # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT
retain: true
qos: 0
myelectricaldata:
"MON-PDL":
enable: 'true'
token: MON-TOKEN
name: "Maison"
addresses: 'true'
cache: 'true'
consumption: 'true'
consumption_detail: 'true'
consumption_price_base: '0.145907'
consumption_price_hc: '0.1470'
consumption_price_hp: '0.1841'
consumption_max_date: "2021-06-01"
consumption_detail_max_date: "2021-06-01"
offpeak_hours_0: 23H30-7H30 # LUNDI
offpeak_hours_1: 23H30-7H30 # MARDI
offpeak_hours_2: 23H30-7H30 # MERCREDI
offpeak_hours_3: 23H30-7H30 # JEUDI
offpeak_hours_4: 23H30-7H30 # VENDREDI
offpeak_hours_5: 23H30-7H30 # SAMEDI
offpeak_hours_6: 23H30-7H30 # DIMANCHE
plan: HC/HP
production: 'false'
production_detail: 'false'
production_price: '0.0'
production_max_date: "2021-06-01"
production_detail_max_date: "2021-06-01"
refresh_addresse: 'false'
refresh_contract: 'false'
Mais quand je lance l’addon j’ai ce message dans les logs de l’addon:
/etc/cont-init.d/00-global_var.sh: executing
CONFIG_LOCATION='/config/enedisgateway2mqtt/config.yaml'
TZ='Europe/Paris'
mqtt_autodiscover='true'
verbose='true'
/etc/cont-init.d/01-custom_script.sh: executing
[11:30:49] INFO: Execute /config/enedisgateway2mqtt.sh if existing
[11:30:49] INFO: ... no script found
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[11:30:49] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[11:30:50] INFO: ... MQTT service found, fetching server detail (you can enter those manually in your config file) ...
/etc/cont-init.d/91-mqtt_autodiscover.sh: exiting 2
/etc/cont-init.d/99-run.sh: executing
[11:30:53] INFO: Using config file found in /config/enedisgateway2mqtt/config.yaml
/config/enedisgateway2mqtt/config.yaml
15:81 warning line too long (113 > 80 characters) (line-length)
17:81 warning line too long (96 > 80 characters) (line-length)
26:81 warning line too long (105 > 80 characters) (line-length)
57:30 error no new line character at the end of file (new-line-at-end-of-file)
[11:30:54] FATAL: Config file has an invalid yaml format. Please check the file in /config/enedisgateway2mqtt/config.yaml. Errors list above. You can check yaml validity with the online tool yamllint.com
/etc/cont-init.d/99-run.sh: exiting 1
Avant de poster ici j’ai envoyé le contenu de mon fichier sur yamllint.com mais il me dit qu’il est bon…
supprime cela
# ATTENTION, L'activation de l'importation asynchrone va réduire fortement le temps d'importation dans InfluxDB
# mais va augmenter drastiquement la consommation mémoire & CPU.
# À activer uniquement sur un hardware robuste (et pas sur un Raspberry ou autre par exemple).
asynchronous: 'false'
# DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT
et tous les semaines qui commence par des
#
Fais bien attention a la fin de chaque ligne si as pas un espace
j’ai remarqué que le fichier est sensible au espace en fin de ligne
Bonjour tout le monde,
Tout d’abord, je tiens à remercier la communauté pour tout son support !
Je suis debutant sur homeassistant et j’apprecie fortement le soutien et l’entraide qu’il y a dans cette communauté.
Je viens recémment de migrer le plugin myelectricaldata sur la derniere version, cependant j’ai une erreur en fin de log semblant m’indiquer qu’il manque une colonne : « sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: usage_points.consentement_expiration »
Ci-dessous une partie du log file recuperé depuis homeassistant :
2022-12-04 11:49:24.184 - INFO : 25265701826605
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: usage_points.consentement_expiration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/main.py", line 46, in <module>
DB.set_usage_point(usage_point_id, data)
File "/app/models/database.py", line 205, in set_usage_point
usage_points = self.session.scalars(query).one_or_none()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: usage_points.consentement_expiration
[SQL: SELECT usage_points.usage_point_id, usage_points.name, usage_points.cache, usage_points.consumption, usage_points.consumption_detail, usage_points.production, usage_points.production_detail, usage_points.consumption_price_base, usage_points.consumption_price_hc, usage_points.consumption_price_hp, usage_points.production_price, usage_points.offpeak_hours_0, usage_points.offpeak_hours_1, usage_points.offpeak_hours_2, usage_points.offpeak_hours_3, usage_points.offpeak_hours_4, usage_points.offpeak_hours_5, usage_points.offpeak_hours_6, usage_points."plan", usage_points.refresh_addresse, usage_points.refresh_contract, usage_points.token, usage_points.progress, usage_points.progress_status, usage_points.enable, usage_points.consentement_expiration, usage_points.call_number, usage_points.quota_reached, usage_points.quota_limit, usage_points.quota_reset_at, usage_points.last_call, usage_points.ban, usage_points.consumption_max_date, usage_points.consumption_detail_max_date, usage_points.production_max_date, usage_points.production_detail_max_date
FROM usage_points
WHERE usage_points.usage_point_id = ?]
[parameters: ('25265701826605',)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
[11:49:24] FATAL: The app has crashed. Are you sure you entered the correct config options?
Quelqu’un aurait t’il une idée du problème ?
Hello All,
Je me reponds; après desinstallation et re-installation du plugin, plus d’erreurs !
Bonjour à tous,
Je vous sollicite parce-que je n’arrive pas à envoyer les infos vers influxdb.
pour le host
j’ai mis l’adresse ip (hostname: 192.168.1.65
) de mon Raspberry et cela fonctionne.
En fait je ne sais pas quoi mettre dans les champs suivants,
token
:
faut-il créer un nouveau user dans influxdb et saisir dans token
les username/password le concernant ?
C’est ce que j’ai fait et apparemment cela fonctionne.
bucker
:
Là je n’ai aucune idée, doit on laisser ainsi ou bien faut-il mettre autre chose ?
comme par exemple le nom de la base hassio homeassistant
Merci par avance de vos retours,
voici également le log pour info,
Log
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2022-12-04 12:31:44.050 - INFO : [2223169xxxxxxxxx EXPORTATION DES DONNÉES "CONSUMPTION" DANS INFLUXDB
2022-12-04 12:31:44.050 - INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2022-12-04 12:31:45.891 - INFO : - 2022-12
Traceback (most recent call last):
File "/app/models/jobs.py", line 171, in job_import_data
ExportInfluxDB(self.usage_point_id).daily(
File "/app/models/export_influxdb.py", line 34, in daily
app.INFLUXDB.write(
File "/app/models/influxdb.py", line 90, in write
self.write_api.write(bucket=self.bucket, org=self.org, record=record)
File "/usr/local/lib/python3.9/site-packages/influxdb_client/client/write_api.py", line 374, in write
results = list(map(write_payload, payloads.items()))
File "/usr/local/lib/python3.9/site-packages/influxdb_client/client/write_api.py", line 372, in write_payload
return self._post_write(_async_req, bucket, org, final_string, payload[0])
File "/usr/local/lib/python3.9/site-packages/influxdb_client/client/write_api.py", line 483, in _post_write
return self._write_service.post_write(org=org, bucket=bucket, body=body, precision=precision,
File "/usr/local/lib/python3.9/site-packages/influxdb_client/service/write_service.py", line 60, in post_write
(data) = self.post_write_with_http_info(org, bucket, body, **kwargs) # noqa: E501
File "/usr/local/lib/python3.9/site-packages/influxdb_client/service/write_service.py", line 90, in post_write_with_http_info
return self.api_client.call_api(
File "/usr/local/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py", line 343, in call_api
return self.__call_api(resource_path, method,
File "/usr/local/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py", line 173, in __call_api
response_data = self.request(
File "/usr/local/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py", line 388, in request
return self.rest_client.POST(url,
File "/usr/local/lib/python3.9/site-packages/influxdb_client/_sync/rest.py", line 311, in POST
return self.request("POST", url,
File "/usr/local/lib/python3.9/site-packages/influxdb_client/_sync/rest.py", line 261, in request
raise ApiException(http_resp=r)
influxdb_client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Request-Id': '3be7687f-73c7-11ed-9c82-0242ac1e2104', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Error': 'database not found: "DATABASE"', 'X-Influxdb-Version': '1.8.10', 'X-Request-Id': '3be7687f-73c7-11ed-9c82-0242ac1e2104', 'Date': 'Sun, 04 Dec 2022 11:31:45 GMT', 'Content-Length': '45'})
HTTP response body: {"error":"database not found: \"DATABASE\""}
2022-12-04 12:31:46.235 - ERROR : ═══════════════════════════════════════════════•°• :ERREUR: •°•════════════════════════════════════════════════
2022-12-04 12:31:46.235 - ERROR :
2022-12-04 12:31:46.235 - ERROR : Erreur lors de l'exportation des données dans InfluxDB
2022-12-04 12:31:46.235 - ERROR : (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Request-Id': '3be7687f-73c7-11ed-9c82-0242ac1e2104', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Error': 'database not found: "DATABASE"', 'X-Influxdb-Version': '1.8.10', 'X-Request-Id': '3be7687f-73c7-11ed-9c82-0242ac1e2104', 'Date': 'Sun, 04 Dec 2022 11:31:45 GMT', 'Content-Length': '45'})
HTTP response body: {"error":"database not found: \"DATABASE\""}
2022-12-04 12:31:46.236 - ERROR :
2022-12-04 12:31:46.236 - ERROR : ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
2022-12-04 12:31:46.236 - INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2022-12-04 12:31:46.237 - INFO : ▌│█║▌║▌║ ___ _ _____ _ _ _ _ _ _ ║▌║▌║█│▌
2022-12-04 12:31:46.237 - INFO : ▌│█║▌║▌║ |_ _| _ __ ___ _ __ ___ _ __ | |_ | ___|(_) _ __ (_) ___ | |__ | || || | ║▌║▌║█│▌
2022-12-04 12:31:46.237 - INFO : ▌│█║▌║▌║ | | | '_ ` _ \ | '_ \ / _ \ | '__|| __| | |_ | || '_ \ | |/ __|| '_ \ | || || | ║▌║▌║█│▌
2022-12-04 12:31:46.237 - INFO : ▌│█║▌║▌║ | | | | | | | || |_) || (_) || | | |_ | _| | || | | || |\__ \| | | ||_||_||_| ║▌║▌║█│▌
2022-12-04 12:31:46.238 - INFO : ▌│█║▌║▌║ |___||_| |_| |_|| .__/ \___/ |_| \__| |_| |_||_| |_||_||___/|_| |_|(_)(_)(_) ║▌║▌║█│▌
2022-12-04 12:31:46.238 - INFO : ▌│█║▌║▌║ |_| ║▌║▌║█│▌
2022-12-04 12:31:46.238 - INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
influxdb:
host: influxdb
port: 8086
token: USERNAME:PASSWORD
org: "-"
bucket: "DATABASE/RETENTION"
On bascule ici