Modification of teleinfo sensor module to catch info for base option.
This commit is contained in:
parent
49c524c6ea
commit
f0427c6508
|
|
@ -13,12 +13,12 @@
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
||||||
|
const char* ssid = "SFR_4D28";
|
||||||
|
const char* password = "catruntiterthsti9ale";
|
||||||
/*
|
/*
|
||||||
const char* ssid = "TNCAP3F2E03";
|
|
||||||
const char* password = "73ABCCAA87";
|
|
||||||
*/
|
|
||||||
const char* ssid = "L0AD";
|
const char* ssid = "L0AD";
|
||||||
const char* password = "";
|
const char* password = "";
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
const char* host = "datahouse.kingpenguin.tk";
|
const char* host = "datahouse.kingpenguin.tk";
|
||||||
|
|
@ -29,8 +29,10 @@ const int DEFAULT_INTERVAL = 60000; // 60 sec
|
||||||
String ADCO = "";
|
String ADCO = "";
|
||||||
String OPTARIF = "";
|
String OPTARIF = "";
|
||||||
String BASE = "";
|
String BASE = "";
|
||||||
String HCHP = "";
|
String ISOUSC = "";
|
||||||
String HCHC = "";
|
String IINST = "";
|
||||||
|
String IMAX = "";
|
||||||
|
String PAPP = "";
|
||||||
bool sendData = false;
|
bool sendData = false;
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -55,9 +57,9 @@ void sendDataToServer() {
|
||||||
Serial.println(httpPort);
|
Serial.println(httpPort);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We now create a URI for the request
|
// We now create a URI for the request
|
||||||
String url = "/teleinfo/add?ADCO="+ADCO+"&OPTARIF="+OPTARIF+"&BASE="+BASE+"&HCHC="+HCHC+"&HCHP="+HCHP;
|
String url = "/teleinfo/add?ADCO="+ADCO+"&OPTARIF="+OPTARIF+"&BASE="+BASE+"&ISOUSC="+ISOUSC+"&IINST="+IINST+"&IMAX="+IMAX+"&PAPP="+PAPP;
|
||||||
|
|
||||||
Serial.print("Requesting URL: ");
|
Serial.print("Requesting URL: ");
|
||||||
Serial.println(url);
|
Serial.println(url);
|
||||||
|
|
@ -181,20 +183,25 @@ void loop() {
|
||||||
|
|
||||||
if (label == "ADCO" && isNumberSelf(value)) {
|
if (label == "ADCO" && isNumberSelf(value)) {
|
||||||
ADCO = value;
|
ADCO = value;
|
||||||
|
sendData = true;
|
||||||
}
|
}
|
||||||
if (label == "OPTARIF") {
|
if (label == "OPTARIF") {
|
||||||
OPTARIF = value;
|
OPTARIF = value;
|
||||||
}
|
}
|
||||||
if (label == "BASE") {
|
if (label == "BASE" && isNumberSelf(value)) {
|
||||||
BASE = value;
|
BASE = value;
|
||||||
}
|
}
|
||||||
if (label == "HCHC" && isNumberSelf(value)) {
|
if (label == "ISOUSC" && isNumberSelf(value)) {
|
||||||
HCHC = value;
|
ISOUSC = value;
|
||||||
sendData = true;
|
|
||||||
}
|
}
|
||||||
if (label == "HCHP" && isNumberSelf(value)) {
|
if (label == "IINST" && isNumberSelf(value)) {
|
||||||
HCHP = value;
|
IINST = value;
|
||||||
sendData = true;
|
}
|
||||||
|
if (label == "IMAX" && isNumberSelf(value)) {
|
||||||
|
IMAX = value;
|
||||||
|
}
|
||||||
|
if (label == "PAPP" && isNumberSelf(value)) {
|
||||||
|
PAPP = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (millis() >= nextInterval) {
|
// if (millis() >= nextInterval) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue