Bonjour à tous,
Et bien je suis bien en peine de faire fonctionner le script... Sur le site Enedis, j'ai ma courbe de charge est activée et je vois bien ma consommation demi-heure par demi-heure (encore vérifié ce jour).
Je viens de refaire une installation propre de domoticz_linky depuis le Git, mais toujours sans succès. Juste après l'installation et après avoir configuré mon compte :
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ ./domoticz_linky.sh
fs.js:502
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'export_years_values.json'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at Object.fs.readFileSync (fs.js:354:15)
at getCumulBefore (/home/pi/domoticz/domoticz_linky/domoticz_linky.js:83:26)
at generateMonthDays (/home/pi/domoticz/domoticz_linky/domoticz_linky.js:98:12)
at Object.<anonymous> (/home/pi/domoticz/domoticz_linky/domoticz_linky.js:113:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
Et le contenu du log :
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ cat linky.log
2018-01-26 11:30:37,889 logging in as XX@YY...
2018-01-26 11:30:38,089 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr
2018-01-26 11:30:39,145 logged in successfully!
2018-01-26 11:30:39,147 retreiving data...
2018-01-26 11:30:39,265 Starting new HTTPS connection (1): espace-client-particuliers.enedis.fr
2018-01-26 11:30:43,156 Starting new HTTPS connection (2): espace-client-particuliers.enedis.fr
Traceback (most recent call last):
File "/home/pi/domoticz/domoticz_linky/linky_json.py", line 189, in <module>
main()
File "/home/pi/domoticz/domoticz_linky/linky_json.py", line 139, in main
res_year = linky.get_data_per_year(token)
File "/home/pi/domoticz/domoticz_linky/linky.py", line 88, in get_data_per_year
return _get_data(session, 'urlCdcAn')
File "/home/pi/domoticz/domoticz_linky/linky.py", line 123, in _get_data
res = req.json()
TypeError: 'dict' object is not callable
J'ai essayé un :
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ touch export_years_values.json
mais j'ai ensuite des erreurs sur la structure du fichier (ce qui est normal). Une piste ? J'avoue que je sèche...