Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connexion impossible au site GRDF (captcha supprimé) #81

Open
Cyril035 opened this issue Aug 16, 2024 · 16 comments
Open

Connexion impossible au site GRDF (captcha supprimé) #81

Cyril035 opened this issue Aug 16, 2024 · 16 comments

Comments

@Cyril035
Copy link

J'ai installé l'addon gazpar2mqtt d' @alexbelgium
Impossible de se connecter au site grdf, le site retourne un code 302

OS : Raspbian BullEyes
Hass version : HomeAssistant supervised.

Ci dessous les logs de l'addon


15:48:14] INFO: ... no script found
/etc/cont-init.d/89-mqtt_autodiscover.sh: executing
[15:48:15] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[15:48:15] INFO: ... MQTT service found, fetching server detail (you can enter those manually in your config file) ...
MQTT_HOST=core-mosquitto
MQTT_PORT=1883
MQTT_SSL=false
MQTT_USERNAME=addons
MQTT_PASSWORD=***************
/etc/cont-init.d/90-config_yaml.sh: executing
Using config file found in /config/gazpar2mqtt/config.yaml
Config file is a valid yaml
[15:48:16] INFO: Starting the app with the variables in /config/gazpar2mqtt/config.yaml
GRDF_USERNAME=************
GRDF_PASSWORD=**************
SCHEDULE_TIME=\'19:00\'
STANDALONE_MODE=\'false\'
HASS_DISCOVERY=\'true\'
HASS_PREFIX=\'homeassistant\'
MQTT_HOST=\'core-mosquitto\'
MQTT_PORT=\'1883\'
MQTT_TOPIC=\'gazpar2mqtt\'
MQTT_SSL=\'false\'
MQTT_USERNAME=*********
MQTT_PASSWORD=***********
DEBUG=\'true\'
/etc/cont-init.d/99-run.sh: executing
 
Starting the app
 
2024-08-16 15:48:20,350 INFO -----------------------------------------------------------
2024-08-16 15:48:20,351 INFO #               Welcome to gazpar2mqtt                    #
2024-08-16 15:48:20,351 INFO -----------------------------------------------------------
2024-08-16 15:48:20,351 INFO Program version : 0.8.2
2024-08-16 15:48:20,351 INFO Database version : 0.8.0
2024-08-16 15:48:20,351 INFO Influxdb version : 0.8.0
2024-08-16 15:48:20,352 INFO Please note that the the tool is still under development, various functions may disappear or be modified.
2024-08-16 15:48:20,352 DEBUG If you can read this line, you are in DEBUG mode.
2024-08-16 15:48:20,352 INFO -----------------------------------------------------------
2024-08-16 15:48:20,352 INFO #                Program parameters                       #
2024-08-16 15:48:20,352 INFO -----------------------------------------------------------
2024-08-16 15:48:20,352 INFO GRDF config : username = ******@****.**, password = ******
2024-08-16 15:48:20,352 DEBUG GRDF config : username = ***********, password = **********
2024-08-16 15:48:20,352 INFO MQTT broker config : host = core-mosquitto, port = 1883, clientId = gazpar2mqtt, qos = 1, topic = gazpar2mqtt, retain = False, ssl = False
2024-08-16 15:48:20,352 INFO Standlone mode : Enable = False
2024-08-16 15:48:20,353 INFO Home Assistant discovery : Enable = True, Topic prefix = homeassistant, Device name = gazpar
2024-08-16 15:48:20,353 INFO Thresold options : Warning percentage = 80
2024-08-16 15:48:20,353 INFO Influxdb config : Enable = False
2024-08-16 15:48:20,353 INFO Price config : Default price = 0.07 €/kWh, default fix price = 0.9 €/day, path to file = /data
2024-08-16 15:48:20,354 INFO Database options : Force reinitialization = False, Path = /data
2024-08-16 15:48:20,354 INFO Debug mode : Enable = True
2024-08-16 15:48:20,354 INFO Check parameters...
2024-08-16 15:48:20,354 INFO Parameters are ok !
2024-08-16 15:48:20,354 INFO -----------------------------------------------------------
2024-08-16 15:48:20,354 INFO #        Connexion to SQLite database                     #
2024-08-16 15:48:20,354 INFO -----------------------------------------------------------
2024-08-16 15:48:20,355 INFO Connexion to SQLite database...
2024-08-16 15:48:20,355 DEBUG Connexion to database
2024-08-16 15:48:20,356 INFO SQLite database connected !
2024-08-16 15:48:20,358 INFO Last execution date 2024-08-15 23:21:32.069786, program was in version 0.8.2.
2024-08-16 15:48:20,358 INFO Checking database version...
2024-08-16 15:48:20,359 INFO Your database is already up to date : version 0.8.0.
2024-08-16 15:48:20,359 INFO Retrieve database statistics...
2024-08-16 15:48:20,360 INFO 0 informatives measures stored
2024-08-16 15:48:20,361 INFO 0 PCE(s)
2024-08-16 15:48:20,361 INFO First measure : None
2024-08-16 15:48:20,362 INFO Last measure : None
2024-08-16 15:48:20,362 INFO -----------------------------------------------------------
2024-08-16 15:48:20,362 INFO #              Connexion to Mqtt broker                   #
2024-08-16 15:48:20,363 INFO -----------------------------------------------------------
2024-08-16 15:48:20,363 INFO Connect to Mqtt broker...
2024-08-16 15:48:20,363 DEBUG Mqtt connect : activation of callbacks
2024-08-16 15:48:20,364 DEBUG Mqtt connect : connection to broker core-mosquitto:1883...
2024-08-16 15:48:20,368 DEBUG Wait for conexion callback
2024-08-16 15:48:22,372 DEBUG Mqtt on_connect callback : Connection Accepted.
2024-08-16 15:48:22,373 DEBUG Mqtt on_connect callback : connected
2024-08-16 15:48:24,374 INFO Mqtt broker connected !
2024-08-16 15:48:24,375 INFO -----------------------------------------------------------
2024-08-16 15:48:24,375 INFO #            Get data from GRDF website                   #
2024-08-16 15:48:24,375 INFO -----------------------------------------------------------
2024-08-16 15:48:24,375 INFO Connexion to GRDF, try 1/14...
2024-08-16 15:48:24,382 DEBUG Starting new HTTPS connection (1): monespace.grdf.fr:443
2024-08-16 15:48:24,494 DEBUG https://monespace.grdf.fr:443 "GET /client/particulier/accueil HTTP/1.1" 302 None
2024-08-16 15:48:24,510 DEBUG Starting new HTTPS connection (1): connexion.grdf.fr:443
2024-08-16 15:48:24,978 DEBUG https://connexion.grdf.fr:443 "GET /oauth2/aus5y2ta2uEHjCWIR417/v1/authorize?response_type=code&scope=openid+profile+email&client_id=0oa95ese18blzdg3p417&state=%2Fclient%2Fparticulier%2Faccueil&redirect_uri=https://monespace.grdf.fr/_codexch&nonce=AWELX3cLY3hHr_wti_Xd94aHw5rGCeS-V7ho3q4FRMM&by_pass_okta=1&capp=meg HTTP/1.1" 200 None
2024-08-16 15:48:24,985 DEBUG Cookies ok.
2024-08-16 15:48:24,985 DEBUG auth_nonce: f7660dfd9283f05d06f47e8928f4b3d8
2024-08-16 15:48:24,986 DEBUG Logging ...
2024-08-16 15:48:24,986 DEBUG Logging payload : {'email': '********', 'password': '***********', 'capp': 'meg', 'goto': 'https://sofa-connexion.grdf.fr:443/openam/oauth2/externeGrdf/authorize'}
2024-08-16 15:48:24,994 DEBUG Starting new HTTPS connection (1): login.monespace.grdf.fr:443
2024-08-16 15:48:25,101 DEBUG https://login.monespace.grdf.fr:443 "POST /sofit-account-api/api/v1/auth HTTP/1.1" 302 None
2024-08-16 15:48:25,106 DEBUG Logging returned : <html>
<head><title>302 Found</title><script type="text/javascript" src="/ruxitagentjs_ICA7NVfgqrux_10291240606133530.js" data-dtconfig="rid=RID_-1017566506|rpid=1644507608|domain=grdf.fr|reportUrl=/rb_28b71b64-4e54-4ada-9d42-8518f652345d|app=ba8bbae595af8ce5|cuc=2hlb4rsn|mel=100000|featureHash=ICA7NVfgqrux|dpvc=1|ssv=4|lastModification=1720006023771|tp=500,50,0|rdnt=0|uxrgce=1|bp=3|agentUri=/ruxitagentjs_ICA7NVfgqrux_10291240606133530.js"></script></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.19.0</center>
</body>
</html>

2024-08-16 15:48:25,106 INFO Unable to login to GRDF website
2024-08-16 15:48:25,107 INFO Wait 20 seconds (0 min) before next try

@alexbelgium
Copy link
Contributor

À priori je ne vois pas de message lié à un dysfonctionnement de l'addon

@Cyril035
Copy link
Author

Désolé sous le message de logs, à la fin il y a

024-08-16 15:48:25,106 INFO Unable to login to GRDF website

J ai fini par avoir un blocage de mon compte grdf à cause de trop de tentatives échouées

@yukulehe
Copy link
Owner

Hello,
Ca fait longtemps que j'ai abandonné ce projet après l'arrivée du Captcha.
Désolé, mais j'en assure plus la maintenance.

@alexbelgium
Copy link
Contributor

Je retire l'addon alors ?

@yukulehe
Copy link
Owner

Oui je pense que tu peux, ça fait un moment qu'il ne fonctionne plus.

@Cyril035
Copy link
Author

C'est dommage, car grdf a supprimé le captcha 😲

@yukulehe
Copy link
Owner

J'étais pas au courant. Pourquoi ils ont fait ça ? C'est temporaire ou long terme ?

@Cyril035
Copy link
Author

J ai vu ça il y a 2 jours. Depuis le mois de mai je crois... ça a l air d etre du long terme à mon avis car la mire de connexion a changé et il semble y avoir um espace dédié aux apps... peut être un truc pour gérer lea apis à l avenir ...!?

@yukulehe
Copy link
Owner

yukulehe commented Aug 16, 2024

En effet, apparemment y'en a un qui a réussi à modifier le code pour pouvoir se connecter.
https://forum.hacf.fr/t/grdf-gazpar-2-mqtt/40828/40

Dans ce cas, je vais peut être m'y remettre après les vacances.

@yukulehe
Copy link
Owner

Du coup @alexbelgium , ne supprime pas tout de suite :)

@Cyril035
Copy link
Author

Cyril035 commented Aug 16, 2024 via email

@yukulehe
Copy link
Owner

Visiblement Vingerha a fait un beau travail de rework pendant mon "absence".
Je mets son github en avant : https://github.com/vingerha/gazpar_2_mqtt
Il y a consacré pas mal de temps, bravo.

@alexbelgium
Copy link
Contributor

Ah je vois qu'il a dev aussi un add-on HA ! https://github.com/vingerha/gazpar_2_mqtt/blob/main/addon/Dockerfile

Dans ce cas je vais probablement retirer le mien alors et mettre un message pour orienter les utilisateurs vers celui ci, sauf si tu veux quand même mettre à jour ton app et garder l'addon

@pbranly
Copy link

pbranly commented Aug 16, 2024

Pour info
J'utilise la version docker et ta carte grafana fonctionne parfaitement
Phil

@pbranly
Copy link

pbranly commented Aug 16, 2024

image
image

@yukulehe
Copy link
Owner

@alexbelgium , je vais m'accorder une semaine de réflexion
@pbranly , sympa ! Ca fait plaisir de voir quelqu'un l'utiliser. J'avais bien galéré avec influxdb v2 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants