mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
bugfix Thermostat, ExternalMqtt; add widget liter
This commit is contained in:
@@ -239,9 +239,9 @@ protected:
|
||||
}
|
||||
if (sp && pv)
|
||||
{
|
||||
value.valD = pid(sp, pv, pv_last, ierr, _int);
|
||||
value.valS = (String)(int)pid(sp, pv, pv_last, ierr, _int);
|
||||
regEvent(value.valS, "ThermostatPID", false, true);
|
||||
// value.valD = pid(sp, pv, pv_last, ierr, _int);
|
||||
// value.valS = (String)(int)value.valD;
|
||||
regEvent(pid(sp, pv, pv_last, ierr, _int), "ThermostatPID", false, true);
|
||||
}
|
||||
pv_last = pv;
|
||||
}
|
||||
@@ -332,8 +332,8 @@ private:
|
||||
public:
|
||||
ThermostatETK(String parameters) : IoTItem(parameters)
|
||||
{
|
||||
jsonRead(parameters, "set_id", _set_id);
|
||||
jsonRead(parameters, "term_id", _term_id);
|
||||
// jsonRead(parameters, "set_id", _set_id);
|
||||
// jsonRead(parameters, "term_id", _term_id);
|
||||
jsonRead(parameters, "iv_k", _iv_k);
|
||||
jsonRead(parameters, "outside_id", _outside_id);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ private:
|
||||
bool dataFromNode = false;
|
||||
String _topic = "";
|
||||
bool _isJson;
|
||||
bool _addPrefix;
|
||||
// bool _addPrefix;
|
||||
bool _debug;
|
||||
bool sendOk = false;
|
||||
|
||||
@@ -28,12 +28,12 @@ public:
|
||||
jsonRead(parameters, F("offline"), offline);
|
||||
_topic = jsonReadStr(parameters, "topic");
|
||||
jsonRead(parameters, "isJson", _isJson);
|
||||
jsonRead(parameters, "addPrefix", _addPrefix);
|
||||
// jsonRead(parameters, "addPrefix", _addPrefix);
|
||||
jsonRead(parameters, "debug", _debug);
|
||||
dataFromNode = false;
|
||||
if (mqttIsConnect())
|
||||
sendOk = true;
|
||||
mqttSubscribeExternal(_topic, _addPrefix);
|
||||
mqttSubscribeExternal(_topic);
|
||||
}
|
||||
char *TimeToString(unsigned long t)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
if (mqttIsConnect() && !sendOk)
|
||||
{
|
||||
sendOk = true;
|
||||
mqttSubscribeExternal(_topic, _addPrefix);
|
||||
mqttSubscribeExternal(_topic);
|
||||
}
|
||||
}
|
||||
void onMqttWsAppConnectEvent()
|
||||
@@ -144,6 +144,8 @@ public:
|
||||
if (_minutesPassed >= offline)
|
||||
{
|
||||
jsonWriteStr(json, F("info"), F("offline"));
|
||||
regEvent(NAN, "ExternalMQTT");
|
||||
SerialPrint("E", "ExternalMQTT", "V error", _id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
"descr": "",
|
||||
"sensor": "",
|
||||
"topic": "",
|
||||
"addPrefix": 0,
|
||||
"isJson": 1,
|
||||
"round": "",
|
||||
"orange": 60,
|
||||
@@ -24,7 +23,7 @@
|
||||
],
|
||||
"about": {
|
||||
"authorName": "AVAKS",
|
||||
"authorContact": "https://t.me/@avaks_dev",
|
||||
"authorContact": "https://t.me/@avaks",
|
||||
"authorGit": "https://github.com/avaksru",
|
||||
"specialThanks": "",
|
||||
"moduleName": "ExternalMQTT",
|
||||
@@ -53,6 +52,7 @@
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [],
|
||||
"esp32s2_4mb": [],
|
||||
"esp32cam_4mb": [],
|
||||
"esp8266_4mb": [],
|
||||
"esp8266_1mb": [],
|
||||
"esp8266_1mb_ota": [],
|
||||
|
||||
Reference in New Issue
Block a user