beufanet / linkyndle Goto Github PK
View Code? Open in Web Editor NEWFetch dataset from Enedis portal (need Linky) and push it to grafana
Fetch dataset from Enedis portal (need Linky) and push it to grafana
Bonjour,
J'essaye de récupérer mes données du compteur Linky mais j'ai toujours cette erreur. J'ai bien créer mon compte sur le portail client d'Enedis et je vois bien ma consommation sur le site.
Je pense qu'il me manque une étape et je préfère demander confirmation avant de faire n'importe quoi.
Est-ce que c'est bien cette demande qui va me permettre de récupérer les infos par l'API ? : https://www.enedis.fr/acceder-aux-donnees-de-mesure
Merci d'avance.
Hello,
it seems that the time zone of the metrics is wrong (UTC).
Enedis provides the data using CEST UTC+2h (but without information of this in the JSON payload).
Can you force this time zone in the code?
Bonjour
au délà des problèmes de l'API dorénavant fermée aux particuliers , j'ai une demande spécifique à adresser aux dev....
Dans les versions précédentes, Enedis ne semblait autoriser qu'un PDL par compte email.
Or depuis leur nouvelle version, on peut avoir plusieurs PDL pour un compte.
Serait il possible d'ajouter un 'champ' pour l'identifiant PDL en cas d'usage de plusieurs linky dans le compte email.
Merci par avance pour votre retour pour voir si cette demande sera possible ou si incongrue
(lorsque la nouvelle API sera dispo évidemment)
Plan retrieve data via a crontab is a good option but personally, i don't start my computer every-day.
Idealy, the script should connect on the influxdb to get the lastest date parsed
then grab all missing day on website (via making a delta day between this & now )
I have done something similar on other project :
def getDBLastInfo():
client = InfluxDBClient(host='localhost', port=8086, username=_db_user , password=_db_passwd )
client.switch_database(_db_name)
db = client.query('SELECT "Température" FROM "XXX" ORDER by time DESC LIMIT 1')
for item in db.get_points():
dateinfluxdb = item['time']
return dateinfluxdb
Bonjour,
J'ai installé le programme python sur le synology -> parfait
J'ai dockerisé le programme -> parfait
Je viens de l'installer sur Raspberry pi et j'ai cette erreur :
2019-01-27 22:31:14,355 logging in InfluxDB Server Host 192.168.0.253...
2019-01-27 22:31:14,361 logged in InfluxDB Server Host 192.168.0.253 succesfully
2019-01-27 22:31:14,362 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2019-01-27 22:31:14,934 logged in successfully!
Traceback (most recent call last):
File "linkynflux.py", line 93, in
firstTS = _getStartTS(args.days)
File "linkynflux.py", line 48, in _getStartTS
return date.astimezone(tz.tzutc()).timestamp()
ValueError: astimezone() cannot be applied to a naive datetime
Du coup je ne comprend pas pkoi j'ai un comportement different sachant que j'ai fait les memes installations...une idée ?
Merci encore pour le boulot accompli :)
ju
Hi,
Is the script still able to login? I feel like the endpoints may have changed since I can't login with my credentials.
2019-03-20 10:17:32,811 logging in InfluxDB Server Host localhost...
2019-03-20 10:17:32,813 logged in InfluxDB Server Host localhost succesfully
2019-03-20 10:17:32,814 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2019-03-20 10:17:32,825 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr:443
2019-03-20 10:17:32,945 https://espace-client-connexion.enedis.fr:443 "POST /auth/UI/Login HTTP/1.1" 302 209
2019-03-20 10:17:32,955 unable to login on https://espace-client-particuliers.enedis.fr/group/espace-particuliers : Login unsuccessful. Check your credentials.
I've followed the README to perform the setup and I don't think I've missed anything.
My credentials do work when I copy/paste them in my browser.
bonjour,
depuis qq jours (15 à priori) le script ne parvient plus à récupérer les données:
phil@domoticz:~/scripts-node-red/script-enedis/linkyndle$ python3 linkynflux.py -d 1
2020-05-29 09:21:57,901 logging in InfluxDB Server Host 192.168.1.44...
2020-05-29 09:21:57,902 logged in InfluxDB Server Host 192.168.1.44 succesfully
2020-05-29 09:21:57,902 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2020-05-29 09:21:58,174 logged in successfully!
2020-05-29 09:21:58,177 get Data from Enedis from 28/05/2020 to 29/05/2020
2020-05-29 09:22:00,988 Data from enedis are in state 'nonActive'. So graphe will be empty, no value to push
Suis-je le seul dans ce cas ?
Ideally, we should able to run the script without being on the same directory as the script (and the configuration file)
the script should try to load the configuration on actual directory if failed try to load it on the same directory than the script ?
Hi, I got data are considered HC and HP in the same time ;
Is it a bug ?
My HC/HP timing are:
HP= 7h22-12h22 and 07h22-12h22
and
HC 12h22/13h52 and 01h32/07h22
my params is:
"hc":
[{
"start": { "h": 0, "m": 52 },
"end": { "h": 7, "m": 22 }
},{
"start": { "h": 12, "m": 22 },
"end": { "h": 13, "m": 52 }
}]
I use lates version of the py code 👍 2020-02-06 14:06:37,004 get Data
from Enedis from 05/02/2020 to 06/02/2020
2020-02-06 14:06:40,432 found value ordre( 1) : 1.79 kWh at 2020-02-05T00:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,434 found value ordre( 2) : 2.06 kWh at 2020-02-05T00:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 3) : 3.20 kWh at 2020-02-05T01:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 4) : 1.92 kWh at 2020-02-05T01:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 5) : 1.74 kWh at 2020-02-05T02:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 6) : 1.83 kWh at 2020-02-05T02:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,439 found value ordre( 7) : 1.80 kWh at 2020-02-05T03:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 8) : 2.16 kWh at 2020-02-05T03:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 9) : 1.79 kWh at 2020-02-05T04:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 10) : 1.62 kWh at 2020-02-05T04:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,441 found value ordre( 11) : 1.75 kWh at 2020-02-05T05:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 12) : 1.47 kWh at 2020-02-05T05:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 13) : 1.79 kWh at 2020-02-05T06:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 14) : 2.21 kWh at 2020-02-05T06:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 15) : 1.89 kWh at 2020-02-05T07:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 16) : 1.75 kWh at 2020-02-05T07:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 17) : 1.75 kWh at 2020-02-05T08:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 18) : 1.33 kWh at 2020-02-05T08:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 19) : 1.94 kWh at 2020-02-05T09:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 20) : 2.63 kWh at 2020-02-05T09:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 21) : 2.43 kWh at 2020-02-05T10:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 22) : 1.82 kWh at 2020-02-05T10:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 23) : 0.72 kWh at 2020-02-05T11:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 24) : 0.35 kWh at 2020-02-05T11:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 25) : 0.66 kWh at 2020-02-05T12:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 26) : 1.58 kWh at 2020-02-05T12:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 27) : 0.26 kWh at 2020-02-05T13:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 28) : 0.18 kWh at 2020-02-05T13:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 29) : 0.15 kWh at 2020-02-05T14:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 30) : 0.11 kWh at 2020-02-05T14:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 31) : 0.11 kWh at 2020-02-05T15:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 32) : 0.10 kWh at 2020-02-05T15:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 33) : 0.12 kWh at 2020-02-05T16:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 34) : 0.11 kWh at 2020-02-05T16:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 35) : 0.14 kWh at 2020-02-05T17:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 36) : 0.13 kWh at 2020-02-05T17:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 37) : 0.92 kWh at 2020-02-05T18:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 38) : 1.88 kWh at 2020-02-05T18:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 39) : 2.00 kWh at 2020-02-05T19:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 40) : 1.88 kWh at 2020-02-05T19:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 41) : 3.11 kWh at 2020-02-05T20:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 42) : 3.00 kWh at 2020-02-05T20:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 43) : 2.94 kWh at 2020-02-05T21:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 44) : 2.98 kWh at 2020-02-05T21:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 45) : 2.91 kWh at 2020-02-05T22:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 46) : 3.00 kWh at 2020-02-05T22:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 47) : 2.90 kWh at 2020-02-05T23:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 48) : 1.73 kWh at 2020-02-05T23:30:00Z (HC:0/HP:1/HN:0)
Hello,
I have the following execution error (probably a Python lib missing):
nioc@nioc:/home/nioc/linkyndle# python3 linkynflux.py --days=16
2019-05-18 20:06:40,476 logging in InfluxDB Server Host http://localhost...
2019-05-18 20:06:40,478 logged in InfluxDB Server Host http://localhost succesfully
2019-05-18 20:06:40,479 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2019-05-18 20:06:40,494 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr:443
2019-05-18 20:06:41,074 https://espace-client-connexion.enedis.fr:443 "POST /auth/UI/Login HTTP/1.1" 302 0
2019-05-18 20:06:41,095 logged in successfully!
Traceback (most recent call last):
File "linkynflux.py", line 117, in <module>
firstTS = _getStartTS(args.days)
File "linkynflux.py", line 59, in _getStartTS
return date.astimezone(tz.tzutc()).timestamp()
ValueError: astimezone() cannot be applied to a naive datetime
My pip3 list:
acme (0.28.0)
certbot (0.28.0)
certbot-apache (0.28.0)
certifi (2019.3.9)
chardet (3.0.4)
ConfigArgParse (0.11.0)
configobj (5.0.6)
cryptography (1.7.1)
DateTime (4.3)
fail2ban (0.9.6)
fake-useragent (0.1.11)
future (0.15.2)
httplib2 (0.9.2)
idna (2.8)
influxdb (5.2.2)
josepy (1.1.0)
keyring (10.1)
keyrings.alt (1.3)
mock (2.0.0)
parsedatetime (2.4)
pbr (1.10.0)
pip (9.0.1)
pyasn1 (0.1.9)
pycrypto (2.6.1)
pycurl (7.43.0)
pygobject (3.22.0)
pyinotify (0.9.6)
pyOpenSSL (16.2.0)
pyRFC3339 (1.0)
python-apt (1.4.0b3)
python-augeas (0.5.0)
python-dateutil (2.8.0)
python-debian (0.1.30)
python-debianbts (2.6.1)
pytz (2016.7)
pyxdg (0.25)
reportbug (7.1.7)
requests (2.22.0)
requests-toolbelt (0.7.0)
SecretStorage (2.3.1)
setuptools (33.1.1)
six (1.10.0)
systemd-python (233)
urllib3 (1.25.2)
wheel (0.29.0)
zope.component (4.3.0)
zope.event (4.2.0)
zope.hookable (4.0.4)
zope.interface (4.3.2)
Bonjour,
Est-il possible dans le fichier .params de choisir un intervalle d'heure en incluant les le début et la fin ?
Je m'explique, chez moi les heures creuses sont de 20h à 4h, je fais donc deux intervalles un de 0h à 4h et un de 20h à 23h59, le problème est que 00h se trouve en heure pleine du coup :
2019-11-19 11:31:03,200 found value ordre( 1) : 0.09 kWh at 2019-11-17T00:00:00Z (HC:0/HP:1/HN:0)
2019-11-19 11:31:03,202 found value ordre( 2) : 0.55 kWh at 2019-11-17T00:30:00Z (HC:1/HP:1/HN:0)
2019-11-19 11:31:03,203 found value ordre( 3) : 0.28 kWh at 2019-11-17T01:00:00Z (HC:1/HP:1/HN:0)
2019-11-19 11:31:03,204 found value ordre( 4) : 0.48 kWh at 2019-11-17T01:30:00Z (HC:1/HP:1/HN:0)
Comment puis-je l'inclure ?
Merci d'avance.
Echec de connexion.
Certainement dû au changement du type de login ?
En regardant les cookies la clé 'iPlanetDirectoryPro' semble ne plus exiser ?
hello,
congratualtion for the scripts, however I cant import your grafana template, i'm getting the following error:
Import failed
JSON -> JS Serialization failed: Unexpected token < in JSON at position 6
any idea ?
Just checking if you had any update on this project?
I'm trying to display the data on grafana with the data pulled from a ZLinky_TIC (zigbee) or Enedis (since the reporting from Home Assistant is actual garbage...)
--thanks
On grafana, it's useful to have a table with Power Consumption Values per day
like you did with Power Consumption Values per 30min
i have created it with duplicate Power Consumption Values per 30min
with small modification :
"SELECT sum("value") FROM "conso_elec" WHERE $timeFilter GROUP BY time(1d) fill(null)"
YYYY-MM-DD
20000,30000
Thanks you for you very useful work !
Bonjour,
Je n'arrive pas à expliquer la différence de données entre ce que je vois sur le portail Enedis par rapport à ce qui est inséré dans influxDB:
Si on prend par exemple la tranche 19h -> 19h30:
Il y a à priori à chaque fois une différence pour facteur de 2.
Qu'est-ce qui m'échappe ?
Merci d'avance
2019-01-09 09:41:58,984 get Data from Enedis from 08/01/2019 to 09/01/2019
{'etat': {'valeur': 'nonActive'}, 'graphe': {}}
Traceback (most recent call last):
File "linky2influxdays.py", line 108, in <module>
for d in resEnedis['graphe']['data']:
KeyError: 'data'
Hi,
The website of Enedis are regulary down or not working as expected
Sometimes, it's can connect but failed to get data, so the script put '-1' as value in the DB
it's a way to avoid/skip this "bad data"
Apres une installation toute fraîche sur un raspberrypi, j'ai essayer de lancer pour la première fois la commande python3 linkynflux.py -d 4
. Sur les premières lignes il arrive bien a trouver de la data mais sur la fin il trouve des value négative. Il fini inexécution par un unable to write data points to influxdb
et n'injecte rien en base.
Des idées d'ou peut venir ce problème ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.