Use https://sinoptik.luon.net and really close connections when doing http.end()
This commit is contained in:
parent
6c360d9473
commit
1ed29953fe
14
Claire.ino
14
Claire.ino
|
@ -58,8 +58,8 @@ String output;
|
|||
Bsec iaqSensor;
|
||||
|
||||
static HTTPClient http;
|
||||
static const String baseUrlAQI = "http://target.luon.net:2356//forecast?&metrics=PAQI&metrics=AQI&metrics=pollen&metrics=UVI";
|
||||
static const String baseUrlPrecipitation = "http://target.luon.net:2356//forecast?metrics=precipitation";
|
||||
static const String baseUrlAQI = "https://sinoptik.luon.net/forecast?metrics=PAQI&metrics=AQI&metrics=pollen&metrics=UVI";
|
||||
static const String baseUrlPrecipitation = "https://sinoptik.luon.net/forecast?metrics=precipitation";
|
||||
|
||||
static int hw_variant = 0;
|
||||
|
||||
|
@ -373,6 +373,8 @@ void setup() {
|
|||
Serial.begin(115200);
|
||||
Serial.println("buienradarklok starting");
|
||||
|
||||
http.setReuse(false);
|
||||
|
||||
SPI.begin();
|
||||
iaqSensor.begin(BME_CS, SPI);
|
||||
String output = "\nBSEC library version " + String(iaqSensor.version.major) + "." + String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." + String(iaqSensor.version.minor_bugfix);
|
||||
|
@ -504,7 +506,7 @@ void getPrecipitation(const float * location) {
|
|||
|
||||
Serial.println(url);
|
||||
|
||||
http.begin(url);
|
||||
http.begin(url, root_ca);
|
||||
httpCode = http.GET();
|
||||
|
||||
if (httpCode > 0) {
|
||||
|
@ -530,7 +532,7 @@ void getPrecipitation(const String address) {
|
|||
|
||||
Serial.println(url);
|
||||
|
||||
http.begin(url);
|
||||
http.begin(url, root_ca);
|
||||
httpCode = http.GET();
|
||||
|
||||
if (httpCode > 0) {
|
||||
|
@ -562,7 +564,7 @@ void getAQI(const float * location) {
|
|||
|
||||
Serial.println(url);
|
||||
|
||||
http.begin(url);
|
||||
http.begin(url, root_ca);
|
||||
httpCode = http.GET();
|
||||
|
||||
if (httpCode > 0) {
|
||||
|
@ -588,7 +590,7 @@ void getAQI(const String address) {
|
|||
|
||||
Serial.println(url);
|
||||
|
||||
http.begin(url);
|
||||
http.begin(url, root_ca);
|
||||
httpCode = http.GET();
|
||||
|
||||
if (httpCode > 0) {
|
||||
|
|
Loading…
Reference in New Issue