DZVents : mise en cache des données de l’API prevision_meteo.ch

Vous avez crée un script lua dont vous êtes fier, un .sh génial, un programme python hors du commun, un tuto , c'est ici que vous pouvez les partager.
Soyez précis quant aux prérequis, les manips à faire pour que votre bijou fonctionne (des chmod ?, un apt-get à faire ...)
Décrivez précisément son fonctionnement
Placez votre code entre [Quote] et {/Quote]
Doudy
Messages : 213
Enregistré le : 07 mai 2016, 17:23

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par Doudy » 03 déc. 2019, 13:08

raphy383 a écrit :
03 déc. 2019, 12:04
dans tous les cas, maintenant, tu dois modifier les propriétés du fichier json qui a été créé :
sur ta capture d'écran, c'est un fichier "root", et il ne pourra pas etre "relu" sinon.
J'ai déjà fait :
Image

raphy383 a écrit :
03 déc. 2019, 12:04
quels étaient les droits auparavant ?
Je ne sais plus
:oops:
PI 3 = RFXCOM
PI 3 + Touchscreen 7" affichage Domoticz
RFXCOM 433
Domoticz Version: 4.10717 - Python Version: 3.5.3

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


raphy383
Messages : 10
Enregistré le : 03 oct. 2019, 21:31

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par raphy383 » 03 déc. 2019, 14:42

Je suis désolé de ne pas etre d'une grande aide, je n'ai que peu de connaissance, mais en fouillant dans tes log , les derniers que tu as postés,

Code : Tout sélectionner

2019-12-03 09:24:05.822 Status: dzVents: Error (2.4.19): Extraction prévisions météo v1.01: Last http response was not what expected. Trigger: prevision-meteo_response
ça marque DzVentz: error (2.4.19)

une petite recherche dans google me donne :
https://www.domoticz.com/wiki/DzVents:_ ... B2.4.19.5D

c'est 2.4.19 ta version de DzVents ?
ou alors, c'est DzVents qui relie le code erreur à son numéro de version

En tout cas, pour moi, cela n'a aucun lien avec le délai de réponse du site internet, mais bien une difficulté soit à interpréter ce qu'il a reçu, soit à l'écrire dans le fichier json.

Doudy
Messages : 213
Enregistré le : 07 mai 2016, 17:23

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par Doudy » 03 déc. 2019, 15:54

raphy383 a écrit :
03 déc. 2019, 14:42
c'est 2.4.19 ta version de DzVents ?
ou alors, c'est DzVents qui relie le code erreur à son numéro de version
C'est bien la version de dzVents :
Image

;)
PI 3 = RFXCOM
PI 3 + Touchscreen 7" affichage Domoticz
RFXCOM 433
Domoticz Version: 4.10717 - Python Version: 3.5.3

raphy383
Messages : 10
Enregistré le : 03 oct. 2019, 21:31

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par raphy383 » 03 déc. 2019, 16:22

je n'arrive pas à voir ma version...
as tu essayé d'installer une version plus récente ?

(fais une sauvegarde, voire même une image de la SD avant)

lu sur le site dont je parlais :
Breaking change warning!!: For people using with dzVents prior to version 2.4: Please read the change log below as there is an easy-to-fix breaking change regarding the second parameter passed to the execute function (it is no longer nil for timer/security triggers).

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


Doudy
Messages : 213
Enregistré le : 07 mai 2016, 17:23

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par Doudy » 04 déc. 2019, 08:07

:!: A papoo : qu'en penses-tu ?
Doudy a écrit :
03 déc. 2019, 11:48
Hello,
Je viens de refaire quelques tests.
J'ai modifié les propriétés du dossier monitor
Image

Hier, le script a réussi à créer le fichier prevision-meteo.json mais je ne sais plus quand et comment cela s'est produit
Image

Voilà maintenant les résultats du log :

Code : Tout sélectionner

2019-12-03 09:24:00.657 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Start external script: previsionMeteo.lua:, trigger: every 6 minutes
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: latitude : 45.85860
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: longitude : 1.23190
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: url = https://www.prevision-meteo.ch/services/json/lat=50.66334lng=3.79129
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: method = GET
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: post data = nil
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: headers = nil
2019-12-03 09:24:00.657 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: callback = prevision-meteo_response
2019-12-03 09:24:00.657 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua

2019-12-03 09:24:05.822 Status: dzVents: Info: Handling httpResponse-events for: "prevision-meteo_response
2019-12-03 09:24:05.822 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Start external script: previsionMeteo.lua: HTTPResponse: "prevision-meteo_response"
2019-12-03 09:24:05.822 Status: dzVents: Error (2.4.19): Extraction prévisions météo v1.01: Last http response was not what expected. Trigger: prevision-meteo_response
2019-12-03 09:24:05.822 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua 
Il y a toujours l'erreur : "Last http response was not what expected"
Je me demande si ce n'est pas la durée d'accès aux data du site meteo.ch qui pose problème !
J'ai fait des tests dans un navigateur avec l'adresse https://www.prevision-meteo.ch/services ... ng=3.79129 et il faut :
test 1 : 30"
test 2 : 26"
test 3 : 26"
test 4 : 31"
test 5 : 28"
pour avoir une réponse !

:idea: :?:
Surtout qu'entre les deux phases du scripts 09:24:00.657 et 09:24:05.822, il n'y a que 5" !
Ne faut-il pas investiguer de ce côté ?

Merci
;)
PI 3 = RFXCOM
PI 3 + Touchscreen 7" affichage Domoticz
RFXCOM 433
Domoticz Version: 4.10717 - Python Version: 3.5.3

papoo
Messages : 1905
Enregistré le : 10 janv. 2016, 11:29
Localisation : Limoges (87)
Contact :

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par papoo » 04 déc. 2019, 12:49

En ce moment l’API est extrêmement lente et génère chez moi plus d’erreurs que de fonctionnement correct
Ce n’est pas la bonne période pour savoir si le script fonctionne correctement chez vous
Les données de l’API ne sont pas mises à jour toutes les minutes, on peut donc ne lancer le script que toutes les demi heure ou même toutes les heures histoire de participer à l’amélioration de son fonctionnement
domoticz beta/RaspBerry PI3 stretch
https://pon.fr github

Doudy
Messages : 213
Enregistré le : 07 mai 2016, 17:23

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par Doudy » 04 déc. 2019, 13:27

Ok merci
Et en utilisant un autre site que previsions-meteo.ch ?

;)
PI 3 = RFXCOM
PI 3 + Touchscreen 7" affichage Domoticz
RFXCOM 433
Domoticz Version: 4.10717 - Python Version: 3.5.3

raphy383
Messages : 10
Enregistré le : 03 oct. 2019, 21:31

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par raphy383 » 04 déc. 2019, 14:28

papoo a écrit :
04 déc. 2019, 12:49
En ce moment l’API est extrêmement lente et génère chez moi plus d’erreurs que de fonctionnement correct
Ce n’est pas la bonne période pour savoir si le script fonctionne correctement chez vous
Les données de l’API ne sont pas mises à jour toutes les minutes, on peut donc ne lancer le script que toutes les demi heure ou même toutes les heures histoire de participer à l’amélioration de son fonctionnement
Oui effectivement,
Mais a titre perso, je n'ai des erreurs que entre 23h et 1h...
Rien depuis...

Moi j'ai laissé a une fois toutes les 30 minutes (même si j'avais diminués pour les tests)

Doudy
Messages : 213
Enregistré le : 07 mai 2016, 17:23

Re: DZVents : mise en cache des données de l’API prevision_meteo.ch

Message par Doudy » 05 déc. 2019, 11:51

Bonjour,

Voilà, je viens de tester un autre site : http://weather-data.org/api/doc
Avec possibilité d'avoir un token et le nombre de requêtes est limité à 1000/jour pour le moment.

J'ai essayé :
http://weather-data.org/api/get?model=i ... xxxx_453_D

Résutat :

Code : Tout sélectionner

{"forecast": {"2019-12-05 10:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 82.2444, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 278.056, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": -0.544821, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.303263, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 11:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 75.9377, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 280.263, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": -0.0851593, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.158646, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 12:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 1.1875, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 72.5924, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 281.865, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.372958, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.560678, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 13:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 2.17188, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 74.1221, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 282.724, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.630029, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.831671, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 14:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 2.29688, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 74.9457, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 282.845, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.607365, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -1.03822, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 15:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 2.26562, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 78.3999, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 282.321, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.569494, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.768864, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 16:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 1.57812, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 84.8321, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 280.741, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.909914, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.617872, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 17:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.4375, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 90.1647, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 279.221, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.77971, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.595428, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 18:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 93.3734, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 277.968, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.574191, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.800144, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 19:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 94.2389, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 277.19, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.40419, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.745646, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 20:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 94.1564, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 276.949, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": 0.0436716, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": -0.144615, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 21:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 0.0, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 95.7902, "unit": {"name": "percent", "symbol": "%"}}, "snow_depth": {"surface": 0.0, "unit": {"name": "meters", "symbol": "m"}}, "temperature": {"2 m above ground": 276.912, "unit": {"name": "kelvin", "symbol": "K"}}, "total_precipitations": {"surface": 0.0, "unit": {"name": "millimeters", "symbol": "mm"}}, "u_component_of_wind": {"10 m above ground": -0.486504, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}, "v_component_of_wind": {"10 m above ground": 0.291668, "unit": {"name": "meters_by_second", "symbol": "m.s^(-1)"}}}, "2019-12-05 22:00:00": {"cloud_cover": {"0-400 mb": 0.0, "400-800 mb": 0.0, "800 mb - surface": 15.9062, "unit": {"name": "percent", "symbol": "%"}}, "convective_available_potential_energy": {"local level type 192 0": 0.0, "unit": {"name": "joules by kilogram", "symbol": "J.kg^(-1)"}}, "relative_humidity": {"2 m above ground": 97.9321, "unit": {"name": 
etc ....
J'ai modifié :

Code : Tout sélectionner

                local url = "http://weather-data.org/api/get?model=icon-eu&lon=3.79129&lat=50.66334&token=W_234_xxxxxxxxxx_453_D"
Résultat :

Code : Tout sélectionner

2019-12-05 11:31:00.325 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Start external script: previsionMeteo.lua:, trigger: every 1 minutes
2019-12-05 11:31:00.325 Status: dzVents: Debug: Extraction prévisions météo v1.01: latitude : 50.66334
2019-12-05 11:31:00.325 Status: dzVents: Debug: Extraction prévisions météo v1.01: longitude : 3.79129
2019-12-05 11:31:00.325 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: url = http://weather-data.org/api/get?model=icon-eu&lon=3.79129&lat=50.66334&token=W_234_xxxxxxxxxx_453_D
2019-12-05 11:31:00.325 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: method = GET
2019-12-05 11:31:00.326 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: post data = nil
2019-12-05 11:31:00.326 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: headers = nil
2019-12-05 11:31:00.326 Status: dzVents: Debug: Extraction prévisions météo v1.01: OpenURL: callback = prevision-meteo_response
2019-12-05 11:31:00.326 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua
2019-12-05 11:31:00.326 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-12-05 11:31:01.096 Status: dzVents: Debug: Extraction prévisions météo v1.01: {"forecast":{"2019-12-05 10:00:00":{"cloud_cover":{"0-400 mb":10.8535,"400-800 mb":0,"800 mb - surface":67.4902,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":92.9886,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":274.191,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.54991,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":2.39791,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 11:00:00":{"cloud_cover":{"0-400 mb":5.05859,"400-800 mb":0,"800 mb - surface":76.5449,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":90.926,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":275.377,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":2.19218,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":2.60698,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 12:00:00":{"cloud_cover":{"0-400 mb":0.0351562,"400-800 mb":0,"800 mb - surface":74.0156,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":90.7155,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":275.985,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.74991,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":3.39538,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 13:00:00":{"cloud_cover":{"0-400 mb":30.3438,"400-800 mb":0,"800 mb - surface":58.791,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0.859375,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":90.6631,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":276.256,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.76772,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":4.11462,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 14:00:00":{"cloud_cover":{"0-400 mb":39.5371,"400-800 mb":0,"800 mb - surface":73.5098,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":1.15625,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":90.7641,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":276.129,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.59272,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":4.1483,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 15:00:00":{"cloud_cover":{"0-400 mb":95.4238,"400-800 mb":0,"800 mb - surface":62.668,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":1.14062,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":91.0893,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":275.804,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.57828,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":4.61102,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 16:00:00":{"cloud_cover":{"0-400 mb":100,"400-800 mb":0,"800 mb - surface":84.4551,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":1.04688,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":92.336,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":275.296,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.76245,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":4.57939,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 17:00:00":{"cloud_cover":{"0-400 mb":92.9883,"400-800 mb":0,"800 mb - surface":82.9238,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":1.48438,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":93.6237,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":274.951,"unit":{"name":"k
2019-12-05 11:31:01.097 Status: dzVents: Debug: Extraction prévisions météo v1.01: ecriture des données dans le fichier /home/pi/domoticz/www/monitor/prevision-meteo.json
2019-12-05 11:31:01.097 Status: dzVents: Info: Extraction prévisions météo v1.01: ------ Finished previsionMeteo.lua 
et en plus fichier prevision-meteo.json créé :
Image

Code : Tout sélectionner

{"forecast":{"2019-12-05 10:00:00":{"cloud_cover":{"0-400 mb":10.8535,"400-800 mb":0,"800 mb - surface":67.4902,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":92.9886,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":274.191,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":{"name":"millimeters","symbol":"mm"}},"u_component_of_wind":{"10 m above ground":1.54991,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}},"v_component_of_wind":{"10 m above ground":2.39791,"unit":{"name":"meters_by_second","symbol":"m.s^(-1)"}}},"2019-12-05 11:00:00":{"cloud_cover":{"0-400 mb":5.05859,"400-800 mb":0,"800 mb - surface":76.5449,"unit":{"name":"percent","symbol":"%"}},"convective_available_potential_energy":{"local level type 192 0":0,"unit":{"name":"joules by kilogram","symbol":"J.kg^(-1)"}},"relative_humidity":{"2 m above ground":90.926,"unit":{"name":"percent","symbol":"%"}},"snow_depth":{"surface":0,"unit":{"name":"meters","symbol":"m"}},"temperature":{"2 m above ground":275.377,"unit":{"name":"kelvin","symbol":"K"}},"total_precipitations":{"surface":0,"unit":etc...
Donc le soucis venait de www.prevision-meteo.ch et pas du script !
Maintenant il faudrait voir si le contenu du fichier json convient ?

Avec Dark Sky cela devrait fonctionner également...

;)
PI 3 = RFXCOM
PI 3 + Touchscreen 7" affichage Domoticz
RFXCOM 433
Domoticz Version: 4.10717 - Python Version: 3.5.3

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


Répondre