[resolu] Probème avec yahoo weather

bonjour à tous ...

depuis des mois j'utilisais le service de yahoo weather pour lire les prévisions météo (projet domotique) or ils ont changé quelque chose depuis le 15 mars et depuis ça plante mon système

j'utilisais ce genre de code

char server[] = "weather.yahooapis.com";

int get_meteo() {  
  if (client.connect(server, 80)) {
    Serial.println("Connect to Yahoo Weather...");
    client.print("GET /forecastrss?w=628879&u=c HTTP/1.0\n"); //toulon
    client.print("HOST:weather.yahooapis.com\n\n");
    Serial.println("Connected...");
  } else {
    Serial.println(" connection failed");
    return(-1);
  }
 
  if (client.connected())   {
    //affichage de la page recue
    while(client.connected()) {
        while(client.available()) Serial.write(client.read());
    }
    return(0);
} ...

j'obtiens toujours une réponse de leur serveur (notemment la date et l'heure), mais sur le reste de la page il n'y a plus les données météo du site mais ce genre de message

HTTP/1.0 401 Unauthorized
WWW-Authenticate: OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"
Content-Type: application/xml;charset=UTF-8
Date: Fri, 25 Mar 2016 17:57:28 GMT
Age: 0
Server: ATS

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"Connect to Yahoo Weather...

Est ce quelqu'un d'autre est concerné par cette erreur et surtout quelqu'un aurait une solution ??

merci (PS je ne suis pas en terminale STxxx; j'ai passé l'age !)

bonsoir
A priori tu a l'explication
il y a eu du changement depuis le 15/3/2016

merci pour la réponse rapide !!

mais la ça commence à être du chinois pour moi !

To increase the security measure and better serving our YDN customers, weather data source will enforce OAuth 1 starting March 15, 2016. Please update your API calls with OAuth 1 enabled (via the OAuth /v1/yql end point if using YQL) using your Yahoo App key and secret.

old: https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D"nome%2C%20ak")&format=json

new: https://query.yahooapis.com/v1/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%2

déjà l’ancienne méthode dont ils parlent ne correspond pas à ce que j'utilisais avant ..

B83s:
merci pour la réponse rapide !!

mais la ça commence à être du chinois pour moi !

déjà l’ancienne méthode dont ils parlent ne correspond pas à ce que j'utilisais avant ..

poste ton code complet
dans ton extrait , je ne vois pas où s'applique la modif , si d'ailleurs elle s'applique là

voici le code complet (carte UNO, shield wifi)

#include <SPI.h>
#include <WiFi.h>
#include <TextFinder.h>
#include <HttpClient.h>

byte mac[] = { 0x78, 0xC4, 0x0E, 0x01, 0x9B, 0x43 }; // OK

char ssid[] = "*************"; 
char pass[] = "************"; 
int status = WL_IDLE_STATUS;
char server[] = "weather.yahooapis.com";

WiFiClient client;

void setup() {
  Serial.begin(9600);
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    // don't continue:
    while(true);
  } 
  
  // connexion au wifi
  while ( status != WL_CONNECTED) { 
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);
    // wait 10 seconds for connection:
    delay(5000);
  } 
}

void loop() {
  get_meteo();
  delay(30000);
}

int get_meteo() {
  if (client.connect(server, 80)) {
    Serial.println("Connect to Yahoo Weather...");
    client.print("GET /forecastrss?w=628879&u=c HTTP/1.0\n"); //toulon
    client.print("HOST:weather.yahooapis.com\n\n");
    Serial.println("Connected...");
  } else {
    Serial.println(" connection failed");
    return(-1);
  }
 
  if (client.connected())   {
    //affichage de la page recue
    while(client.connected()) {
     while(client.available()) Serial.write(client.read());
    }
    // END XML
    return(0);
  }
  else Serial.println("Disconnected"); 
   
  client.stop();
  client.flush();
}

il me retourne dans la console le texte suivant (on voit qu'il se connecte à yahoo mais il demande une "identification" à priori

Attempting to connect to SSID: ma_freebox
Connect to Yahoo Weather...
Connected...
HTTP/1.0 401 Unauthorized
WWW-Authenticate: OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"
Content-Type: application/xml;charset=UTF-8
Date: Fri, 25 Mar 2016 20:06:53 GMT
Age: 0
Server: ATS

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"

Je pensais qu'il y avait une lib specialisée "Yahoo"

Sous toutes réserves , je pense que l’évolution récente du service yahoo weather , n'est plus géré/gerable aussi simplement avec un arduino par la simple clef API .
A suivre , mais plus tard , je ne pense pas que tu sois le seul impacté

grrrrrrrrrr .... c'est dommage !!!

en tapant cette ligne dans un moteur de recherche, j'obtiens les données météo que j'avais avant ..

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D"toulon%2C%20france")&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys

mais comment faire pour que ce soit l'arduino qui envoie ca ??

pourquoi demander

char server[] = "weather.yahooapis.com";

alors que dans ta ligne browser tu mets
query.yahooapis.com

https://developer.yahoo.com/weather/

To increase the security measure and better serving our YDN customers, weather data source will enforce OAuth 1 starting March 15, 2016. Please update your API calls with OAuth 1 enabled (via the OAuth /v1/yql end point if using YQL) using your Yahoo App key and secret.

old: https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D"nome%2C%20ak")&format=json

new: https://query.yahooapis.com/v1/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D"nome%2C%20ak")&format=json

pourquoi demander
Code: [Select]

char server[] = "weather.yahooapis.com";

alors que dans ta ligne browser tu mets
query.yahooapis.com

Le programme était l'ancienne version qui fonctionnait.
Depuis j'ai bien essayé (au pif) de mettre dans le programme

char server[] = "query.yahooapis.com";

et dans la fonction

client.print("GET /v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20%28select%20woeid%20from%20geo.places%281%29%20where%20text%3D%22toulon%2C%20france%22%29&format=xml\n"); //toulon
client.print("HOST:query.yahooapis.com\n\n");

mais je ne recois aucun réponse de leur serveur

relis ma réponse juste au dessus

old: https://query.yahooapis.com/v1/public/yql?q=........

new: https://query.yahooapis.com/v1/yql?q.........

s'il s'agit du /public dans le lien ??

dans le programme arduino avec ou sans ça ne change rien : la connextion se fait mais aucune réponse xml en retour.

dans un navigateur:
sans /public j'ai un message d'erreur "oauth_problem"
avec /public je reçois les données météo