Get data from OpenWeatherMap API without webpage to Photon

Hi ScruffR

This is what I’m seeing in the events. I just need the weather-main

This is my webhook definition

{
    "event": "CurrentWeather",
    "deviceID": "XXXXXXXXXXXXXXXXXXXX",
    "responseTopic": "",
    "url": "https://api.openweathermap.org/data/2.5/weather?q=Diepenbeek&units=metric&appid=609fd5eb18ba6e03f9baa3160d1ffcef",
    "requestType": "GET",
    "noDefaults": false,
    "rejectUnauthorized": true
}

This is the code I’m using, just the code provided by the webhook to see what data I’m getting.

void setup() {
  // Subscribe to the integration response event
  Particle.subscribe("hook-response/CurrentWeather", myHandler, MY_DEVICES);
}

void myHandler(const char *event, const char *data) {
  // Handle the integration response
}


void loop() {
  // Get some data
  String data = String(10);
  // Trigger the integration
  Particle.publish("CurrentWeather", data, PRIVATE);
 
  // Wait 60 seconds
  delay(60000);
}
     

And yes I’ve looked at the docs but not seen info on this…

Thanks