From 13b6388a92bc1c77291a6e1125b15eb8fec9ef03 Mon Sep 17 00:00:00 2001 From: Christophe SCAYA <> Date: Fri, 16 Feb 2024 22:01:20 +0100 Subject: [PATCH] Erreur 1er commit Passage de log INFO en ERROR --- enphase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enphase.py b/enphase.py index 6190d21..4d2ea20 100644 --- a/enphase.py +++ b/enphase.py @@ -7,7 +7,7 @@ import logging import os urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -logging.basicConfig(level=logging.INFO, filename=os.path.join(os.path.dirname(__file__),'enphase.log'), filemode="a+",format="%(asctime)-15s %(levelname)-8s %(message)s") +logging.basicConfig(level=logging.ERROR, filename=os.path.join(os.path.dirname(__file__),'enphase.log'), filemode="a+",format="%(asctime)-15s %(levelname)-8s %(message)s") user='christophe.scaya@gmail.com' password='92@!Z&KYxt8shT' @@ -34,7 +34,7 @@ while True: total = round(json[0]['cumulative']['currW']) net = round(json[1]['cumulative']['currW']) panneaux = total-net - #esp_cmd = requests.get('http://'+ip_esp+'/control?cmd=event,setPwr='+str(net)) + esp_cmd = requests.get('http://'+ip_esp+'/control?cmd=event,setPwr='+str(net)) logging.info("Total: "+str(total)+" Panneaux: "+str(panneaux)+" Enedis: "+str(net)) print("Total: "+str(total)+" Panneaux: "+str(panneaux)+" Enedis: "+str(net)) time.sleep(2)