mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 07:02:17 +03:00
переход на асинхронный ws
This commit is contained in:
@@ -13,11 +13,7 @@ void* getAPI_Bme280(String subtype, String params);
|
||||
void* getAPI_Bmp280(String subtype, String params);
|
||||
void* getAPI_Dht1122(String subtype, String params);
|
||||
void* getAPI_Ds18b20(String subtype, String params);
|
||||
void* getAPI_GY21(String subtype, String params);
|
||||
void* getAPI_Hdc1080(String subtype, String params);
|
||||
void* getAPI_Max6675(String subtype, String params);
|
||||
void* getAPI_Pzem004(String subtype, String params);
|
||||
void* getAPI_RCswitch(String subtype, String params);
|
||||
void* getAPI_Sht20(String subtype, String params);
|
||||
void* getAPI_Sht30(String subtype, String params);
|
||||
void* getAPI_Sonar(String subtype, String params);
|
||||
@@ -32,7 +28,6 @@ void* getAPI_Pcf8574(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_TelegramLT(String subtype, String params);
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
void* getAPI_Ws2812b(String subtype, String params);
|
||||
|
||||
void* getAPI(String subtype, String params) {
|
||||
void* tmpAPI;
|
||||
@@ -49,11 +44,7 @@ if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_GY21(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Hdc1080(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Max6675(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pzem004(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_RCswitch(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sht30(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Sonar(subtype, params)) != nullptr) return tmpAPI;
|
||||
@@ -68,6 +59,5 @@ if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Ws2812b(subtype, params)) != nullptr) return tmpAPI;
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
{
|
||||
{
|
||||
"menuSection": "Экраны",
|
||||
"configItem": [
|
||||
{
|
||||
"global": 0,
|
||||
"name": "Strip ws2812b",
|
||||
"type": "Reading",
|
||||
"subtype": "Ws2812b",
|
||||
"id": "strip",
|
||||
"widget": "range",
|
||||
"page": "Кнопки",
|
||||
"descr": "Лента",
|
||||
"int": 15,
|
||||
"needSave": 0,
|
||||
"pin": "4",
|
||||
"numLeds": "8",
|
||||
"brightness": "100",
|
||||
"mode": "1",
|
||||
"min": "15",
|
||||
"max": "30",
|
||||
"idshow": "t"
|
||||
}],
|
||||
|
||||
{
|
||||
"global": 0,
|
||||
"name": "Strip ws2812b",
|
||||
"type": "Reading",
|
||||
"subtype": "Ws2812b",
|
||||
"id": "strip",
|
||||
"widget": "range",
|
||||
"page": "Кнопки",
|
||||
"descr": "Лента",
|
||||
"int": 15,
|
||||
"needSave": 0,
|
||||
"pin": "4",
|
||||
"numLeds": "8",
|
||||
"brightness": "100",
|
||||
"mode": "1",
|
||||
"min": "15",
|
||||
"max": "30",
|
||||
"idshow": "t"
|
||||
}
|
||||
],
|
||||
"about": {
|
||||
"authorName": "Yuriy Kuneev",
|
||||
"authorContact": "https://t.me/Kuneev07",
|
||||
@@ -44,7 +44,9 @@
|
||||
{
|
||||
"name": "noShow",
|
||||
"descr": "Выключить ленту",
|
||||
"params": ["номер пикселя"]
|
||||
"params": [
|
||||
"номер пикселя"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "noShowOne",
|
||||
@@ -59,17 +61,26 @@
|
||||
{
|
||||
"name": "showLed",
|
||||
"descr": "Зажечь один диод",
|
||||
"params": ["номер пикселя","цвет 255,255,255 или red,green"]
|
||||
"params": [
|
||||
"номер пикселя",
|
||||
"цвет 255,255,255 или red,green"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "showLedAll",
|
||||
"descr": "Зажечь все диоды",
|
||||
"params": ["Цвет красного светодиода от 0 до 255","Цвет зеленого светодиода от 0 до 255","Цвет синего светодиода от 0 до 255"]
|
||||
"params": [
|
||||
"Цвет красного светодиода от 0 до 255",
|
||||
"Цвет зеленого светодиода от 0 до 255",
|
||||
"Цвет синего светодиода от 0 до 255"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Brightness",
|
||||
"descr": "Устанавливает общую яркость ленты от 0 до 255",
|
||||
"params": ["яркость от 0 до 255"]
|
||||
"params": [
|
||||
"яркость от 0 до 255"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enableIndication",
|
||||
@@ -83,15 +94,13 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"defActive": true,
|
||||
|
||||
"defActive": false,
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [
|
||||
"adafruit/Adafruit NeoPixel@^1.10.6"
|
||||
],
|
||||
"esp8266_4mb": [
|
||||
"adafruit/Adafruit NeoPixel@^1.10.6"
|
||||
"adafruit/Adafruit NeoPixel@^1.10.6"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@
|
||||
"int": "Количество секунд между опросами датчика."
|
||||
}
|
||||
},
|
||||
"defActive": true,
|
||||
"defActive": false,
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [
|
||||
"https://github.com/JonasGMorsch/GY-21.git"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"int": "Количество секунд между опросами датчика."
|
||||
}
|
||||
},
|
||||
"defActive": true,
|
||||
"defActive": false,
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [
|
||||
"ClosedCube HDC1080"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"int": "Количество секунд между опросами датчика."
|
||||
}
|
||||
},
|
||||
"defActive": true,
|
||||
"defActive": false,
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [
|
||||
"adafruit/MAX6675 library"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
{
|
||||
"menuSection": "Сенсоры",
|
||||
|
||||
"configItem": [{
|
||||
"global": 0,
|
||||
"name": "Сканер кнопок 433 MHz",
|
||||
"num": 31,
|
||||
"type": "Reading",
|
||||
"subtype": "RCswitch",
|
||||
"id": "rsw",
|
||||
"int": 500,
|
||||
"pinRx": 12,
|
||||
"pinTx": 12
|
||||
}],
|
||||
|
||||
"configItem": [
|
||||
{
|
||||
"global": 0,
|
||||
"name": "Сканер кнопок 433 MHz",
|
||||
"num": 31,
|
||||
"type": "Reading",
|
||||
"subtype": "RCswitch",
|
||||
"id": "rsw",
|
||||
"int": 500,
|
||||
"pinRx": 12,
|
||||
"pinTx": 12
|
||||
}
|
||||
],
|
||||
"about": {
|
||||
"authorName": "Serghei Crasnicov",
|
||||
"authorContact": "https://t.me/Serghei63",
|
||||
@@ -36,23 +36,28 @@
|
||||
{
|
||||
"name": "sendBitStr",
|
||||
"descr": "Отправляем строку вида 000000000001010100010001",
|
||||
"params": ["Строка 000000000001010100010001"]
|
||||
"params": [
|
||||
"Строка 000000000001010100010001"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sendTriState",
|
||||
"descr": "отправляем строку вида 00000FFF0F0F",
|
||||
"params": ["Строка 00000FFF0F0F"]
|
||||
"params": [
|
||||
"Строка 00000FFF0F0F"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sendDecimal",
|
||||
"descr": "отправляем строку вида 5393",
|
||||
"params": ["Код в виде числа", "Количество бит чтоб заполнить нулями"]
|
||||
"params": [
|
||||
"Код в виде числа",
|
||||
"Количество бит чтоб заполнить нулями"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"defActive": true,
|
||||
|
||||
"defActive": false,
|
||||
"usedLibs": {
|
||||
"esp32_4mb": [
|
||||
"rc-switch @ ^2.6.4"
|
||||
|
||||
Reference in New Issue
Block a user