mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 07:02:17 +03:00
267 Scenario bug fully fixed Stable
This commit is contained in:
@@ -19,9 +19,14 @@ void inputTimeSet() {
|
||||
|
||||
void handle_time_init() {
|
||||
ts.add(
|
||||
TIME, 1000, [&](void *) {
|
||||
jsonWriteStr(configLiveJson, "timenow", timeNow->getTime());
|
||||
eventGen("timenow", "");
|
||||
TIME, 1000, [&](void*) {
|
||||
String timenow = timeNow->getTimeWOsec();
|
||||
static String prevTime;
|
||||
if (prevTime != timenow) {
|
||||
prevTime = timenow;
|
||||
jsonWriteStr(configLiveJson, "timenow", timenow);
|
||||
eventGen2("timenow", timenow);
|
||||
}
|
||||
},
|
||||
nullptr, true);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ void SensorDallas::loop() {
|
||||
void SensorDallas::readDallas() {
|
||||
sensors.requestTemperaturesByIndex(_index);
|
||||
float value = sensors.getTempCByIndex(_index);
|
||||
eventGen(_key, "");
|
||||
eventGen2(_key, String(value));
|
||||
jsonWriteStr(configLiveJson, _key, String(value));
|
||||
publishStatus(_key, String(value));
|
||||
SerialPrint("I", "Sensor", "'" + _key + "' data: " + String(value));
|
||||
|
||||
Reference in New Issue
Block a user