mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 14:12:16 +03:00
IoT manager ver2.0 support
This commit is contained in:
113
Cmd.ino
113
Cmd.ino
@@ -1,16 +1,5 @@
|
||||
void CMD_init() {
|
||||
|
||||
//======новые виджеты ver2.0=======//
|
||||
sCmd.addCommand("inputNumber", inputNumber);
|
||||
sCmd.addCommand("inputText", inputText);
|
||||
sCmd.addCommand("inputTime", inputTime);
|
||||
sCmd.addCommand("inputDate", inputDate);
|
||||
sCmd.addCommand("inputDropdown", inputDropdown);
|
||||
|
||||
//======новые виджеты ver2.0=======//
|
||||
|
||||
|
||||
sCmd.addCommand("input_new", input_new);
|
||||
|
||||
sCmd.addCommand("button", button);
|
||||
sCmd.addCommand("buttonSet", buttonSet);
|
||||
@@ -33,7 +22,7 @@ void CMD_init() {
|
||||
sCmd.addCommand("valueUpSet", valueUpSet);
|
||||
sCmd.addCommand("valueDownSet", valueDownSet);
|
||||
|
||||
|
||||
|
||||
|
||||
sCmd.addCommand("text", text);
|
||||
sCmd.addCommand("textSet", textSet);
|
||||
@@ -49,18 +38,104 @@ void CMD_init() {
|
||||
//!sCmd.addCommand("push", pushControl);
|
||||
|
||||
//handleCMD_ticker();
|
||||
|
||||
|
||||
//======новые виджеты ver2.0=======//
|
||||
|
||||
sCmd.addCommand("inputNumber", inputNumber);
|
||||
sCmd.addCommand("inputNumberSet", inputNumberSet);
|
||||
|
||||
sCmd.addCommand("inputText", inputText);
|
||||
sCmd.addCommand("inputTextSet", inputTextSet);
|
||||
|
||||
sCmd.addCommand("inputTime", inputTime);
|
||||
sCmd.addCommand("inputTimeSet", inputTimeSet);
|
||||
|
||||
sCmd.addCommand("inputDate", inputDate);
|
||||
sCmd.addCommand("inputDateSet", inputDateSet);
|
||||
|
||||
//sCmd.addCommand("inputDropdown", inputDropdown);
|
||||
|
||||
//=================================//
|
||||
|
||||
}
|
||||
|
||||
void input_new() {
|
||||
|
||||
String input_number = sCmd.next();
|
||||
void inputNumber() {
|
||||
String number = sCmd.next();
|
||||
String viget_name = sCmd.next();
|
||||
viget_name.replace("#", " ");
|
||||
String page_name = sCmd.next();
|
||||
page_name.replace("#", " ");
|
||||
String start_state = sCmd.next();
|
||||
String page_number = sCmd.next();
|
||||
|
||||
|
||||
createViget (viget_name, page_name, page_number, "vigets/viget.input_new.json", "inputSet" + input_number);
|
||||
jsonWrite(configJson, "inputNumberSet" + number, start_state);
|
||||
createViget (viget_name, page_name, page_number, "vigets/viget.inputNumber.json", "inputNumberSet" + number);
|
||||
}
|
||||
void inputNumberSet() {
|
||||
String number = sCmd.next();
|
||||
String value = sCmd.next();
|
||||
jsonWrite(configJson, "inputNumberSet" + number, value);
|
||||
sendSTATUS("inputNumberSet" + number, value);
|
||||
}
|
||||
|
||||
void inputText() {
|
||||
String number = sCmd.next();
|
||||
String viget_name = sCmd.next();
|
||||
viget_name.replace("#", " ");
|
||||
String page_name = sCmd.next();
|
||||
page_name.replace("#", " ");
|
||||
String start_state = sCmd.next();
|
||||
String page_number = sCmd.next();
|
||||
jsonWrite(configJson, "inputTextSet" + number, start_state);
|
||||
createViget (viget_name, page_name, page_number, "vigets/viget.inputText.json", "inputTextSet" + number);
|
||||
}
|
||||
void inputTextSet() {
|
||||
String number = sCmd.next();
|
||||
String value = sCmd.next();
|
||||
jsonWrite(configJson, "inputTextSet" + number, value);
|
||||
sendSTATUS("inputTextSet" + number, value);
|
||||
}
|
||||
|
||||
void inputTime() {
|
||||
String number = sCmd.next();
|
||||
String viget_name = sCmd.next();
|
||||
viget_name.replace("#", " ");
|
||||
String page_name = sCmd.next();
|
||||
page_name.replace("#", " ");
|
||||
String start_state = sCmd.next();
|
||||
String page_number = sCmd.next();
|
||||
jsonWrite(configJson, "inputTimeSet" + number, start_state);
|
||||
createViget (viget_name, page_name, page_number, "vigets/viget.inputTime.json", "inputTimeSet" + number);
|
||||
}
|
||||
void inputTimeSet() {
|
||||
String number = sCmd.next();
|
||||
String value = sCmd.next();
|
||||
value.replace(":", ".");
|
||||
jsonWrite(configJson, "inputTimeSet" + number, value);
|
||||
value.replace(".", ":");
|
||||
sendSTATUS("inputTimeSet" + number, value);
|
||||
}
|
||||
|
||||
void inputDate() {
|
||||
String number = sCmd.next();
|
||||
String viget_name = sCmd.next();
|
||||
viget_name.replace("#", " ");
|
||||
String page_name = sCmd.next();
|
||||
page_name.replace("#", " ");
|
||||
String start_state = sCmd.next();
|
||||
String page_number = sCmd.next();
|
||||
jsonWrite(configJson, "inputDateSet" + number, start_state);
|
||||
createViget (viget_name, page_name, page_number, "vigets/viget.inputDate.json", "inputDateSet" + number);
|
||||
}
|
||||
void inputDateSet() {
|
||||
String number = sCmd.next();
|
||||
String value = sCmd.next();
|
||||
jsonWrite(configJson, "inputDateSet" + number, value);
|
||||
sendSTATUS("inputDateSet" + number, value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//==========================================================================================================
|
||||
@@ -416,7 +491,7 @@ void createViget (String viget_name, String page_name, String page_number, Stri
|
||||
page_name.replace("#", " ");
|
||||
|
||||
jsonWrite(viget, "page", page_name);
|
||||
jsonWrite(viget, "pageId", page_number);
|
||||
jsonWrite(viget, "id", page_number);//"pageId"
|
||||
jsonWrite(viget, "descr", viget_name);
|
||||
jsonWrite(viget, "topic", prex + "/" + topic);
|
||||
all_vigets += viget + "\r\n";
|
||||
|
||||
@@ -1,19 +1,5 @@
|
||||
button 1 na Включить#все Освещение 0 1
|
||||
button 2 13 Прихожая Освещение 0 2
|
||||
button 3 14 Кухня Освещение 0 3
|
||||
pwm 1 3 Яркость#коредор: Освещение 1023 4
|
||||
pwm 2 4 Яркость#ванная: Освещение 510 5
|
||||
analog Аналоговый#вход,#% Датчики text 1 1024 1 1024 6
|
||||
logging analog 1 144 график Датчики 7
|
||||
input value1 20.0 5 порог.#значение Датчики 8
|
||||
button 4 na Вкл#по#analog>20 Датчики 0 11
|
||||
//dallas 2 Водонагреватель,#t°C Датчики termometr 14
|
||||
//level Вода#в#баке,#% Датчики gauge 125 20 15
|
||||
//ph pH Датчики text 0 16
|
||||
input value2 8.0 1 период#сек Таймер 117
|
||||
button 5 na Вкл#обратный#таймер Таймер 0 20
|
||||
button 6 5 Включится#по#таймеру Таймер 0 21
|
||||
switch 1 0 20
|
||||
text 1 Квартира Двери 22
|
||||
button 7 scenario Сценарии Настройки 1 23
|
||||
button 8 line1,line2, 2строки#сценариев Освещение 1 24
|
||||
inputNumber 1 Температура#максимальная moscow 60 1
|
||||
inputNumber 2 Температура#минимальная moscow 30 2
|
||||
inputText 1 Введите#текст moscow привет 3
|
||||
inputTime 1 Введите#время moscow 12.00 4
|
||||
inputDate 1 Введите#дату novorossiysk 10-01-2020 5
|
||||
@@ -1 +1 @@
|
||||
{"SSDP":"MODULES","chipID":"12884479-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"MGTS_GPON_DC15","password":"HKC4MRE4","timezone":3,"mqttServer":"91.204.228.124","mqttPort":1883,"mqttUser":"rise","mqttPass":"23ri22se32","scenario":"1","timers":"0","pushingbox_id":"v670C4F8A2581A11"}
|
||||
{"SSDP":"MODULES","chipID":"4039078204","ssidAP":"WiFi","passwordAP":"","ssid":"rise","password":"hostel3333","timezone":3,"mqttServer":"m12.cloudmqtt.com","mqttPort":14053,"mqttUser":"lbscvzuj","mqttPass":"bLxlveOgaF8F","scenario":"1","timers":"0","pushingbox_id":"v670C4F8A2581A11"}
|
||||
@@ -1,31 +1 @@
|
||||
button1 = 1
|
||||
buttonSet 2 1
|
||||
buttonSet 3 1
|
||||
pwmSet 2 1024
|
||||
end
|
||||
button1 = 0
|
||||
buttonSet 2 0
|
||||
buttonSet 3 0
|
||||
pwmSet 2 0
|
||||
end
|
||||
analog > value1
|
||||
buttonSet 4 1
|
||||
end
|
||||
button5 = 1
|
||||
timerStart 1 value2 sec
|
||||
end
|
||||
button5 = 0
|
||||
timerStart 2 value2 sec
|
||||
end
|
||||
timer1 = 0
|
||||
buttonSet 6 1
|
||||
end
|
||||
timer2 = 0
|
||||
buttonSet 6 0
|
||||
end
|
||||
switch1 = 1
|
||||
textSet 1 закрыто-time
|
||||
end
|
||||
switch1 = 0
|
||||
textSet 1 открыто-time
|
||||
end
|
||||
|
||||
|
||||
6
data/vigets/viget.inputNumber.json
Normal file
6
data/vigets/viget.inputNumber.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget" : "input",
|
||||
"size" : "small",
|
||||
"color" : "orange",
|
||||
"type" : "number"
|
||||
}
|
||||
6
data/vigets/viget.inputText.json
Normal file
6
data/vigets/viget.inputText.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget" : "input",
|
||||
"size" : "small",
|
||||
"color" : "orange",
|
||||
"type" : "text"
|
||||
}
|
||||
6
data/vigets/viget.inputTime.json
Normal file
6
data/vigets/viget.inputTime.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget" : "input",
|
||||
"size" : "small",
|
||||
"color" : "orange",
|
||||
"type" : "time"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget" : "input",
|
||||
"size" : "small",
|
||||
"color" : "orange",
|
||||
"type" : "date"
|
||||
}
|
||||
7
data/vigets/viget.select.json
Normal file
7
data/vigets/viget.select.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"widget" : "select",
|
||||
"size" : "small",
|
||||
"fill" : "outline",
|
||||
"options" : "["Zero item", "First item", "Second item"]",
|
||||
"status" : 2
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
config[0] = {
|
||||
id : 0,
|
||||
widget : 'btn',
|
||||
descr : "Outline red button FA icon",
|
||||
topic : prefix + "/" + deviceID + "/btn0",
|
||||
faicon : "arrow-circle-left",
|
||||
iconslot: 'start',
|
||||
status : 'Back',
|
||||
color : 'red',
|
||||
fill : 'outline',
|
||||
};
|
||||
|
||||
config[1] = {
|
||||
id : 1,
|
||||
widget : 'btn',
|
||||
descr : "Button with ion-icon",
|
||||
topic : prefix + "/" + deviceID + "/btn1",
|
||||
icon : "add",
|
||||
iconslot: "icon-only",
|
||||
};
|
||||
|
||||
config[2] = {
|
||||
id : 2,
|
||||
widget : 'anydata',
|
||||
descr : "Anydata",
|
||||
topic : prefix + "/" + deviceID + "/anydata2",
|
||||
status : 123,
|
||||
};
|
||||
|
||||
config[3] = {
|
||||
id : 3,
|
||||
widget : 'btn',
|
||||
descr : "Button with ion-icon",
|
||||
topic : prefix + "/" + deviceID + "/btn3",
|
||||
icon : "remove",
|
||||
iconslot : "icon-only",
|
||||
};
|
||||
|
||||
config[4] = {
|
||||
id : 4,
|
||||
widget : 'btn',
|
||||
topic : prefix + "/" + deviceID + "/btn4" ,
|
||||
descr : "Large button",
|
||||
size : 'large',
|
||||
color : 'green',
|
||||
send : "any usefull data",
|
||||
status : 'press'
|
||||
};
|
||||
|
||||
config[5] = {
|
||||
id : '5',
|
||||
widget : 'input',
|
||||
topic : prefix + "/" + deviceID + "/input5",
|
||||
descr : "Input number",
|
||||
size : 'small',
|
||||
color : 'orange',
|
||||
type : 'number',
|
||||
status : 321
|
||||
};
|
||||
|
||||
config[6] = {
|
||||
id : '6',
|
||||
widget : 'input',
|
||||
topic : prefix + "/" + deviceID + "/input6",
|
||||
descr : "Input text",
|
||||
type : 'text',
|
||||
status : "some text"
|
||||
};
|
||||
|
||||
config[7] = {
|
||||
id : 7,
|
||||
widget : 'input',
|
||||
topic : prefix + "/" + deviceID + "/input7",
|
||||
descr : "Input time",
|
||||
type : 'time',
|
||||
status : "10:00"
|
||||
};
|
||||
|
||||
config[8] = {
|
||||
id : 8,
|
||||
widget : 'input',
|
||||
topic : prefix + "/" + deviceID + "/input8",
|
||||
descr : "Input date",
|
||||
type : 'date',
|
||||
size : 'small',
|
||||
status : "20.03.2020"
|
||||
};
|
||||
|
||||
config[9] = {
|
||||
id : 9,
|
||||
widget : 'select',
|
||||
topic : prefix + "/" + deviceID + "/input9",
|
||||
descr : "Please, select",
|
||||
size : 'small',
|
||||
fill : 'outline',
|
||||
options: ['Zero item', 'First item', 'Second item'],
|
||||
status : 2,
|
||||
};
|
||||
|
||||
Toggle:
|
||||
[descr]="item.descr"
|
||||
[descrColor]="item.descrColor"
|
||||
[color]="item.color"
|
||||
[status]="item.status"
|
||||
[icon]="item.icon"
|
||||
[iconOff]="item.iconOff"
|
||||
[disabled]="item.disabled"
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,144 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
|
||||
"/config.live.json",
|
||||
"/config.setup.json",
|
||||
"/config.option.json"
|
||||
],
|
||||
"class":"col-sm-offset-1 col-sm-10",
|
||||
"content": [
|
||||
{
|
||||
"type": "h5",
|
||||
"title": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Device ID: {{chipID}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "IP address: {{ip}}"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Конфигурация устройства"
|
||||
},
|
||||
{
|
||||
"type":"file",
|
||||
"state":"config.all.txt",
|
||||
"style":"width:100%;height:400px",
|
||||
"title": "Сохранить",
|
||||
"action": "/all_modules_init",
|
||||
"class":"btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Инструкция",
|
||||
"action": "https://github.com/DmitryBorisenko33/esp8266_iot-manager_modules_firmware/wiki/Instruction",
|
||||
"class": "btn btn-block btn-primary"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Сценарии"
|
||||
},
|
||||
{
|
||||
"type": "checkbox",
|
||||
"name":"scenario",
|
||||
"title": "Включить сценарии",
|
||||
"action": "/scenario?status=[[scenario]]",
|
||||
"state": "{{scenario}}"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": ""
|
||||
},
|
||||
{
|
||||
"type":"file",
|
||||
"state":"scenario.all.txt",
|
||||
"style":"width:100%;height:400px",
|
||||
"title": "Сохранить и включить",
|
||||
"action": "/scenario?status=1",
|
||||
"class":"btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Данные модулей"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Модуль уровня воды (level)",
|
||||
"style": "width:100%"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "h6",
|
||||
"title": "Расстояние от датчика до воды: {{level_in}} см"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": " Заполнение бака: {{level}} %"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Модуль аналогового входа (analog)",
|
||||
"style": "width:100%"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": "Прочитанное значение: {{analog_in}}"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": "Преобразованное значение: {{analog}}"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Модуль температурного датчика (dallas)",
|
||||
"style": "width:100%"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": "Текущее значение: {{dallas}} °C"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Модуль pH сенсора от df robot (ph)",
|
||||
"style": "width:100%"
|
||||
},
|
||||
{
|
||||
"type": "h6",
|
||||
"title": "Текущее значение: {{ph}}"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Очистить все логи",
|
||||
"action": "/cleanlog",
|
||||
"class": "btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/page.htm?index",
|
||||
"class": "btn btn-block btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
button 1 na Включить#все Освещение 0 1
|
||||
button 2 13 Прихожая Освещение 0 2
|
||||
button 3 14 Кухня Освещение 0 3
|
||||
pwm 1 3 Яркость#коредор: Освещение 1023 4
|
||||
pwm 2 4 Яркость#ванная: Освещение 510 5
|
||||
analog Аналоговый#вход,#% Датчики text 1 1024 1 1024 6
|
||||
logging analog 1 144 график Датчики 7
|
||||
input value1 20.0 5 порог.#значение Датчики 8
|
||||
button 4 na Вкл#по#analog>20 Датчики 0 11
|
||||
//dallas 2 Водонагреватель,#t°C Датчики termometr 14
|
||||
//level Вода#в#баке,#% Датчики gauge 125 20 15
|
||||
//ph pH Датчики text 0 16
|
||||
input value2 8.0 1 период#сек Таймер 117
|
||||
button 5 na Вкл#обратный#таймер Таймер 0 20
|
||||
button 6 5 Включится#по#таймеру Таймер 0 21
|
||||
switch 1 0 20
|
||||
text 1 Квартира Двери 22
|
||||
button 7 scenario Сценарии Настройки 1 23
|
||||
button 8 line1,line2, 2строки#сценариев Освещение 1 24
|
||||
@@ -1 +0,0 @@
|
||||
{"SSDP":"MODULES","chipID":"12884479-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"MGTS_GPON_1002","password":"TTNYJ4QJ","timezone":3,"mqttServer":"91.204.228.124","mqttPort":1883,"mqttUser":"rise","mqttPass":"23ri22se32","scenario":"1","timers":"0","pushingbox_id":"v670C4F8A2581A11"}
|
||||
@@ -1 +0,0 @@
|
||||
{"SSDP":"MODULES","ssidAP":"WiFi","passwordAP":"","ssid":"MGTS_GPON_10B0","password":"8ed76da8","timezone":3,"mqttServer":"","mqttPort":0,"mqttUser":"","mqttPass":"","chipID":"9139530-1458400","scenario":"1","timers":"1","pushHost":"api.pushbullet.com","pushPort":443,"pushAccessToken":"","module_push":"0","pushFingerprint":"fef1573c6feeef932eaed0228e91878e048e73a2"}
|
||||
@@ -1 +0,0 @@
|
||||
{"SSDP":"MODULES","ssidAP":"WiFi","passwordAP":"","ssid":"your_ssid","password":"your_password","timezone":3,"mqttServer":"","mqttPort":0,"mqttUser":"","mqttPass":"","chipID":"9139530-1458400","scenario":"1","timers":"1","pushHost":"api.pushbullet.com","pushPort":443,"pushAccessToken":"","module_push":"0","pushFingerprint":"fef1573c6feeef932eaed0228e91878e048e73a2"}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
Web Developer: Renats Kevrels (ex. Zozula)
|
||||
Site: http://www.onclick.lv
|
||||
Contact: info [at] onclick.lv
|
||||
Skype: renat2985
|
||||
Twitter: @Ramzies
|
||||
Facebook: http://www.facebook.com/renat2985
|
||||
GitHub: https://github.com/renat2985
|
||||
From: Latvia, Valmiera
|
||||
-->
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
<script defer src="js/build.chart.js?v17.12.2018" charset="utf-8"></script>
|
||||
<!-- <link rel="stylesheet" type="text/css" href="css/chartist.min.css">
|
||||
<script src="js/chartist.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="js/chart.js"></script> -->
|
||||
<link rel="stylesheet" type="text/css" href="css/build.css?v17.12.2018">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css"> -->
|
||||
<script defer type="text/javascript" src="js/function.js?v17.12.2018"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title id="h-title"></title>
|
||||
<script type="text/javascript">
|
||||
var jsonResponse;
|
||||
window.onload = function() {
|
||||
setContent('first');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="news"></div>
|
||||
<div class="container loader-bg">
|
||||
|
||||
<ul id="url-content" class="hidden" onclick="document.getElementById('content').style.zIndex=0;"></ul>
|
||||
<div id="headers"></div>
|
||||
<div class="row hidden" id="container_column">
|
||||
<h1 id="title"></h1>
|
||||
<div id="content" onclick="this.style.zIndex=10"></div>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
<div id="edit-content" class="hidden" onclick="document.getElementById('content').style.zIndex=0;">
|
||||
<a target="_blank" style="position:fixed;right:0;color:#000;" href="https://github.com/tretyakovsa/Sonoff_WiFi_switch/wiki/%D0%92%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D0%B8-page.htm%3F*" title="GitHub Wiki"><i class="help-img"></i>wiki</a>
|
||||
<textarea class="form-control" onkeyup="isValidJson(this.value,'edit-json')" spellcheck="false" id="edit-json"></textarea>
|
||||
<div id="error-json"></div>
|
||||
<div class="btn-group btn-block">
|
||||
<input class="btn btn-success" style="width:40%" id="edit-view" onclick="setContent('edit');this.value='Loading...';html('url-content', ' ');" value="View" type="button">
|
||||
<input class="btn btn-danger" style="width:40%" id="edit-save" onclick="var urlPages=window.location.search.substring(1).split('&')[0];httpDelete('/'+urlPages+'.json.gz');send_request_edit(this, val('edit-json'),(urlPages?urlPages:'index')+'.json');toggle('edit-content');toggle('url-content');" value="Save" type="button">
|
||||
<a class="btn btn-info" style="width:20%" href="#" id="download-json" download="" title="Save to PC"><i class="download-img"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
"/config.live.json",
|
||||
"/config.setup.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": "{{SSDP}}",
|
||||
"class": "alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Device ID: {{chipID}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "IP address: {{ip}}"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Конфигурация устройства",
|
||||
"action": "/page.htm?config.all",
|
||||
"class": "btn btn-block btn-primary"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Конфигурация WIFI",
|
||||
"action": "/page.htm?setup",
|
||||
"class": "btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Конфигурация MQTT",
|
||||
"action": "/page.htm?mqtt",
|
||||
"class": "btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Конфигурация push",
|
||||
"action": "/page.htm?pushingbox",
|
||||
"class": "btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Скачать приложение IoT Manager",
|
||||
"action": "https://github.com/DmitryBorisenko33/esp8266_iot-manager_modules_firmware/raw/master/iot_manager/IoT%20Manager%201.5.5.apk",
|
||||
"class": "btn btn-block btn-success"
|
||||
}
|
||||
]
|
||||
}
|
||||
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.
Binary file not shown.
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
"/config.setup.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": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Server name:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"1",
|
||||
"state": "{{mqttServer}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Port:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"2",
|
||||
"state": "{{mqttPort}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "User name:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"3",
|
||||
"state": "{{mqttUser}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Password:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"4",
|
||||
"state": "{{mqttPass}}"
|
||||
},
|
||||
{
|
||||
"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":"Сохранить и проверить соединение",
|
||||
"action": "mqttSave?mqttServer=[[1]]&mqttPort=[[2]]&mqttUser=[[3]]&mqttPass=[[4]]",
|
||||
"response":"[[my-block]]",
|
||||
"class": "btn btn-block btn-success",
|
||||
"style": "width:100%;display:inline"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/page.htm?index",
|
||||
"class": "btn btn-block btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -1,92 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
"/config.setup.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": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Host name:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"1",
|
||||
"state": "{{pushHost}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Port:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"2",
|
||||
"state": "{{pushPort}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Fingerprint:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"3",
|
||||
"state": "{{pushFingerprint}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Access Token:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"4",
|
||||
"state": "{{pushAccessToken}}"
|
||||
},
|
||||
{
|
||||
"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":"Сохранить и проверить соединение",
|
||||
"action": "pushDate?pushHost=[[1]]&pushPort=[[2]]&pushFingerprint=[[3]]&pushAccessToken=[[4]]",
|
||||
"response":"[[my-block]]",
|
||||
"class": "btn btn-block btn-success",
|
||||
"style": "width:100%;display:inline"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "checkbox",
|
||||
"name":"start-push",
|
||||
"title": "Отправлять push при включении устройства",
|
||||
"action": "startPush?status=[[start-push]]",
|
||||
"state": "{{startPush}}"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
|
||||
"class": "btn btn-block btn-warning"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/page.htm?index",
|
||||
"class": "btn btn-block btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
"/config.setup.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": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Device id:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name":"1",
|
||||
"state": "{{pushingbox_id}}"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "button",
|
||||
"title":"Сохранить",
|
||||
"action": "pushingboxDate?pushingbox_id=[[1]]",
|
||||
"class": "btn btn-block btn-success",
|
||||
"style": "width:100%;display:inline"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
|
||||
"class": "btn btn-block btn-warning"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/page.htm?index",
|
||||
"class": "btn btn-block btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
button1 = 1
|
||||
buttonSet 2 1
|
||||
buttonSet 3 1
|
||||
pwmSet 2 1024
|
||||
end
|
||||
button1 = 0
|
||||
buttonSet 2 0
|
||||
buttonSet 3 0
|
||||
pwmSet 2 0
|
||||
end
|
||||
analog > value1
|
||||
buttonSet 4 1
|
||||
end
|
||||
button5 = 1
|
||||
timerStart 1 value2 sec
|
||||
end
|
||||
button5 = 0
|
||||
timerStart 2 value2 sec
|
||||
end
|
||||
timer1 = 0
|
||||
buttonSet 6 1
|
||||
end
|
||||
timer2 = 0
|
||||
buttonSet 6 0
|
||||
end
|
||||
switch1 = 1
|
||||
textSet 1 закрыто-time
|
||||
end
|
||||
switch1 = 0
|
||||
textSet 1 открыто-time
|
||||
end
|
||||
@@ -1,154 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
"/config.setup.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": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/",
|
||||
"class": "btn btn-block btn-danger"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Имя устройства"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "Имя устройства",
|
||||
"name":"ssdp",
|
||||
"state": "{{SSDP}}",
|
||||
"pattern": "[0-9a-zA-Zа-яА-Я.\\- ]{1,20}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"title": "Сохранить",
|
||||
"action": "ssdp?ssdp=[[ssdp]]",
|
||||
"class": "btn btn-block btn-success"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Подключение к Wi-Fi роутеру"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title":"Сеть",
|
||||
"name":"ssid",
|
||||
"state": "{{ssid}}"
|
||||
},
|
||||
{
|
||||
"type": "password",
|
||||
"title": "Введите пароль",
|
||||
"name":"ssidPass",
|
||||
"state": "{{password}}",
|
||||
"pattern": ".{8,20}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"title": "Сохранить",
|
||||
"class": "btn btn-block btn-success",
|
||||
"action": "ssid?ssid=[[ssid]]&password=[[ssidPass]]"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Временная зона GMT"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "{{LangSpace}}",
|
||||
"name":"timeZone",
|
||||
"state": "{{timezone}}",
|
||||
"pattern": "[0-9-]{1,3}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"module":"",
|
||||
"title": "Сохранить",
|
||||
"class": "btn btn-block btn-success",
|
||||
"action": "timeZone?timeZone=[[timeZone]]"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Автоопределение зоны",
|
||||
"action": "javascript:set_time_zone(this);",
|
||||
"class": "btn btn-block btn-primary"
|
||||
},
|
||||
{
|
||||
"type": "time",
|
||||
"name":"times1",
|
||||
"title": "На устройстве сейчас",
|
||||
"state":"{{time}}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"response":"[[times1]]",
|
||||
"title": "Синхронизировать",
|
||||
"class": "btn btn-block btn-primary",
|
||||
"action": "Time"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h2",
|
||||
"title": "Точка доступа"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"title": "После того как устройство подключается к роутеру, его Wi-Fi исчезнет.",
|
||||
"class": "alert alert-warning",
|
||||
"style": "width:45%;float:right;"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "Имя WI-FI сети",
|
||||
"name":"ssidap",
|
||||
"state": "{{ssidAP}}",
|
||||
"style": "width:50%;display:inline",
|
||||
"pattern": ".{1,20}"
|
||||
},
|
||||
{
|
||||
"type": "password",
|
||||
"title": "Пароль",
|
||||
"name":"ssidApPass",
|
||||
"state": "{{passwordAP}}",
|
||||
"style": "width:50%;display:inline",
|
||||
"pattern": ".{8,20}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"title": "Сохранить",
|
||||
"action": "ssidap?ssidAP=[[ssidap]]&passwordAP=[[ssidApPass]]",
|
||||
"class": "btn btn-block btn-success",
|
||||
"style": "width:50%;display:inline"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
|
||||
"class": "btn btn-block btn-warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"configs": [
|
||||
|
||||
"/config.live.json",
|
||||
"/config.option.json",
|
||||
"/config.setup.json",
|
||||
"/lang/lang.ru.json",
|
||||
"socket {{ip}}:81/"
|
||||
|
||||
],
|
||||
"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": "{{SSDP}}",
|
||||
"class":"alert-warning"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Module tank level:",
|
||||
"style": "width:80%;float:left;"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "{{module_tank_level_s}}",
|
||||
"style": "width:20%;float:right;"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Module analog:",
|
||||
"style": "width:80%;float:left;"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "{{module_analog_s}}",
|
||||
"style": "width:20%;float:right;"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Module ds18b20:",
|
||||
"style": "width:80%;float:left;"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "{{module_ds18b20_s}}",
|
||||
"style": "width:20%;float:right;"
|
||||
},
|
||||
{
|
||||
"type": "link",
|
||||
"title": "Главная",
|
||||
"action": "/page.htm?index",
|
||||
"class": "btn btn-block btn-danger btn-sm",
|
||||
"style": "width:100%;float:right;"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"id" : "",
|
||||
"page" : "",
|
||||
"widget" : "anydata",
|
||||
"class1": "col-xs-4 text-center",
|
||||
"class2": "stable",
|
||||
"style2": "font-size:12px;float:center;",
|
||||
"class3":"stable",
|
||||
"style3": "font-size:25px;float:center;font-weight:bold;",
|
||||
"descr" : "",
|
||||
"topic" : ""
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"id" : "",
|
||||
"page" : "",
|
||||
"widget" : "anydata",
|
||||
"class1" : "item col-xs-12 text-center",
|
||||
"class2": "ballanced",
|
||||
"style2": "font-size:20px;float:left;font-weight:bold;",
|
||||
"class3":"ballanced",
|
||||
"style3": "font-size:17px;float:right;",
|
||||
"descr" : "",
|
||||
"topic" : ""
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"pageId":"",
|
||||
"page": "",
|
||||
"widget": "simple-btn",
|
||||
"class1": "col-xs-4 text-center",
|
||||
"class2": "ballanced",
|
||||
"style2": "font-size:15px;float:left;font-weight:bold;",
|
||||
"topic": "",
|
||||
"class3": "button button-block",
|
||||
"style3": "float:right;",
|
||||
"widgetConfig": {
|
||||
"fill": "#F5F5F5",
|
||||
"fillPressed": "#4169E1",
|
||||
"title": "-",
|
||||
"delay":500
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"id" : "",
|
||||
"pageId": "",
|
||||
"widget" : "chart",
|
||||
"topic" : "",
|
||||
"widgetConfig": {
|
||||
|
||||
"maxCount": 200,
|
||||
"type": "line",
|
||||
"height": 200
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"page": "",
|
||||
"pageId": "",
|
||||
"widget": "fillgauge",
|
||||
"descr": "",
|
||||
"class2": "text-center ballanced",
|
||||
"style2": "font-size:25px;font-weight:bold;padding-top:10px;padding-bottom:10px;",
|
||||
"class3" : "text-center",
|
||||
"style3": "padding-top:10px;padding-bottom:10px;",
|
||||
"topic": "",
|
||||
"width": "250px",
|
||||
"height": "250px",
|
||||
"widgetConfig": {
|
||||
"circleColor": "#228B22",
|
||||
"textColor": "#FFFFFF",
|
||||
"waveTextColor": "#050000",
|
||||
"waveColor": "#40E0D0",
|
||||
"circleThickness": 0.05,
|
||||
"textVertPosition": 0.5,
|
||||
"waveAnimateTime": 500
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"id" : "",
|
||||
"pageId": "",
|
||||
"widget" : "gauge",
|
||||
"topic" : "",
|
||||
"class1" : "item no-border no-padding text-center",
|
||||
"descr" : "",
|
||||
"widgetConfig" : {
|
||||
"type" : "full",
|
||||
"cap" : "round",
|
||||
"append" : "",
|
||||
"size" : 300,
|
||||
"thick" : 20,
|
||||
"maximum": 1024,
|
||||
"color" : "#11c1f3",
|
||||
"backgroundColor": "rgba(0,0,0, 0.2)"
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"pageId": "",
|
||||
"descr": "",
|
||||
"class1": "col-xs-3 text-center",
|
||||
"page": "",
|
||||
"widget": "steel",
|
||||
"topic": "",
|
||||
"widgetConfig": {
|
||||
"width": 60,
|
||||
"height": 60,
|
||||
"type": "Led",
|
||||
"blink": false,
|
||||
"LedColor": "RED_LED"
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"page": "",
|
||||
"descr": "",
|
||||
"widget": "range",
|
||||
"class3": "ballanced",
|
||||
"style3": "font-size:25px;float:left;font-weight:bold;",
|
||||
"topic": "",
|
||||
"widgetConfig": {
|
||||
"maxValue": 1023,
|
||||
"minValue": 0
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"id" : "1",
|
||||
"page" : "",
|
||||
"pageId":"",
|
||||
"widget" : "anydata",
|
||||
"class1" : "item rounded text-center no-padding",
|
||||
"class2": "ballanced",
|
||||
"style2": "",
|
||||
"class3":"ballanced",
|
||||
"style3": "font-size:10px;float:right;",
|
||||
"descr" : "",
|
||||
"topic" : ""
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"page": "",
|
||||
"pageId": "",
|
||||
"widget": "steel",
|
||||
"topic": "/DS",
|
||||
"widgetConfig": {
|
||||
"width": "auto",
|
||||
"height": 150,
|
||||
"type": "Linear",
|
||||
"titleString": "Спальня",
|
||||
"unitString": "°C",
|
||||
"threshold": 30
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "",
|
||||
"page": "",
|
||||
"pageId": "",
|
||||
"widget": "toggle",
|
||||
"descrStyle": "font-size:20px;float:left;font-weight:bold;",
|
||||
"descrStyleOff": "font-size:20px;float:left;",
|
||||
"color": "#8997ff",
|
||||
"descr": "",
|
||||
"topic": ""
|
||||
}
|
||||
Binary file not shown.
5
mqtt.ino
5
mqtt.ino
@@ -128,6 +128,7 @@ void callback(char* topic, byte* payload, unsigned int length) {
|
||||
|
||||
if (str == "HELLO") outcoming_date();
|
||||
//if (str == "work") outcoming_date(); //Для приема получения work и подтверждения связи (для приложения mqtt IOT MQTT Panel)
|
||||
|
||||
//превращает название топика в команду, а значение в параметр команды
|
||||
|
||||
if (topic_str.indexOf("control") > 0) { //IoTmanager/800324-1458415/RelaySet1/control 1 /IoTmanager/9139530-1458400/RelaySet1/control -> 1
|
||||
@@ -222,7 +223,9 @@ void sendAllWigets() {
|
||||
|
||||
psn_2 = all_vigets.indexOf("\r\n", psn_1);
|
||||
line = all_vigets.substring(psn_1, psn_2);
|
||||
jsonWrite(line, "id", String(counter));
|
||||
line.replace("\r\n", "");
|
||||
//jsonWrite(line, "id", String(counter));
|
||||
//jsonWrite(line, "pageId", String(counter));
|
||||
counter++;
|
||||
sendMQTT("config", line);
|
||||
Serial.println("[V] " + line);
|
||||
|
||||
Reference in New Issue
Block a user