Tuto Météo
#20
Bonjour


Bon, j'ai trouvé un service gratuit qui mets donc à dispo les infos météo ( et alertes ) selon la station choisie

S'enregistrer sur le site https://www.wunderground.com/weather/api...lerts&MR=1 afin d'avoir une clé api.

Ensuite, une requete régulière nous retourne un json complet du style :
Code :
/ 20160611120103// http://api.wunderground.com/api/b8axxxxxxxxxxx1c/alerts/lang:FR/q/pws:ILENTILL2.json


{
  "response": {
    "version": "0.1",
    "termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
    "features": {
      "alerts": 1
    }
  },
  "query_zone": "999",
  "alerts": [
    {
      "type": "WRN",
      "wtype_meteoalarm": "3",
      "wtype_meteoalarm_name": "Thunderstorms",
      "level_meteoalarm": "2",
      "level_meteoalarm_name": "Yellow",
      "level_meteoalarm_description": "The weather is potentially dangerous. The weather phenomena that have been forecast are not unusual, but be attentive if you intend to practice activities exposed to meteorological risks. Keep informed about the expected meteorological conditions and do not take any avoidable risk.",
      "description": "\t\t\t\t\t\t\t\tfrançais: \n\t Des phénomènes habituels dans la région mais occasionnellement et localement dangereux sont prévus \n\t (ex. mistral, orage d’été, montée des eaux, fortes vagues submergeant le littoral) \n\t \n\t \n Soyez attentifs; si vous pratiquez des activitéssensibles au risque météorologique ou à proximité d'un rivage ou d'un cours d'eau; tenez-vous au courant de l’évolution de la situation. \n\t english: \n\t Although rather usual in this region, locally or potentially dangerous phenomena are expected. (such as local winds, summer thunderstorms, rising streams or high waves) \n\t \n\t \n Be aware and pay attention to the latest weather updates, especially if you carry out activities exposed to weather or close to a stream or shoreline.",
      "date": "2016-06-11 09:32:00 GMT",
      "date_epoch": "NA",
      "expires": "2016-06-12 05:00:00 GMT",
      "expires_epoch": "NA",
      "message": "\t\t\t\t\t\t\t\tfrançais: \n\t Des phénomènes habituels dans la région mais occasionnellement et localement dangereux sont prévus \n\t (ex. mistral, orage d’été, montée des eaux, fortes vagues submergeant le littoral) \n\t \n\t \n Soyez attentifs; si vous pratiquez des activitéssensibles au risque météorologique ou à proximité d'un rivage ou d'un cours d'eau; tenez-vous au courant de l’évolution de la situation. \n\t english: \n\t Although rather usual in this region, locally or potentially dangerous phenomena are expected. (such as local winds, summer thunderstorms, rising streams or high waves) \n\t \n\t \n Be aware and pay attention to the latest weather updates, especially if you carry out activities exposed to weather or close to a stream or shoreline.)",
      "phenomena": "NA",
      "significance": "NA",
      "attribution": "Information provided by , <a href='http://meteoalarm.eu/'>EUMETNET - MeteoAlarm</a> Note: Time delays between this website and <a href='http://meteoalarm.eu/'>Meteoalarm.eu</a> are possible. For the most up-to-date information about alert levels as published by the participating National Meteorological Services, please visit <a href='http://meteoalarm.eu/'>Meteoalarm</a>. For terms of use of this information, and copyright information, see <a href='http://meteoalarm.eu/'>Meteoalarm</a> Terms of Use."
    }
  ]
}

On peut donc récupérer régulièrement le niveau d'alerte, sa couleur et le type d'alerte.

Philippe
-------------------------
Répondre


Messages dans ce sujet
Météo - par Florent - 03-05-2016, 12:23 AM
RE: Météo - par Mika84 - 02-10-2018, 11:09 AM
RE: Météo - par Jonathan HSD - 02-10-2018, 12:29 PM
RE: Météo - par SamSam13 - 02-23-2018, 04:40 PM
RE: Météo - par Jonathan HSD - 02-23-2018, 04:43 PM
RE: Météo - par SamSam13 - 02-23-2018, 05:58 PM
RE: Météo - par GuyS - 06-19-2018, 10:43 AM
RE: Météo - par Florent - 08-24-2018, 09:44 AM
RE: Météo - par foxbru - 08-13-2018, 05:52 PM
RE: Météo - par foxbru - 08-23-2018, 11:37 AM
RE: Météo - par vincentbraillard - 10-15-2018, 03:39 PM
RE: Météo - par Florent - 10-26-2018, 02:34 PM
RE: Météo - par sud-domotique-expert - 12-19-2019, 08:18 PM
RE: Météo - par sud-domotique-expert - 12-28-2019, 12:37 PM
RE: Météo - par Ives - 12-28-2019, 02:34 PM
RE: Météo - par sud-domotique-expert - 12-28-2019, 06:06 PM
RE: Météo - par Ives - 12-28-2019, 06:18 PM
RE: Météo - par sud-domotique-expert - 12-29-2019, 02:41 AM
RE: Météo - par Ives - 12-29-2019, 01:04 PM
RE: Météo - par sud-domotique-expert - 12-29-2019, 02:11 PM
RE: Météo - par sud-domotique-expert - 12-29-2019, 12:43 PM
RE: Météo - par AucuneID - 01-19-2020, 11:30 AM
RE: Météo - par sud-domotique-expert - 01-19-2020, 12:15 PM
RE: Météo - par Al_Bla - 01-19-2020, 12:05 PM
RE: Météo - par Jlr - 01-19-2020, 12:50 PM
RE: Météo - par Al_Bla - 01-22-2020, 03:41 PM
RE: Météo - par sud-domotique-expert - 01-22-2020, 05:57 PM
Icônes Météo - par FranckH - 03-05-2016, 11:44 AM
Icônes Météo - par aussillou - 03-05-2016, 07:36 PM
Icônes Météo - par Florent - 03-08-2016, 10:17 AM
Icônes Météo - par aussillou - 03-08-2016, 04:23 PM
Icônes Météo - par Florent - 03-08-2016, 08:43 PM
Icônes Météo - par aussillou - 03-08-2016, 10:28 PM
Icônes Météo - par cybergui - 03-09-2016, 04:54 PM
Icônes Météo - par Florent - 03-09-2016, 08:56 PM
RE: Icônes Météo - par mschone - 10-29-2020, 10:08 PM
RE: Icônes Météo - par mschone - 11-09-2020, 09:40 PM
Icônes Météo - par CS Domotic - 03-10-2016, 12:36 PM
Icônes Météo - par FranckH - 03-10-2016, 09:34 PM
Icônes Météo - par cybergui - 03-11-2016, 01:00 PM
Icônes Météo - par Jlr - 03-11-2016, 02:54 PM
Icônes Météo - par ngm47 - 03-14-2016, 06:43 PM
Icônes Météo - par Florent - 03-19-2016, 02:41 PM
Icônes Météo - par FranckH - 03-20-2016, 02:35 PM
Icônes Météo - par cybergui - 05-06-2016, 09:18 AM
Icônes Météo - par AucuneID - 05-11-2016, 11:20 AM
Icônes Météo - par mcp - 05-31-2016, 08:06 PM
Icônes Météo - par mcp - 06-11-2016, 02:02 PM
Icônes Météo - par Mika84 - 08-25-2016, 09:53 PM
Icônes Météo - par mcp - 08-25-2016, 10:16 PM
Météo - par Hsd - 04-15-2017, 03:55 PM

Sujets apparemment similaires...
Sujet Auteur Réponses Affichages Dernier message
  Météo avec Météo concept sud-domotique-expert 84 99,284 05-11-2020, 11:31 AM
Dernier message: Al_Bla



Utilisateur(s) parcourant ce sujet : 1 visiteur(s)