This commit is contained in:
2019-03-09 23:49:10 +03:00
parent 7595a99474
commit cbe5980766
3 changed files with 3 additions and 2 deletions

View File

@@ -227,7 +227,7 @@ void Input::dht22Poll() {
#endif #endif
aJsonObject *emit = aJson.getObjectItem(inputObj, "emit"); aJsonObject *emit = aJson.getObjectItem(inputObj, "emit");
aJsonObject *item = aJson.getObjectItem(inputObj, "item"); aJsonObject *item = aJson.getObjectItem(inputObj, "item");
if (item) thermoSetCurTemp(item, temp); if (item) thermoSetCurTemp(item->valuestring, temp);
debugSerial << F("IN:") << pin << F(" DHT22 type. T=") << temp << F("°C H=") << humidity << F("%"); debugSerial << F("IN:") << pin << F(" DHT22 type. T=") << temp << F("°C H=") << humidity << F("%");
if (emit && temp && humidity && temp == temp && humidity == humidity) { if (emit && temp && humidity && temp == temp && humidity == humidity) {
char addrstr[MQTT_TOPIC_LENGTH] = ""; char addrstr[MQTT_TOPIC_LENGTH] = "";

View File

@@ -270,7 +270,7 @@ if (isSet)
while (payload && i < 3) while (payload && i < 3)
Par[i++] = getInt((char **) &payload); Par[i++] = getInt((char **) &payload);
return Ctrl(0, i, Par, send, subItem); return Ctrl(0, i, Par, send, subItemN);
} }
break; break;

View File

@@ -79,6 +79,7 @@ e-mail anklimov@gmail.com
#include "aJSON.h" #include "aJSON.h"
extern aJsonObject *items; extern aJsonObject *items;
extern short thermoSetCurTemp(char *name, float t);
int txt2cmd (char * payload); int txt2cmd (char * payload);