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* password = "";
|
||||
*/
|
||||
|
||||
|
||||
const char* host = "datahouse.kingpenguin.tk";
|
||||
|
|
@ -29,8 +29,10 @@ const int DEFAULT_INTERVAL = 60000; // 60 sec
|
|||
String ADCO = "";
|
||||
String OPTARIF = "";
|
||||
String BASE = "";
|
||||
String HCHP = "";
|
||||
String HCHC = "";
|
||||
String ISOUSC = "";
|
||||
String IINST = "";
|
||||
String IMAX = "";
|
||||
String PAPP = "";
|
||||
bool sendData = false;
|
||||
//----------------------------------------------------
|
||||
|
||||
|
|
@ -55,9 +57,9 @@ void sendDataToServer() {
|
|||
Serial.println(httpPort);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 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.println(url);
|
||||
|
|
@ -181,20 +183,25 @@ void loop() {
|
|||
|
||||
if (label == "ADCO" && isNumberSelf(value)) {
|
||||
ADCO = value;
|
||||
sendData = true;
|
||||
}
|
||||
if (label == "OPTARIF") {
|
||||
OPTARIF = value;
|
||||
}
|
||||
if (label == "BASE") {
|
||||
if (label == "BASE" && isNumberSelf(value)) {
|
||||
BASE = value;
|
||||
}
|
||||
if (label == "HCHC" && isNumberSelf(value)) {
|
||||
HCHC = value;
|
||||
sendData = true;
|
||||
if (label == "ISOUSC" && isNumberSelf(value)) {
|
||||
ISOUSC = value;
|
||||
}
|
||||
if (label == "HCHP" && isNumberSelf(value)) {
|
||||
HCHP = value;
|
||||
sendData = true;
|
||||
if (label == "IINST" && isNumberSelf(value)) {
|
||||
IINST = value;
|
||||
}
|
||||
if (label == "IMAX" && isNumberSelf(value)) {
|
||||
IMAX = value;
|
||||
}
|
||||
if (label == "PAPP" && isNumberSelf(value)) {
|
||||
PAPP = value;
|
||||
}
|
||||
|
||||
// if (millis() >= nextInterval) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue