From 34252302a9ac9554ac2e282b93acd9a0ba8a98fb Mon Sep 17 00:00:00 2001 From: biver Date: Thu, 3 Feb 2022 18:32:31 +0300 Subject: [PATCH 1/4] =?UTF-8?q?=D0=9F=D0=BE=D1=80=D1=82=D0=B8=D1=80=D1=83?= =?UTF-8?q?=D0=B5=D0=BC=20Bme280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_svelte/items.json | 38 ++++++++++++++++- platformio.ini | 2 + src/modules/API.cpp | 2 + src/modules/Bme280.cpp | 94 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 src/modules/Bme280.cpp diff --git a/data_svelte/items.json b/data_svelte/items.json index 2437d262..70f84c8b 100644 --- a/data_svelte/items.json +++ b/data_svelte/items.json @@ -102,10 +102,46 @@ "type": "Reading", "subtype": "Bmp280p", "id": "Press3", - "widget": "anydataPress", + "widget": "anydataMm", "page": "Сенсоры", "descr": "Давление", "int": 15, "addr": "0x76" + }, + { + "name": "9. Cенсор температуры Bme280", + "num": 9, + "type": "Reading", + "subtype": "Bme280t", + "id": "tmp3", + "widget": "anydataTmp", + "page": "Сенсоры", + "descr": "Температура", + "int": 15, + "addr": "0x76" + }, + { + "name": "10. Cенсор давления Bme280", + "num": 10, + "type": "Reading", + "subtype": "Bme280p", + "id": "Press3", + "widget": "anydataMm", + "page": "Сенсоры", + "descr": "Давление", + "int": 15, + "addr": "0x76" + }, + { + "name": "11. Cенсор влажности Bme280", + "num": 11, + "type": "Reading", + "subtype": "Bme280h", + "id": "Hum3", + "widget": "anydataHum", + "page": "Сенсоры", + "descr": "Влажность", + "int": 15, + "addr": "0x76" } ] \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 5fb418d2..50924368 100644 --- a/platformio.ini +++ b/platformio.ini @@ -31,6 +31,7 @@ lib_deps = robtillaart/SHT2x@^0.1.1 beegee-tokyo/DHT sensor library for ESPx adafruit/Adafruit BMP280 Library + adafruit/Adafruit BME280 Library monitor_filters = esp8266_exception_decoder upload_speed = 921600 monitor_speed = 115200 @@ -47,6 +48,7 @@ lib_deps = robtillaart/SHT2x@^0.1.1 beegee-tokyo/DHT sensor library for ESPx adafruit/Adafruit BMP280 Library + adafruit/Adafruit BME280 Library monitor_filters = esp32_exception_decoder upload_speed = 921600 monitor_speed = 115200 diff --git a/src/modules/API.cpp b/src/modules/API.cpp index 9628fd87..24ff97aa 100644 --- a/src/modules/API.cpp +++ b/src/modules/API.cpp @@ -7,6 +7,7 @@ void* getAPI_Ds18b20(String subtype, String params); void* getAPI_Sht20(String subtype, String params); void* getAPI_Dht1122(String subtype, String params); void* getAPI_Bmp280(String subtype, String params); +void* getAPI_Bme280(String subtype, String params); //============================================================================================ void* getAPI(String subtype, String params) { @@ -18,6 +19,7 @@ void* getAPI(String subtype, String params) { if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI; + if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI; //================================================================================================================ return nullptr; diff --git a/src/modules/Bme280.cpp b/src/modules/Bme280.cpp new file mode 100644 index 00000000..09317cb0 --- /dev/null +++ b/src/modules/Bme280.cpp @@ -0,0 +1,94 @@ +/****************************************************************** + Used Adafruit BME280 Driver (Barometric Pressure Sensor) + Support for BME280 + https://github.com/adafruit/Adafruit_BME280_Library + ******************************************************************/ + + +#include "Global.h" +#include "Classes/IoTSensor.h" + +#include +#include + + +std::map bmes; + +class Bme280t : public IoTSensor { + private: + Adafruit_BME280* _bme; + + public: + Bme280t(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + _bme = bme; + } + + void doByInterval() { + float value = _bme->readTemperature(); + if (value < 145) regEvent(value, "Bme280t"); + else SerialPrint("E", "Sensor Bme280t", "Error"); + } + + ~Bme280t(); +}; + + +class Bme280h : public IoTSensor { + private: + Adafruit_BME280* _bme; + + public: + Bme280h(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + _bme = bme; + } + + void doByInterval() { + float value = _bme->readHumidity(); + if (value < 100) regEvent(value, "Bme280h"); + else SerialPrint("E", "Sensor Bme280h", "Error"); + } + + ~Bme280h(); +}; + + +class Bme280p : public IoTSensor { + private: + Adafruit_BME280* _bme; + + public: + Bme280p(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + _bme = bme; + } + + void doByInterval() { + float value = _bme->readPressure(); + if (value > 0) { + value = value / 1.333224 / 100; + regEvent(value, "Bme280p"); + } else SerialPrint("E", "Sensor Bme280p", "Error"); + } + + ~Bme280p(); +}; + + +void* getAPI_Bme280(String subtype, String param) { + String addr; + jsonRead(param, "addr", addr); + + if (bmes.find(addr) == bmes.end()) { + bmes[addr] = new Adafruit_BME280(); + bmes[addr]->begin(hexStringToUint8(addr)); + } + + if (subtype == F("Bme280t")) { + return new Bme280t(bmes[addr], param); + } else if (subtype == F("Bme280h")) { + return new Bme280h(bmes[addr], param); + } else if (subtype == F("Bme280p")) { + return new Bme280p(bmes[addr], param); + } else { + return nullptr; + } +} From 8b83e1649c4e8c23882a12ad942526b59abc144d Mon Sep 17 00:00:00 2001 From: biver Date: Sun, 6 Feb 2022 09:11:07 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BC=20=D0=BD=D0=B0=20=D0=B5=D0=B4=D0=B8=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BA?= =?UTF-8?q?=D0=BB=D0=B0=D1=81=D1=81=20IoTItem=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B2=D1=81=D0=B5=D1=85=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D0=B5?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/ESPConfiguration.h | 6 +++--- include/classes/IoTSensor.h | 6 +++--- src/ESPConfiguration.cpp | 8 ++++---- src/Main.cpp | 4 ++-- src/classes/IoTSensor.cpp | 20 ++++++++++---------- src/modules/AnalogAdc.cpp | 6 +++--- src/modules/Bme280.cpp | 14 +++++++------- src/modules/Bmp280.cpp | 10 +++++----- src/modules/Dht1122.cpp | 10 +++++----- src/modules/Sht20.cpp | 10 +++++----- src/modules/ds18b20.cpp | 6 +++--- 11 files changed, 50 insertions(+), 50 deletions(-) diff --git a/include/ESPConfiguration.h b/include/ESPConfiguration.h index 69d190cf..d2196696 100644 --- a/include/ESPConfiguration.h +++ b/include/ESPConfiguration.h @@ -1,8 +1,8 @@ #pragma once #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" -extern std::vector iotSensors; // вектор ссылок базового класса IoTSensor - список всех запущенных сенсоров +extern std::vector IoTItems; // вектор ссылок базового класса IoTItem - список всех запущенных сенсоров extern void configure(String path); -extern IoTSensor* myIoTSensor; +extern IoTItem* myIoTItem; diff --git a/include/classes/IoTSensor.h b/include/classes/IoTSensor.h index f58dd40c..b1899614 100644 --- a/include/classes/IoTSensor.h +++ b/include/classes/IoTSensor.h @@ -2,10 +2,10 @@ #include -class IoTSensor { +class IoTItem { public: - IoTSensor(String parameters); - ~IoTSensor(); + IoTItem(String parameters); + ~IoTItem(); void loop(); virtual void doByInterval(); diff --git a/src/ESPConfiguration.cpp b/src/ESPConfiguration.cpp index ec3c0e3c..9e976008 100644 --- a/src/ESPConfiguration.cpp +++ b/src/ESPConfiguration.cpp @@ -1,6 +1,6 @@ #include "ESPConfiguration.h" -std::vector iotSensors; +std::vector IoTItems; void* getAPI(String subtype, String params); void configure(String path) { @@ -17,9 +17,9 @@ void configure(String path) { SerialPrint(F("E"), F("Config"), "json error " + subtype); continue; } else { - myIoTSensor = (IoTSensor*)getAPI(subtype, jsonArrayElement); - if (myIoTSensor) { - iotSensors.push_back(myIoTSensor); + myIoTItem = (IoTItem*)getAPI(subtype, jsonArrayElement); + if (myIoTItem) { + IoTItems.push_back(myIoTItem); } } } diff --git a/src/Main.cpp b/src/Main.cpp index 71385a04..17633a03 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -75,7 +75,7 @@ void loop() { //обновление mqtt mqttLoop(); - for (unsigned int i = 0; i < iotSensors.size(); i++) { - iotSensors[i]->loop(); + for (unsigned int i = 0; i < IoTItems.size(); i++) { + IoTItems[i]->loop(); } } diff --git a/src/classes/IoTSensor.cpp b/src/classes/IoTSensor.cpp index 6db2b6b2..bb30f3a4 100644 --- a/src/classes/IoTSensor.cpp +++ b/src/classes/IoTSensor.cpp @@ -1,10 +1,10 @@ #include "Utils/JsonUtils.h" #include "Utils/SerialPrint.h" #include "Classes/ScenarioClass3.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include "WsServer.h" -IoTSensor::IoTSensor(String parameters) { +IoTItem::IoTItem(String parameters) { jsonRead(parameters, "int", _interval); _interval = _interval * 1000; jsonRead(parameters, "subtype", _subtype); @@ -22,17 +22,17 @@ IoTSensor::IoTSensor(String parameters) { _map4 = selectFromMarkerToMarker(map, ",", 3).toInt(); } } -IoTSensor::~IoTSensor() {} +IoTItem::~IoTItem() {} -String IoTSensor::getSubtype() { +String IoTItem::getSubtype() { return _subtype; } -String IoTSensor::getID() { +String IoTItem::getID() { return _id; }; -void IoTSensor::loop() { +void IoTItem::loop() { currentMillis = millis(); difference = currentMillis - prevMillis; if (difference >= _interval) { @@ -41,7 +41,7 @@ void IoTSensor::loop() { } } -void IoTSensor::regEvent(String value, String consoleInfo = "") { +void IoTItem::regEvent(String value, String consoleInfo = "") { eventGen2(_id, value); jsonWriteStr(paramsFlashJson, _id, value); publishStatusMqtt(_id, value); @@ -49,7 +49,7 @@ void IoTSensor::regEvent(String value, String consoleInfo = "") { SerialPrint("I", "Sensor " + consoleInfo, "'" + _id + "' data: " + value + "'"); } -void IoTSensor::regEvent(float value, String consoleInfo = "") { +void IoTItem::regEvent(float value, String consoleInfo = "") { if (_multiply) value = value * _multiply; if (_plus) value = value + _multiply; if (_round != 0) { @@ -70,6 +70,6 @@ void IoTSensor::regEvent(float value, String consoleInfo = "") { regEvent((String)buf, consoleInfo); } -void IoTSensor::doByInterval() {} +void IoTItem::doByInterval() {} -IoTSensor* myIoTSensor; \ No newline at end of file +IoTItem* myIoTItem; \ No newline at end of file diff --git a/src/modules/AnalogAdc.cpp b/src/modules/AnalogAdc.cpp index 2f3ecac7..b7251e6a 100644 --- a/src/modules/AnalogAdc.cpp +++ b/src/modules/AnalogAdc.cpp @@ -1,11 +1,11 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" //Это файл сенсора, в нем осуществляется чтение сенсора. //для добавления сенсора вам нужно скопировать этот файл и заменить в нем текст AnalogAdc на название вашего сенсора //Название должно быть уникальным, коротким и отражать суть сенсора. -class AnalogAdc : public IoTSensor { +class AnalogAdc : public IoTItem { private: //======================================================================================================= // Секция переменных. @@ -20,7 +20,7 @@ class AnalogAdc : public IoTSensor { //Такие как ...begin и подставлять в них параметры полученные из web интерфейса. //Все параметры хранятся в перемененной parameters, вы можете прочитать любой параметр используя jsonRead функции: // jsonReadStr, jsonReadBool, jsonReadInt - AnalogAdc(String parameters): IoTSensor(parameters) { + AnalogAdc(String parameters): IoTItem(parameters) { _pin = jsonReadInt(parameters, "pin"); } //======================================================================================================= diff --git a/src/modules/Bme280.cpp b/src/modules/Bme280.cpp index 09317cb0..0d14e38a 100644 --- a/src/modules/Bme280.cpp +++ b/src/modules/Bme280.cpp @@ -6,7 +6,7 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include #include @@ -14,12 +14,12 @@ std::map bmes; -class Bme280t : public IoTSensor { +class Bme280t : public IoTItem { private: Adafruit_BME280* _bme; public: - Bme280t(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + Bme280t(Adafruit_BME280* bme, String parameters): IoTItem(parameters) { _bme = bme; } @@ -33,12 +33,12 @@ class Bme280t : public IoTSensor { }; -class Bme280h : public IoTSensor { +class Bme280h : public IoTItem { private: Adafruit_BME280* _bme; public: - Bme280h(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + Bme280h(Adafruit_BME280* bme, String parameters): IoTItem(parameters) { _bme = bme; } @@ -52,12 +52,12 @@ class Bme280h : public IoTSensor { }; -class Bme280p : public IoTSensor { +class Bme280p : public IoTItem { private: Adafruit_BME280* _bme; public: - Bme280p(Adafruit_BME280* bme, String parameters): IoTSensor(parameters) { + Bme280p(Adafruit_BME280* bme, String parameters): IoTItem(parameters) { _bme = bme; } diff --git a/src/modules/Bmp280.cpp b/src/modules/Bmp280.cpp index 4f264706..d474edc2 100644 --- a/src/modules/Bmp280.cpp +++ b/src/modules/Bmp280.cpp @@ -6,7 +6,7 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include #include @@ -14,12 +14,12 @@ std::map bmps; -class Bmp280t : public IoTSensor { +class Bmp280t : public IoTItem { private: Adafruit_BMP280* _bmp; public: - Bmp280t(Adafruit_BMP280* bmp, String parameters): IoTSensor(parameters) { + Bmp280t(Adafruit_BMP280* bmp, String parameters): IoTItem(parameters) { _bmp = bmp; } @@ -33,12 +33,12 @@ class Bmp280t : public IoTSensor { }; -class Bmp280p : public IoTSensor { +class Bmp280p : public IoTItem { private: Adafruit_BMP280* _bmp; public: - Bmp280p(Adafruit_BMP280* bmp, String parameters): IoTSensor(parameters) { + Bmp280p(Adafruit_BMP280* bmp, String parameters): IoTItem(parameters) { _bmp = bmp; } diff --git a/src/modules/Dht1122.cpp b/src/modules/Dht1122.cpp index 1dfbe964..927861a5 100644 --- a/src/modules/Dht1122.cpp +++ b/src/modules/Dht1122.cpp @@ -6,7 +6,7 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include "DHTesp.h" #include @@ -14,12 +14,12 @@ std::map dhts; -class Dht1122t : public IoTSensor { +class Dht1122t : public IoTItem { private: DHTesp* _dht; public: - Dht1122t(DHTesp* dht, String parameters): IoTSensor(parameters) { + Dht1122t(DHTesp* dht, String parameters): IoTItem(parameters) { _dht = dht; } @@ -33,12 +33,12 @@ class Dht1122t : public IoTSensor { }; -class Dht1122h : public IoTSensor { +class Dht1122h : public IoTItem { private: DHTesp* _dht; public: - Dht1122h(DHTesp* dht, String parameters): IoTSensor(parameters) { + Dht1122h(DHTesp* dht, String parameters): IoTItem(parameters) { _dht = dht; } diff --git a/src/modules/Sht20.cpp b/src/modules/Sht20.cpp index 6f30f78d..4381e9b4 100644 --- a/src/modules/Sht20.cpp +++ b/src/modules/Sht20.cpp @@ -1,5 +1,5 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include "Wire.h" #include "SHT2x.h" @@ -7,9 +7,9 @@ SHT2x* sht = nullptr; -class Sht20t : public IoTSensor { +class Sht20t : public IoTItem { public: - Sht20t(String parameters): IoTSensor(parameters) { } + Sht20t(String parameters): IoTItem(parameters) { } void doByInterval() { sht->read(); @@ -21,9 +21,9 @@ class Sht20t : public IoTSensor { ~Sht20t(); }; -class Sht20h : public IoTSensor { +class Sht20h : public IoTItem { public: - Sht20h(String parameters): IoTSensor(parameters) { } + Sht20h(String parameters): IoTItem(parameters) { } void doByInterval() { sht->read(); diff --git a/src/modules/ds18b20.cpp b/src/modules/ds18b20.cpp index 9cbd6109..e51103f6 100644 --- a/src/modules/ds18b20.cpp +++ b/src/modules/ds18b20.cpp @@ -1,5 +1,5 @@ #include "Global.h" -#include "Classes/IoTSensor.h" +#include "Classes/IoTItem.h" #include "DallasTemperature.h" #include @@ -9,7 +9,7 @@ std::map oneWireTemperatureArray; std::map sensorsTemperatureArray; -class Ds18b20 : public IoTSensor { +class Ds18b20 : public IoTItem { private: //для работы библиотеки с несколькими линиями необходимо обеспечить каждый экземпляр класса ссылками на объекты настроенные на эти линии OneWire* oneWire; @@ -27,7 +27,7 @@ class Ds18b20 : public IoTSensor { //Такие как ...begin и подставлять в них параметры полученные из web интерфейса. //Все параметры хранятся в перемененной parameters, вы можете прочитать любой параметр используя jsonRead функции: // jsonReadStr, jsonReadBool, jsonReadInt - Ds18b20(String parameters): IoTSensor(parameters) { + Ds18b20(String parameters): IoTItem(parameters) { jsonRead(parameters, "pin", _pin); jsonRead(parameters, "index", _index); jsonRead(parameters, "addr", _addr); From ca0fb25a305ead4a281cffc8dd41757043d1831d Mon Sep 17 00:00:00 2001 From: biver Date: Sun, 6 Feb 2022 09:24:59 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D1=8B=D0=B2=D0=B0=D0=B5=D0=BC=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D1=8B=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/classes/{IoTSensor.h => IoTItem.h} | 0 src/classes/{IoTSensor.cpp => IoTItem.cpp} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename include/classes/{IoTSensor.h => IoTItem.h} (100%) rename src/classes/{IoTSensor.cpp => IoTItem.cpp} (100%) diff --git a/include/classes/IoTSensor.h b/include/classes/IoTItem.h similarity index 100% rename from include/classes/IoTSensor.h rename to include/classes/IoTItem.h diff --git a/src/classes/IoTSensor.cpp b/src/classes/IoTItem.cpp similarity index 100% rename from src/classes/IoTSensor.cpp rename to src/classes/IoTItem.cpp From ce7d461b77ecaf130281dd639855809a505fbd67 Mon Sep 17 00:00:00 2001 From: biver Date: Sun, 6 Feb 2022 09:32:28 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20execute()=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D1=83=D0=BB=D0=B5=D0=BC=20=D0=BF=D0=BE=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D1=83=20=D1=8F=D0=B4=D1=80=D0=B0?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/classes/IoTItem.h | 2 ++ src/classes/IoTItem.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/classes/IoTItem.h b/include/classes/IoTItem.h index b1899614..faa02106 100644 --- a/include/classes/IoTItem.h +++ b/include/classes/IoTItem.h @@ -9,6 +9,8 @@ class IoTItem { void loop(); virtual void doByInterval(); + virtual void execute(String command, String param); + void regEvent(String value, String consoleInfo); void regEvent(float value, String consoleInfo); diff --git a/src/classes/IoTItem.cpp b/src/classes/IoTItem.cpp index bb30f3a4..5ac9fd72 100644 --- a/src/classes/IoTItem.cpp +++ b/src/classes/IoTItem.cpp @@ -72,4 +72,6 @@ void IoTItem::regEvent(float value, String consoleInfo = "") { void IoTItem::doByInterval() {} +void IoTItem::execute(String command, String param) {} + IoTItem* myIoTItem; \ No newline at end of file