mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Меняем структуру FS для хранения модулей и добавляем скрипт сборки модулей для интеграции в меню и библиотеки
This commit is contained in:
72
accembleItems.py
Normal file
72
accembleItems.py
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
import configparser
|
||||||
|
import os
|
||||||
|
import json, pprint
|
||||||
|
|
||||||
|
config = configparser.ConfigParser() # создаём объекта парсера INI
|
||||||
|
allLibs_esp8266_4mb = ""
|
||||||
|
allLibs_esp32_4mb = ""
|
||||||
|
allMenuItems = json.loads('[]')
|
||||||
|
allMenuItemsCount = 1;
|
||||||
|
|
||||||
|
|
||||||
|
def getDirs(path):
|
||||||
|
for file in os.listdir(path):
|
||||||
|
if os.path.isdir(os.path.join(path, file)):
|
||||||
|
yield file
|
||||||
|
|
||||||
|
|
||||||
|
def getPIOLibs(patch):
|
||||||
|
global allLibs_esp8266_4mb, allLibs_esp32_4mb
|
||||||
|
for dir in getDirs(patch):
|
||||||
|
if (config.read(patch + dir + "/platformio.ini")):
|
||||||
|
print(patch + dir + "/platformio.ini")
|
||||||
|
allLibs_esp8266_4mb = allLibs_esp8266_4mb + config["env:esp8266_4mb"]["lib_deps"]
|
||||||
|
allLibs_esp32_4mb = allLibs_esp32_4mb + config["env:esp32_4mb"]["lib_deps"]
|
||||||
|
|
||||||
|
|
||||||
|
def getMenuItems(patch):
|
||||||
|
global allMenuItems, allMenuItemsCount
|
||||||
|
with open(patch + "items.json", "r") as read_file:
|
||||||
|
allMenuItems = allMenuItems + json.load(read_file)
|
||||||
|
|
||||||
|
for dir in getDirs(patch):
|
||||||
|
with open(patch + dir + "/items.json", "r") as read_file:
|
||||||
|
print(patch + dir + "/items.json")
|
||||||
|
data = json.load(read_file)
|
||||||
|
for item in data:
|
||||||
|
item["name"] = str(allMenuItemsCount) + ". " + item["name"]
|
||||||
|
item["num"] = allMenuItemsCount
|
||||||
|
allMenuItemsCount = allMenuItemsCount + 1
|
||||||
|
allMenuItems = allMenuItems + data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# читаем и запоминаем все либы мз каждого модуля
|
||||||
|
getPIOLibs("src/modules/system/")
|
||||||
|
getPIOLibs("src/modules/exec/")
|
||||||
|
getPIOLibs("src/modules/sensors/")
|
||||||
|
getPIOLibs("src/modules/lcd/")
|
||||||
|
|
||||||
|
|
||||||
|
# сохраняем собранные либы в настройках PIO
|
||||||
|
config.read("platformio.ini")
|
||||||
|
config["env:esp8266_4mb_fromitems"]["lib_deps"] = allLibs_esp8266_4mb
|
||||||
|
config["env:esp32_4mb_fromitems"]["lib_deps"] = allLibs_esp32_4mb
|
||||||
|
with open("platformio.ini", 'w') as configfile:
|
||||||
|
config.write(configfile)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# готовим первый элемент меню
|
||||||
|
with open("src/modules/items.json", "r") as read_file:
|
||||||
|
allMenuItems = allMenuItems + json.load(read_file)
|
||||||
|
|
||||||
|
# читаем и запоминаем пункты меню модуелей
|
||||||
|
getMenuItems("src/modules/system/")
|
||||||
|
getMenuItems("src/modules/exec/")
|
||||||
|
getMenuItems("src/modules/sensors/")
|
||||||
|
getMenuItems("src/modules/lcd/")
|
||||||
|
|
||||||
|
# сохраняем пункты меню в общий файл
|
||||||
|
with open('data_svelte/items.json', 'w') as f:
|
||||||
|
json.dump(allMenuItems, f, ensure_ascii=False, indent=4, sort_keys=False)
|
||||||
@@ -3,12 +3,110 @@
|
|||||||
"name": "Выберите элемент",
|
"name": "Выберите элемент",
|
||||||
"num": 0
|
"num": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"header": "Расширения"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "1. Расширитель портов Mcp23017",
|
||||||
|
"num": 1,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mcp23017",
|
||||||
|
"id": "Mcp",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
"int": "0",
|
||||||
|
"addr": "0x20",
|
||||||
|
"index": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "2. Доп. функции системы",
|
||||||
|
"num": 2,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "SysExt",
|
||||||
|
"id": "SysExt",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
"int": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "3. Переменная",
|
||||||
|
"num": 3,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Variable",
|
||||||
|
"id": "var",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
"int": "0",
|
||||||
|
"val": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"header": "Модули управления"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "4. Кнопка управляющая пином (Реле с кнопкой)",
|
||||||
|
"num": 4,
|
||||||
|
"type": "Writing",
|
||||||
|
"subtype": "ButtonOut",
|
||||||
|
"id": "btn",
|
||||||
|
"widget": "toggle",
|
||||||
|
"page": "Кнопки",
|
||||||
|
"descr": "",
|
||||||
|
"int": 0,
|
||||||
|
"inv": 0,
|
||||||
|
"pin": 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"header": "Сенсоры"
|
"header": "Сенсоры"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "1. Аналоговый сенсор",
|
"name": "5. Датчик напряжения ADS1115",
|
||||||
"num": 1,
|
"num": 5,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ads1115",
|
||||||
|
"id": "Ads3",
|
||||||
|
"widget": "anydataVlt",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "ADS_3",
|
||||||
|
"pin": "0",
|
||||||
|
"mode": "volt",
|
||||||
|
"gain": "3/4x",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 100,
|
||||||
|
"int": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "6. Cенсор температуры AHT20",
|
||||||
|
"num": 6,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Aht20t",
|
||||||
|
"id": "Temp20",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "AHT20 Температура",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x38",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "7. Cенсор влажности AHT20",
|
||||||
|
"num": 7,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Aht20h",
|
||||||
|
"id": "Hum20",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "AHT20 Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x38",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "8. Аналоговый сенсор",
|
||||||
|
"num": 8,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "AnalogAdc",
|
"subtype": "AnalogAdc",
|
||||||
"id": "t",
|
"id": "t",
|
||||||
@@ -22,97 +120,6 @@
|
|||||||
"pin": 0,
|
"pin": 0,
|
||||||
"int": 15
|
"int": 15
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "2. Cенсор температуры ds18b20",
|
|
||||||
"num": 2,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Ds18b20",
|
|
||||||
"id": "dstmp",
|
|
||||||
"widget": "anydataTmp",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "DS Температура",
|
|
||||||
"int": 15,
|
|
||||||
"pin": 2,
|
|
||||||
"index": 0,
|
|
||||||
"addr": "",
|
|
||||||
"round": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "3. Cенсор температуры Sht20",
|
|
||||||
"num": 3,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Sht20t",
|
|
||||||
"id": "tmp2",
|
|
||||||
"widget": "anydataTmp",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Температура",
|
|
||||||
"int": 15,
|
|
||||||
"round": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "4. Cенсор влажности Sht20",
|
|
||||||
"num": 4,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Sht20h",
|
|
||||||
"id": "Hum2",
|
|
||||||
"widget": "anydataHum",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Влажность",
|
|
||||||
"int": 15,
|
|
||||||
"round": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "5. Cенсор температуры dht11",
|
|
||||||
"num": 5,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Dht1122t",
|
|
||||||
"id": "tmp3",
|
|
||||||
"widget": "anydataTmp",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Температура",
|
|
||||||
"int": 15,
|
|
||||||
"pin": 0,
|
|
||||||
"senstype": "dht11"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "6. Cенсор влажности dht11",
|
|
||||||
"num": 6,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Dht1122h",
|
|
||||||
"id": "Hum3",
|
|
||||||
"widget": "anydataHum",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Влажность",
|
|
||||||
"int": 15,
|
|
||||||
"pin": 0,
|
|
||||||
"senstype": "dht11"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "7. Cенсор температуры Bmp280",
|
|
||||||
"num": 7,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Bmp280t",
|
|
||||||
"id": "tmp3",
|
|
||||||
"widget": "anydataTmp",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "280 Температура",
|
|
||||||
"int": 15,
|
|
||||||
"addr": "0x77",
|
|
||||||
"round": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "8. Cенсор давления Bmp280",
|
|
||||||
"num": 8,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Bmp280p",
|
|
||||||
"id": "Press3",
|
|
||||||
"widget": "anydataMm",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "280 Давление",
|
|
||||||
"int": 15,
|
|
||||||
"addr": "0x77",
|
|
||||||
"round": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "9. Cенсор температуры Bme280",
|
"name": "9. Cенсор температуры Bme280",
|
||||||
"num": 9,
|
"num": 9,
|
||||||
@@ -153,35 +160,100 @@
|
|||||||
"round": 1
|
"round": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "12. Cенсор температуры AHT20",
|
"name": "12. Cенсор температуры Bmp280",
|
||||||
"num": 12,
|
"num": 12,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Aht20t",
|
"subtype": "Bmp280t",
|
||||||
"id": "Temp20",
|
"id": "tmp3",
|
||||||
"widget": "anydataTmp",
|
"widget": "anydataTmp",
|
||||||
"page": "Сенсоры",
|
"page": "Сенсоры",
|
||||||
"descr": "AHT20 Температура",
|
"descr": "280 Температура",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x38",
|
"addr": "0x77",
|
||||||
"round": 1
|
"round": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "13. Cенсор влажности AHT20",
|
"name": "13. Cенсор давления Bmp280",
|
||||||
"num": 13,
|
"num": 13,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Aht20h",
|
"subtype": "Bmp280p",
|
||||||
"id": "Hum20",
|
"id": "Press3",
|
||||||
"widget": "anydataHum",
|
"widget": "anydataMm",
|
||||||
"page": "Сенсоры",
|
"page": "Сенсоры",
|
||||||
"descr": "AHT20 Влажность",
|
"descr": "280 Давление",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x38",
|
"addr": "0x77",
|
||||||
"round": 1
|
"round": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "14. Cенсор температуры HDC1080",
|
"name": "14. Cенсор температуры dht11",
|
||||||
"num": 14,
|
"num": 14,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
|
"subtype": "Dht1122t",
|
||||||
|
"id": "tmp3",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 0,
|
||||||
|
"senstype": "dht11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "15. Cенсор влажности dht11",
|
||||||
|
"num": 15,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Dht1122h",
|
||||||
|
"id": "Hum3",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 0,
|
||||||
|
"senstype": "dht11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "16. Cенсор температуры ds18b20",
|
||||||
|
"num": 16,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ds18b20",
|
||||||
|
"id": "dstmp",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "DS Температура",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 2,
|
||||||
|
"index": 0,
|
||||||
|
"addr": "",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "17. Cенсор температуры GY21",
|
||||||
|
"num": 17,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "GY21t",
|
||||||
|
"id": "tmp4",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"round": 1,
|
||||||
|
"int": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "18. Cенсор влажности GY21",
|
||||||
|
"num": 18,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "GY21h",
|
||||||
|
"id": "Hum4",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"round": 1,
|
||||||
|
"int": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "19. Cенсор температуры HDC1080",
|
||||||
|
"num": 19,
|
||||||
|
"type": "Reading",
|
||||||
"subtype": "Hdc1080t",
|
"subtype": "Hdc1080t",
|
||||||
"id": "Temp1080",
|
"id": "Temp1080",
|
||||||
"widget": "anydataTmp",
|
"widget": "anydataTmp",
|
||||||
@@ -192,8 +264,8 @@
|
|||||||
"round": 1
|
"round": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "15. Cенсор влажности HDC1080",
|
"name": "20. Cенсор влажности HDC1080",
|
||||||
"num": 15,
|
"num": 20,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Hdc1080h",
|
"subtype": "Hdc1080h",
|
||||||
"id": "Hum1080",
|
"id": "Hum1080",
|
||||||
@@ -205,68 +277,8 @@
|
|||||||
"round": 1
|
"round": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "16. Cенсор температуры GY21",
|
"name": "21. Датчик CO2 MHZ-19 UART",
|
||||||
"num": 16,
|
"num": 21,
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "GY21t",
|
|
||||||
"id": "tmp4",
|
|
||||||
"widget": "anydataTmp",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Температура",
|
|
||||||
"round": 1,
|
|
||||||
"int": 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "17. Cенсор влажности GY21",
|
|
||||||
"num": 17,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "GY21h",
|
|
||||||
"id": "Hum4",
|
|
||||||
"widget": "anydataHum",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "Влажность",
|
|
||||||
"round": 1,
|
|
||||||
"int": 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "18. Датчик пыли SDS011 PM25",
|
|
||||||
"num": 18,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Sds011_25",
|
|
||||||
"id": "pmuart25",
|
|
||||||
"widget": "anydataPpm",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "PM-2.5",
|
|
||||||
"plus": 0,
|
|
||||||
"multiply": 1,
|
|
||||||
"round": 10,
|
|
||||||
"rxPin": 13,
|
|
||||||
"txPin": 12,
|
|
||||||
"int": 15,
|
|
||||||
"warmUp": 30,
|
|
||||||
"period": 300
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "19. Датчик пыли SDS011 PM10",
|
|
||||||
"num": 19,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Sds011_10",
|
|
||||||
"id": "pmuart10",
|
|
||||||
"widget": "anydataPpm",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "PM-10",
|
|
||||||
"plus": 0,
|
|
||||||
"multiply": 1,
|
|
||||||
"round": 10,
|
|
||||||
"rxPin": 13,
|
|
||||||
"txPin": 12,
|
|
||||||
"int": 15,
|
|
||||||
"warmUp": 30,
|
|
||||||
"period": 300
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "20. Датчик CO2 MHZ-19 UART",
|
|
||||||
"num": 20,
|
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mhz19uart",
|
"subtype": "Mhz19uart",
|
||||||
"id": "co2uart",
|
"id": "co2uart",
|
||||||
@@ -284,8 +296,8 @@
|
|||||||
"ABC": 1
|
"ABC": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "21. Датчик CO2 MHZ-19 PWM",
|
"name": "22. Датчик CO2 MHZ-19 PWM",
|
||||||
"num": 21,
|
"num": 22,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mhz19pwm",
|
"subtype": "Mhz19pwm",
|
||||||
"id": "co2pwm",
|
"id": "co2pwm",
|
||||||
@@ -299,8 +311,8 @@
|
|||||||
"int": 300
|
"int": 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "22. Cенсор температуры от MHZ-19 UART",
|
"name": "23. Cенсор температуры от MHZ-19 UART",
|
||||||
"num": 22,
|
"num": 23,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mhz19temp",
|
"subtype": "Mhz19temp",
|
||||||
"id": "Mhz19temp",
|
"id": "Mhz19temp",
|
||||||
@@ -316,8 +328,8 @@
|
|||||||
"int": 30
|
"int": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "23. Рабочий диапазон от MHZ-19 UART",
|
"name": "24. Рабочий диапазон от MHZ-19 UART",
|
||||||
"num": 23,
|
"num": 24,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mhz19range",
|
"subtype": "Mhz19range",
|
||||||
"id": "Mhz19range",
|
"id": "Mhz19range",
|
||||||
@@ -334,8 +346,8 @@
|
|||||||
"int": 30
|
"int": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "24. Автокалибровка от MHZ-19 UART",
|
"name": "25. Автокалибровка от MHZ-19 UART",
|
||||||
"num": 24,
|
"num": 25,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mhz19ABC",
|
"subtype": "Mhz19ABC",
|
||||||
"id": "Mhz19ABC",
|
"id": "Mhz19ABC",
|
||||||
@@ -348,12 +360,72 @@
|
|||||||
"ABC": 1,
|
"ABC": 1,
|
||||||
"int": 30
|
"int": 30
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "26. Датчик пыли SDS011 PM25",
|
||||||
|
"num": 26,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sds011_25",
|
||||||
|
"id": "pmuart25",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "PM-2.5",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 10,
|
||||||
|
"rxPin": 13,
|
||||||
|
"txPin": 12,
|
||||||
|
"int": 15,
|
||||||
|
"warmUp": 30,
|
||||||
|
"period": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "27. Датчик пыли SDS011 PM10",
|
||||||
|
"num": 27,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sds011_10",
|
||||||
|
"id": "pmuart10",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "PM-10",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 10,
|
||||||
|
"rxPin": 13,
|
||||||
|
"txPin": 12,
|
||||||
|
"int": 15,
|
||||||
|
"warmUp": 30,
|
||||||
|
"period": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "28. Cенсор температуры Sht20",
|
||||||
|
"num": 28,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sht20t",
|
||||||
|
"id": "tmp2",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "29. Cенсор влажности Sht20",
|
||||||
|
"num": 29,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sht20h",
|
||||||
|
"id": "Hum2",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"header": "Экраны"
|
"header": "Экраны"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "25. LCD экран 2004",
|
"name": "30. LCD экран 2004",
|
||||||
"num": 25,
|
"num": 30,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Lcd2004",
|
"subtype": "Lcd2004",
|
||||||
"id": "Lcd",
|
"id": "Lcd",
|
||||||
@@ -367,8 +439,8 @@
|
|||||||
"id2show": "id датчика"
|
"id2show": "id датчика"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "26. LCD экран 1602",
|
"name": "31. LCD экран 1602",
|
||||||
"num": 26,
|
"num": 31,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Lcd2004",
|
"subtype": "Lcd2004",
|
||||||
"id": "Lcd",
|
"id": "Lcd",
|
||||||
@@ -380,82 +452,5 @@
|
|||||||
"size": "16,2",
|
"size": "16,2",
|
||||||
"coord": "0,0",
|
"coord": "0,0",
|
||||||
"id2show": "id датчика"
|
"id2show": "id датчика"
|
||||||
},
|
|
||||||
{
|
|
||||||
"header": "Расширения"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "27. Доп. функции системы",
|
|
||||||
"num": 27,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "SysExt",
|
|
||||||
"id": "SysExt",
|
|
||||||
"widget": "",
|
|
||||||
"page": "",
|
|
||||||
"descr": "",
|
|
||||||
"int": 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "28. Датчик напряжения ADS1115",
|
|
||||||
"num": 28,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Ads1115",
|
|
||||||
"id": "Ads3",
|
|
||||||
"widget": "anydataVlt",
|
|
||||||
"page": "Сенсоры",
|
|
||||||
"descr": "ADS_3",
|
|
||||||
|
|
||||||
"pin": "0",
|
|
||||||
"mode": "volt",
|
|
||||||
"gain": "3/4x",
|
|
||||||
|
|
||||||
"plus": 0,
|
|
||||||
"multiply": 1,
|
|
||||||
"round": 100,
|
|
||||||
"int": 10
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "29. Расширитель портов Mcp23017",
|
|
||||||
"num": 29,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Mcp23017",
|
|
||||||
"id": "Mcp",
|
|
||||||
"widget": "",
|
|
||||||
"page": "",
|
|
||||||
"descr": "",
|
|
||||||
|
|
||||||
"int": "0",
|
|
||||||
"addr": "0x20",
|
|
||||||
"index": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "30. Переменная",
|
|
||||||
"num": 30,
|
|
||||||
"type": "Reading",
|
|
||||||
"subtype": "Variable",
|
|
||||||
"id": "var",
|
|
||||||
"widget": "",
|
|
||||||
"page": "",
|
|
||||||
"descr": "",
|
|
||||||
|
|
||||||
"int": "0",
|
|
||||||
"val": "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"header": "Исполнительные устройства"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "31. Кнопка управляющая пином (Реле с кнопкой)",
|
|
||||||
"num": 31,
|
|
||||||
"type": "Writing",
|
|
||||||
"subtype": "ButtonOut",
|
|
||||||
"id": "btn",
|
|
||||||
"widget": "toggle",
|
|
||||||
"page": "Кнопки",
|
|
||||||
"descr": "",
|
|
||||||
"int": 0,
|
|
||||||
|
|
||||||
"inv": 0,
|
|
||||||
"pin": 2
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,12 +1,28 @@
|
|||||||
; PlatformIO Project Configuration File
|
[env:esp8266_4mb]
|
||||||
;
|
lib_deps =
|
||||||
; Build options: build flags, source filter
|
${common_env_data.lib_deps_external}
|
||||||
; Upload options: custom upload port, speed and extra flags
|
${env:esp8266_4mb_fromitems.lib_deps}
|
||||||
; Library options: dependencies, extra library storages
|
build_flags = -Desp8266_4mb="esp8266_4mb"
|
||||||
; Advanced options: extra scripting
|
framework = arduino
|
||||||
;
|
board = nodemcuv2
|
||||||
; Please visit documentation for the other options and examples
|
board_build.ldscript = eagle.flash.4m1m.ld
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
platform = espressif8266 @2.6.3
|
||||||
|
monitor_filters = esp8266_exception_decoder
|
||||||
|
upload_speed = 921600
|
||||||
|
monitor_speed = 115200
|
||||||
|
board_build.filesystem = littlefs
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
${common_env_data.lib_deps_external}
|
||||||
|
${env:esp32_4mb_fromitems.lib_deps}
|
||||||
|
build_flags = -Desp32_4mb="esp32_4mb"
|
||||||
|
framework = arduino
|
||||||
|
board = esp32dev
|
||||||
|
platform = espressif32 @3.3.0
|
||||||
|
monitor_filters = esp32_exception_decoder
|
||||||
|
upload_speed = 921600
|
||||||
|
monitor_speed = 115200
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
default_envs = esp8266_4mb
|
default_envs = esp8266_4mb
|
||||||
@@ -19,51 +35,33 @@ lib_deps_external =
|
|||||||
Links2004/WebSockets
|
Links2004/WebSockets
|
||||||
knolleary/PubSubClient
|
knolleary/PubSubClient
|
||||||
|
|
||||||
[env:esp8266_4mb]
|
[env:esp8266_4mb_fromitems]
|
||||||
build_flags = -Desp8266_4mb="esp8266_4mb"
|
|
||||||
framework = arduino
|
|
||||||
board = nodemcuv2
|
|
||||||
board_build.ldscript = eagle.flash.4m1m.ld
|
|
||||||
platform = espressif8266 @2.6.3
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common_env_data.lib_deps_external}
|
|
||||||
milesburton/DallasTemperature@^3.9.1
|
|
||||||
robtillaart/SHT2x@^0.1.1
|
|
||||||
beegee-tokyo/DHT sensor library for ESPx
|
|
||||||
adafruit/Adafruit BMP280 Library
|
|
||||||
adafruit/Adafruit BME280 Library
|
|
||||||
Adafruit AHTX0
|
|
||||||
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
|
||||||
me-no-dev/ESPAsyncUDP
|
|
||||||
ClosedCube HDC1080
|
|
||||||
https://github.com/JonasGMorsch/GY-21.git
|
|
||||||
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
|
||||||
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
||||||
|
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
||||||
|
Adafruit AHTX0
|
||||||
|
adafruit/Adafruit BME280 Library
|
||||||
|
adafruit/Adafruit BMP280 Library
|
||||||
|
beegee-tokyo/DHT sensor library for ESPx
|
||||||
|
milesburton/DallasTemperature@^3.9.1
|
||||||
|
https://github.com/JonasGMorsch/GY-21.git
|
||||||
|
ClosedCube HDC1080
|
||||||
Nova Fitness Sds dust sensors library@1.5.1
|
Nova Fitness Sds dust sensors library@1.5.1
|
||||||
monitor_filters = esp8266_exception_decoder
|
robtillaart/SHT2x@^0.1.1
|
||||||
upload_speed = 921600
|
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
||||||
monitor_speed = 115200
|
|
||||||
board_build.filesystem = littlefs
|
|
||||||
|
|
||||||
[env:esp32_4mb]
|
[env:esp32_4mb_fromitems]
|
||||||
build_flags = -Desp32_4mb="esp32_4mb"
|
|
||||||
framework = arduino
|
|
||||||
board = esp32dev
|
|
||||||
platform = espressif32 @3.3.0
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common_env_data.lib_deps_external}
|
|
||||||
milesburton/DallasTemperature@^3.9.1
|
|
||||||
robtillaart/SHT2x@^0.1.1
|
|
||||||
beegee-tokyo/DHT sensor library for ESPx
|
|
||||||
adafruit/Adafruit BMP280 Library
|
|
||||||
adafruit/Adafruit BME280 Library
|
|
||||||
Adafruit AHTX0
|
|
||||||
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
|
||||||
ClosedCube HDC1080
|
|
||||||
https://github.com/JonasGMorsch/GY-21.git
|
|
||||||
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
|
||||||
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
||||||
|
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
||||||
|
Adafruit AHTX0
|
||||||
|
adafruit/Adafruit BME280 Library
|
||||||
|
adafruit/Adafruit BMP280 Library
|
||||||
|
beegee-tokyo/DHT sensor library for ESPx
|
||||||
|
milesburton/DallasTemperature@^3.9.1
|
||||||
|
https://github.com/JonasGMorsch/GY-21.git
|
||||||
|
ClosedCube HDC1080
|
||||||
Nova Fitness Sds dust sensors library@1.5.1
|
Nova Fitness Sds dust sensors library@1.5.1
|
||||||
monitor_filters = esp32_exception_decoder
|
robtillaart/SHT2x@^0.1.1
|
||||||
upload_speed = 921600
|
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
||||||
monitor_speed = 115200
|
|
||||||
|
|||||||
16
src/modules/exec/ButtonOut/items.json
Normal file
16
src/modules/exec/ButtonOut/items.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Кнопка управляющая пином (Реле с кнопкой)",
|
||||||
|
"num": 31,
|
||||||
|
"type": "Writing",
|
||||||
|
"subtype": "ButtonOut",
|
||||||
|
"id": "btn",
|
||||||
|
"widget": "toggle",
|
||||||
|
"page": "Кнопки",
|
||||||
|
"descr": "",
|
||||||
|
"int": 0,
|
||||||
|
|
||||||
|
"inv": 0,
|
||||||
|
"pin": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
5
src/modules/exec/items.json
Normal file
5
src/modules/exec/items.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"header": "Модули управления"
|
||||||
|
}
|
||||||
|
]
|
||||||
6
src/modules/items.json
Normal file
6
src/modules/items.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Выберите элемент",
|
||||||
|
"num": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
32
src/modules/lcd/Lcd2004/items.json
Normal file
32
src/modules/lcd/Lcd2004/items.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "LCD экран 2004",
|
||||||
|
"num": 25,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Lcd2004",
|
||||||
|
"id": "Lcd",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "T",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x27",
|
||||||
|
"size": "20,4",
|
||||||
|
"coord": "0,0",
|
||||||
|
"id2show": "id датчика"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LCD экран 1602",
|
||||||
|
"num": 26,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Lcd2004",
|
||||||
|
"id": "Lcd",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "T",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x27",
|
||||||
|
"size": "16,2",
|
||||||
|
"coord": "0,0",
|
||||||
|
"id2show": "id датчика"
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/lcd/Lcd2004/platformio.ini
Normal file
7
src/modules/lcd/Lcd2004/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
||||||
5
src/modules/lcd/items.json
Normal file
5
src/modules/lcd/items.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"header": "Экраны"
|
||||||
|
}
|
||||||
|
]
|
||||||
21
src/modules/sensors/Ads1115/items.json
Normal file
21
src/modules/sensors/Ads1115/items.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Датчик напряжения ADS1115",
|
||||||
|
"num": 28,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ads1115",
|
||||||
|
"id": "Ads3",
|
||||||
|
"widget": "anydataVlt",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "ADS_3",
|
||||||
|
|
||||||
|
"pin": "0",
|
||||||
|
"mode": "volt",
|
||||||
|
"gain": "3/4x",
|
||||||
|
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 100,
|
||||||
|
"int": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Ads1115/platformio.ini
Normal file
7
src/modules/sensors/Ads1115/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit ADS1X15 @ ^2.3.0
|
||||||
27
src/modules/sensors/Aht20/items.json
Normal file
27
src/modules/sensors/Aht20/items.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
[{
|
||||||
|
"name": "Cенсор температуры AHT20",
|
||||||
|
"num": 12,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Aht20t",
|
||||||
|
"id": "Temp20",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "AHT20 Температура",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x38",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности AHT20",
|
||||||
|
"num": 13,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Aht20h",
|
||||||
|
"id": "Hum20",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "AHT20 Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x38",
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Aht20/platformio.ini
Normal file
7
src/modules/sensors/Aht20/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
Adafruit AHTX0
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
Adafruit AHTX0
|
||||||
18
src/modules/sensors/AnalogAdc/items.json
Normal file
18
src/modules/sensors/AnalogAdc/items.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Аналоговый сенсор",
|
||||||
|
"num": 1,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "AnalogAdc",
|
||||||
|
"id": "t",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"map": "1,1024,1,100",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 1,
|
||||||
|
"pin": 0,
|
||||||
|
"int": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
41
src/modules/sensors/Bme280/items.json
Normal file
41
src/modules/sensors/Bme280/items.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры Bme280",
|
||||||
|
"num": 9,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Bme280t",
|
||||||
|
"id": "tmp3",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x77",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор давления Bme280",
|
||||||
|
"num": 10,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Bme280p",
|
||||||
|
"id": "Press3",
|
||||||
|
"widget": "anydataMm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Давление",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x77",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности Bme280",
|
||||||
|
"num": 11,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Bme280h",
|
||||||
|
"id": "Hum3",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x77",
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
8
src/modules/sensors/Bme280/platformio.ini
Normal file
8
src/modules/sensors/Bme280/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit BME280 Library
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit BME280 Library
|
||||||
|
|
||||||
28
src/modules/sensors/Bmp280/items.json
Normal file
28
src/modules/sensors/Bmp280/items.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры Bmp280",
|
||||||
|
"num": 7,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Bmp280t",
|
||||||
|
"id": "tmp3",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "280 Температура",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x77",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор давления Bmp280",
|
||||||
|
"num": 8,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Bmp280p",
|
||||||
|
"id": "Press3",
|
||||||
|
"widget": "anydataMm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "280 Давление",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x77",
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
8
src/modules/sensors/Bmp280/platformio.ini
Normal file
8
src/modules/sensors/Bmp280/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit BMP280 Library
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit BMP280 Library
|
||||||
|
|
||||||
28
src/modules/sensors/Dht1122/items.json
Normal file
28
src/modules/sensors/Dht1122/items.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры dht11",
|
||||||
|
"num": 5,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Dht1122t",
|
||||||
|
"id": "tmp3",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 0,
|
||||||
|
"senstype": "dht11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности dht11",
|
||||||
|
"num": 6,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Dht1122h",
|
||||||
|
"id": "Hum3",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 0,
|
||||||
|
"senstype": "dht11"
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Dht1122/platformio.ini
Normal file
7
src/modules/sensors/Dht1122/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
beegee-tokyo/DHT sensor library for ESPx
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
beegee-tokyo/DHT sensor library for ESPx
|
||||||
17
src/modules/sensors/Ds18b20/items.json
Normal file
17
src/modules/sensors/Ds18b20/items.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры ds18b20",
|
||||||
|
"num": 2,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ds18b20",
|
||||||
|
"id": "dstmp",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "DS Температура",
|
||||||
|
"int": 15,
|
||||||
|
"pin": 2,
|
||||||
|
"index": 0,
|
||||||
|
"addr": "",
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
8
src/modules/sensors/Ds18b20/platformio.ini
Normal file
8
src/modules/sensors/Ds18b20/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
milesburton/DallasTemperature@^3.9.1
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
milesburton/DallasTemperature@^3.9.1
|
||||||
|
|
||||||
26
src/modules/sensors/GY-21/items.json
Normal file
26
src/modules/sensors/GY-21/items.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры GY21",
|
||||||
|
"num": 16,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "GY21t",
|
||||||
|
"id": "tmp4",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"round": 1,
|
||||||
|
"int": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности GY21",
|
||||||
|
"num": 17,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "GY21h",
|
||||||
|
"id": "Hum4",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"round": 1,
|
||||||
|
"int": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
8
src/modules/sensors/GY-21/platformio.ini
Normal file
8
src/modules/sensors/GY-21/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/JonasGMorsch/GY-21.git
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/JonasGMorsch/GY-21.git
|
||||||
|
|
||||||
28
src/modules/sensors/Hdc1080/items.json
Normal file
28
src/modules/sensors/Hdc1080/items.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры HDC1080",
|
||||||
|
"num": 14,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Hdc1080t",
|
||||||
|
"id": "Temp1080",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "1080 Температура",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x40",
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности HDC1080",
|
||||||
|
"num": 15,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Hdc1080h",
|
||||||
|
"id": "Hum1080",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "1080 Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"addr": "0x40",
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Hdc1080/platformio.ini
Normal file
7
src/modules/sensors/Hdc1080/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
ClosedCube HDC1080
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
ClosedCube HDC1080
|
||||||
86
src/modules/sensors/Mhz19/items.json
Normal file
86
src/modules/sensors/Mhz19/items.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Датчик CO2 MHZ-19 UART",
|
||||||
|
"num": 20,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mhz19uart",
|
||||||
|
"id": "co2uart",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "CO2uart",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 1,
|
||||||
|
"pin": 0,
|
||||||
|
"rxPin": 14,
|
||||||
|
"txPin": 16,
|
||||||
|
"int": 15,
|
||||||
|
"range": 5000,
|
||||||
|
"ABC": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Датчик CO2 MHZ-19 PWM",
|
||||||
|
"num": 21,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mhz19pwm",
|
||||||
|
"id": "co2pwm",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "CO2pwm",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 1,
|
||||||
|
"pin": 16,
|
||||||
|
"int": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры от MHZ-19 UART",
|
||||||
|
"num": 22,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mhz19temp",
|
||||||
|
"id": "Mhz19temp",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 1,
|
||||||
|
"rxPin": 14,
|
||||||
|
"txPin": 16,
|
||||||
|
"ABC": 1,
|
||||||
|
"int": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Рабочий диапазон от MHZ-19 UART",
|
||||||
|
"num": 23,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mhz19range",
|
||||||
|
"id": "Mhz19range",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Диапазон",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 1,
|
||||||
|
"rxPin": 14,
|
||||||
|
"txPin": 16,
|
||||||
|
"range": 5000,
|
||||||
|
"ABC": 1,
|
||||||
|
"int": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Автокалибровка от MHZ-19 UART",
|
||||||
|
"num": 24,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mhz19ABC",
|
||||||
|
"id": "Mhz19ABC",
|
||||||
|
"widget": "anydataDef",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "ABC",
|
||||||
|
"rxPin": 14,
|
||||||
|
"txPin": 16,
|
||||||
|
"range": 5000,
|
||||||
|
"ABC": 1,
|
||||||
|
"int": 30
|
||||||
|
}
|
||||||
|
]
|
||||||
38
src/modules/sensors/Sds011/items.json
Normal file
38
src/modules/sensors/Sds011/items.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Датчик пыли SDS011 PM25",
|
||||||
|
"num": 18,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sds011_25",
|
||||||
|
"id": "pmuart25",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "PM-2.5",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 10,
|
||||||
|
"rxPin": 13,
|
||||||
|
"txPin": 12,
|
||||||
|
"int": 15,
|
||||||
|
"warmUp": 30,
|
||||||
|
"period": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Датчик пыли SDS011 PM10",
|
||||||
|
"num": 19,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sds011_10",
|
||||||
|
"id": "pmuart10",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "PM-10",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"round": 10,
|
||||||
|
"rxPin": 13,
|
||||||
|
"txPin": 12,
|
||||||
|
"int": 15,
|
||||||
|
"warmUp": 30,
|
||||||
|
"period": 300
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Sds011/platformio.ini
Normal file
7
src/modules/sensors/Sds011/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
Nova Fitness Sds dust sensors library@1.5.1
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
Nova Fitness Sds dust sensors library@1.5.1
|
||||||
26
src/modules/sensors/Sht20/items.json
Normal file
26
src/modules/sensors/Sht20/items.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Cенсор температуры Sht20",
|
||||||
|
"num": 3,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sht20t",
|
||||||
|
"id": "tmp2",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Температура",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cенсор влажности Sht20",
|
||||||
|
"num": 4,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Sht20h",
|
||||||
|
"id": "Hum2",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
7
src/modules/sensors/Sht20/platformio.ini
Normal file
7
src/modules/sensors/Sht20/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
robtillaart/SHT2x@^0.1.1
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
robtillaart/SHT2x@^0.1.1
|
||||||
5
src/modules/sensors/items.json
Normal file
5
src/modules/sensors/items.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"header": "Сенсоры"
|
||||||
|
}
|
||||||
|
]
|
||||||
16
src/modules/system/Mcp23017/items.json
Normal file
16
src/modules/system/Mcp23017/items.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Расширитель портов Mcp23017",
|
||||||
|
"num": 29,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Mcp23017",
|
||||||
|
"id": "Mcp",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
|
||||||
|
"int": "0",
|
||||||
|
"addr": "0x20",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
8
src/modules/system/Mcp23017/platformio.ini
Normal file
8
src/modules/system/Mcp23017/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[env:esp8266_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
||||||
|
|
||||||
|
[env:esp32_4mb]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/Adafruit MCP23017 Arduino Library@^2.0.2
|
||||||
|
|
||||||
13
src/modules/system/SysExt/items.json
Normal file
13
src/modules/system/SysExt/items.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Доп. функции системы",
|
||||||
|
"num": 27,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "SysExt",
|
||||||
|
"id": "SysExt",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
"int": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
15
src/modules/system/Variable/items.json
Normal file
15
src/modules/system/Variable/items.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Переменная",
|
||||||
|
"num": 30,
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Variable",
|
||||||
|
"id": "var",
|
||||||
|
"widget": "",
|
||||||
|
"page": "",
|
||||||
|
"descr": "",
|
||||||
|
|
||||||
|
"int": "0",
|
||||||
|
"val": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
5
src/modules/system/items.json
Normal file
5
src/modules/system/items.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"header": "Расширения"
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user