   }
   c.humidity = atoi(current_observation[F("relative_humidity")] | "0");
   c.pressure_trend = atoi(current_observation[F("pressure_trend")] | "0");
-  strncpy(c.wind_dir, current_observation[F("wind_dir")] | "", sizeof(c.wind_dir));;
+  strlcpy(c.wind_dir, current_observation[F("wind_dir")] | "", sizeof(c.wind_dir));;
   c.wind_degrees = current_observation[F("wind_degrees")];
-  strncpy(c.city, current_observation[F("observation_location")][F("city")] | "", sizeof(c.city));
+  strlcpy(c.city, current_observation[F("observation_location")][F("city")] | "", sizeof(c.city));
   JsonObject &sun = root[F("sun_phase")];
-  strncpy(c.sunrise_hour, sun[F("sunrise")][F("hour")] | "", sizeof(c.sunrise_hour));
-  strncpy(c.sunrise_minute, sun[F("sunrise")][F("minute")] | "", sizeof(c.sunrise_minute));
-  strncpy(c.sunset_hour, sun[F("sunset")][F("hour")] | "", sizeof(c.sunset_hour));
-  strncpy(c.sunset_minute, sun[F("sunset")][F("minute")] | "", sizeof(c.sunset_minute));
+  strlcpy(c.sunrise_hour, sun[F("sunrise")][F("hour")] | "", sizeof(c.sunrise_hour));
+  strlcpy(c.sunrise_minute, sun[F("sunrise")][F("minute")] | "", sizeof(c.sunrise_minute));
+  strlcpy(c.sunset_hour, sun[F("sunset")][F("hour")] | "", sizeof(c.sunset_hour));
+  strlcpy(c.sunset_minute, sun[F("sunset")][F("minute")] | "", sizeof(c.sunset_minute));
   JsonObject &moon = root[F("moon_phase")];
-  strncpy(c.age_of_moon, moon[F("ageOfMoon")] | "", sizeof(c.age_of_moon));
-  strncpy(c.moon_phase, moon[F("phaseofMoon")] | "", sizeof(c.moon_phase));
-  strncpy(c.moonrise_hour, moon[F("moonrise")][F("hour")] | "", sizeof(c.moonrise_hour));
-  strncpy(c.moonrise_minute, moon[F("moonrise")][F("minute")] | "", sizeof(c.moonrise_minute));
-  strncpy(c.moonset_hour, moon[F("moonset")][F("hour")] | "", sizeof(c.moonset_hour));
-  strncpy(c.moonset_minute, moon[F("moonset")][F("minute")] | "", sizeof(c.moonset_minute));
+  strlcpy(c.age_of_moon, moon[F("ageOfMoon")] | "", sizeof(c.age_of_moon));
+  strlcpy(c.moon_phase, moon[F("phaseofMoon")] | "", sizeof(c.moon_phase));
+  strlcpy(c.moonrise_hour, moon[F("moonrise")][F("hour")] | "", sizeof(c.moonrise_hour));
+  strlcpy(c.moonrise_minute, moon[F("moonrise")][F("minute")] | "", sizeof(c.moonrise_minute));
+  strlcpy(c.moonset_hour, moon[F("moonset")][F("hour")] | "", sizeof(c.moonset_hour));
+  strlcpy(c.moonset_minute, moon[F("moonset")][F("minute")] | "", sizeof(c.moonset_minute));
   return true;
 }
 

  }
  
  static WiFiClient client;
  if (now - last_fetch_conditions > cfg.conditions_interval) {
    const size_t bufferSize = JSON_OBJECT_SIZE(0) + 9 * JSON_OBJECT_SIZE(2) + 2 * JSON_OBJECT_SIZE(3) + JSON_OBJECT_SIZE(4) +
                              JSON_OBJECT_SIZE(8) + JSON_OBJECT_SIZE(9) + JSON_OBJECT_SIZE(12) + JSON_OBJECT_SIZE(56) + 2530;
    DBG(print(F("Updating conditions ")));
    DBG(print(bufferSize));
    DBG(print(' '));
    DBG(println(ESP.getFreeHeap()));

    if (connect_and_get(client, F("astronomy/conditions"))) {
      DynamicJsonBuffer buffer(bufferSize);
      JsonObject &root = buffer.parseObject(client);
      if (root.success()) {
        if (update_conditions(root, conditions))
          update_display(screen);
        DBG(print(F("Done ")));
        DBG(println(ESP.getFreeHeap()));
      } else
        ERR(println(F("Failed to parse conditions!")));
      last_fetch_conditions = now;
    } else
      ERR(println(F("Failed to fetch conditions!")));
    client.stop();
  }

  if (now - last_fetch_forecasts > cfg.forecasts_interval) {
    const size_t bufferSize = JSON_ARRAY_SIZE(4) + JSON_ARRAY_SIZE(8) + 2*JSON_OBJECT_SIZE(1) + 35*JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) +
                              8*JSON_OBJECT_SIZE(4) + 8*JSON_OBJECT_SIZE(7) + 4*JSON_OBJECT_SIZE(17) + 4*JSON_OBJECT_SIZE(20) + 5360;
    DBG(print(F("Updating forecasts ")));
    DBG(print(bufferSize));
    DBG(print(' '));
    DBG(println(ESP.getFreeHeap()));

    if (connect_and_get(client, F("forecast"))) {
      DynamicJsonBuffer forecast(bufferSize);
      JsonObject &root = forecast.parseObject(client);
      if (root.success()) {
        update_forecasts(root);
        DBG(print(F("Done ")));
        DBG(println(ESP.getFreeHeap()));
      } else
        ERR(println(F("Failed to parse forecasts!")));
      last_fetch_forecasts = now;
    } else
      ERR(println(F("Failed to fetch forecast!")));
    client.stop();
  }
}

    return false;

  c.epoch = epoch;
  strlcpy(c.icon, current_observation[F("icon")] | "", sizeof(c.icon));
  strlcpy(c.weather, current_observation[F("weather")] | "", sizeof(c.weather));
  if (cfg.metric) {
    c.temp = current_observation[F("temp_c")];
    c.feelslike = atoi(current_observation[F("feelslike_c")] | "0");
