Bonjour,
Je ne sais pas si il est mieux de créer un noueau sujet, mais au cas où, je poste à la suite des messages...
J'essaye d'installer le script sur mon installation, jusqu'à présent sans succès. J'ai suivi les directives d'installations (packages, etc.), mais j'ai les retours suivants :
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)
Au niveau du fichier linky.log :
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ cat linky.log
2018-01-17 09:11:48,669 logging in as XX@YY...
2018-01-17 09:11:48,872 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr
2018-01-17 09:11:49,875 logged in successfully!
2018-01-17 09:11:49,878 retreiving data...
2018-01-17 09:11:49,999 Starting new HTTPS connection (1): espace-client-particuliers.enedis.fr
2018-01-17 09:11:52,097 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é de lancer le fichier /domoticz_linky_month.sh, mais égaiement sans succès jusqu'à maintenant :
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ ./domoticz_linky_month.sh 1
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)
Code : Tout sélectionner
pi@raspberrypi ~/domoticz/domoticz_linky $ cat linky.log
2018-01-17 09:13:17,056 logging in as XX@YY...
2018-01-17 09:13:17,183 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr
2018-01-17 09:13:17,921 logged in successfully!
2018-01-17 09:13:17,924 retreiving data...
2018-01-17 09:13:17,927 arg 1
2018-01-17 09:13:17,931 16/12/2017
2018-01-17 09:13:17,934 16/11/2017
2018-01-17 09:13:18,008 Starting new HTTPS connection (1): espace-client-particuliers.enedis.fr
2018-01-17 09:13:20,182 Starting new HTTPS connection (2): espace-client-particuliers.enedis.fr
Traceback (most recent call last):
File "/home/pi/domoticz/domoticz_linky/linky_month.py", line 174, in <module>
main()
File "/home/pi/domoticz/domoticz_linky/linky_month.py", line 146, in main
dtostr(today))
File "/home/pi/domoticz/domoticz_linky/linky.py", line 84, in get_data_per_month
return _get_data(session, 'urlCdcMois', start_date, end_date)
File "/home/pi/domoticz/domoticz_linky/linky.py", line 123, in _get_data
res = req.json()
TypeError: 'dict' object is not callable
Dans les 2 cas, aucune création de quelque fichier que ce soit, en dehors du log. J'ai regardé un peu dans le code, mais je ne vois pas où est le problème. J'ai l'impression qu'il n'y a tout simplement pas de retour de données de la part d'Enerdis ?
Merci d'avance pour tout début de piste !