Browse Source

Suppression des info d'identification

master
scayac 10 months ago
parent
commit
0bd8bbfa74
  1. 6
      enphase.py
  2. 6
      getNewToken.sh

6
enphase.py

@ -9,9 +9,9 @@ import os @@ -9,9 +9,9 @@ import os
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
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'
envoy_serial='482330092358'
user='USER'
password='PASS'
envoy_serial='SERIAL'
ip='192.168.0.201'
ip_esp='192.168.0.115'

6
getNewToken.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
user='christophe.scaya@gmail.com'
password='92@!Z&KYxt8shT'
envoy_serial='482330092358'
user='USER'
password='PASS'
envoy_serial='SERIAL'
session_id=$(curl -X POST https://enlighten.enphaseenergy.com/login/login.json? -F "user[email]=$user" -F "user[password]=$password" | jq -r ".session_id")
web_token=$(curl -X POST https://entrez.enphaseenergy.com/tokens -H "Content-Type: application/json" -d "{\"session_id\": \"$session_id\", \"serial_num\": \"$envoy_serial\", \"username\": \"$user\"}")
echo $web_token

Loading…
Cancel
Save