diff --git a/src/modules/system/IarduinoRTC/IarduinoRTC.cpp b/src/modules/system/IarduinoRTC/IarduinoRTC.cpp index 5b8ada9f..b2cbb936 100644 --- a/src/modules/system/IarduinoRTC/IarduinoRTC.cpp +++ b/src/modules/system/IarduinoRTC/IarduinoRTC.cpp @@ -75,7 +75,22 @@ class IarduinoRTC : public IoTItem { if (param.size()) { watch->settimeUnix(param[0].valD); } - } + } else if (command == "getHours") { + tmpValue.valD = watch->Hours; // Часы 0-23 + return tmpValue; + } else if (command == "getMinutes") { + tmpValue.valD = watch->minutes; // Минуты 0-59 + return tmpValue; + } else if (command == "getSeconds") { + tmpValue.valD = watch->seconds; // Секунды 0-59 + return tmpValue; + } else if (command == "getMonth") { + tmpValue.valD = watch->month; // Месяц 1-12 + return tmpValue; + } else if (command == "getDay") { + tmpValue.valD = watch->day; // День месяца 1-31 + return tmpValue; + } return {}; }