dans outils de dev / services, justement je n ai pas call_grdf dans la liste deroulante c est bien là mon probleme …
si je le fait en yalm , pareil, il me dit le serivce defini n est pas valide
( cf mes derniers screenshoot )
pourant dans le service.log, j ai ça hier soir …
2023-11-16 23:11:04,835 : OK : Using /usr/bin/python3 Version 3.11.6Loading configuration file : /m2h_config.json
2023-11-16 23:11:04,839 : -- : Start loading configuration
2023-11-16 23:11:04,841 : OK : "veolia" = "False"
2023-11-16 23:11:04,843 : OK : "veolia_login" = "None"
2023-11-16 23:11:04,844 : OK : "veolia_password" = "None"
2023-11-16 23:11:04,845 : OK : "veolia_contract" = "None"
2023-11-16 23:11:04,846 : OK : "grdf" = "True"
2023-11-16 23:11:04,847 : OK : "grdf_login" = "*****@gmail.com"
2023-11-16 23:11:04,849 : OK : "grdf_password" = "***************"
2023-11-16 23:11:04,850 : OK : "grdf_pce" = "********"
2023-11-16 23:11:04,851 : OK : "screenshot" = "True"
2023-11-16 23:11:04,852 : OK : "skip_download" = "False"
2023-11-16 23:11:04,853 : OK : "keep_output" = "True"
2023-11-16 23:11:04,854 : WW : "geckodriver" not found in config file, using default value
2023-11-16 23:11:04,855 : OK : "geckodriver" = "/MetersToHA/apps/meters_to_ha/geckodriver"
2023-11-16 23:11:04,856 : WW : "firefox" not found in config file, using default value
2023-11-16 23:11:04,857 : OK : "firefox" = "/MetersToHA/apps/meters_to_ha/firefox"
2023-11-16 23:11:04,857 : WW : "chromium" not found in config file, using default value
2023-11-16 23:11:04,858 : OK : "chromium" = "/usr/bin/chromium"
2023-11-16 23:11:04,859 : WW : "chromedriver" not found in config file, using default value
2023-11-16 23:11:04,860 : OK : "chromedriver" = "/usr/bin/chromedriver"
2023-11-16 23:11:04,861 : OK : "chrome_version" = "None"
2023-11-16 23:11:04,862 : OK : "timeout" = "60"
2023-11-16 23:11:04,863 : OK : "download_folder" = "/config/"
2023-11-16 23:11:04,864 : OK : "logs_folder" = "/config/"
2023-11-16 23:11:04,865 : OK : "2captcha_token" = "None"
2023-11-16 23:11:04,866 : OK : "capmonster_token" = "None"
2023-11-16 23:11:04,867 : OK : "captchaai_token" = "********************************"
2023-11-16 23:11:04,868 : OK : "log_level" = "debug"
2023-11-16 23:11:04,869 : OK : End loading configuration
2023-11-16 23:11:04,870 : -- : Start Loading Home Assistant configuration
2023-11-16 23:11:04,872 : OK : "ha_server" = "https://*****.duckdns.org:8123"
2023-11-16 23:11:04,873 : OK : "ha_token" = "***************************************************************************************************************************************************************************************"
2023-11-16 23:11:04,873 : OK : "veolia_contract" = "None"
2023-11-16 23:11:04,874 : OK : "timeout" = "60"
2023-11-16 23:11:04,875 : OK : "insecure" = "False"
2023-11-16 23:11:04,876 : OK : "state_file" = "/config/meters2ha_state.json"
2023-11-16 23:11:04,877 : OK : End loading Home Assistant configuration
2023-11-16 23:11:04,878 : ~~ : Check availability of "geckodriver"+"firefox" or "chromedriver"+"chromium"
2023-11-16 23:11:04,879 : OK : Found chromium binary
2023-11-16 23:11:06,107 : OK : Check Home Assistant connectivity
2023-11-16 23:11:06,109 : -- : Try starting Chromium. Add nix root user options.
2023-11-16 23:11:06,725 : OK : Start virtual display (Chromium).
2023-11-16 23:11:06,726 : ~~ : LOG LEVEL debug:10:20 ['--verbose']
2023-11-16 23:11:09,505 : OK : Start the browser
2023-11-16 23:11:09,506 : OK :
2023-11-16 23:11:23,627 : OK : Connexion au site GRDF
2023-11-16 23:11:26,996 : OK : Waiting for Password
2023-11-16 23:11:27,257 : OK : Waiting for Email
2023-11-16 23:11:29,987 : OK : Type Email
2023-11-16 23:11:32,011 : OK : Type Password
2023-11-16 23:11:32,116 : ~~ : Proceed with captcha resolution. Captchaai https://ocr.captchaai.com/in.php?key=****&method=userrecaptcha&googlekey=*****&pageurl=https%3A%2F%2Flogin.monespace.grdf.fr%3A443&from=151169
2023-11-16 23:11:32,616 : ~~ : Captchaai Service response OK|1333737833
2023-11-16 23:11:32,617 : ~~ : Wait 20s for Captchaai
2023-11-16 23:11:52,951 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:11:52,952 : ~~ : Wait 10s for Captchaai
2023-11-16 23:12:04,331 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:12:04,332 : ~~ : Wait 10s for Captchaai
2023-11-16 23:12:15,815 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:12:15,819 : ~~ : Wait 10s for Captchaai
2023-11-16 23:12:27,178 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:12:27,179 : ~~ : Wait 10s for Captchaai
2023-11-16 23:12:38,524 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:12:38,525 : ~~ : Wait 10s for Captchaai
2023-11-16 23:12:49,944 : ~~ : Captchaai Service response CAPCHA_NOT_READY
2023-11-16 23:12:49,945 : ~~ : Wait 10s for Captchaai
2023-11-16 23:13:00,271 : ~~ : Captchaai Service response OK|*****
2023-11-16 23:13:03,316 : OK : Automatic resolution succeeded. Grab & Save '/config/screen_before_connection.png'. Wait for Button xpath://input[@value='Connexion'].
2023-11-16 23:13:03,317 : ~~ : Wait before clicking (1.1s).
2023-11-16 23:13:05,099 : OK : Click on connexion
2023-11-16 23:13:28,013 : -- : End of wait after connexion. Get Data URL https://monespace.grdf.fr/api/e-conso/pce/consommation/informatives?dateDebut=2023-11-02&dateFin=2023-11-16&pceList[]=****Get Data Content. Writing '/config/historique_gazpar.json'. Parsing JSON file.
2023-11-16 23:13:28,916 : -- : From sensor.grdf_***_kwh: None
2023-11-16 23:13:29,610 : -- : From sensor.gas_consumption_kwh: None
2023-11-16 23:13:30,954 : ~~ : grdf_state: {'state': 121, 'attributes': {'date_time': '2023-11-15T06:00:00+01:00', 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'last_check': '2023-11-16T13:10:24.344191+00:00'}, 'm3': 979}
2023-11-16 23:13:30,955 : -- : Previous 979 m3 121 kWh 2023-11-15 06:00:00+01:00 from None
2023-11-16 23:13:30,956 : WW : No new data, no update
2023-11-16 23:13:30,957 : OK : Finished on success, cleaning up
2023-11-16 23:13:31,193 : OK : Close Browser
2023-11-16 23:13:31,219 : OK : Close Display
c est donc bien que l automation le lance non ? l automation ne fait pourtant que lancer :
action:
- delay: "{{ range(0, 55*60+1) | random }}"
alias: Avec un délai variable pour ne pas charger le serveur tous en même temps.
- event: call_grdf
event_data: {}
bon ca s est lancé hier soir ( 2 fois ) , mais j ai pas les sensors