Merci de la réponse rapide. J'ai mis en place ce script hier, après avoir galéré une semaine.
Code : Tout sélectionner
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: latitude : 47.366285
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: longitude : -1.619198
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: url = https://www.prevision-meteo.ch/services/json/lat=47.366285lng=-1.619198
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: method = GET
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: post data = nil
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: headers = nil
2020-04-27 06:36:00.579 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: callback = prevision-meteo_response
2020-04-27 06:36:00.579 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua
2020-04-27 06:36:00.580 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2020-04-27 06:36:02.925 Status: dzVents: Info: Handling httpResponse-events for: "prevision-meteo_response"
2020-04-27 06:36:02.925 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Start external script: previsionMeteo.lua: HTTPResponse: "prevision-meteo_response"
2020-04-27 06:36:03.082 Status: dzVents: Debug: Extraction prévisions météo v1.01: {"city_info":{"country":"--","elevation":"NA","latitude":"47.366285","longitude":"-1.619198","name":"NA","sunrise":"06:53","sunset":"21:14"},"current_condition":{"condition":"Stratus","condition_key":"stratus","date":"27.04.2020","hour":"07:00","humidity":97,"icon":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/stratus.png","icon_big":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/stratus-big.png","pressure":1004.5,"tmp":7,"wnd_dir":"E","wnd_gust":11,"wnd_spd":7},"fcst_day_0":{"condition":"Averses de pluie faible","condition_key":"averses-de-pluie-faible","date":"27.04.2020","day_long":"Lundi","day_short":"Lun.","hourly_data":{"0H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Nuit nuageuse","CONDITION_KEY":"nuit-nuageuse","DPT2m":8.8,"HCDC":"0.00","HGT0C":2600,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/nuit-nuageuse.png","ISSNOW":0,"KINDEX":36,"LCDC":"0.00","MCDC":"0.00","PRMSL":1007.2,"RH2m":93,"TMP2m":9.9,"WNDCHILL2m":8.3,"WNDDIR10m":298,"WNDDIRCARD10":"NO","WNDGUST10m":18,"WNDSPD10m":11},"10H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":-4,"CONDITION":"Ensoleillé","CONDITION_KEY":"ensoleille","DPT2m":10.4,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/ensoleille.png","ISSNOW":0,"KINDEX":39,"LCDC":"0.00","MCDC":"0.00","PRMSL":1004.9,"RH2m":88,"TMP2m":12.5,"WNDDIR10m":321,"WNDDIRCARD10":"NO","WNDGUST10m":4,"WNDSPD10m":2},"11H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Ensoleillé","CONDITION_KEY":"ensoleille","DPT2m":10.7,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/ensoleille.png","ISSNOW":0,"KINDEX":38,"LCDC":"0.00","MCDC":"0.00","PRMSL":1004.7,"RH2m":87,"TMP2m":12.8,"WNDDIR10m":267,"WNDDIRCARD10":"O","WNDGUST10m":10,"WNDSPD10m":6},"12H00":{"APCPsfc":0.1,"CAPE180_0":"0.000","CIN180_0":-8,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":11.4,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":35,"LCDC":"0.00","MCDC":"0.00","PRMSL":1004.4,"RH2m":83,"TMP2m":14.3,"WNDDIR10m":297,"WNDDIRCARD10":"NO","WNDGUST10m":13,"WNDSPD10m":8},"13H00":{"APCPsfc":0.1,"CAPE180_0":"48.000","CIN180_0":-6,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":12,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":37,"LCDC":"0.00","MCDC":"0.00","PRMSL":1003.9,"RH2m":76,"TMP2m":16.2,"WNDDIR10m":340,"WNDDIRCARD10":"N","WNDGUST10m":16,"WNDSPD10m":10},"14H00":{"APCPsfc":0.1,"CAPE180_0":"134.000","CIN180_0":-10,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":12.1,"HCDC":"55.60","HGT0C":2300,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":37,"LCDC":"0.00","MCDC":"0.00","PRMSL":1003.6,"RH2m":75,"TMP2m":16.5,"WNDDIR10m":345,"WNDDIRCARD10":"N","WNDGUST10m":16,"WNDSPD10m":7},"15H00":{"APCPsfc":1.7,"CAPE180_0":"96.000","CIN180_0":0,"CONDITION":"Faiblement orageux","CONDITION_KEY":"faiblement-orageux","DPT2m":13.5,"HCDC":"0.00","HGT0C":2500,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/faiblement-orageux.png","ISSNOW":0,"KINDEX":34,"LCDC":"0.00","MCDC":"0.00","PRMSL":1002.5,"RH2m":89,"TMP2m":15.3,"WNDDIR10m":308,"WNDDIRCARD10":"NO","WNDGUST10m":29,"WNDSPD10m":18},"16H00":{"APCPsfc":2.4,"CAPE180_0":"68.000","CIN180_0":0,"CONDITION":"Faiblement orageux","CONDITION_KEY":"faiblement-orageux","DPT2m":13.7,"HCDC":"0.00","HGT0C":2500,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/faiblement-orageux.png","ISSNOW":0,"KINDEX":34,"LCDC":"0.00","MCDC":"0.00","PRMSL":1002.3,"RH2m":95,"TMP2m":14.5,"WNDDIR10m":292,"WNDDIRCARD10":"O","WNDGUST10m":32,"WNDSPD10m":19},"17H00":{"APCPsfc":1.6,"CAPE180_0":"22.000","CIN180_0":0,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":13,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":34,"LCDC":"0.00","MCDC":"0.00","PRMSL":1002.2,"RH2m":95,"TMP2m":13.9,"WNDDIR10m":289,"WNDDIRCARD10":"O","WNDGUST10m":30,"WNDSPD10m":15},"18H00":{"APCPsfc":0.2,"CAPE180_0":"7.000","CIN180_0":0,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":12.4,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":34,"LCDC":"0.00","MCDC":"0.00","PRMSL":1002.1,"RH2m":94,"TMP2m":13.4,"WNDDIR10m":308,"WNDDIRCARD10":"NO","WNDGUST10m":25,"WNDSPD10m":16},"19H00":{"APCPsfc":0.6,"CAPE180_0":"3.000","CIN180_0":0,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":11.8,"HCDC":"0.00","HGT0C":2400,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/averses-de-pluie-faible.png","ISSNOW":0,"KINDEX":35,"LCDC":"0.00","MCDC":"0.00","PRMSL":1001.9,"RH2m":97,"TMP2m":12.3,"WNDDIR10m":297,"WNDDIRCARD10":"NO","WNDGUST10m":26,"WNDSPD10m":16},"1H00":{"APCPsfc":0,"CAPE180_0":"0.000","CIN180_0":0,"CONDITION":"Nuit nuageuse","CONDITION_KEY":"nuit-nuageuse","DPT2m":8.2,"HCDC":"0.00","HGT0C":2600,"ICON":"http://192.168.1.79:8080/home/pi/domoticz/www/monitor/icons/prevision-meteo/nuit-nuageuse.png","ISSNOW":0,"KINDEX":35,"LCDC":"0.00","MCDC":"0.00","PRMSL":1006.8,"RH2m":95,"TMP2m":9.1,"WNDCHILL2m":7.6,"WNDDIR10m":315,"WNDDIRCARD10":"NO","WNDGUST10m":17,"WNDSPD10m":10},"20H00":{"APCPsfc":0.7,"CAPE180_0":"3.000","CIN180_0":0,"CONDITION":"Averses de pluie faible","CONDITION_KEY":"averses-de-pluie-faible","DPT2m":11.7,"HCDC":"33.30","HGT0C":2400,"ICON":"htt
2020-04-27 06:36:03.083 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua
2020-04-27 06:36:03.082 Error: dzVents: Error: (3.0.1) Extraction prévisions météo v1.01: An error occurred when calling event handler previsionMeteo
2020-04-27 06:36:03.083 Error: dzVents: Error: (3.0.1) Extraction prévisions météo v1.01: ...e/pi/domoticz/scripts/dzVents/scripts/previsionMeteo.lua:131: attempt to index a nil value (global 'file')
Bonne semaine.