This commit is contained in:
Dmitry Borisenko
2021-10-05 19:19:14 +08:00
parent 60a292a2f5
commit 74c31e30ea
269 changed files with 0 additions and 20922 deletions

7
.gitignore vendored
View File

@@ -1,7 +0,0 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
lib/libraies-master

View File

@@ -1,7 +0,0 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}

View File

@@ -1,6 +0,0 @@
# IoTManager
Это модульная система беспроводной автоматизации на базе ESP32/ESP8266 микроконтроллеров и приложения IoT Manager.
Телеграм канал обсуждения приложения и системы автоматизации https://t.me/IoTmanager
# [Инструкция](https://github.com/IoTManagerProject/IoTManager/wiki)
![](https://github.com/IoTManagerProject/IoTManager/blob/beta/doc/pictures/007%20iot%20manager.jpg)

View File

@@ -1,37 +0,0 @@
{
"name": "IoTmanager",
"chipID": "",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "rise",
"routerpass": "hostel3333",
"timezone": 1,
"ntp": "pool.ntp.org",
"mqttServer": "91.204.228.124",
"mqttPort": 1883,
"mqttPrefix": "/iotTest",
"mqttUser": "rise",
"mqttPass": "23ri22se32",
"mqttServer2": "",
"mqttPort2": 1883,
"mqttPrefix2": "/iotTest",
"mqttUser2": "",
"mqttPass2": "",
"scen": "1",
"telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo",
"telegonof": "0",
"teleginput": "0",
"autos": "1",
"weblogin": "admin",
"webpass": "admin",
"MqttIn": "0",
"MqttOut": "0",
"blink": "0",
"oneWirePin": "2",
"serverip": "http://206.189.49.244",
"uart": "0",
"uartS": "9600",
"uartTX": "12",
"uartRX": "13",
"grafmax": "0"
}

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Binary file not shown.

View File

@@ -1,27 +0,0 @@
0;button-out;btnid;toggle;Кнопки;Освещение;order;gpio*
0;button-out;btnid;toggle;Кнопки;Освещение;order;gpio;inv[1]*
0;button-out;btnid;toggle;Кнопки;Освещение;order*
0;button-in;btnid;toggle;Кнопки;Освещение;order;gpio;db[20]*
0;pwm-out;pwmid;range;Ползунки;Яркость;order;gpio*
0;inoutput;dgtid;inputDigit;Ввод;Введите#цифру;order*
0;inoutput;tmid;inputTime;Ввод;Введите#время;order*
0;inoutput;txtid;anydata;Вывод;Сигнализация;order*
0;analog-adc;adcid;fillgauge;Сенсоры;Аналоговый;order;pin[0];map[0,1024,0,100];c[1];int[10]*
0;dallas-temp;tmpid;anydataTemp;Сенсоры;Температура;order;pin[2];index[0];int[10]*
0;ultrasonic-cm;cmid;anydata;Сенсоры;Расстояние;order;pin[12,13];map[0,500,0,100];c[1];int[10]*
0;dht;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
0;dht;humid;anydataHum;Сенсоры;Влажность;2;c[1];pin[2];type[dht11];int[10]*
0;dht;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
0;dht;humid;anydataHum;Сенсоры;Влажность;2;c[1];pin[2];type[dht22];int[10]*
0;bme280;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
0;bme280;humid;anydataHum;Сенсоры;Влажность;2;c[1]
0;bme280;prsid;anydataPress;Сенсоры;Давление;3;c[1];addr[0x76];int[10]*
0;bmp280;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
0;bmp280;prsid;anydataPress;Сенсоры;Давление;3;c[1];addr[0x76];int[10]*
0;ccs811;ppmid;anydataPpm;Сенсоры;Содержание#CO2;1;c[1]
0;ccs811;ppbid;anydataPpb;Сенсоры;Содержание#орг#соед;2;c[1];addr[0x76];int[10]*
0;impuls-out;impid;na;na;na;order;gpio*
0;count-down;cntid;anydata;Таймер;Обратный#отчет;order*
0;inoutput;txtid;anydata;Вывод;Вывод#uart;order*
0;logging;crtid;chart;Графики;История;order;val[any];int[60];cnt[100]*
0;uptime;uptid;anydataTime;Системные;%name%#uptime;order;int[60]*

Binary file not shown.

Binary file not shown.

View File

@@ -1,39 +0,0 @@
{
"SetDevConf": "Конфигурация устройства",
"SetDevPreset": "Выберите из списка подходящий пресет кофигурации",
"ButSave":"Сохранить",
"ButMainPage":"Главная",
"SetUDPList": "Список других устройств в сети:",
"SetUDPWarn1": "После нажатия на кнопку <b>переформировать список устройств</b> ждите примерно минуту, а затем обновите страницу и список появится вновь",
"SetUDPUpdateList":"Переформировать список устройств",
"SetUDPUpdatePage":"Обновить страницу",
"SetUDPNameOfDev":"Имя этого устройства:",
"SetUDPDateExchange":"Включить обмен данными между устройствами",
"SetUDPWarn2":"Если обмен данными включен, то устройства будут обмениваться широковещательными пакетами udp для формирования списка устройств и для осуществления посылки настроек mqtt. Данный обмен создает дополнительную нагрузку на wifi сеть.",
"SetWiFiNameOfDev":"Имя устройства:",
"SetWiFiRouterConnect":"Подключение к WiFi роутеру:",
"SetWiFiAccessPoint":"Точка доступа:",
"SetWiFiWeb":"Логин и пароль web interface:",
"SetWiFiTimeZone":"Временная зона:",
"SetWiFiNTP":"Сервер NTP:",
"SetWiFiWarn1":"Имя устройства должно состоять из английских букв и иметь длинну от 6 до 12 символов",
"SetWiFiWarn2":"После того как вы введете логин пароль от вашего wifi роутера необходимо нажать кнопку сохранить, а затем обязательно нажать кнопку <b>перезагрузить устройство</b> внизу этой страницы",
"SetWiFiWarn3":"Устройство постоянно сканирует сеть на наличие wifi. Если роутер отключен, то устройство автоматически перейдет в режим точки доступа. Когда wifi появится устройство автоматически подключится к роутеру снова, и выключит точку доступа",
"SetWiFiWarn4":"После изменения поля <b>NTP сервер</b> необходимо перезагрузить устройство",
"SetWiFiWarn5":"Светодиод статуса подключения показывает четыре состояния подключения: <br><b>1. мигает редко</b> - идет подключение к wifi <br><b>2. мигает часто</b> - идет подключение к серверу mqtt <br><b>3. горит постоянно</b> - модуль в режиме точки доступа, <br><b>4. не горит</b> - модуль подключен к wifi и к mqtt. <br>Светодиод подключен к gpio2. Если галочка стоит - то использовать этот пин нельзя",
"SetMQTTServerName":"Имя сервера:",
"SetMQTTPort":"Номер порта:",
"SetMQTTPrefix":"Префикс:",
"SetMQTTUserName":"Имя пользователя:",
"SetMQTTPassword":"Пароль:",
"SetMQTTSendSettings":"Отправить настройки MQTT с этого устройства на все остальные",
"SetMQTTWarn1":"Обратите внимание что поле префикс может состоять только из одного слова и одного разделителя: <b>/prefix</b>, вариант вида: <b>/prefix1/prefix2</b> работать не будет. После изменения поля prefix необходимо перезагрузить устройство",
"SetMQTTWarn2":"Прежде чем нажимать на кнопку <b>Отправить настройки MQTT</b> сохрание их, если Вы их меняли. Настройки получат и перезапишут все устройства в локальной сети"
}

View File

@@ -1,47 +0,0 @@
0;dallas-temp;t1;anydataTemp;Термостат1;Температура;1;pin[2];index[0];int[10]
0;logging;log1;chart;Термостат1;История;2;val[t1];int[60];cnt[100]
0;inoutput;tUp1;inputDigit;Термостат1;Верхний#порог;3
0;inoutput;tLow1;inputDigit;Термостат1;Нижний#порог;4
0;button-out;btn1;toggle;Термостат1;Нагрев;5;pin[12]*
0;dallas-temp;t2;anydataTemp;Термостат2;Температура;1;pin[2];index[0];int[10]
0;logging;log2;chart;Термостат2;История;2;val[t2];int[10];cnt[100]
0;inoutput;threshold;inputDigitTemp;Термостат2;Заданная#температура;3
0;button-out;heater2;toggle;Термостат2;Нагреватель;7;pin[5]
0;inoutput;time21;inputTimeClock;Расписание2;Утренний#период;8
0;inoutput;threshold1;inputDigitTemp;Расписание2;Температура;9
0;inoutput;time22;inputTimeClock;Расписание2;Дневной#период;10
0;inoutput;threshold2;inputDigitTemp;Расписание2;Температура;11
0;inoutput;time23;inputTimeClock;Расписание2;Вечерний#период;12
0;inoutput;threshold3;inputDigitTemp;Расписание2;Температура;13
0;inoutput;time24;inputTimeClock;Расписание2;Ночной#период;14
0;inoutput;threshold4;inputDigitTemp;Расписание2;Температура;15*
0;dht;t3;anydataTemp;Теплица3;Температура;1;c[1]
0;dht;h3;anydataHum;Теплица3;Влажность;2;c[1];pin[2];type[dht11];int[10]
0;logging;log3;chart;Теплица3;История;3;val[h3];int[60];cnt[100]
0;inoutput;hUp3;inputDigit;Теплица3;Верхний#порог;4
0;inoutput;hLow3;inputDigit;Теплица3;Нижний#порог;5
0;button-out;hUp3;toggle;Теплица3;Полив;6;pin[12]*
0;button-out;btn41;toggle;Реле4;Освещение;1;pin[12]
0;button-out;btn42;toggle;Реле4;Освещение;2;pin[13]
0;inoutput;time41;inputTime;Реле4;Введите#время#включения;3
0;inoutput;time42;inputTime;Реле4;Введите#время#выключения;4*
0;button-out;btn51;toggle;Свет5;Выключить#все;1
0;button-out;btn52;toggle;Свет5;Гостинная;2;pin[12]
0;button-out;btn53;toggle;Свет5;Спальня;3;pin[13]
0;button-out;btn54;toggle;Свет5;Прихожая;4;pin[14]
0;pwm-out;pwm51;range;Свет5;Яркость;5;pin[15]
0;pwm-out;pwm52;range;Свет5;Яркость;6;pin[16]
0;inoutput;txt5;anydata;Свет5;Статус;7*
0;button-out;button;toggle;Таймер;Освещение;1;pin[12]
0;count-down;count;anydata;Таймер;Обратный#отчет;2
0;inoutput;input;inputDigit;Таймер;Введите#цифру;3*
0;inoutput;text;anydataAlarm;Сигнализация;Движение:;1
0;inoutput;time;anydataTime;Сигнализация;Время:;2
0;button-in;sensor;na;na;na;3;pin[0];db[20]
0;button-out;reset;toggle;Сигнализация;Сбросить;4*
0;button-in;sensor;na;na;na;1;pin[0];db[20]
0;button-out;light;toggle;Освещение;Освещение;2;pin[13]
0;count-down;count;anydata;Освещение;Обратный#отчет;3
0;inoutput;period;inputDigit;Освещение;Период#включения;4*
0;button-out;light;toggle;Кнопки;Освещение;1;pin[13]
0;button-in;switch;na;na;na;2;pin[0];db[20]*

View File

@@ -1,84 +0,0 @@
t1 > tUp1
btn1 0
telegram Гостинная нагрев#выключен
end
t1 < tLow1
btn1 1
telegram Гостинная нагрев#включен
end*
t2 > threshold+-2
heater2 0
end
t2 < threshold+-2
heater2 1
end
timenow = time21
threshold threshold1
end
timenow = time22
threshold threshold2
end
timenow = time23
threshold threshold3
end
timenow = time24
threshold threshold4
end*
h3 > hUp3
hUp3 0
telegram Теплица полив#выключен
end
h3 < hLow3
hUp3 1
telegram Теплица полив#включен
end*
timenow = time41
btn41 1
btn42 0
end
timenow = time42
btn41 0
btn42 1
end*
btn51 = 1
btn52 1
btn53 1
btn54 1
pwm51 200
pwm52 800
txt5 включено
end
btn51 = 0
btn52 0
btn53 0
btn54 0
pwm51 800
pwm52 200
txt5 выключено
end*
button = 1
count input
end
count = 0
button 0
end*
sensor = 1
text обнаружено
time %date%
telegram often Обнаружено#движение
end
reset = 1
text не#обнаружено
time %date%
reset 0
end*
sensor = 1
light 1
count period
end
count = 0
light 0
end*
switch = 1
light change
end*

View File

@@ -1 +0,0 @@
Удалить;Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета
1 Удалить Тип элемента Id Виджет Имя вкладки Имя виджета Позиция виджета

View File

@@ -1 +0,0 @@
//

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +0,0 @@
{
"widget": "anydata",
"icon": "body",
"color": "red",
"descrColor": "red"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "",
"icon": ""
}

View File

@@ -1,6 +0,0 @@
{
"widget": "anydata",
"after": "",
"color":"red",
"icon": "walk"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "%",
"icon": "water"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "ppb",
"icon": "body"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "ppm",
"icon": "body"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "mm",
"icon": "speedometer"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "°С",
"icon": "thermometer"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "anydata",
"after": "",
"icon": "speedometer"
}

View File

@@ -1,6 +0,0 @@
{
"widget": "btn",
"size": "large",
"color": "green",
"send": "test"
}

View File

@@ -1,5 +0,0 @@
{
"widget": "chart",
"dateFormat": "HH:mm",
"pointRadius": 0
}

View File

@@ -1,4 +0,0 @@
{
"widget": "chart",
"dateFormat": "HH:mm"
}

View File

@@ -1,7 +0,0 @@
{
"widget": "fillgauge",
"circleColor": "#00FFFF",
"textColor": "#FFFFFF",
"waveTextColor": "#000000",
"waveColor": "#00FFFF"
}

View File

@@ -1,6 +0,0 @@
{
"widget" : "input",
"size" : "small",
"color" : "orange",
"type" : "date"
}

View File

@@ -1,5 +0,0 @@
{
"widget" : "input",
"color" : "blue",
"type" : "number"
}

View File

@@ -1,7 +0,0 @@
{
"widget" : "input",
"color" : "green",
"type" : "number",
"size" : "small",
"icon": "thermometer"
}

View File

@@ -1,6 +0,0 @@
{
"widget" : "input",
"size" : "small",
"color" : "orange",
"type" : "text"
}

View File

@@ -1,5 +0,0 @@
{
"widget" : "input",
"color" : "blue",
"type" : "time"
}

View File

@@ -1,7 +0,0 @@
{
"widget" : "input",
"color" : "orange",
"type" : "time",
"size" : "small",
"icon": "alarm-outline"
}

View File

@@ -1,12 +0,0 @@
{
"widget": "progress-line",
"icon": "sunny",
"descrColor": "",
"color": "",
"max": "100",
"background": "",
"stroke": "10",
"disabled": "",
"before": "",
"after": ""
}

View File

@@ -1,11 +0,0 @@
{
"widget": "progress-round",
"descrColor": "",
"max": "100",
"stroke": "20",
"color": "#45ccce",
"background": "#777",
"before": "",
"semicircle": "1",
"after": ""
}

View File

@@ -1,9 +0,0 @@
{
"widget" : "range",
"descrColor": "red",
"after" : "%",
"k" : 0.0977,
"min" : 0,
"max" : 100,
"debounce": 500
}

View File

@@ -1,8 +0,0 @@
{
"widget": "select",
"options": [
"Выключен",
"Включен"
],
"status": 0
}

View File

@@ -1,5 +0,0 @@
{
"widget": "toggle",
"icon": "",
"iconOff": ""
}

View File

@@ -1,5 +0,0 @@
{
"widget": "toggle",
"icon": "sunny",
"iconOff": "moon"
}

View File

@@ -1,64 +0,0 @@
{
"configs": [
"/config.live.json",
"/config.setup.json",
"/lang/lang.ru.json"
],
"title": "Главная",
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "Конфигурация устройства",
"action": "/?set.device",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Конфигурация WIFI",
"action": "/?set.wifi",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Конфигурация MQTT",
"action": "/?set.mqtt",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Конфигурация telegram",
"action": "/?set.telegram",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Утилиты",
"action": "/?set.utilities",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Настройки разработчика",
"action": "/?set.dev",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Скачать приложение IoT Manager для android",
"action": "https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Скачать приложение IoT Manager для iphone",
"action": "https://apps.apple.com/ru/app/iot-manager/id1155934877",
"class": "btn btn-block btn-default"
}
]
}

View File

@@ -1,75 +0,0 @@
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"title": "Конфигурация",
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "Адрес сервера обновлений"
},
{
"type": "input",
"title": "ip address",
"name": "serverip-arg",
"state": "{{serverip}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?serverip=[[serverip-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "Количество точек графика выгружаемое за раз"
},
{
"type": "input",
"title": "ip address",
"name": "graf-arg",
"state": "{{grafmax}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?grafmax=[[graf-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "reset-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Перезагрузить устройство",
"action": "/set?reqReset",
"response": "[[reset-block]]",
"class": "btn btn-block btn-danger"
}
]
}

View File

@@ -1,262 +0,0 @@
{
"configs": [
"/config.setup.json",
"/config.option.json",
"/config.live.json",
"/lang/lang.ru.json"
],
"class": "col-sm-offset-1 col-sm-10",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "ID устройства: {{chipID}}"
},
{
"type": "h4",
"title": "IP адрес: {{ip}}"
},
{
"type": "h4",
"title": "Время: {{timenow}}"
},
{
"type": "h4",
"title": "Uptime: {{uptime}}"
},
{
"type": "h4",
"title": "Версия прошивки: {{firmware_version}}"
},
{
"type": "h4",
"title": "Версия файловой системы: 278"
},
{
"type": "h4",
"title": "{{signal}}"
},
{
"type": "h4",
"title": "Остаток памяти: {{freeBytes}}"
},
{
"type": "hr"
},
{
"type": "text",
"title": "{{warning1}}"
},
{
"type": "text",
"title": "{{warning2}}"
},
{
"type": "text",
"title": "{{warning3}}"
},
{
"type": "hr"
},
{
"type": "dropdown",
"name": "help-url1",
"class": "btn btn-default",
"style": "display:inline",
"title": {
"#": "Выберите элемент из списка<span class=\"caret\"></span>",
"/set?addItem=1": "1.Кнопка управляющая пином",
"/set?addItem=2": "2.Кнопка управляющая пином (с инверсией)",
"/set?addItem=3": "3.Кнопка виртуальная (не привязанная к пину, для использования в сценариях)",
"/set?addItem=4": "4.Кнопка физическая, чтение состояния пина (подключается провдами к устройству)",
"/set?addItem=5": "5.Широтно импульсная модуляция pwm",
"/set?addItem=6": "6.Окно ввода цифровых значений",
"/set?addItem=7": "7.Окно ввода времени",
"/set?addItem=8": "8.Окно вывода любого текста, предупреждения, цифры",
"/set?addItem=9": "9.Датчик аналоговый, чтение аналогового входа",
"/set?addItem=10": "10.Датчик температуры ds18b20",
"/set?addItem=11": "11.Датчик расстояния ультрозвуковой JSN-SR04T, HC-SR04, HY-SRF05",
"/set?addItem=12": "12.Датчик температуры и влажности DHT11",
"/set?addItem=13": "13.Датчик температуры и влажности DHT22, DHT33, DHT44, AM2302, RHT03",
"/set?addItem=14": "14.Датчик температуры, влажности и давления bme280",
"/set?addItem=15": "15.Датчик температуры и давления bmp280",
"/set?addItem=16": "16.Датчик качества воздуха ccs811",
"/set?addItem=17": "17.Создать импульсы через заданный промежуток времени (управление шд)",
"/set?addItem=18": "18.Таймер обратного отчета",
"/set?addItem=19": "19.Виджет для отображения информации полученной из uart, get-запроса, или по udp",
"/set?addItem=20": "20.Логгирование и вывод в график любой величины",
"/set?addItem=21": "21.Отобразить время работы устройства"
}
},
{
"type": "dropdown",
"name": "help-url2",
"class": "btn btn-default",
"style": "display:inline",
"title": {
"#": "Выберите пресет из списка<span class=\"caret\"></span>",
"/set?addPreset=1": "1.Термостат на основе ds18b20 с оповещением в телеграм",
"/set?addPreset=2": "2.Гистерезис термостат на основе ds18b20 с суточным расписанием",
"/set?addPreset=3": "3.Контроль влажности на основе DHT с оповещением в телеграм",
"/set?addPreset=4": "4.Включение выключение реле в заданное время",
"/set?addPreset=5": "5.Выключить все (пример работы сценариев)",
"/set?addPreset=6": "6.Включить кнопку на определенное время (пример работы таймера обратного отчета)",
"/set?addPreset=7": "7.Охранный датчик движения",
"/set?addPreset=8": "8.Датчик движения включающий свет с настраиваемой задержкой",
"/set?addPreset=9": "9.Управление светом с помощью выключателя и приложения"
}
},
{
"type": "hr"
},
{
"type": "csv",
"title": [
"checkbox",
"html",
"text",
"text",
"text",
"text",
"text"
],
"state": "s.conf.csv",
"style": "width:100%;",
"action": "/set?saveItems",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "link",
"title": "Удалить выбранные элементы",
"action": "javascript:{send_request(this,'/set?delChoosingItems');setTimeout(function(){location.href='/?set.device' ; }, 1000);}",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Удалить все",
"action": "/set?delAllItems",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>После любого изменения таблицы элементов, включая удаление/добавление строк, необходимо нажать кнопку <b>СОХРАНИТЬ ТАБЛИЦУ</b>. Иногда, для корректной работы необходимо перезагрузить устройство после финального завершения его настройки</p></font></div>"
},
{
"type": "h2",
"title": "Сценарии"
},
{
"type": "checkbox",
"name": "scen",
"title": "Включить сценарии",
"action": "/set?scen=[[scen]]",
"state": "{{scen}}"
},
{
"type": "file",
"state": "s.scen.txt",
"style": "width:100%;height:350px",
"title": "Сохранить",
"action": "/set?sceninit",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "MqttOut",
"title": "Передавать события другим устройствам",
"action": "/set?MqttOut=[[MqttOut]]",
"state": "{{MqttOut}}"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "MqttIn",
"title": "Принимать события с других устройств",
"action": "/set?MqttIn=[[MqttIn]]",
"state": "{{MqttIn}}"
},
{
"type": "hr"
},
{
"type": "button",
"title": "Синхронизировать сценарии на всех устройствах",
"action": "/set?scenMqtt",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "button",
"title": "Очистить графики и введенные данные",
"action": "/set?cleanlog",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Ручная настройка",
"action": "/?set.manual",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "Инструкция к системе автоматизации",
"action": "https://github.com/IoTManagerProject/IoTManager/wiki",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "my-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Обновить прошивку устройства",
"action": "/check",
"response": "[[my-block]]",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "reset-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Перезагрузить устройство",
"action": "/set?reqReset",
"response": "[[reset-block]]",
"class": "btn btn-block btn-danger"
}
]
}

View File

@@ -1,38 +0,0 @@
{
"configs": [
"/config.setup.json",
"/config.option.json",
"/config.live.json",
"/lang/lang.ru.json"
],
"class": "col-sm-offset-1 col-sm-10",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "file",
"state": "s.conf.csv",
"style": "width:100%;height:350px",
"title": "Сохранить",
"action": "/set?saveItems",
"class": "btn btn-block btn-default"
},
{
"type": "file",
"state": "s.scen.txt",
"style": "width:100%;height:350px",
"title": "Сохранить",
"action": "/set?sceninit",
"class": "btn btn-block btn-default"
}
]
}

View File

@@ -1,217 +0,0 @@
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "Основной брокер",
"style": "width:100%;float:left;"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "{{SetMQTTServerName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttServer-arg",
"state": "{{mqttServer}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPort}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPort-arg",
"state": "{{mqttPort}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPrefix}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPrefix-arg",
"state": "{{mqttPrefix}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTUserName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttUser-arg",
"state": "{{mqttUser}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPassword}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPass-arg",
"state": "{{mqttPass}}",
"style": "width:40%;float:right"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "Резервный брокер",
"style": "width:100%;float:left;"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "{{SetMQTTServerName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttServer2-arg",
"state": "{{mqttServer2}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPort}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPort2-arg",
"state": "{{mqttPort2}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPrefix}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPrefix2-arg",
"state": "{{mqttPrefix2}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTUserName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttUser2-arg",
"state": "{{mqttUser2}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPassword}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPass2-arg",
"state": "{{mqttPass2}}",
"style": "width:40%;float:right"
},
{
"type": "h3",
"name": "my-block",
"style": "position:fixed;top:30%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "{{ButSave}}",
"style": "width:100%;float:left;",
"action": "set?mqttServer=[[mqttServer-arg]]&mqttPort=[[mqttPort-arg]]&mqttPrefix=[[mqttPrefix-arg]]&mqttUser=[[mqttUser-arg]]&mqttPass=[[mqttPass-arg]]&mqttServer2=[[mqttServer2-arg]]&mqttPort2=[[mqttPort2-arg]]&mqttPrefix2=[[mqttPrefix2-arg]]&mqttUser2=[[mqttUser2-arg]]&mqttPass2=[[mqttPass2-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "button",
"style": "width:100%;float:left;",
"title": "{{SetMQTTSendSettings}}",
"action": "set?mqttsend",
"class": "btn btn-block btn-default"
},
{
"type": "button",
"style": "width:100%;float:left;",
"title": "Проверить соединение с MQTT",
"action": "set?mqttcheck",
"response": "[[my-block]]",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"style": "width:100%;float:left;",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetMQTTWarn1}}</p></font></div>"
},
{
"type": "text",
"style": "width:100%;float:left;",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetMQTTWarn2}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "reset-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Перезагрузить устройство",
"action": "/set?reqReset",
"response": "[[reset-block]]",
"class": "btn btn-block btn-danger"
}
]
}

View File

@@ -1,103 +0,0 @@
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "telegonof",
"title": "Включить телеграм",
"action": "/set?telegonof=[[telegonof]]",
"state": "{{telegonof}}"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "teleginput",
"title": "Включить прием входящих сообщений",
"action": "/set?teleginput=[[teleginput]]",
"state": "{{teleginput}}"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "autos",
"title": "Автоматически брать chat ID из входящих сообщений",
"action": "/set?autos=[[autos]]",
"state": "{{autos}}"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "Telegram chat ID"
},
{
"type": "input",
"title": "",
"name": "chatId-arg",
"state": "{{chatId}}"
},
{
"type": "h4",
"title": "Telegram API token"
},
{
"type": "input",
"title": "",
"name": "telegramApi-arg",
"state": "{{telegramApi}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?telegramApi=[[telegramApi-arg]]&chatId=[[chatId-arg]]",
"class": "btn btn-block btn-default",
"style": "width:100%;display:inline"
},
{
"type": "hr"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>После настройки telegram перезагрузите устройство что бы изменения вступили в силу</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "reset-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Перезагрузить устройство",
"action": "/set?reqReset",
"response": "[[reset-block]]",
"class": "btn btn-block btn-danger"
}
]
}

View File

@@ -1,96 +0,0 @@
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"title": "Главная",
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetUDPList}}"
},
{
"type": "hr"
},
{
"type": "csv",
"title": [
"html",
"html",
"html"
],
"state": "dev.csv",
"style": "width:100%;",
"class": "nan"
},
{
"type": "hr"
},
{
"type": "link",
"title": "{{SetUDPUpdateList}}",
"action": "/set?updatelist",
"class": "btn btn-block btn-default"
},
{
"type": "link",
"title": "{{SetUDPUpdatePage}}",
"action": "/set?updatepage",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetUDPWarn1}}</p></font></div>",
"style": "width:100%;float:left;"
},
{
"type": "h3",
"title": "{{SetUDPNameOfDev}}"
},
{
"type": "input",
"title": "{{SetUDPNameOfDev}}",
"name": "devname-arg",
"state": "{{name}}",
"pattern": "[A-Za-z0-9]{6,12}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "/set?devname=[[devname-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "udponoff",
"title": "{{SetUDPDateExchange}}",
"action": "/set?udponoff=[[udponoff]]",
"state": "{{udponoff}}"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetUDPWarn2}}</p></font></div>"
}
]
}

View File

@@ -1,109 +0,0 @@
{
"configs": [
"/config.live.json",
"/config.setup.json",
"/lang/lang.ru.json"
],
"title": "Главная",
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "Сканирование шины i2c"
},
{
"type": "h4",
"title": "{{i2c}}"
},
{
"type": "link",
"title": "Сканировать",
"action": "/set?i2c",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "UART"
},
{
"type": "checkbox",
"name": "uart",
"title": "Включить UART",
"action": "/set?uart=[[uart]]",
"state": "{{uart}}"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "uartEvents",
"title": "Включить отправку всех событий в UART",
"action": "/set?uartEvents=[[uartEvents]]",
"state": "{{uartEvents}}"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "Скорость",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "uartS-arg",
"state": "{{uartS}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "Пин TX",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "uartTX-arg",
"state": "{{uartTX}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "Пин RX",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "uartRX-arg",
"state": "{{uartRX}}",
"style": "width:40%;float:right"
},
{
"type": "button",
"title": "{{ButSave}}",
"style": "width:100%;float:left;",
"action": "set?uartS=[[uartS-arg]]&uartTX=[[uartTX-arg]]&uartRX=[[uartRX-arg]]",
"class": "btn btn-block btn-default"
}
]
}

View File

@@ -1,191 +0,0 @@
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"title": "Конфигурация",
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetWiFiNameOfDev}}"
},
{
"type": "input",
"title": "{{SetWiFiNameOfDev}}",
"name": "devname-arg",
"state": "{{name}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?devname=[[devname-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetWiFiWarn1}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetWiFiRouterConnect}}"
},
{
"type": "input",
"title": "",
"name": "routerssid-arg",
"state": "{{routerssid}}"
},
{
"type": "password",
"title": "",
"name": "routerpass-arg",
"state": "{{routerpass}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"class": "btn btn-block btn-default",
"action": "set?routerssid=[[routerssid-arg]]&routerpass=[[routerpass-arg]]"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetWiFiWarn2}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "checkbox",
"name": "blink",
"title": "Включить светодиод статуса подключения",
"action": "/set?blink=[[blink]]",
"state": "{{blink}}"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetWiFiWarn5}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetWiFiAccessPoint}}"
},
{
"type": "input",
"title": "",
"name": "apssid-arg",
"state": "{{apssid}}",
"pattern": ".{1,20}"
},
{
"type": "password",
"title": "",
"name": "appass-arg",
"state": "{{appass}}",
"pattern": ".{8,20}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?apssid=[[apssid-arg]]&appass=[[appass-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetWiFiWarn3}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetWiFiWeb}}"
},
{
"type": "input",
"title": "Логин",
"name": "weblogin-arg",
"state": "{{weblogin}}",
"pattern": ".{1,20}"
},
{
"type": "password",
"title": "Пароль",
"name": "webpass-arg",
"state": "{{webpass}}",
"pattern": ".{1,20}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?weblogin=[[weblogin-arg]]&webpass=[[webpass-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h3",
"title": "{{SetWiFiTimeZone}}"
},
{
"type": "input",
"title": "",
"name": "timezone-arg",
"state": "{{timezone}}",
"pattern": ".{1,20}"
},
{
"type": "input",
"title": "",
"name": "ntp-arg",
"state": "{{ntp}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?timezone=[[timezone-arg]]&ntp=[[ntp-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetWiFiWarn4}}</p></font></div>"
},
{
"type": "hr"
},
{
"type": "h3",
"name": "reset-block",
"style": "position:fixed;top:50%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "Перезагрузить устройство",
"action": "/set?reqReset",
"response": "[[reset-block]]",
"class": "btn btn-block btn-danger"
}
]
}

Binary file not shown.

View File

@@ -1,24 +0,0 @@
eagle.flash.512k0.ld 512K (no SPIFFS)
eagle.flash.512k64.ld 512K (64K SPIFFS)
eagle.flash.512k128.ld 512K (128K SPIFFS)
eagle.flash.1m0.ld 1M (no SPIFFS)
eagle.flash.1m64.ld 1M (64K SPIFFS)
eagle.flash.1m128.ld 1M (128K SPIFFS)
eagle.flash.1m144.ld 1M (144K SPIFFS)
eagle.flash.1m160.ld 1M (160K SPIFFS)
eagle.flash.1m192.ld 1M (192K SPIFFS)
eagle.flash.1m256.ld 1M (256K SPIFFS)
eagle.flash.1m512.ld 1M (512K SPIFFS)
eagle.flash.2m.ld 2M (1M SPIFFS)
eagle.flash.4m1m.ld 4M (1M SPIFFS)
eagle.flash.4m2m.ld 4M (2M SPIFFS)
eagle.flash.4m.ld 4M (3M SPIFFS)
eagle.flash.8m.ld 8M (7M SPIFFS)
eagle.flash.16m.ld 16M (15M SPIFFS)
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1F0000,
app1, app, ota_1, 0x200000, 0x1F0000,
spiffs, data, spiffs, 0x3F0000,0x10000,

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,19 +0,0 @@
#pragma once
#include <Arduino.h>
extern void loopCmdAdd(const String& cmdStr);
extern void fileCmdExecute(const String& filename);
extern void csvCmdExecute(String& cmdStr);
extern void spaceCmdExecute(String& cmdStr);
extern void loopCmdExecute();
extern void addKey(String& key, String& keyNumberTable, int number);
extern int getKeyNum(String& key, String& keyNumberTable);
extern void buttonIn();
extern void buttonInSet();

View File

@@ -1,4 +0,0 @@
#pragma once
#include <Arduino.h>
void busInit();
String i2c_scan();

View File

@@ -1,26 +0,0 @@
#pragma once
#include <Arduino.h>
#include <stdint.h>
#include <functional>
// Декларируем тип - сигнатуру метода , который мы готовы принять в данном случае это
// должен быть метод без результата и без параметров.
// Новый тип мы называем AsynсActionCb - хотя можешь назвать вообще как нравиться а что значит callBack
typedef std::function<void()> AsyncActionCb; //метод без результата и параметров
typedef std::function<bool(const String)> AsyncParamActionCb; //метод без результата и параметров
class CallBackTest {
private:
long count;
AsyncActionCb _cb;
AsyncParamActionCb _pcb;
public:
CallBackTest();
void loop();
void setCallback(AsyncActionCb cb);
void setCallback(AsyncParamActionCb pcb);
};
//extern CallBackTest* CB;

View File

@@ -1,261 +0,0 @@
#pragma once
#include <Arduino.h>
#include "Global.h"
#include "ItemsList.h"
#include "Utils/JsonUtils.h"
class LineParsing {
protected:
String _key;
String _file;
String _page;
String _descr;
String _order;
String _addr;
String _reg;
String _pin;
String _map;
String _c;
String _inv;
String _state;
String _db;
String _type;
String _int;
String _cnt;
String _val;
String _index;
int pinErrors;
public:
LineParsing() :
_key{""},
_file{""},
_page{""},
_descr{""},
_order{""},
_addr{""},
_reg{""},
_pin{""},
_map{""},
_c{""},
_inv{""},
_state{""},
_db{""},
_type{""},
_int{""},
_cnt{""},
_val{""},
_index{""},
pinErrors{0}
{};
void update() {
//String order = sCmd.order();
//SerialPrint("I","module","create '" + order + "'");
for (int i = 1; i < 12; i++) {
if (i == 1) _key = sCmd.next();
if (i == 2) _file = sCmd.next();
if (i == 3) _page = sCmd.next();
if (i == 4) _descr = sCmd.next();
if (i == 5) _order = sCmd.next();
}
for (int i = 1; i < 10; i++) {
String arg = sCmd.next();
if (arg != "") {
if (arg.indexOf("pin[") != -1) {
_pin = extractInner(arg);
}
if (arg.indexOf("inv[") != -1) {
_inv = extractInner(arg);
}
if (arg.indexOf("st[") != -1) {
_state = extractInner(arg);
}
if (arg.indexOf("db[") != -1) {
_db = extractInner(arg);
}
if (arg.indexOf("map[") != -1) {
_map = extractInner(arg);
}
if (arg.indexOf("c[") != -1) {
_c = extractInner(arg);
}
if (arg.indexOf("type[") != -1) {
_type = extractInner(arg);
}
if (arg.indexOf("addr[") != -1) {
_addr = extractInner(arg);
}
if (arg.indexOf("reg[") != -1) {
_reg = extractInner(arg);
}
if (arg.indexOf("int[") != -1) {
_int = extractInner(arg);
}
if (arg.indexOf("cnt[") != -1) {
_cnt = extractInner(arg);
}
if (arg.indexOf("val[") != -1) {
_val = extractInner(arg);
}
if (arg.indexOf("index[") != -1) {
_index = extractInner(arg);
}
}
}
if (_pin != "") {
if (_pin.indexOf(",") == -1) {
if (!isPinExist(_pin.toInt()) || !isDigitStr(_pin)) {
pinErrors++;
_pin = "";
}
} else {
String pin1 = selectToMarker(_pin, ",");
String pin2 = deleteBeforeDelimiter(_pin, ",");
if (!isPinExist(pin1.toInt()) || !isDigitStr(pin1) || !isPinExist(pin2.toInt()) || !isDigitStr(pin2)) {
pinErrors++;
_pin = "";
}
}
}
_page.replace("#", " ");
_descr.replace("#", " ");
_descr.replace("%ver%", String(FIRMWARE_VERSION));
_descr.replace("%name%", jsonReadStr(configSetupJson, F("name")));
createWidget(_descr, _page, _order, _file, _key);
}
String gkey() {
return _key;
}
String gfile() {
return _file;
}
String gpage() {
return _page;
}
String gdescr() {
return _descr;
}
String gorder() {
return _order;
}
String gpin() {
return _pin;
}
String ginv() {
return _inv;
}
String gstate() {
return _state;
}
String gmap() {
return _map;
}
String gc() {
return _c;
}
String gtype() {
return _type;
}
String gaddr() {
return _addr;
}
String gregaddr() {
return _reg;
}
String gint() {
return _int;
}
String gcnt() {
return _cnt;
}
String gval() {
return _val;
}
String gindex() {
return _index;
}
int getPinErrors() {
return pinErrors;
}
void clearErrors() {
pinErrors = 0;
}
void clear() {
_key = "";
_file = "";
_page = "";
_descr = "";
_order = "";
_addr = "";
_reg = "";
_pin = "";
_map = "";
_c = "";
_inv = "";
_state = "";
_db = "";
_type = "";
_int = "";
_cnt = "";
_val = "";
_index = "";
}
String extractInnerDigit(String str) {
int p1 = str.indexOf("[");
int p2 = str.indexOf("]");
return str.substring(p1 + 1, p2);
}
void createWidget(String descr, String page, String order, String filename, String topic) {
if (filename != "na") {
String buf = "{}";
if (!loadWidget(filename, buf)) {
return;
}
if (filename.indexOf("chart") != -1) jsonWriteStr(buf, "maxCount", _cnt);
jsonWriteStr(buf, "page", page);
jsonWriteStr(buf, "order", order);
jsonWriteStr(buf, "descr", descr);
jsonWriteStr(buf, "topic", prex + "/" + topic);
#ifdef LAYOUT_IN_RAM
all_widgets += widget + "\r\n";
#else
addFileLn("layout.txt", buf);
#endif
}
}
bool loadWidget(const String& filename, String& buf) {
buf = readFile(getWidgetFile(filename), 2048);
bool res = !(buf == "Failed" || buf == "Large");
if (!res) {
//SerialPrint("[E]","module","on load" + filename);
}
return res;
}
const String getWidgetFile(const String& name) {
return "/widgets/" + name + ".json";
}
};
extern LineParsing myLineParsing;

View File

@@ -1,32 +0,0 @@
#pragma once
#include <Arduino.h>
#include <stdint.h>
#include <functional>
typedef std::function<void(void*)> NotAsyncCb;
struct NotAsyncItem {
bool test;
NotAsyncCb cb;
void* cb_arg;
volatile bool is_used = false;
};
class NotAsync {
private:
uint8_t size;
uint8_t task = 0;
NotAsyncItem* items = NULL;
void handle(NotAsyncCb f, void* arg);
public:
NotAsync(uint8_t size);
~NotAsync();
void add(uint8_t i, NotAsyncCb, void* arg);
void make(uint8_t task);
void loop();
};
extern NotAsync* myNotAsyncActions;

View File

@@ -1,85 +0,0 @@
#pragma once
#include <Arduino.h>
#include "Cmd.h"
#include "Global.h"
class Scenario {
public:
void loop() {
if (!jsonReadBool(configSetupJson, "scen")) {
return;
}
String allBlocks = scenario;
allBlocks.replace("\r\n", "\n");
allBlocks.replace("\r", "\n");
allBlocks += "\n";
String incommingEvent = selectToMarker(eventBuf, ",");
String incommingEventKey = selectToMarker(incommingEvent, " ");
String incommingEventValue = selectToMarkerLast(incommingEvent, " ");
while (allBlocks.length() > 1) {
String oneBlock = selectToMarker(allBlocks, "end\n");
String condition = selectToMarker(oneBlock, "\n");
String setEventKey = selectFromMarkerToMarker(condition, " ", 0);
if (incommingEventKey == setEventKey) {
String setEventSign = selectFromMarkerToMarker(condition, " ", 1);
String setEventValue = selectFromMarkerToMarker(condition, " ", 2);
if (!isDigitDotCommaStr(setEventValue)) {
if (setEventValue.indexOf("+-") != -1) {
String setEventValueName = selectToMarker(setEventValue, "+-");
String gisteresisValue = selectToMarkerLast(setEventValue, "+-");
gisteresisValue.replace("+-", "");
String value = getValue(setEventValueName);
String upValue = String(value.toFloat() + gisteresisValue.toFloat());
String lowValue = String(value.toFloat() - gisteresisValue.toFloat());
if (setEventSign == ">") {
setEventValue = upValue;
} else if (setEventSign == "<") {
setEventValue = lowValue;
}
} else {
setEventValue = getValue(setEventValue);
}
}
boolean flag = false;
if (setEventSign == "=") {
flag = incommingEventValue == setEventValue;
} else if (setEventSign == "!=") {
flag = incommingEventValue != setEventValue;
} else if (setEventSign == "<") {
flag = incommingEventValue.toFloat() < setEventValue.toFloat();
} else if (setEventSign == ">") {
flag = incommingEventValue.toFloat() > setEventValue.toFloat();
} else if (setEventSign == ">=") {
flag = incommingEventValue.toFloat() >= setEventValue.toFloat();
} else if (setEventSign == "<=") {
flag = incommingEventValue.toFloat() <= setEventValue.toFloat();
}
if (flag) {
//SerialPrint("I", "Scenario", "incomming Event Value: " + incommingEventValue);
//SerialPrint("I", "Scenario", "set Event Value: " + setEventValue);
oneBlock = deleteBeforeDelimiter(oneBlock, "\n");
oneBlock.replace("end", "");
SerialPrint("I", "Scenario", condition + " \n" + oneBlock);
spaceCmdExecute(oneBlock);
}
}
allBlocks = deleteBeforeDelimiter(allBlocks, "end\n");
}
eventBuf = deleteBeforeDelimiter(eventBuf, ",");
}
};
extern Scenario* myScenario;
extern void streamEventUDP(String event);

View File

@@ -1,168 +0,0 @@
#pragma once
#include "Clock.h"
#include "Global.h"
#include "Utils/TimeUtils.h"
#include "Utils\SerialPrint.h"
extern void clockInit();
#ifdef ESP8266
#include "sntp.h"
#endif
class Clock {
private:
Time_t _time_local;
Time_t _time_utc;
unsigned long _uptime;
unsigned long _unixtime;
int _timezone;
String _ntp;
bool _hasSynced;
bool _configured;
public:
Clock() : _uptime{0}, _timezone{0}, _ntp{""}, _hasSynced{false}, _configured{false} {};
void loop() {
unsigned long passed = millis_since(_uptime);
if (passed < ONE_SECOND_ms) {
return;
}
_uptime += passed;
// world time
time_t now = getSystemTime();
time_t estimated = _unixtime + (passed / ONE_SECOND_ms);
double drift = difftime(now, estimated);
if (drift > 1) {
// Обработать ситуации c дрифтом времени на значительные величины
}
_unixtime = now;
breakEpochToTime(_unixtime, _time_utc);
breakEpochToTime(_unixtime + getOffsetInSeconds(_timezone), _time_local);
}
bool hasSync() {
if (!_hasSynced) {
startSync();
}
return _hasSynced;
}
void setNtpPool(String ntp) {
if (!_ntp.equals(ntp)) {
_ntp = ntp;
_configured = false;
}
}
void setTimezone(int timezone) {
if (_timezone != timezone) {
_timezone = timezone;
_configured = false;
}
}
void startSync() {
if (!_configured) {
SerialPrint("I", "NTP", "sync to: " + _ntp + " timezone: " + String(_timezone));
setupSntp();
_configured = true;
return;
}
_hasSynced = hasTimeSynced();
if (_hasSynced) {
SerialPrint("I", "NTP", "synced " + getDateDotFormated() + " " + getTime());
} else {
SerialPrint("E", "NTP", "failed to obtain time");
}
}
void setupSntp() {
#ifdef ESP8266
sntp_setservername(0, _ntp.c_str());
sntp_setservername(1, "ru.pool.ntp.org");
sntp_setservername(2, "pool.ntp.org");
sntp_stop();
sntp_set_timezone(0);
sntp_init();
#else
configTime(0, 0, _ntp.c_str(), "ru.pool.ntp.org", "pool.ntp.org");
#endif
}
bool hasTimeSynced() const {
return _unixtime > MIN_DATETIME;
}
time_t getSystemTime() const {
timeval tv{0, 0};
timezone tz = timezone{0, 0};
time_t epoch = 0;
if (gettimeofday(&tv, &tz) != -1) {
epoch = tv.tv_sec;
}
return epoch;
}
const String getTimeUnix() {
return String(_unixtime);
}
/*
* Локальное время "дд.ММ.гг"
*/
const String getDateDotFormated() {
char buf[32];
sprintf(buf, "%02d.%02d.%02d", _time_local.day_of_month, _time_local.month, _time_local.year);
return String(buf);
}
/*
* Локальное дата время "дд.ММ.гг чч.мм.cc"
*/
const String getDateTimeDotFormated() {
char buf[32];
sprintf(buf, "%02d.%02d.%02d %02d:%02d:%02d", _time_local.day_of_month, _time_local.month, _time_local.year, _time_local.hour, _time_local.minute, _time_local.second);
return String(buf);
}
/*
* Локальное время "чч:мм:cc"
*/
const String getTime() {
char buf[32];
sprintf(buf, "%02d:%02d:%02d", _time_local.hour, _time_local.minute, _time_local.second);
return String(buf);
}
const String getTimeJson() {
char buf[32];
sprintf(buf, "%02d-%02d-%02d", _time_local.hour, _time_local.minute, _time_local.second);
return String(buf);
}
/*
* Локальное время "чч:мм"
*/
const String getTimeWOsec() {
char buf[32];
sprintf(buf, "%02d:%02d", _time_local.hour, _time_local.minute);
return String(buf);
}
/*
* Время с момента запуска "чч:мм:cc" далее "дд чч:мм"
*/
const String getUptime() {
return prettyMillis(_uptime);
}
};
extern Clock* timeNow;

View File

@@ -1,64 +0,0 @@
#pragma once
#include <Arduino.h>
extern void cmd_init();
//extern void levelPr();
//extern void ultrasonicCm();
//extern void ultrasonic_reading();
extern void analog_reading1();
extern void analog_reading2();
extern void dallas_reading();
extern void dhtT_reading();
//extern void dallas();
extern void bmp280T();
extern void bmp280P();
extern void bmp280T_reading();
extern void bmp280P_reading();
extern void bme280T();
extern void bme280P();
extern void bme280H();
extern void bme280A();
extern void bme280T_reading();
extern void bme280P_reading();
extern void bme280H_reading();
extern void bme280A_reading();
//extern void dhtT();
//extern void dhtH();
//extern void dhtP();
//extern void dhtC();
//extern void dhtD();
//extern void dhtH_reading();
//extern void dhtP_reading();
//extern void dhtC_reading();
//extern void dhtD_reading();
extern void timeInit();
extern void stepper();
extern void stepperSet();
extern void servo_();
extern void servoSet();
extern void serialBegin();
extern void serialWrite();
extern void logging();
extern void button();
extern void timeSet();
extern void mqttOrderSend();
extern void httpOrderSend();
extern void firmwareVersion();
extern void firmwareUpdate();
extern void loadScenario();
extern void fileCmdExecute(const String& filename);
extern void csvCmdExecute(String& cmdStr);
extern void spaceCmdExecute(String& cmdStr);

View File

@@ -1,127 +0,0 @@
#pragma once
#define FIRMWARE_VERSION 278
#ifdef esp8266_4mb
#define FIRMWARE_NAME "esp8266_4mb"
#define USE_LITTLEFS true
#define USE_OTA true
#define LED_PIN 2
#endif
#ifdef esp8266_1mb
#define FIRMWARE_NAME "esp8266_1mb"
#define USE_LITTLEFS false
#define USE_OTA false
#define LED_PIN 2
#endif
#ifdef esp32_4mb
#define FIRMWARE_NAME "esp32_4mb"
#define USE_LITTLEFS false
#define USE_OTA true
#define LED_PIN 22
#endif
#define NUM_BUTTONS 6
#define MQTT_RECONNECT_INTERVAL 20000
#define TELEMETRY_UPDATE_INTERVAL_MIN 60
#define DEVICE_CONFIG_FILE "s.conf.csv"
#define DEVICE_SCENARIO_FILE "s.scen.txt"
//=========System parts===========================================================================================================================================
//#define OTA_UPDATES_ENABLED
//#define MDNS_ENABLED
//#define WEBSOCKET_ENABLED
//#define LAYOUT_IN_RAM
//#define UDP_ENABLED
//#define SSDP_ENABLED
#define SensorBme280Enabled
#define SensorBmp280Enabled
#define SensorDhtEnabled
#define PwmOutEnable
#define telegramEnable
#define uartEnable
//================================================================================================================================================================
enum TimerTask_t { WIFI_SCAN,
WIFI_MQTT_CONNECTION_CHECK,
TIME,
TIME_SYNC,
STATISTICS,
UPTIME,
UDP,
SYGNAL };
enum NotAsyncActions {
do_ZERO,
do_UPGRADE,
do_GETLASTVERSION,
do_BUSSCAN,
do_MQTTPARAMSCHANGED,
do_deviceInit,
do_delChoosingItems,
do_addItem,
do_addPreset,
do_sendScenUDP,
do_sendScenMQTT,
do_LAST,
};
enum LedStatus_t {
LED_OFF,
LED_ON,
LED_SLOW,
LED_FAST
};
enum ConfigType_t {
CT_CONFIG,
CT_SCENARIO
};
//history
//07.11.2020 (SSDP OFF, UDP OFF)
//RAM: [===== ] 46.8% (used 38376 bytes from 81920 bytes)
//Flash: [===== ] 54.2% (used 566004 bytes from 1044464 bytes)
//13.11.2020 (SSDP OFF, UDP OFF)
//RAM: [===== ] 46.6% (used 38208 bytes from 81920 bytes)
//Flash: [===== ] 54.2% (used 566388 bytes from 1044464 bytes)
//15.11.2020 (SSDP OFF, UDP OFF)
//RAM: [===== ] 46.1% (used 37780 bytes from 81920 bytes)
//Flash: [===== ] 54.3% (used 566656 bytes from 1044464 bytes)
//17.11.2020 (SSDP OFF, UDP OFF)
//RAM: [===== ] 45.7% (used 37476 bytes from 81920 bytes)
//Flash: [===== ] 54.5% (used 569296 bytes from 1044464 bytes)
//RAM: [===== ] 45.6% (used 37336 bytes from 81920 bytes)
//Flash: [====== ] 55.3% (used 577396 bytes from 1044464 bytes)
//eventBuf - буфер событий которые проверяются в сценариях,
//и если событие удовлетворяет какому нибудь условию то выполняются указанные команды
//orderBuf - буфер команд которые выполняются сейчас же

View File

@@ -1,26 +0,0 @@
#pragma once
#ifdef ESP32
// don't change order
#include "WiFi.h"
//
#include "ESPAsyncWebServer.h"
#include "SPIFFSEditor.h"
// don't change order
#include <AsyncUDP.h>
#include <ESP32Servo.h>
#include <HTTPClient.h>
#include <HTTPUpdate.h>
//
#include <WiFi.h>
#include <analogWrite.h>
#ifdef MDNS_ENABLED
#include <ESPmDNS.h>
#endif
extern AsyncUDP udp;
#endif

View File

@@ -1,18 +0,0 @@
#pragma once
#ifdef ESP8266
#include <ESP8266WebServer.h>
#include <ESP8266httpUpdate.h>
#include "ESPAsyncTCP.h"
#include "ESPAsyncWebServer.h"
#include <SPIFFSEditor.h>
#include <Servo.h>
#include <WiFiUdp.h>
#include <SoftwareSerial.h>
#ifdef MDNS_ENABLED
#include <ESP8266mDNS.h>
#endif
extern WiFiUDP udp;
#endif

View File

@@ -1,29 +0,0 @@
#pragma once
#include <ESPAsyncWebServer.h>
#include "FileSystem.h"
class FSEditor : public AsyncWebHandler {
private:
fs::FS _fs;
String _username;
String _password;
bool _authenticated;
uint32_t _startTime;
private:
void getDirList(const String& path, String& output);
public:
#ifdef ESP32
FSEditor(const fs::FS& fs, const String& username = String(), const String& password = String());
#else
FSEditor(const String& username = String(), const String& password = String(), const fs::FS& fs = FileFS);
#endif
virtual bool canHandle(AsyncWebServerRequest* request) override final;
virtual void handleRequest(AsyncWebServerRequest* request) override final;
virtual void handleUpload(AsyncWebServerRequest* request, const String& filename, size_t index, uint8_t* data, size_t len, bool final) override final;
virtual bool isRequestHandlerTrivial() override final {
return false;
}
};

View File

@@ -1,36 +0,0 @@
#pragma once
#include "Consts.h"
#define FILE_READ "r"
#define FILE_WRITE "w"
#define FILE_APPEND "a"
#include <FS.h>
#ifdef ESP32
#include <SPIFFS.h>
extern FS* filesystem;
#define FileFS SPIFFS
#define FS_NAME "SPIFFS"
#endif
#ifdef ESP8266
#if USE_LITTLEFS
#include "LittleFS.h"
extern FS LittleFS;
using littlefs_impl::LittleFSConfig;
extern FS* filesystem;
#define FileFS LittleFS
#define FS_NAME "LittleFS"
#else
extern FS* filesystem;
#define FileFS SPIFFS
#define FS_NAME "SPIFFS"
#endif
#endif
extern void getFSInfo();
#ifdef ESP8266
extern bool getInfo(FSInfo& info);
#endif

View File

@@ -1,152 +0,0 @@
#pragma once
//===================Libraries===================================================================================================================================================
#include "Consts.h"
#include <Arduino.h>
#include "CTBot.h"
#include <ArduinoJson.h>
#include <ArduinoOTA.h>
#include <Bounce2.h>
#include <DallasTemperature.h>
#include <OneWire.h>
#include <PubSubClient.h>
#include <StringCommand.h>
#include <TickerScheduler.h>
#include <Wire.h>
#include <time.h>
#include "Clock.h"
#include "ESP32.h"
#include "ESP8266.h"
#include "GyverFilters.h"
#include "MqttClient.h"
#include "Upgrade.h"
#include "Utils/FileUtils.h"
#include "Utils/JsonUtils.h"
#include "Utils/SerialPrint.h"
#include "Utils/StringUtils.h"
#include "Utils/SysUtils.h"
#include "Utils/WiFiUtils.h"
#ifdef WEBSOCKET_ENABLED
extern AsyncWebSocket ws;
//extern AsyncEventSource events;
#endif
extern TickerScheduler ts;
extern WiFiClient espClient;
extern PubSubClient mqtt;
extern StringCommand sCmd;
extern AsyncWebServer server;
extern boolean but[NUM_BUTTONS];
extern Bounce* buttons;
//Global vars
extern boolean just_load;
extern boolean telegramInitBeen;
// Json
extern String configSetupJson; //все настройки
extern String configLiveJson; //все данные с датчиков (связан с mqtt)
extern String configStoreJson; //все данные которые должны сохраняться
extern String configOptionJson; //для трансфера
extern String telegramMsgJson;
extern String getValue(String& key);
// Mqtt
extern String chipId;
extern String prex;
extern String all_widgets;
extern String scenario;
//orders and events
extern String orderBuf;
extern String eventBuf;
extern String itemsFile;
extern String itemsLine;
//key lists and numbers
//=========================================
extern String impuls_KeyList;
extern int impuls_EnterCounter;
//=========================================
extern String buttonOut_KeyList;
extern int buttonOut_EnterCounter;
//=========================================
extern String inOutput_KeyList;
extern int inOutput_EnterCounter;
//=========================================
extern String pwmOut_KeyList;
extern int pwmOut_EnterCounter;
//=========================================
extern String countDown_KeyList;
extern int countDown_EnterCounter;
//=========================================
extern String logging_KeyList;
extern int logging_EnterCounter;
//=========================================
extern int dht_EnterCounter;
//=========================================
extern String itemName;
extern String presetName;
extern int scenario_line_status[40];
extern int lastVersion;
// Main
extern void setChipId();
extern void saveConfig();
extern void setConfigParam(const char* param, const String& value);
extern String getURL(const String& urls);
extern void do_fscheck();
extern void doBusScan();
extern void servo_();
extern void setLedStatus(LedStatus_t);
//Scenario
extern void eventGen2(String eventName, String eventValue);
extern String add_set(String param_name);
//Timers
extern void Timer_countdown_init();
extern void timerStart_();
extern void addTimer(String number, String time);
extern void timerStop_();
extern void delTimer(String number);
extern int readTimer(int number);
extern void upgradeInit();
// widget
extern void createWidgetByType(String widget_name, String page_name, String page_number, String file, String topic);
extern void createWidgetParam(String widget_name, String page_name, String page_number, String file, String topic, String name1, String param1, String name2, String param2, String name3, String param3);
extern void createWidget(String widget_name, String page_name, String page_number, String type, String topik);
extern void createChart(String widget_name, String page_name, String page_number, String file, String topic, String maxCount);
// PushingBox
extern void pushControl();
// UDP
//extern void udpInit();
//extern void do_udp_data_parse();
//extern void do_mqtt_send_settings_to_udp();
extern void do_update();
// Init
extern void uptime_init();
// Web
extern void web_init();
// Upgrade
extern String serverIP;

View File

@@ -1,9 +0,0 @@
#pragma once
#include "Global.h"
namespace HttpServer {
void init();
} // namespace HttpServer

View File

@@ -1,10 +0,0 @@
#pragma once
extern void loadConfig();
extern void espInit();
extern void statistics_init();
extern void loadScenario();
extern void deviceInit();
extern void prsets_init();
extern void handle_uptime();
extern void handle_statistics();

View File

@@ -1,16 +0,0 @@
#pragma once
#include <Arduino.h>
#include "Global.h"
extern void itemsListInit();
extern void addItem2(int num);
extern void addItem(String name);
extern void addPreset(String name);
extern void addPreset2(int num);
extern void delChoosingItems();
extern void delAllItems();
extern uint8_t getNewElementNumber(String file);
extern uint8_t getFreePinAll();
extern bool isPinExist(unsigned int num);
extern uint8_t getFreePinAnalog();

View File

@@ -1,9 +0,0 @@
//#pragma once
//#define ST(A) #A
//#define STR(A) ST(A)
//
//#ifdef esp32_4mb
//#pragma message STR(esp32_4mb)
//#endif
//Serial.println(STR(esp32_4mb));

View File

@@ -1,27 +0,0 @@
#pragma once
#include <Arduino.h>
extern String mqttPrefix;
extern String mqttRootDevice;
void mqttInit();
boolean mqttConnect();
void mqttReconnect();
void mqttLoop();
void mqttSubscribe();
boolean publish(const String& topic, const String& data);
boolean publishData(const String& topic, const String& data);
boolean publishChart(const String& topic, const String& data);
boolean publishControl(String id, String topic, String state);
boolean publishChart_test(const String& topic, const String& data);
boolean publishStatus(const String& topic, const String& data);
boolean publishEvent(const String& topic, const String& data);
boolean publishInfo(const String& topic, const String& data);
void publishWidgets();
void publishState();
void mqttCallback(char* topic, uint8_t* payload, size_t length);
const String getStateStr();

View File

@@ -1,8 +0,0 @@
#pragma once
#include "Utils/SysUtils.h"
namespace Discovery {
}

Some files were not shown because too many files have changed in this diff Show More