Je fais un nouveau message pour plus de lisibilité. J'ai fait pas mal de modif, je ne sais pas laquelle a été la bonne...
2- j'ai revu le script pour remplacer http par https et la localisation en coordonnées long/lat par la ville:
Et cela semble avoir fonctionné (en tout cas mon fichier est correctement rempli):
Code : Tout sélectionner
Status: dzVents: Info: Extraction prévisions météo v1.0a: ------ Start external script: previsionMeteo.lua:, trigger: every 10 minutes
Status: dzVents: Debug: Extraction prévisions météo v1.0a: OpenURL: url = https://www.prevision-meteo.ch/services/json/saint-jean
Status: dzVents: Debug: Extraction prévisions météo v1.0a: OpenURL: method = GET
Status: dzVents: Debug: Extraction prévisions météo v1.0a: OpenURL: post data = nil
Status: dzVents: Debug: Extraction prévisions météo v1.0a: OpenURL: headers = nil
Status: dzVents: Debug: Extraction prévisions météo v1.0a: OpenURL: callback = prevision-meteo_response
Status: dzVents: Info: Extraction prévisions météo v1.0a: ------ Finished previsionMeteo.lua
Status: dzVents: Debug: Commands sent to Domoticz:
Status: dzVents: Debug: - OpenURL = {["URL"]="https://www.prevision-meteo.ch/services/json/saint-jean", ["_trigger"]="prevision-meteo_response", ["method"]="GET"}
Status: dzVents: Debug: =====================================================
Status: EventSystem: Script event triggered: /usr/local/domoticz/dzVents/runtime/dzVents.lua
Status: dzVents: Debug: Dumping domoticz data to /usr/local/domoticz/var/scripts/dzVents/domoticzData.lua
Status: dzVents: Debug: dzVents version: 2.4.6
Status: dzVents: Debug: Event triggers:
Status: dzVents: Debug: - HTTPResponse: prevision-meteo_response
Status: dzVents: Info: Handling httpResponse-events for: "prevision-meteo_response
Status: dzVents: Info: Extraction prévisions météo v1.0a: ------ Start external script: previsionMeteo.lua: HTTPResponse: "prevision-meteo_response"
Status: dzVents: Debug: Extraction prévisions météo v1.0a: {"city_info":{"country":"France","elevation":"206","latitude":"43.6658325","longitude":"1.5052780","name":"Saint-Jean","sunrise":"06:43","sunset":"19:15"},"current_condition":{"condition":"Nuit nuageuse","condition_key":"nuit-nuageuse","date":"26.03.2020","hour":"22:00","humidity":62,"icon":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/nuit-nuageuse.png","icon_big":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/nuit-nuageuse-big.png","pressure":1011.5,"tmp":5,"wnd_dir":"O","wnd_gust":6,"wnd_spd":4},"fcst_day_0":{"condition":"Fortement nuageux","condition_key":"fortement-nuageux","date":"26.03.2020","day_long":"Jeudi","day_short":"Jeu.","hourly_data":{"0H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":-7,"CONDITION":"Nuit nuageuse","CONDITION_KEY":"nuit-nuageuse","DPT2m":0.9,"HCDC":"0.00","HGT0C":1500,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/nuit-nuageuse.png","ISSNOW":0,"KINDEX":39,"LCDC":"1.10","MCDC":"100.00","PRMSL":1008.4,"RH2m":71,"TMP2m":5.9,"WNDCHILL2m":3,"WNDDIR10m":165,"WNDDIRCARD10":"S","WNDGUST10m":22,"WNDSPD10m":14},"10H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":0.8,"HCDC":"100.00","HGT0C":900,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":37,"LCDC":"91.30","MCDC":"100.00","PRMSL":1008.9,"RH2m":70,"TMP2m":5.9,"WNDCHILL2m":2.6,"WNDDIR10m":145,"WNDDIRCARD10":"SE","WNDGUST10m":28,"WNDSPD10m":17},"11H00":{"APCPsfc":0,"CAPE180_0":"32.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":1,"HCDC":"98.80","HGT0C":900,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":38,"LCDC":"15.60","MCDC":"100.00","PRMSL":1009,"RH2m":62,"TMP2m":7.8,"WNDCHILL2m":4.8,"WNDDIR10m":157,"WNDDIRCARD10":"SE","WNDGUST10m":29,"WNDSPD10m":18},"12H00":{"APCPsfc":0,"CAPE180_0":"46.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":0.3,"HCDC":"11.30","HGT0C":1000,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":43,"LCDC":"90.10","MCDC":"100.00","PRMSL":1008.5,"RH2m":54,"TMP2m":9.2,"WNDCHILL2m":6.5,"WNDDIR10m":142,"WNDDIRCARD10":"SE","WNDGUST10m":30,"WNDSPD10m":19},"13H00":{"APCPsfc":0,"CAPE180_0":"78.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":1.1,"HCDC":"92.90","HGT0C":1000,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":42,"LCDC":"78.60","MCDC":"100.00","PRMSL":1008.8,"RH2m":59,"TMP2m":8.7,"WNDCHILL2m":5.4,"WNDDIR10m":126,"WNDDIRCARD10":"SE","WNDGUST10m":38,"WNDSPD10m":24},"14H00":{"APCPsfc":0,"CAPE180_0":"67.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":1,"HCDC":"100.00","HGT0C":1000,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":42,"LCDC":"35.70","MCDC":"100.00","PRMSL":1008.9,"RH2m":56,"TMP2m":9.4,"WNDCHILL2m":5.9,"WNDDIR10m":123,"WNDDIRCARD10":"SE","WNDGUST10m":44,"WNDSPD10m":28},"15H00":{"APCPsfc":0,"CAPE180_0":"33.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":-0.2,"HCDC":"100.00","HGT0C":1100,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":41,"LCDC":"40.80","MCDC":"100.00","PRMSL":1008.8,"RH2m":49,"TMP2m":10.1,"WNDDIR10m":128,"WNDDIRCARD10":"SE","WNDGUST10m":43,"WNDSPD10m":24},"16H00":{"APCPsfc":0,"CAPE180_0":"26.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":-0.3,"HCDC":"99.70","HGT0C":1100,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":41,"LCDC":"45.80","MCDC":"100.00","PRMSL":1009.1,"RH2m":48,"TMP2m":10.3,"WNDDIR10m":121,"WNDDIRCARD10":"SE","WNDGUST10m":37,"WNDSPD10m":20},"17H00":{"APCPsfc":0,"CAPE180_0":"10.000","CIN180_0":0,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":-1.1,"HCDC":"33.20","HGT0C":1200,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":39,"LCDC":"34.30","MCDC":"100.00","PRMSL":1008.9,"RH2m":44,"TMP2m":10.5,"WNDDIR10m":121,"WNDDIRCARD10":"SE","WNDGUST10m":32,"WNDSPD10m":16},"18H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Eclaircies","CONDITION_KEY":"eclaircies","DPT2m":-2.2,"HCDC":"0.00","HGT0C":1200,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/eclaircies.png","ISSNOW":0,"KINDEX":40,"LCDC":"1.50","MCDC":"100.00","PRMSL":1009,"RH2m":42,"TMP2m":10.2,"WNDDIR10m":133,"WNDDIRCARD10":"SE","WNDGUST10m":26,"WNDSPD10m":14},"19H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Eclaircies","CONDITION_KEY":"eclaircies","DPT2m":-2.2,"HCDC":"0.00","HGT0C":1200,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/eclaircies.png","ISSNOW":0,"KINDEX":38,"LCDC":"1.50","MCDC":"100.00","PRMSL":1009.4,"RH2m":52,"TMP2m":7.1,"WNDCHILL2m":5.6,"WNDDIR10m":144,"WNDDIRCARD10":"SE","WNDGUST10m":22,"WNDSPD10m":8},"1H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":-6,"CONDITION":"Fortement nuageux","CONDITION_KEY":"fortement-nuageux","DPT2m":1.1,"HCDC":"3.90","HGT0C":1500,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/fortement-nuageux.png","ISSNOW":0,"KINDEX":36,"LCDC":"38.60","MCDC":"100.00","PRMSL":1007.9,"RH2m":64,"TMP2m":7.5,"WNDCHILL2m":4.3,"WNDDIR10m":175,"WNDDIRCARD10":"S","WNDGUST10m":31,"WNDSPD10m":19},"20H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Nuit nuageuse","CONDITION_KEY":"nuit-nuageuse","DPT2m":-2,"HCDC":"39.30","HGT0C":1200,"ICON":"http://192.168.1.100:8084/monitor/icons/prevision-meteo/nuit-nuageuse.png","ISSNOW":0,"KINDEX":41,"LCDC":"0.00","MCDC":"55.60","PRMSL":1010.1,"RH2m":55,"TMP2m":6.5,"WNDCHILL2m":5.8,"WNDDIR10m":157,"WNDDIRCARD10":"SE","WNDGUST10m":13,"WNDSPD10m":5},"21H00":{"APCPsfc":0,"CAPE
Status: dzVents: Debug: Extraction prévisions météo v1.0a: ecriture des données dans le fichier /volume1/domoticz/www/monitor/prevision-meteo.json
Status: dzVents: Info: Extraction prévisions météo v1.0a: ------ Finished previsionMeteo.lua
Je reste intimement convaincu que la plupart des pertes/erreurs sur prevision-meteo viennent de la redirection http => https qui est faite par le serveur en direct.