Aller au contenu
pepite

Prévision Météo

Recommended Posts

Voilà  un module Virtuel "Collaboratif", comme beaucoup d'autres sur ce forum me direz-vous ;-)

 

De peur d'en oublier et pour ne froisser personne, UN GRAND MERCI à  VOUS TOUS, vous vous reconnaitrez... je ne fais que le messager avec PLAISIR

 

Idée de jojo, le lien du topic original pour tous les intervenants ;-)

 

http://www.domotique-fibaro.fr/index.php/topic/4087-pr%C3%A9vision-m%C3%A9t%C3%A9o/

 

--> Le VD tire ses infos de  : www.prevision-meteo.ch et son API : http://www.prevision-meteo.ch/uploads/pdf/recuperation-donnees-meteo.pdf

 

SCREENSHOTS :

 

Capture d’écran 2015 03 19 à  21.35.57

 

Capture d’écran 2015 03 19 à  21.35.37

 

Capture d’écran 2015 03 19 à  21.35.18

 

 

FONCTIONNEMENT : 

 

Mise à  jour toutes les heures : 00 h 01 min, 01 h 01, 02 h 01....14 h 01 min, 15 h 01 min ...

 

 PRE-REQUIS INDISPENSABLE

 

Renseigner Longitude et Latitude dans la configuration de la HC2

 

MODE OPERATOIRE : 

 

1- Importer le VD ci-joint (étonnant non ? ... :P )

2- Télécharger les icônes et importez-les (encore plus étonnant... :60: )

3- Modifier le code du bouton avec vos numéros d'icônes

 

--Affichage des icones en fonction des conditions météo
local icone = {
  ["Ensoleillé"] = 1030, --numéro icone à  renseigner
  ["Nuit claire"] = 1031,
  ["Ciel voilé"] = 1032,
  ["Nuit légèrement voilée"] = 1033,
  ["Faibles passages nuageux"] = 1034,
  ["Nuit bien dégagée"] = 1035,
  ["Brouillard"] = 1036,
  ["Stratus"] = 1037,
  ["Stratus se dissipant"] = 1038,
  ["Nuit claire et stratus"] = 1029,
  ["Eclaircies"] = 1039,
  ["Nuit nuageuse"] = 1040,
  ["Faiblement nuageux"] = 1041,
  ["Fortement nuageux"] = 1042,
  ["Averses de pluie faible"] = 1043,  ["Nuit avec averses"] = 1044, 

4- Enregistrer, petit appui sur le bouton et ENJOY ;-)

 

EVOLUTION FUTURE : 

 

Intégration possible de la ville et toutes les idées qui pourraient vous venir .... :D

 

Module Virtuel : V1.0 : ajout de la ville

Prévision_Météo (1).vfib

 

Icones : 

prev_meteo.zip

 

  • Upvote 9

Partager ce message


Lien à poster
Partager sur d’autres sites

merci pour le partage !

 

je me demande comment l'utiliser plus loin que la simple remontée météo, comment l'intégrer dans la gestion de la maison

Partager ce message


Lien à poster
Partager sur d’autres sites

Super pepite merci. Peux tu mettre aussi le pdf pour l.'APi comme cela tout et au même endroit tu as le droit de boire une bonne bière 😀

Envoyé de mon SM-G900F en utilisant Tapatalk

Partager ce message


Lien à poster
Partager sur d’autres sites

@sakkho : on peut pe utiliser en plus la localisation GPS : detection de presence ou l'integrer aussi avec la temperature exterieure : gestion du chauffage..pas d'autres idees pour l'instant ;-)

@mprinfo : je te fais ca

 

BIZARRE : pas l'impression que le mainloop fonctionne pour moi, je vous tiens au jus :-)

 

Bon ca doit etre OK, j'avais deplace les etiquettes et autres, donc le bouton n'etait plus en 1 ;-)

 

1er post normalement à  jour et ajout de la ville ;-) 

  • Upvote 1

Partager ce message


Lien à poster
Partager sur d’autres sites

Bonjour,

 

pensez-vous que c'est fonctionnel pour une ville du Quebec au Canada?

 

bonne journée,

 

Patrick

Partager ce message


Lien à poster
Partager sur d’autres sites

@Plap3014 essaie sur le site de de meteo pour voir si ils donne la meteo pour quebec si oui sa fonctionnera

Envoyé de mon SM-G900F en utilisant Tapatalk

Partager ce message


Lien à poster
Partager sur d’autres sites

Si tu trouve l api d un site meteo pour le quebec je veux bien t'aider pour modifier le module

Envoyé de mon SM-G900F en utilisant Tapatalk

Partager ce message


Lien à poster
Partager sur d’autres sites

Il y a worldwheateronline et wunderground? Il ont des api gratuit.

Penses-tu que sa peut fonctionner?

Merci

Patrick

Envoyé de mon iPhone en utilisant Tapatalk

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut mprinfo

 

j'ai ouvert un compte sur worldweather online et j'ai une clé API.

 

tu as besoin de quoi comme information?

 

voici le lien de la DOC:

 

http://www.worldweatheronline.com/api/docs/local-city-town-weather-api.aspx

 

mon code postal est le: j3g6t3

 

je t'envoie en MP le code de l'api

 

merci,

 

Patrick

Partager ce message


Lien à poster
Partager sur d’autres sites

Bonsoir,

 

tel que demander par mprinfo, voici le code avec l'api du site WorldWheateronline:

 

Code API en Json

 

Call

api.worldweatheronline.com/free/v2/weather.ashx?q=j3g6t3&format=json&num_of_days=5&key=CLE API

Response Code
200

Response Headers
{
"x-apiaxleproxy-qps-left": "4",
"x-apiaxleproxy-qpd-left": "999",
"cache-control": "public, no-cache=\"Set-Cookie\", max-age=120, private",
"content-type": "application/json; charset=utf-8",
"expires": "Fri, 20 Mar 2015 16:23:21 GMT",
"server": "Microsoft-IIS/7.5",
"x-aspnet-version": "4.0.30319",
"set-cookie": [
"wwoanon=R5t6O2jSWpYzMe77xPto8ZakYFwmiTbuL3RsDiIsKjkGMfQl2WbQeVmk-tfTqE8qiXzw_J-YshYHXF82g4romWMva-DUUMdt_GsznikOmSUYhMOMzNN9SBpTSUj_I2_uuHVa1g2; domain=www.worldweatheronline.com; expires=Sun, 12-Feb-2017 03:01:21 GMT; path=/; HttpOnly",
"SERVERID=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/"
],
"accept-ranges": "bytes",
"age": "0",
"access-control-allow-origin": "*",
"access-control-allow-methods": "GET, POST, PUT, DELETE",
"access-control-allow-headers": "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token",
"x-cacheable": "NO:Cache-Control=private",
"transfer-encoding": "chunked",
"date": "Fri, 20 Mar 2015 16:21:55 GMT",
"connection": "keep-alive",
"x-powered-by": "UKFast Webcelerator",
"x-cache": "MISS"
}

 

avez-vous besoin du body aussi?

 

Merci,

 

Patrick

Partager ce message


Lien à poster
Partager sur d’autres sites

la 2e partie le body:

{

    "data": {
        "current_condition": [
            {
                "cloudcover": "0",
                "FeelsLikeC": "-7",
                "FeelsLikeF": "20",
                "humidity": "43",
                "observation_time": "04:30 PM",
                "precipMM": "0.0",
                "pressure": "1024",
                "temp_C": "-2",
                "temp_F": "28",
                "visibility": "14",
                "weatherCode": "113",
                "weatherDesc": [
                    {
                        "value": "Sunny"
                    }
                ],
                "weatherIconUrl": [
                    {
                        "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0001_sunny.png"
                    }
                ],
                "winddir16Point": "SSE",
                "winddirDegree": "150",
                "windspeedKmph": "15",
                "windspeedMiles": "9"
            }
        ],
        "request": [
            {
                "query": "J3G",
                "type": "Canada Postcode"
            }
        ],
        "weather": [
            {
                "astronomy": [
                    {
                        "moonrise": "06:59 AM",
                        "moonset": "07:44 PM",
                        "sunrise": "06:56 AM",
                        "sunset": "07:05 PM"
                    }
                ],
                "date": "2015-03-20",
                "hourly": [
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "100",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "0",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "100",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "7",
                        "DewPointC": "-12",
                        "DewPointF": "10",
                        "FeelsLikeC": "-17",
                        "FeelsLikeF": "2",
                        "HeatIndexC": "-11",
                        "HeatIndexF": "13",
                        "humidity": "89",
                        "precipMM": "0.0",
                        "pressure": "1028",
                        "tempC": "-11",
                        "tempF": "13",
                        "time": "200",
                        "visibility": "10",
                        "weatherCode": "113",
                        "weatherDesc": [
                            {
                                "value": "Clear"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"
                            }
                        ],
                        "WindChillC": "-17",
                        "WindChillF": "2",
                        "winddir16Point": "WSW",
                        "winddirDegree": "245",
                        "WindGustKmph": "23",
                        "WindGustMiles": "14",
                        "windspeedKmph": "11",
                        "windspeedMiles": "7"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "99",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "0",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "1",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "49",
                        "DewPointC": "-11",
                        "DewPointF": "13",
                        "FeelsLikeC": "-14",
                        "FeelsLikeF": "6",
                        "HeatIndexC": "-9",
                        "HeatIndexF": "16",
                        "humidity": "89",
                        "precipMM": "0.0",
                        "pressure": "1027",
                        "tempC": "-9",
                        "tempF": "16",
                        "time": "500",
                        "visibility": "10",
                        "weatherCode": "116",
                        "weatherDesc": [
                            {
                                "value": "Partly Cloudy"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
                            }
                        ],
                        "WindChillC": "-14",
                        "WindChillF": "6",
                        "winddir16Point": "S",
                        "winddirDegree": "183",
                        "WindGustKmph": "23",
                        "WindGustMiles": "14",
                        "windspeedKmph": "11",
                        "windspeedMiles": "7"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "100",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "95",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "95",
                        "DewPointC": "-10",
                        "DewPointF": "15",
                        "FeelsLikeC": "-14",
                        "FeelsLikeF": "8",
                        "HeatIndexC": "-8",
                        "HeatIndexF": "17",
                        "humidity": "89",
                        "precipMM": "0.0",
                        "pressure": "1026",
                        "tempC": "-8",
                        "tempF": "17",
                        "time": "800",
                        "visibility": "10",
                        "weatherCode": "122",
                        "weatherDesc": [
                            {
                                "value": "Overcast"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
                            }
                        ],
                        "WindChillC": "-14",
                        "WindChillF": "8",
                        "winddir16Point": "SSE",
                        "winddirDegree": "166",
                        "WindGustKmph": "22",
                        "WindGustMiles": "14",
                        "windspeedKmph": "11",
                        "windspeedMiles": "7"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "97",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "1",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "100",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "45",
                        "DewPointC": "-6",
                        "DewPointF": "22",
                        "FeelsLikeC": "-7",
                        "FeelsLikeF": "19",
                        "HeatIndexC": "-3",
                        "HeatIndexF": "27",
                        "humidity": "82",
                        "precipMM": "0.0",
                        "pressure": "1024",
                        "tempC": "-3",
                        "tempF": "26",
                        "time": "1100",
                        "visibility": "10",
                        "weatherCode": "116",
                        "weatherDesc": [
                            {
                                "value": "Partly Cloudy"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"
                            }
                        ],
                        "WindChillC": "-7",
                        "WindChillF": "19",
                        "winddir16Point": "SSE",
                        "winddirDegree": "156",
                        "WindGustKmph": "13",
                        "WindGustMiles": "8",
                        "windspeedKmph": "11",
                        "windspeedMiles": "7"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "96",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "0",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "100",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "47",
                        "DewPointC": "-2",
                        "DewPointF": "28",
                        "FeelsLikeC": "-4",
                        "FeelsLikeF": "24",
                        "HeatIndexC": "0",
                        "HeatIndexF": "32",
                        "humidity": "85",
                        "precipMM": "0.0",
                        "pressure": "1022",
                        "tempC": "0",
                        "tempF": "32",
                        "time": "1400",
                        "visibility": "10",
                        "weatherCode": "116",
                        "weatherDesc": [
                            {
                                "value": "Partly Cloudy"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"
                            }
                        ],
                        "WindChillC": "-4",
                        "WindChillF": "24",
                        "winddir16Point": "SSE",
                        "winddirDegree": "168",
                        "WindGustKmph": "19",
                        "WindGustMiles": "12",
                        "windspeedKmph": "13",
                        "windspeedMiles": "8"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "10",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "0",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "100",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "46",
                        "DewPointC": "0",
                        "DewPointF": "31",
                        "FeelsLikeC": "-2",
                        "FeelsLikeF": "28",
                        "HeatIndexC": "1",
                        "HeatIndexF": "34",
                        "humidity": "90",
                        "precipMM": "0.0",
                        "pressure": "1020",
                        "tempC": "4",
                        "tempF": "38",
                        "time": "1700",
                        "visibility": "10",
                        "weatherCode": "116",
                        "weatherDesc": [
                            {
                                "value": "Partly Cloudy"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"
                            }
                        ],
                        "WindChillC": "-2",
                        "WindChillF": "28",
                        "winddir16Point": "SSE",
                        "winddirDegree": "155",
                        "WindGustKmph": "18",
                        "WindGustMiles": "11",
                        "windspeedKmph": "12",
                        "windspeedMiles": "7"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "100",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "18",
                        "chanceofrain": "3",
                        "chanceofremdry": "0",
                        "chanceofsnow": "3",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "73",
                        "DewPointC": "-3",
                        "DewPointF": "26",
                        "FeelsLikeC": "-7",
                        "FeelsLikeF": "20",
                        "HeatIndexC": "-2",
                        "HeatIndexF": "29",
                        "humidity": "87",
                        "precipMM": "0.0",
                        "pressure": "1020",
                        "tempC": "-2",
                        "tempF": "29",
                        "time": "2000",
                        "visibility": "10",
                        "weatherCode": "119",
                        "weatherDesc": [
                            {
                                "value": "Cloudy"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
                            }
                        ],
                        "WindChillC": "-7",
                        "WindChillF": "20",
                        "winddir16Point": "S",
                        "winddirDegree": "172",
                        "WindGustKmph": "35",
                        "WindGustMiles": "22",
                        "windspeedKmph": "17",
                        "windspeedMiles": "10"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "93",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "19",
                        "chanceofrain": "0",
                        "chanceofremdry": "0",
                        "chanceofsnow": "0",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "-3",
                        "DewPointF": "27",
                        "FeelsLikeC": "-7",
                        "FeelsLikeF": "20",
                        "HeatIndexC": "-5",
                        "HeatIndexF": "24",
                        "humidity": "90",
                        "precipMM": "0.0",
                        "pressure": "1019",
                        "tempC": "-7",
                        "tempF": "20",
                        "time": "2300",
                        "visibility": "10",
                        "weatherCode": "122",
                        "weatherDesc": [
                            {
                                "value": "Overcast"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
                            }
                        ],
                        "WindChillC": "-7",
                        "WindChillF": "20",
                        "winddir16Point": "S",
                        "winddirDegree": "177",
                        "WindGustKmph": "37",
                        "WindGustMiles": "23",
                        "windspeedKmph": "20",
                        "windspeedMiles": "12"
                    }
                ],
                "maxtempC": "4",
                "maxtempF": "38",
                "mintempC": "-1",
                "mintempF": "30",
                "uvIndex": "4"
            },
            {
                "astronomy": [
                    {
                        "moonrise": "07:35 AM",
                        "moonset": "09:00 PM",
                        "sunrise": "06:54 AM",
                        "sunset": "07:06 PM"
                    }
                ],
                "date": "2015-03-21",
                "hourly": [
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "100",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "100",
                        "chanceofrain": "1",
                        "chanceofremdry": "0",
                        "chanceofsnow": "1",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "-3",
                        "DewPointF": "27",
                        "FeelsLikeC": "-7",
                        "FeelsLikeF": "19",
                        "HeatIndexC": "-2",
                        "HeatIndexF": "29",
                        "humidity": "90",
                        "precipMM": "0.0",
                        "pressure": "1017",
                        "tempC": "-2",
                        "tempF": "29",
                        "time": "200",
                        "visibility": "10",
                        "weatherCode": "122",
                        "weatherDesc": [
                            {
                                "value": "Overcast"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
                            }
                        ],
                        "WindChillC": "-7",
                        "WindChillF": "19",
                        "winddir16Point": "S",
                        "winddirDegree": "176",
                        "WindGustKmph": "32",
                        "WindGustMiles": "20",
                        "windspeedKmph": "19",
                        "windspeedMiles": "12"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "91",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "91",
                        "chanceofrain": "66",
                        "chanceofremdry": "0",
                        "chanceofsnow": "66",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "-3",
                        "DewPointF": "27",
                        "FeelsLikeC": "-8",
                        "FeelsLikeF": "18",
                        "HeatIndexC": "-2",
                        "HeatIndexF": "29",
                        "humidity": "92",
                        "precipMM": "0.2",
                        "pressure": "1015",
                        "tempC": "-2",
                        "tempF": "29",
                        "time": "500",
                        "visibility": "10",
                        "weatherCode": "326",
                        "weatherDesc": [
                            {
                                "value": "Light snow"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0027_light_snow_showers_night.png"
                            }
                        ],
                        "WindChillC": "-8",
                        "WindChillF": "18",
                        "winddir16Point": "S",
                        "winddirDegree": "170",
                        "WindGustKmph": "36",
                        "WindGustMiles": "22",
                        "windspeedKmph": "22",
                        "windspeedMiles": "14"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "100",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "92",
                        "chanceofrain": "95",
                        "chanceofremdry": "0",
                        "chanceofsnow": "95",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "-2",
                        "DewPointF": "29",
                        "FeelsLikeC": "-7",
                        "FeelsLikeF": "20",
                        "HeatIndexC": "-1",
                        "HeatIndexF": "31",
                        "humidity": "92",
                        "precipMM": "0.6",
                        "pressure": "1012",
                        "tempC": "-1",
                        "tempF": "31",
                        "time": "800",
                        "visibility": "10",
                        "weatherCode": "326",
                        "weatherDesc": [
                            {
                                "value": "Light snow"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0011_light_snow_showers.png"
                            }
                        ],
                        "WindChillC": "-7",
                        "WindChillF": "20",
                        "winddir16Point": "SSE",
                        "winddirDegree": "165",
                        "WindGustKmph": "33",
                        "WindGustMiles": "21",
                        "windspeedKmph": "25",
                        "windspeedMiles": "16"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "15",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "89",
                        "chanceofrain": "89",
                        "chanceofremdry": "0",
                        "chanceofsnow": "89",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "0",
                        "DewPointF": "31",
                        "FeelsLikeC": "-6",
                        "FeelsLikeF": "22",
                        "HeatIndexC": "1",
                        "HeatIndexF": "33",
                        "humidity": "93",
                        "precipMM": "0.5",
                        "pressure": "1008",
                        "tempC": "1",
                        "tempF": "33",
                        "time": "1100",
                        "visibility": "10",
                        "weatherCode": "326",
                        "weatherDesc": [
                            {
                                "value": "Light snow"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0011_light_snow_showers.png"
                            }
                        ],
                        "WindChillC": "-6",
                        "WindChillF": "22",
                        "winddir16Point": "SSE",
                        "winddirDegree": "166",
                        "WindGustKmph": "42",
                        "WindGustMiles": "26",
                        "windspeedKmph": "29",
                        "windspeedMiles": "18"
                    },
                    {
                        "chanceoffog": "0",
                        "chanceoffrost": "10",
                        "chanceofhightemp": "0",
                        "chanceofovercast": "100",
                        "chanceofrain": "100",
                        "chanceofremdry": "0",
                        "chanceofsnow": "1",
                        "chanceofsunshine": "0",
                        "chanceofthunder": "0",
                        "chanceofwindy": "0",
                        "cloudcover": "100",
                        "DewPointC": "1",
                        "DewPointF": "34",
                        "FeelsLikeC": "-4",
                        "FeelsLikeF": "25",
                        "HeatIndexC": "2",
                        "HeatIndexF": "35",
                        "humidity": "95",
                        "precipMM": "2.4",
                        "pressure": "1005",
                        "tempC": "2",
                        "tempF": "35",
                        "time": "1400",
                        "visibility": "9",
                        "weatherCode": "317",
                        "weatherDesc": [
                            {
                                "value": "Light sleet"
                            }
                        ],
                        "weatherIconUrl": [
                            {
                                "value": "http
                        

Partager ce message


Lien à poster
Partager sur d’autres sites

Raté, ce n'est pas le MP.

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut Did,

 

je sais, il ma demander de le mettre ici, après lui avoir envoyer en MP. que les autres allez le voir aussi et voir ce qu'il pouvait faire avec .

 

bonne soirée,

 

Patrick

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut Patrick,

Pardon, je pensais que tu t'étais trompé.

Partager ce message


Lien à poster
Partager sur d’autres sites

Quelqu'un pour faire la récuperation par json ? car je ne maitrise pas assez le json

Ensuite je ferai le VD pour notre ami du Quebec

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut les gars ;) 

 

Excellent vos prévisions météo, mais pour répondre à  Sakkoo, sur mon eedomus Aurel de Domoblog avait fait la même chose mais avait sortie les valeurs comme la température de demain, les précipitations de demain etc..... 

 

A partir de là  on pouvait par exemple faire un TTS en nous alertant sur un Karotz ou Nabaztag si la température de demain serait inf à  3°, ou attiré notre attention si il y aurait des précipitations et vérifié que les fenêtres et portes sont fermé. 

 

Voici à  quoi ça ressemble :

 

 

 

meteo_demain.jpg

Vous en pensez quoi  ?

 

++

Ludo

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut Rocket oui pourquoi pas.

Personnellement, Je préfère développé  en groupe plutôt qu'individuellement,

Chacun apporte ces idées et connaissance. A la fin on est tous gagnants.

Pour la récupération des valeurs de J+1 je pense qu'il n'y a pas de gros soucis

Par contre pour le TTS je n'y connais rien et je n'ai pas de Karotz ou Nabaztag

Mais je veux bien participer à  ton projet si d'autres veulent si joindre ils sont les bienvenues (plus on est de fou plus on rit)

Partager ce message


Lien à poster
Partager sur d’autres sites

faut regarder dans l' API s'il y a les précipitations ;-), me souviens deja plus..go sur la DOC,mais,pourquoi pas puis le TTS

 

Pour le TTS, (ca va pas te plaire @mprinfo :P ) mais il existe deja un VD fait par @steven qui s'interface tres bien avec GEA ;-) et en fonction des valeurs, go TTS

 

EN lua pour le TTS je pense qu'on peut aller voir le code de steven.

Partager ce message


Lien à poster
Partager sur d’autres sites

voila le json, mais je n'arrive pas a recuperer la donnee qui correspond aux precipitations, je ne sais pas aller dans les sous-sous-sous... ;-)

fcst_day_1": {
"date": "22.03.2015","day_short": "Dim.","day_long": "Dimanche","tmin": 3,"tmax": 12,"condition": "Ensoleillé","icon": "http://www.prevision-meteo.ch/style/images/icon/ensoleille.png","icon_big": "http://www.prevision-meteo.ch/style/images/icon/ensoleille-big.png","hourly_data":{"0H00":{"ICON": "http://www.prevision-meteo.ch/style/images/icon/nuit-nuageuse.png","CONDITION": "Nuit nuageuse","TMP2m": 4.1,"DPT2m": 3.8,"WNDCHILL2m": -0.1,"RH2m": 98,"PRMSL": 1022.7,"APCPsfc": 0,"WNDSPD10m": 20.620805027932,"WNDGUST10m": 33.749197793449,"WNDDIR10m": 16,"WNDDIRCARD10": "N","ISSNOW": 0,"HCDC": "0.00","MCDC": "0.00","LCDC": "100.00","HGT0C": 600,"KINDEX": 37,"CAPE180_0": "0.0000","CIN180_0": 0},

les precipitations d'apres l'API :

 
Précipitations
[mm
]
Fcst_day_0->hourly_data->0H00->APCPsfc

 

 
Voila ce que j'ai mis mais j'ai une erreur dans le debug
 
fibaro:debug("precipitations :" ..jsonTable.fcst_day_1.hourly_data.APCPsfc);

Debug : a priori, c'est vide

[ERROR] 13:31:49: line 55: attempt to concatenate field 'APCPsfc' (a nil value)

 

Partager ce message


Lien à poster
Partager sur d’autres sites

La je peux pas t'aider je suis tu en connais plus que moi sur le json. On va attendre un peu si quelqu'un peu aider sinon je ferai une demande par MP aux spécialistes

Partager ce message


Lien à poster
Partager sur d’autres sites

Merci les gars ;) 

 

Alors pour la partie TTS sur Nabaztag ou Karotz c'est facile ;) J'avais fait ça: http://www.domotique-fibaro.fr/index.php/topic/985-notification-vers-un-nabaztag-v2/ il y a aussi qqle un qui avait repris pour le Karotz;) on peut même se servir de l'excellent GEA de Steven pour faire du TTS sur Kartoz ou nabaztag ;) 

Mais aussi SONOS  ;) 

Partager ce message


Lien à poster
Partager sur d’autres sites

@Rocketlud si je te fais un code pour que la température de J+1 mette a jour une variable globale

 

2 solutions :

 

Soit je mets juste la température

Soit je te mets la phase a lire dans la variable globale.

 

cela te conviendrait il ?

Partager ce message


Lien à poster
Partager sur d’autres sites

Bonjour,

 

Super intéressant. Mais question bête : Comment avoir l'ID des icons ?

En vous remerciant

Partager ce message


Lien à poster
Partager sur d’autres sites

×