mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-04-05 16:49:25 +03:00
Compare commits
212 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fe10441b1 | ||
| c002bafc1c | |||
|
|
6b481de207 | ||
| b0fb71832c | |||
| 6a7653c7ff | |||
| ee94853ad9 | |||
| ede9092a73 | |||
| 30cf9cc3bb | |||
| 41f4be6139 | |||
|
|
c8df0de972 | ||
| bebea0732a | |||
| 5fecb51d69 | |||
| faa865e78d | |||
|
|
66f21a5001 | ||
|
|
e9032365b4 | ||
|
|
f39b16f787 | ||
|
|
fd09ec9d6b | ||
|
|
9ce2cea94a | ||
|
|
b0e06707bd | ||
|
|
cf7599e367 | ||
|
|
5b87cedd78 | ||
|
|
5e24d7aec0 | ||
|
|
a4fe4f6c1a | ||
|
|
3d93141e2c | ||
|
|
e9d3750e1b | ||
|
|
03b347b630 | ||
|
|
3fc86fb173 | ||
|
|
9dde5942f0 | ||
|
|
3bb13de0a9 | ||
|
|
f5b5bd78ec | ||
|
|
b68fa1b0f6 | ||
|
|
1529da443b | ||
|
|
8984a8d143 | ||
|
|
93a6a24254 | ||
|
|
d2a375dc9e | ||
|
|
acf9e2bd5d | ||
| 4a946ff3eb | |||
|
|
9c1604e9cc | ||
|
|
bc8f683c79 | ||
|
|
65c1449cde | ||
|
|
1a88298fd4 | ||
|
|
fbb5ba7e64 | ||
|
|
ca9444bbd9 | ||
|
|
e9f36e7d20 | ||
|
|
32350ddaf1 | ||
|
|
d083fbf9cf | ||
|
|
e46a6247f9 | ||
|
|
b125986fb3 | ||
|
|
a020c09928 | ||
|
|
7c423ddea6 | ||
|
|
f28bafa277 | ||
|
|
35923eca7d | ||
|
|
495488a52f | ||
| 96b80dfd28 | |||
|
|
b8f2cb2716 | ||
|
|
bb5eed987e | ||
| 2b1ab1df50 | |||
| f668b5783e | |||
| 70d2926f55 | |||
| f1c573b882 | |||
| de2075664b | |||
| 55ee70849f | |||
| 725cf26d41 | |||
| 7e5b611c23 | |||
|
|
b6c5f50123 | ||
|
|
b077d31e83 | ||
|
|
5ff0e8a5c1 | ||
|
|
3f5d7e8b6e | ||
|
|
421f3fcb9a | ||
|
|
74c31e30ea | ||
|
|
60a292a2f5 | ||
|
|
cbf0d372c9 | ||
|
|
e1b96cd287 | ||
|
|
0b5d7236aa | ||
|
|
bce8723ecf | ||
|
|
b7fcedb6c3 | ||
|
|
54cb92d2bb | ||
|
|
6902d57be2 | ||
|
|
57c12e43f1 | ||
|
|
c72af8650b | ||
|
|
a68dfb37fc | ||
|
|
3cdd8fc2b9 | ||
|
|
a4ae02736c | ||
|
|
e822414187 | ||
|
|
4e630fd0b0 | ||
|
|
988fb94c52 | ||
|
|
9906fade9a | ||
|
|
4cf68f417f | ||
|
|
05f726e378 | ||
|
|
75a7d4e16a | ||
|
|
691126a2d0 | ||
|
|
5eb3c6d3a3 | ||
|
|
bf9855aa60 | ||
|
|
50c616c61b | ||
|
|
2d2148d2c4 | ||
|
|
6ae001232d | ||
|
|
965b09cc78 | ||
|
|
a8534c4a73 | ||
|
|
401564a778 | ||
|
|
673bfe6b6b | ||
|
|
f8d574d15a | ||
|
|
e39806e0ac | ||
|
|
0fa7876b80 | ||
|
|
7eac8dde3b | ||
|
|
746ecc9c7a | ||
|
|
dad08c1686 | ||
|
|
e0bb6d58e8 | ||
|
|
a30dc04055 | ||
|
|
454922b8b4 | ||
|
|
02c363f1d6 | ||
|
|
d20f30d5e9 | ||
|
|
ddc3a92c15 | ||
|
|
e33ec57a1e | ||
|
|
7e4f852bf1 | ||
|
|
1a097ff2b7 | ||
|
|
99134cb6fd | ||
|
|
5955743426 | ||
|
|
5c664594af | ||
|
|
0df63ba642 | ||
|
|
d9672d17b0 | ||
|
|
c5772f8451 | ||
|
|
1df87f8986 | ||
|
|
3417d0c915 | ||
|
|
f4e917afba | ||
|
|
2aa3b56e85 | ||
|
|
e60d5eb62f | ||
|
|
6573b2c145 | ||
|
|
017c6f6234 | ||
|
|
305b3f32d6 | ||
|
|
5280a8914f | ||
|
|
cab8aff562 | ||
|
|
4711af6589 | ||
|
|
fe029a624c | ||
|
|
17162a2d85 | ||
|
|
433d28a785 | ||
|
|
19f728e209 | ||
|
|
07b75afb94 | ||
|
|
916116bbc4 | ||
|
|
9ac72f14e0 | ||
|
|
eddb2eb289 | ||
|
|
5f9d9ec48e | ||
|
|
0d6d1a7f6c | ||
|
|
a467117df9 | ||
|
|
0bb028229a | ||
|
|
ce383fe7fe | ||
|
|
2e240def88 | ||
|
|
245475ae99 | ||
|
|
c4df80e904 | ||
|
|
d5826b7038 | ||
|
|
8f08459a5a | ||
|
|
2fc82c3311 | ||
|
|
078c4389b5 | ||
|
|
9934690d0a | ||
|
|
b8a9f9b6b3 | ||
|
|
9fd88ffae1 | ||
|
|
9a7f6c5b05 | ||
|
|
ef01d08053 | ||
|
|
9a8061a84d | ||
|
|
e9820efff9 | ||
|
|
b2385bbc4c | ||
|
|
3e5d9770a1 | ||
|
|
71468599fe | ||
|
|
71c8fec27b | ||
|
|
f487a691fb | ||
|
|
d17112b3ff | ||
|
|
81866043bc | ||
|
|
253a9a5ae5 | ||
|
|
5c774c29bd | ||
|
|
6205f6959c | ||
|
|
6e44f76385 | ||
|
|
8dd4d8491c | ||
|
|
4436991205 | ||
|
|
d15cf619f1 | ||
|
|
9a2bdb54d1 | ||
|
|
7043855e3d | ||
|
|
49f11841be | ||
|
|
e88718ada0 | ||
|
|
0fc7cccda7 | ||
|
|
38924e4ed3 | ||
|
|
70c34d3d8d | ||
|
|
4f9763334b | ||
|
|
b2e9d90686 | ||
|
|
ceb516ddbe | ||
|
|
06df1f17b6 | ||
|
|
a20c2b8564 | ||
|
|
3c3a4a33ca | ||
|
|
28c24562bc | ||
|
|
d0ef8ec82e | ||
|
|
452110225d | ||
|
|
bdc9cd9b31 | ||
|
|
6cd60c9eef | ||
|
|
3e9da81b8c | ||
|
|
2e73eac2f1 | ||
|
|
6f45148d75 | ||
|
|
3766a744f4 | ||
|
|
94d93d3be6 | ||
|
|
d6aab0cf94 | ||
|
|
6135f3322e | ||
|
|
b53e7d15a4 | ||
|
|
7daa49083b | ||
|
|
68dc9c7bb3 | ||
|
|
b5cf1fd347 | ||
|
|
22f44afa1e | ||
|
|
964abc9f0c | ||
|
|
dfae6ebf09 | ||
|
|
50ad50efb2 | ||
|
|
96f160fc88 | ||
|
|
8bfba7ab4a | ||
|
|
6d52a181f0 | ||
|
|
044dd6294e | ||
|
|
c2baece068 | ||
|
|
9d6ec18bb2 |
23
.vscode/settings.json
vendored
23
.vscode/settings.json
vendored
@@ -1,13 +1,10 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.tcc": "cpp",
|
||||
"string": "cpp",
|
||||
"functional": "cpp",
|
||||
"array": "cpp",
|
||||
"atomic": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"bitset": "cpp",
|
||||
"cctype": "cpp",
|
||||
"chrono": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
@@ -24,26 +21,34 @@
|
||||
"vector": "cpp",
|
||||
"exception": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"mutex": "cpp",
|
||||
"new": "cpp",
|
||||
"ostream": "cpp",
|
||||
"numeric": "cpp",
|
||||
"ratio": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"system_error": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"regex": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"utility": "cpp",
|
||||
"typeinfo": "cpp"
|
||||
"typeinfo": "cpp",
|
||||
"chrono": "cpp",
|
||||
"mutex": "cpp",
|
||||
"ratio": "cpp",
|
||||
"system_error": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"memory": "cpp",
|
||||
"string": "cpp"
|
||||
},
|
||||
"cmake.configureOnOpen": true
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Dmitry Borisenko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,5 +1,6 @@
|
||||
# IoTManager
|
||||
Это модульная система беспроводной автоматизации на базе ESP32/ESP8266 микроконтроллеров и приложения IoT Manager.
|
||||
Телеграм канал обсуждения приложения и системы автоматизации https://t.me/IoTmanager
|
||||
# [Инструкция](https://github.com/IoTManagerProject/IoTManager/wiki)
|
||||
|
||||

|
||||
|
||||
BIN
bin/esp8266_1mb/firmware.bin
Normal file
BIN
bin/esp8266_1mb/firmware.bin
Normal file
Binary file not shown.
BIN
bin/esp8266_1mb/spiffs.bin
Normal file
BIN
bin/esp8266_1mb/spiffs.bin
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 256 KiB |
BIN
bin/esp8266_mysensors_4mb/firmware.bin
Normal file
BIN
bin/esp8266_mysensors_4mb/firmware.bin
Normal file
Binary file not shown.
BIN
bin/esp8266_mysensors_4mb/littlefs.bin
Normal file
BIN
bin/esp8266_mysensors_4mb/littlefs.bin
Normal file
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
/*.js.gz
|
||||
/.exclude.files
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "IoTmanager",
|
||||
"chipID": "",
|
||||
"apssid": "IoTmanager",
|
||||
"appass": "",
|
||||
"routerssid": "VOLODYA",
|
||||
"routerpass": "BELCHENKO",
|
||||
"timezone": 1,
|
||||
"ntp": "pool.ntp.org",
|
||||
"mqttServer": "m12.cloudmqtt.com",
|
||||
"mqttPort": 14053,
|
||||
"mqttPrefix": "/iotTest",
|
||||
"mqttUser": "lbscvzuj",
|
||||
"mqttPass": "bLxlveOgaF8F",
|
||||
"scen": "1",
|
||||
"telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo",
|
||||
"telegonof": "0",
|
||||
"weblogin": "admin",
|
||||
"webpass": "admin",
|
||||
"udponoff": "1",
|
||||
"blink": "1",
|
||||
"oneWirePin": "2",
|
||||
"serverip": "http://206.189.49.244"
|
||||
}
|
||||
658
data/edit.htm
658
data/edit.htm
@@ -1,658 +0,0 @@
|
||||
<!--This is the plain html source of the hex encoded Editor-Page embedded in SPIFFSEditor.cpp -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>FS Editor</title>
|
||||
<style type="text/css" media="screen">
|
||||
.cm {
|
||||
z-index: 300;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
border: 1px solid #444;
|
||||
background-color: #F5F5F5;
|
||||
display: none;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, .4);
|
||||
font-size: 12px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm ul {
|
||||
list-style: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cm li {
|
||||
position: relative;
|
||||
min-width: 60px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cm span {
|
||||
color: #444;
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.cm li:hover {
|
||||
background: #444;
|
||||
}
|
||||
|
||||
.cm li:hover span {
|
||||
color: #EEE;
|
||||
}
|
||||
|
||||
.tvu ul,
|
||||
.tvu li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tvu input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tvu {
|
||||
font: normal 12px Verdana, Arial, Sans-serif;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
color: #444;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.tvu span {
|
||||
margin-bottom: 5px;
|
||||
padding: 0 0 0 18px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKOgiihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQIV2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4trRCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC') no-repeat;
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
|
||||
.tvu span:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
.tvu {
|
||||
-webkit-animation: webkit-adjacent-element-selector-bugfix infinite 1s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes webkit-adjacent-element-selector-bugfix {
|
||||
from {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#uploader {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 28px;
|
||||
line-height: 24px;
|
||||
padding-left: 10px;
|
||||
background-color: #444;
|
||||
color: #EEE;
|
||||
}
|
||||
|
||||
#tree {
|
||||
position: absolute;
|
||||
top: 28px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 160px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#editor,
|
||||
#preview {
|
||||
position: absolute;
|
||||
top: 28px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 160px;
|
||||
border-left: 1px solid #EEE;
|
||||
}
|
||||
|
||||
#preview {
|
||||
background-color: #EEE;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#loader {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
right: 40%;
|
||||
}
|
||||
|
||||
.loader {
|
||||
z-index: 10000;
|
||||
border: 8px solid #b5b5b5;
|
||||
/* Grey */
|
||||
border-top: 8px solid #3498db;
|
||||
/* Blue */
|
||||
border-bottom: 8px solid #3498db;
|
||||
/* Blue */
|
||||
border-radius: 50%;
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
animation: spin 2s linear infinite;
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
if (typeof XMLHttpRequest === "undefined") {
|
||||
XMLHttpRequest = function () {
|
||||
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e) { }
|
||||
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (e) { }
|
||||
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { }
|
||||
throw new Error("This browser does not support XMLHttpRequest.");
|
||||
};
|
||||
}
|
||||
|
||||
function ge(a) {
|
||||
return document.getElementById(a);
|
||||
}
|
||||
function ce(a) {
|
||||
return document.createElement(a);
|
||||
}
|
||||
|
||||
function sortByKey(array, key) {
|
||||
return array.sort(function (a, b) {
|
||||
var x = a[key]; var y = b[key];
|
||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var QueuedRequester = function () {
|
||||
this.queue = [];
|
||||
this.running = false;
|
||||
this.xmlhttp = null;
|
||||
}
|
||||
QueuedRequester.prototype = {
|
||||
_request: function (req) {
|
||||
this.running = true;
|
||||
if (!req instanceof Object) return;
|
||||
var that = this;
|
||||
|
||||
function ajaxCb(x, d) {
|
||||
return function () {
|
||||
if (x.readyState == 4) {
|
||||
ge("loader").style.display = "none";
|
||||
d.callback(x.status, x.responseText);
|
||||
if (that.queue.length === 0) that.running = false;
|
||||
if (that.running) that._request(that.queue.shift());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ge("loader").style.display = "block";
|
||||
|
||||
var p = "";
|
||||
if (req.params instanceof FormData) {
|
||||
p = req.params;
|
||||
} else if (req.params instanceof Object) {
|
||||
for (var key in req.params) {
|
||||
if (p === "")
|
||||
p += (req.method === "GET") ? "?" : "";
|
||||
else
|
||||
p += "&";
|
||||
p += encodeURIComponent(key) + "=" + encodeURIComponent(req.params[key]);
|
||||
};
|
||||
}
|
||||
|
||||
this.xmlhttp = new XMLHttpRequest();
|
||||
this.xmlhttp.onreadystatechange = ajaxCb(this.xmlhttp, req);
|
||||
if (req.method === "GET") {
|
||||
this.xmlhttp.open(req.method, req.url + p, true);
|
||||
this.xmlhttp.send();
|
||||
} else {
|
||||
this.xmlhttp.open(req.method, req.url, true);
|
||||
if (p instanceof String)
|
||||
this.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
this.xmlhttp.send(p);
|
||||
}
|
||||
},
|
||||
stop: function () {
|
||||
if (this.running) this.running = false;
|
||||
if (this.xmlhttp && this.xmlhttp.readyState < 4) {
|
||||
this.xmlhttp.abort();
|
||||
}
|
||||
},
|
||||
add: function (method, url, params, callback) {
|
||||
this.queue.push({ url: url, method: method, params: params, callback: callback });
|
||||
if (!this.running) {
|
||||
this._request(this.queue.shift());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var requests = new QueuedRequester();
|
||||
|
||||
function createFileUploader(element, tree, editor) {
|
||||
var xmlHttp;
|
||||
|
||||
var refresh = ce("button");
|
||||
refresh.innerHTML = 'Refresh List';
|
||||
ge(element).appendChild(refresh);
|
||||
|
||||
var input = ce("input");
|
||||
input.type = "file";
|
||||
input.multiple = false;
|
||||
input.name = "data";
|
||||
input.id = "upload-select";
|
||||
ge(element).appendChild(input);
|
||||
|
||||
var path = ce("input");
|
||||
path.id = "upload-path";
|
||||
path.type = "text";
|
||||
path.name = "path";
|
||||
path.defaultValue = "/";
|
||||
ge(element).appendChild(path);
|
||||
|
||||
var button = ce("button");
|
||||
button.innerHTML = 'Upload';
|
||||
ge(element).appendChild(button);
|
||||
|
||||
var mkfile = ce("button");
|
||||
mkfile.innerHTML = 'Create';
|
||||
ge(element).appendChild(mkfile);
|
||||
|
||||
var filename = ce("input");
|
||||
filename.id = "editor-filename";
|
||||
filename.type = "text";
|
||||
filename.disabled = true;
|
||||
filename.size = 20;
|
||||
ge(element).appendChild(filename);
|
||||
|
||||
var savefile = ce("button");
|
||||
savefile.innerHTML = ' Save ';
|
||||
ge(element).appendChild(savefile);
|
||||
|
||||
function httpPostProcessRequest(status, responseText) {
|
||||
if (status != 200)
|
||||
alert("ERROR[" + status + "]: " + responseText);
|
||||
else
|
||||
tree.refreshPath(path.value);
|
||||
}
|
||||
function createPath(p) {
|
||||
var formData = new FormData();
|
||||
formData.append("path", p);
|
||||
requests.add("PUT", "/edit", formData, httpPostProcessRequest);
|
||||
}
|
||||
|
||||
mkfile.onclick = function (e) {
|
||||
createPath(path.value);
|
||||
editor.loadUrl(path.value);
|
||||
path.value = "/";
|
||||
};
|
||||
|
||||
savefile.onclick = function (e) {
|
||||
editor.execCommand('saveCommand');
|
||||
};
|
||||
|
||||
refresh.onclick = function (e) {
|
||||
tree.refreshPath(path.value);
|
||||
};
|
||||
|
||||
button.onclick = function (e) {
|
||||
if (input.files.length === 0) {
|
||||
return;
|
||||
}
|
||||
var formData = new FormData();
|
||||
formData.append("data", input.files[0], path.value);
|
||||
requests.add("POST", "/edit", formData, httpPostProcessRequest);
|
||||
var uploadPath = ge("upload-path");
|
||||
uploadPath.value = "/";
|
||||
var uploadSelect = ge("upload-select");
|
||||
uploadSelect.value = "";
|
||||
};
|
||||
input.onchange = function (e) {
|
||||
if (input.files.length === 0) return;
|
||||
var filename = input.files[0].name;
|
||||
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||
var name = /(.*)\.[^.]+$/.exec(filename)[1];
|
||||
if (typeof name !== undefined) {
|
||||
filename = name;
|
||||
}
|
||||
path.value = "/" + filename + "." + ext;
|
||||
};
|
||||
}
|
||||
|
||||
function createTree(element, editor) {
|
||||
var preview = ge("preview");
|
||||
var treeRoot = ce("div");
|
||||
treeRoot.className = "tvu";
|
||||
ge(element).appendChild(treeRoot);
|
||||
|
||||
function loadDownload(path) {
|
||||
ge('download-frame').src = "/edit?download=" + path;
|
||||
}
|
||||
|
||||
function loadPreview(path) {
|
||||
var edfname = ge("editor-filename");
|
||||
edfname.value = path;
|
||||
ge("editor").style.display = "none";
|
||||
preview.style.display = "block";
|
||||
preview.innerHTML = '<img src="/edit?edit=' + path + '&_cb=' + Date.now() + '" style="max-width:100%; max-height:100%; margin:auto; display:block;" />';
|
||||
}
|
||||
|
||||
function fillFileMenu(el, path) {
|
||||
var list = ce("ul");
|
||||
el.appendChild(list);
|
||||
var action = ce("li");
|
||||
list.appendChild(action);
|
||||
if (isImageFile(path)) {
|
||||
action.innerHTML = "<span>Preview</span>";
|
||||
action.onclick = function (e) {
|
||||
loadPreview(path);
|
||||
if (document.body.getElementsByClassName('cm').length > 0) document.body.removeChild(el);
|
||||
};
|
||||
} else if (isTextFile(path)) {
|
||||
action.innerHTML = "<span>Edit</span>";
|
||||
action.onclick = function (e) {
|
||||
editor.loadUrl(path);
|
||||
if (document.body.getElementsByClassName('cm').length > 0) document.body.removeChild(el);
|
||||
};
|
||||
}
|
||||
var download = ce("li");
|
||||
list.appendChild(download);
|
||||
download.innerHTML = "<span>Download</span>";
|
||||
download.onclick = function (e) {
|
||||
loadDownload(path);
|
||||
if (document.body.getElementsByClassName('cm').length > 0) document.body.removeChild(el);
|
||||
};
|
||||
var delFile = ce("li");
|
||||
list.appendChild(delFile);
|
||||
delFile.innerHTML = "<span>Delete</span>";
|
||||
delFile.onclick = function (e) {
|
||||
httpDelete(path);
|
||||
if (document.body.getElementsByClassName('cm').length > 0) document.body.removeChild(el);
|
||||
};
|
||||
}
|
||||
|
||||
function showContextMenu(event, path, isfile) {
|
||||
var divContext = ce("div");
|
||||
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
|
||||
var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft;
|
||||
var left = event.clientX + scrollLeft;
|
||||
var top = event.clientY + scrollTop;
|
||||
divContext.className = 'cm';
|
||||
divContext.style.display = 'block';
|
||||
divContext.style.left = left + 'px';
|
||||
divContext.style.top = top + 'px';
|
||||
fillFileMenu(divContext, path);
|
||||
document.body.appendChild(divContext);
|
||||
var width = divContext.offsetWidth;
|
||||
var height = divContext.offsetHeight;
|
||||
divContext.onmouseout = function (e) {
|
||||
if (e.clientX < left || e.clientX > (left + width) || e.clientY < top || e.clientY > (top + height)) {
|
||||
if (document.body.getElementsByClassName('cm').length > 0) document.body.removeChild(divContext);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function createTreeLeaf(path, name, size) {
|
||||
var leaf = ce("li");
|
||||
leaf.id = name;
|
||||
var label = ce("span");
|
||||
label.innerHTML = name;
|
||||
leaf.appendChild(label);
|
||||
leaf.onclick = function (e) {
|
||||
if (isTextFile(leaf.id.toLowerCase())) {
|
||||
editor.loadUrl(leaf.id);
|
||||
} else if (isImageFile(leaf.id.toLowerCase())) {
|
||||
loadPreview(leaf.id);
|
||||
}
|
||||
};
|
||||
leaf.oncontextmenu = function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
showContextMenu(e, leaf.id, true);
|
||||
};
|
||||
return leaf;
|
||||
}
|
||||
|
||||
function addList(parent, path, items) {
|
||||
sortByKey(items, 'name');
|
||||
var list = ce("ul");
|
||||
parent.appendChild(list);
|
||||
var ll = items.length;
|
||||
for (var i = 0; i < ll; i++) {
|
||||
if (items[i].type === "file")
|
||||
list.appendChild(createTreeLeaf(path, items[i].name, items[i].size));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function isTextFile(path) {
|
||||
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||
if (typeof ext !== undefined) {
|
||||
switch (ext) {
|
||||
case "cnv":
|
||||
case "txt":
|
||||
case "htm":
|
||||
case "html":
|
||||
case "js":
|
||||
case "css":
|
||||
case "xml":
|
||||
case "json":
|
||||
case "conf":
|
||||
case "ini":
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isImageFile(path) {
|
||||
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||
if (typeof ext !== undefined) {
|
||||
switch (ext) {
|
||||
case "png":
|
||||
case "jpg":
|
||||
case "jpeg":
|
||||
case "gif":
|
||||
case "bmp":
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.refreshPath = function (path) {
|
||||
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||
httpGet(treeRoot, "/");
|
||||
};
|
||||
|
||||
function delCb(path) {
|
||||
return function (status, responseText) {
|
||||
if (status != 200) {
|
||||
alert("ERROR[" + status + "]: " + responseText);
|
||||
} else {
|
||||
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||
httpGet(treeRoot, "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function httpDelete(filename) {
|
||||
var formData = new FormData();
|
||||
formData.append("path", filename);
|
||||
requests.add("DELETE", "/edit", formData, delCb(filename));
|
||||
}
|
||||
|
||||
function getCb(parent, path) {
|
||||
return function (status, responseText) {
|
||||
if (status == 200)
|
||||
addList(parent, path, JSON.parse(responseText));
|
||||
}
|
||||
}
|
||||
|
||||
function httpGet(parent, path) {
|
||||
requests.add("GET", "/edit", { list: path }, getCb(parent, path));
|
||||
}
|
||||
|
||||
httpGet(treeRoot, "/");
|
||||
return this;
|
||||
}
|
||||
|
||||
function createEditor(element, file, lang, theme, type) {
|
||||
function getLangFromFilename(filename) {
|
||||
var lang = "plain";
|
||||
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||
if (typeof ext !== undefined) {
|
||||
switch (ext) {
|
||||
case "cnv": lang = "plain"; break;
|
||||
case "txt": lang = "plain"; break;
|
||||
case "hex": lang = "plain"; break;
|
||||
case "conf": lang = "plain"; break;
|
||||
case "htm": lang = "html"; break;
|
||||
case "js": lang = "javascript"; break;
|
||||
case "css":
|
||||
case "scss":
|
||||
case "php":
|
||||
case "html":
|
||||
case "json":
|
||||
case "xml":
|
||||
case "ini": lang = ext;
|
||||
}
|
||||
}
|
||||
return lang;
|
||||
}
|
||||
|
||||
if (typeof file === "undefined") file = "/index.html";
|
||||
|
||||
if (typeof lang === "undefined") {
|
||||
lang = getLangFromFilename(file);
|
||||
}
|
||||
|
||||
if (typeof theme === "undefined") theme = "textmate";
|
||||
|
||||
if (typeof type === "undefined") {
|
||||
type = "text/" + lang;
|
||||
if (lang === "c_cpp") type = "text/plain";
|
||||
}
|
||||
|
||||
var editor = ace.edit(element);
|
||||
function httpPostProcessRequest(status, responseText) {
|
||||
if (status != 200) alert("ERROR[" + status + "]: " + responseText);
|
||||
}
|
||||
function httpPost(filename, data, type) {
|
||||
var formData = new FormData();
|
||||
formData.append("data", new Blob([data], { type: type }), filename);
|
||||
requests.add("POST", "/edit", formData, httpPostProcessRequest);
|
||||
}
|
||||
function httpGetProcessRequest(status, responseText) {
|
||||
ge("preview").style.display = "none";
|
||||
ge("editor").style.display = "block";
|
||||
if (status == 200)
|
||||
editor.setValue(responseText);
|
||||
else
|
||||
editor.setValue("");
|
||||
editor.clearSelection();
|
||||
}
|
||||
function httpGet(theUrl) {
|
||||
requests.add("GET", "/edit", { edit: theUrl }, httpGetProcessRequest);
|
||||
}
|
||||
|
||||
if (lang !== "plain") editor.getSession().setMode("ace/mode/" + lang);
|
||||
editor.setTheme("ace/theme/" + theme);
|
||||
editor.$blockScrolling = Infinity;
|
||||
editor.getSession().setUseSoftTabs(true);
|
||||
editor.getSession().setTabSize(2);
|
||||
editor.setHighlightActiveLine(true);
|
||||
editor.setShowPrintMargin(false);
|
||||
editor.commands.addCommand({
|
||||
name: 'saveCommand',
|
||||
bindKey: { win: 'Ctrl-S', mac: 'Command-S' },
|
||||
exec: function (editor) {
|
||||
httpPost(file, editor.getValue() + "", type);
|
||||
},
|
||||
readOnly: false
|
||||
});
|
||||
editor.commands.addCommand({
|
||||
name: 'undoCommand',
|
||||
bindKey: { win: 'Ctrl-Z', mac: 'Command-Z' },
|
||||
exec: function (editor) {
|
||||
editor.getSession().getUndoManager().undo(false);
|
||||
},
|
||||
readOnly: false
|
||||
});
|
||||
editor.commands.addCommand({
|
||||
name: 'redoCommand',
|
||||
bindKey: { win: 'Ctrl-Shift-Z', mac: 'Command-Shift-Z' },
|
||||
exec: function (editor) {
|
||||
editor.getSession().getUndoManager().redo(false);
|
||||
},
|
||||
readOnly: false
|
||||
});
|
||||
editor.loadUrl = function (filename) {
|
||||
var edfname = ge("editor-filename");
|
||||
edfname.value = filename;
|
||||
file = filename;
|
||||
lang = getLangFromFilename(file);
|
||||
type = "text/" + lang;
|
||||
if (lang !== "plain") editor.getSession().setMode("ace/mode/" + lang);
|
||||
httpGet(file);
|
||||
};
|
||||
return editor;
|
||||
}
|
||||
function onBodyLoad() {
|
||||
var vars = {};
|
||||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { vars[key] = value; });
|
||||
var editor = createEditor("editor", vars.file, vars.lang, vars.theme);
|
||||
var tree = createTree("tree", editor);
|
||||
createFileUploader("uploader", tree, editor);
|
||||
if (typeof vars.file === "undefined") vars.file = "/dev_conf.txt";
|
||||
editor.loadUrl(vars.file);
|
||||
};
|
||||
</script>
|
||||
<script id='ace' src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js" type="text/javascript"
|
||||
charset="utf-8"></script>
|
||||
<script>
|
||||
if (typeof ace.edit == "undefined") {
|
||||
var script = document.createElement('script');
|
||||
script.src = "/ace.js";
|
||||
script.async = false;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="onBodyLoad();">
|
||||
<div id="loader" class="loader"></div>
|
||||
<div id="uploader"></div>
|
||||
<div id="tree"></div>
|
||||
<div id="editor"></div>
|
||||
<div id="preview" style="display:none;"></div>
|
||||
<iframe id=download-frame style='display:none;'></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
data/icon.jpeg
BIN
data/icon.jpeg
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,63 +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": "text",
|
||||
"class": "alert alert-light",
|
||||
"title": "<center><img src='/icon.jpeg' alt='IoT Manager'></center>"
|
||||
},
|
||||
{
|
||||
"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": "Скачать приложение 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
0;analog-adc;id;fillgauge;Сенсоры;Аналоговый;order;gol;map[0,1024,0,100];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;bme280-hum;id;anydataHum;Сенсоры;Влажность;order;addr[0x76];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;bme280-press;id;anydataPress;Сенсоры;Давление;order;addr[0x76];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;bme280-temp;id;anydataTemp;Сенсоры;Температура;order;addr[0x76];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;bmp280-press;id;anydataPress;Сенсоры;Давление;order;addr[0x76];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;bmp280-temp;id;anydataTemp;Сенсоры;Температура;order;addr[0x76];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;button-in;id;toggle;Кнопки;Освещение;order;pin;db[20]
|
||||
@@ -1 +0,0 @@
|
||||
0;button-out;id;toggle;Кнопки;Освещение;order;pin;inv[1];st[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;button-out;id;toggle;Кнопки;Освещение;order;st[0]
|
||||
@@ -1 +0,0 @@
|
||||
0;button-out;id;toggle;Кнопки;Освещение;order;pin;st[0]
|
||||
@@ -1 +0,0 @@
|
||||
0;dallas-temp;id;anydataTemp;Сенсоры;Температура;order;sal;index[0];int[10]
|
||||
@@ -1 +0,0 @@
|
||||
0;dht-hum;id;anydataHum;Сенсоры;Влажность;order;thd;type[dht11];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;dht-temp;id;anydataTemp;Сенсоры;Температура;order;thd;type[dht11];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;dht-hum;id;anydataHum;Сенсоры;Влажность;order;thd;type[dht22];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;dht-temp;id;anydataTemp;Сенсоры;Температура;order;thd;type[dht22];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;impuls-out;id;na;na;na;order;pin
|
||||
@@ -1 +0,0 @@
|
||||
0;input-digit;id;inputDigit;Ввод;Введите#цифру;order;st[60]
|
||||
@@ -1 +0,0 @@
|
||||
0;input-time;id;inputTime;Ввод;Введите#время;order;st[10:00]
|
||||
@@ -1 +0,0 @@
|
||||
0;logging;id;chart;Графики;История;order;val[any];int[60];cnt[100]
|
||||
@@ -1 +0,0 @@
|
||||
0;modbus;id;anydata;Modbus;Регистр;order;addr[1];reg[0];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;output-text;id;anydata;Вывод;Сигнализация;order;st[Обнаружено#движение]
|
||||
@@ -1 +0,0 @@
|
||||
0;pwm-out;id;range;Ползунки;Яркость;order;pin;st[500]
|
||||
@@ -1 +0,0 @@
|
||||
0;ultrasonic-cm;id;anydata;Сенсоры;Расстояние;order;cin;map[0,500,0,100];c[1]
|
||||
@@ -1 +0,0 @@
|
||||
0;uptime;id;anydataTime;Системные;%name%#uptime;order
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
0;dallas-temp;temp;anydataTemp;Термостат;Температура;1;pin[2];index[0];int[10]
|
||||
0;logging;log;chart;Термостат;История;2;val[temp];int[60];cnt[100]
|
||||
0;input-digit;inputU;inputDigit;Термостат;Верхний#порог;3;st[30]
|
||||
0;input-digit;inputL;inputDigit;Термостат;Нижний#порог;4;st[20]
|
||||
0;button-out;button;toggle;Термостат;Нагрев;5;pin[12];st[0]
|
||||
@@ -1,8 +0,0 @@
|
||||
temp > inputU
|
||||
button 0
|
||||
telegram нагрев#выключен 1
|
||||
end
|
||||
temp < inputL
|
||||
button 1
|
||||
telegram нагрев#включен 1
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
0;dht-hum;hum;anydataHum;Теплица;Влажность;1;pin[2];type[dht11];c[1]
|
||||
0;logging;log;chart;Теплица;История;2;val[hum];int[60];cnt[100]
|
||||
0;input-digit;inputU;inputDigit;Теплица;Верхний#порог;3;st[45]
|
||||
0;input-digit;inputL;inputDigit;Теплица;Нижний#порог;4;st[35]
|
||||
0;button-out;button;toggle;Теплица;Полив;5;pin[12];st[0]
|
||||
@@ -1,8 +0,0 @@
|
||||
hum > inputU
|
||||
button 0
|
||||
telegram полив#выключен 1
|
||||
end
|
||||
hum < inputL
|
||||
button 1
|
||||
telegram полив#включен 1
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
0;button-out;button1;toggle;Реле;Освещение;1;pin[12];st[0]
|
||||
0;button-out;button2;toggle;Реле;Освещение;2;pin[13];st[0]
|
||||
0;input-time;T1;inputTime;Реле;Введите#время#включения;3;st[10:00]
|
||||
0;input-time;T2;inputTime;Реле;Введите#время#выключения;4;st[11:00]
|
||||
@@ -1,8 +0,0 @@
|
||||
timenow = T1
|
||||
button1 1
|
||||
button2 0
|
||||
end
|
||||
timenow = T2
|
||||
button1 0
|
||||
button2 1
|
||||
end
|
||||
@@ -1 +0,0 @@
|
||||
Удалить;Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета
|
||||
|
@@ -1 +0,0 @@
|
||||
//
|
||||
@@ -1,46 +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": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/set?device=ok');}",
|
||||
"class": "btn btn-block btn-danger"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,199 +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": "Device ID: {{chipID}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "IP address: {{ip}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Time: {{timenow}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Uptime: {{uptime}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Build version: {{firmware_version}}"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "LittleFS version: 267"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "dropdown",
|
||||
"name": "help-url1",
|
||||
"class": "btn btn-default",
|
||||
"style": "display:inline",
|
||||
"title": {
|
||||
"#": "Выберите элемент из списка<span class=\"caret\"></span>",
|
||||
"/set?addItem=button-out.pin": "1.Кнопка управляющая пином",
|
||||
"/set?addItem=button-out.npin": "2.Кнопка виртуальная",
|
||||
"/set?addItem=button-in": "4.Кнопка физическая",
|
||||
"/set?addItem=pwm-out": "3.Широтно импульсная модуляция pwm",
|
||||
"/set?addItem=input-digit": "5.Окно ввода цифровых значений",
|
||||
"/set?addItem=input-time": "6.Окно ввода времени",
|
||||
"/set?addItem=output-text": "7.Окно вывода любого текста, предупреждения, цифры",
|
||||
"/set?addItem=analog-adc": "8.Датчик аналоговый, чтение аналогового входа",
|
||||
"/set?addItem=dallas-temp": "9.Датчик температуры ds18b20",
|
||||
"/set?addItem=ultrasonic-cm": "10.Датчик расстояния ультрозвуковой JSN-SR04T, HC-SR04, HY-SRF05",
|
||||
"/set?addItem=dht11-temp": "11.Датчик температуры DHT11",
|
||||
"/set?addItem=dht11-hum": "12.Датчик влажности DHT11",
|
||||
"/set?addItem=dht22-temp": "13.Датчик температуры DHT22, DHT33, DHT44, AM2302, RHT03",
|
||||
"/set?addItem=dht22-hum": "14.Датчик влажности DHT22, DHT33, DHT44, AM2302, RHT03",
|
||||
"/set?addItem=bme280-temp": "15.Датчик температуры bme280",
|
||||
"/set?addItem=bme280-hum": "16.Датчик влажности bme280",
|
||||
"/set?addItem=bme280-press": "17.Датчик давления bme280",
|
||||
"/set?addItem=bmp280-temp": "18.Датчик температуры bmp280",
|
||||
"/set?addItem=bmp280-press": "19.Датчик давления bmp280",
|
||||
"/set?addItem=impuls-out": "20.Создать импульсы через заданный промежуток времени (управление шд)",
|
||||
"/set?addItem=modbus": "21.Прочитать регистр modbus устройства",
|
||||
"/set?addItem=logging": "a.Логгирование и вывод в график любой величины",
|
||||
"/set?addItem=uptime": "b.Отобразить время работы устройства"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dropdown",
|
||||
"name": "help-url2",
|
||||
"class": "btn btn-default",
|
||||
"style": "display:inline",
|
||||
"title": {
|
||||
"#": "Выберите пресет из списка<span class=\"caret\"></span>",
|
||||
"/set?addPreset=dal.c": "1.Термостат на основе ds18b20 с оповещением в телеграм",
|
||||
"/set?addPreset=dht.c": "2.Контроль влажности на основе DHT с оповещением в телеграм",
|
||||
"/set?addPreset=rel.c": "3.Включение выключение реле в заданное время"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "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": "button",
|
||||
"title": "Очистить логи сенсоров",
|
||||
"action": "/set?cleanlog",
|
||||
"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": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/set?device=ok');}",
|
||||
"class": "btn btn-block btn-danger"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,133 +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": "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": "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]]",
|
||||
"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": "link",
|
||||
"style": "width:100%;float:left;",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
|
||||
"class": "btn btn-block btn-danger"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,68 +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": "tel",
|
||||
"title": "Включить телеграм",
|
||||
"action": "/set?telegonof=[[tel]]",
|
||||
"state": "{{telegonof}}"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"style": "width:40%;float:left;",
|
||||
"title": "Telegram API token:"
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"title": "",
|
||||
"name": "telegramApi-arg",
|
||||
"style": "width:60%;float:right",
|
||||
"state": "{{telegramApi}}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"title": "{{ButSave}}",
|
||||
"action": "set?telegramApi=[[telegramApi-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": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/set?device=ok');}",
|
||||
"class": "btn btn-block btn-danger"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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>"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,39 +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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,184 +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": "link",
|
||||
"title": "Перезагрузить устройство",
|
||||
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/set?device=ok');}",
|
||||
"class": "btn btn-block btn-danger"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "°С",
|
||||
"icon": "thermometer"
|
||||
}
|
||||
37
data_esp/config.json
Normal file
37
data_esp/config.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "IoTmanager",
|
||||
"chipID": "",
|
||||
"apssid": "IoTmanager",
|
||||
"appass": "",
|
||||
"routerssid": "rise",
|
||||
"routerpass": "hostel3333",
|
||||
"timezone": 3,
|
||||
"ntp": "pool.ntp.org",
|
||||
"mqttServer": "live-control.ru",
|
||||
"mqttPort": 1883,
|
||||
"mqttPrefix": "/IotManager",
|
||||
"mqttUser": "IotManager:guest",
|
||||
"mqttPass": "guest",
|
||||
"mqttServer2": "",
|
||||
"mqttPort2": 0,
|
||||
"mqttPrefix2": "",
|
||||
"mqttUser2": "",
|
||||
"mqttPass2": "",
|
||||
"scen": "1",
|
||||
"telegramApi": "",
|
||||
"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.
1
data_esp/dashboard/build/bundle.css
Normal file
1
data_esp/dashboard/build/bundle.css
Normal file
File diff suppressed because one or more lines are too long
BIN
data_esp/dashboard/build/bundle.js.gz
Normal file
BIN
data_esp/dashboard/build/bundle.js.gz
Normal file
Binary file not shown.
63
data_esp/dashboard/global.css
Normal file
63
data_esp/dashboard/global.css
Normal file
@@ -0,0 +1,63 @@
|
||||
html, body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgb(0,100,200);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(0,80,160);
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input, button, select, textarea {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
-webkit-padding: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
margin: 0 0 0.5em 0;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
input:disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
button {
|
||||
color: #333;
|
||||
background-color: #f4f4f4;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
button:not(:disabled):active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
border-color: #666;
|
||||
}
|
||||
104
data_esp/dashboard/index.html
Normal file
104
data_esp/dashboard/index.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>LiveControl v 0.3.2</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/dashboard/global.css" />
|
||||
<link rel="stylesheet" href="/dashboard/build/bundle.css" />
|
||||
|
||||
<script defer src="/dashboard/build/bundle.js" onload="loadPage()"></script>
|
||||
<script>
|
||||
function get_cookie ( cookie_name ){
|
||||
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
|
||||
if ( results )
|
||||
return ( unescape ( results[2] ) );
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
if (get_cookie("darktheme") == "true"){
|
||||
var myColor = "#1d3040";
|
||||
document.write('\
|
||||
<style>\
|
||||
body{\
|
||||
background-color: '+myColor+';\
|
||||
}\
|
||||
</style>\
|
||||
');
|
||||
}
|
||||
|
||||
function loadPage() {
|
||||
document.getElementById("status").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.rotate-shadows {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
margin:0 auto;
|
||||
position: relative;
|
||||
}
|
||||
.rotate-shadows:after,
|
||||
.rotate-shadows:before {
|
||||
content: "";
|
||||
border-radius: 150%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-origin: center center;
|
||||
}
|
||||
.rotate-shadows:before {
|
||||
box-shadow: inset 0 20px 0 rgba(0, 250, 250, 0.2),
|
||||
inset 20px 0 0 rgba(0, 200, 200, 0.2),
|
||||
inset 0 -20px 0 rgba(0, 150, 200, 0.2),
|
||||
inset -20px 0 0 rgba(0, 200, 250, 0.2);
|
||||
animation: rotate-before 9s -0.5s linear infinite;
|
||||
}
|
||||
.rotate-shadows:after {
|
||||
box-shadow: inset 0 20px 0 rgba(250, 250, 0, 0.2),
|
||||
inset 20px 0 0 rgba(250, 200, 0, 0.2),
|
||||
inset 0 -20px 0 rgba(250, 150, 0, 0.2),
|
||||
inset -20px 0 0 rgba(250, 100, 0, 0.2);
|
||||
animation: rotate-after 9s -0.5s linear infinite;
|
||||
}
|
||||
@keyframes rotate-after {
|
||||
0% {
|
||||
transform: rotateZ(0deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(180deg) scaleX(0.82) scaleY(0.95);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(360deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
}
|
||||
@keyframes rotate-before {
|
||||
0% {
|
||||
transform: rotateZ(0deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(-180deg) scaleX(0.95) scaleY(0.85);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(-360deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p><div id="status" class="rotate-shadows"></div></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
data_esp/edit.htm.gz
Normal file
BIN
data_esp/edit.htm.gz
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
data_esp/index.json.gz
Normal file
BIN
data_esp/index.json.gz
Normal file
Binary file not shown.
43
data_esp/items/items.txt
Normal file
43
data_esp/items/items.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
0;button-out;btnid;toggleBtn;Кнопки;Освещение;order;gpio*
|
||||
0;button-out;btnid;toggleBtn;Кнопки;Освещение;order;gpio;inv[1]*
|
||||
0;button-out;btnid;toggleBtn;Кнопки;Освещение;order*
|
||||
0;button-in;btnid;toggleBtn;Кнопки;Освещение;order;gpio;db[20]*
|
||||
0;pwm-out;pwmid;range;Ползунки;Яркость;order;gpio*
|
||||
0;input-value;dgtid;inputDigit;Ввод;Введите#цифру;order*
|
||||
0;input-value;tmid;inputTime;Ввод;Введите#время;order*
|
||||
0;output-value;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;pzem;Vltid;anydataVlt;Сенсоры;Напряжение;1;c[1];k[0]
|
||||
0;pzem;Ampid;anydataAmp;Сенсоры;Сила#тока;2;c[1];k[0]
|
||||
0;pzem;Wttid;anydataWtt;Сенсоры;Мощность;3;c[1];k[0]
|
||||
0;pzem;Whrid;anydataWhr;Сенсоры;Энергия;4;c[1];k[0]
|
||||
0;pzem;Htzid;anydataHtz;Сенсоры;Частота;5;c[1];k[0];addr[0xF8];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;impuls-in;impid;anydata;Сенсоры;Количество#импульсов;order;pin[0];c[1];k[0]*
|
||||
0;count-down;cntid;anydata;Таймер;Обратный#отчет;order*
|
||||
0;output-value;txtid;anydata;Вывод;Температура;order*
|
||||
0;logging;crtid;chart;Графики;История;order;val[any];int[60];cnt[100]*
|
||||
0;logging;crtid;chart3;Графики;История;order;val[any];int[23:30];cnt[100];st[0]*
|
||||
0;uptime;uptid;anydataTime;Системные;%name%#uptime;order;int[60]*
|
||||
0;sht20;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
|
||||
0;sht20;humid;anydataHum;Сенсоры;Влажность;2;c[1];int[50]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[HDC1080_temp];addr[0x76]
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[HDC1080_hum];addr[0x76]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[AHTX0_temp];addr[0x76]
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[AHTX0_hum];addr[0x76]*
|
||||
0;sensor;anyid;anydata;Page;Tmp;1;c[0];k[0];int[10];type[LCD];val[any]
|
||||
0;sensor;anyid;anydata;Page;Hum;1;c[8];k[1];int[10];type[LCD];val[any]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[type1];addr[0x76]*
|
||||
BIN
data_esp/js/function.js.gz
Normal file
BIN
data_esp/js/function.js.gz
Normal file
Binary file not shown.
54
data_esp/presets/presets.c.txt
Normal file
54
data_esp/presets/presets.c.txt
Normal file
@@ -0,0 +1,54 @@
|
||||
0;dallas-temp;t1;anydataTemp;Термостат;Температура;1;pin[2];index[0];int[10]
|
||||
0;logging;log1;chart;Термостат;История;2;val[t1];int[60];cnt[100]
|
||||
0;input-value;tUp1;inputDigitTemp;Термостат;Верхний#порог;3
|
||||
0;input-value;tLow1;inputDigitTemp;Термостат;Нижний#порог;4
|
||||
0;button-out;btn1;toggleBtn;Термостат;Нагрев;5;pin[12]*
|
||||
0;dallas-temp;t2;anydataTemp;Главная;Температура;1;pin[2];index[0];int[10]
|
||||
0;logging;log2;chart;Главная;История;2;val[t2];int[10];cnt[100]
|
||||
0;input-value;threshold;inputDigitTemp;Главная;Заданная#температура;3
|
||||
0;button-out;heater2;toggleBtn;Главная;Нагреватель;7;pin[5]
|
||||
0;input-value;time21;inputTimeClock;Расписание;Утренний#период;8
|
||||
0;input-value;threshold1;inputDigitTemp;Расписание;Температура;9
|
||||
0;input-value;time22;inputTimeClock;Расписание;Дневной#период;10
|
||||
0;input-value;threshold2;inputDigitTemp;Расписание;Температура;11
|
||||
0;input-value;time23;inputTimeClock;Расписание;Вечерний#период;12
|
||||
0;input-value;threshold3;inputDigitTemp;Расписание;Температура;13
|
||||
0;input-value;time24;inputTimeClock;Расписание;Ночной#период;14
|
||||
0;input-value;threshold4;inputDigitTemp;Расписание;Температура;15*
|
||||
0;dht;t3;anydataTemp;Теплица;Температура;1;c[1]
|
||||
0;dht;h3;anydataHum;Теплица;Влажность;2;c[1];pin[2];type[dht11];int[10]
|
||||
0;logging;log3;chart;Теплица;История;3;val[h3];int[60];cnt[100]
|
||||
0;input-value;hUp3;inputDigit;Теплица;Верхний#порог;4
|
||||
0;input-value;hLow3;inputDigit;Теплица;Нижний#порог;5
|
||||
0;button-out;btn3;toggleBtn;Теплица;Полив;6;pin[12]*
|
||||
0;button-out;btn41;toggleBtn;Реле;Реле1;1;pin[12]
|
||||
0;input-value;time41;inputTimeClock;Реле;Введите#время#включения;2
|
||||
0;button-out;btn42;toggleBtn;Реле;Реле2;3;pin[13]
|
||||
0;input-value;time42;inputTimeClock;Реле;Введите#время#выключения;4*
|
||||
0;button-out;btn51;toggleBtn;Сценарии;Выключить#все;1
|
||||
0;button-out;btn52;toggleBtn;Сценарии;Гостинная;2;pin[12]
|
||||
0;button-out;btn53;toggleBtn;Сценарии;Спальня;3;pin[13]
|
||||
0;button-out;btn54;toggleBtn;Сценарии;Прихожая;4;pin[14]
|
||||
0;pwm-out;pwm51;range;Сценарии;Яркость;5;pin[15]
|
||||
0;pwm-out;pwm52;range;Сценарии;Яркость;6;pin[16]
|
||||
0;output-value;txt5;anydata;Сценарии;Статус;7*
|
||||
0;button-out;btn6;toggleBtn;Таймер;Освещение;1;pin[12]
|
||||
0;count-down;cnt6;anydata;Таймер;Обратный#отчет;2
|
||||
0;input-value;sec6;inputDigit;Таймер;Введите#цифру;3*
|
||||
0;button-out;start;toggleBtn;Цикл;Запустить#цикл;1
|
||||
0;count-down;cnt71;anydata;Цикл;Осталось#секунд;3
|
||||
0;input-value;sec71;inputDigit;Цикл;Период#включения;4
|
||||
0;count-down;cnt72;anydata;Цикл;Осталось#секунд;5
|
||||
0;input-value;sec72;inputDigit;Цикл;Период#выключения;6
|
||||
0;button-out;btn7;toggleBtn;Цикл;Реле;7;pin[12]*
|
||||
0;output-value;txt81;anydataAlarm;Сигнализация;Движение:;1
|
||||
0;output-value;txt82;anydataTime;Сигнализация;Время:;2
|
||||
0;button-in;sens8;na;na;na;3;pin[0];db[20]
|
||||
0;button-out;rst8;toggleBtn;Сигнализация;Сбросить;4
|
||||
0;button-out;on8;toggleBtn;Сигнализация;Включить;5*
|
||||
0;button-in;sens9;na;na;na;1;pin[0];db[20]
|
||||
0;button-out;btn9;toggleBtn;Освещение;Освещение;2;pin[13]
|
||||
0;count-down;cnt9;anydata;Освещение;Обратный#отчет;3
|
||||
0;input-value;sec9;inputDigit;Освещение;Период#включения;4*
|
||||
0;button-out;btn10;toggleBtn;Кнопки;Освещение;1;pin[13]
|
||||
0;button-in;sw10;na;na;na;2;pin[0];db[20]*
|
||||
105
data_esp/presets/presets.s.txt
Normal file
105
data_esp/presets/presets.s.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
t1 > tUp1
|
||||
btn1 0
|
||||
telegram msg1 нагрев#выключен
|
||||
end
|
||||
t1 < tLow1
|
||||
btn1 1
|
||||
telegram msg1 нагрев#включен
|
||||
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
|
||||
btn3 0
|
||||
telegram msg3 полив#выключен
|
||||
end
|
||||
h3 < hLow3
|
||||
btn3 1
|
||||
telegram msg3 полив#включен
|
||||
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
|
||||
pwm51 > 900 && pwm52 > 900
|
||||
btn52 0
|
||||
btn53 0
|
||||
btn54 0
|
||||
end*
|
||||
btn6 = 1
|
||||
cnt6 sec6
|
||||
end
|
||||
cnt6 = 0
|
||||
btn6 0
|
||||
end*
|
||||
start = 1
|
||||
cnt71 sec71
|
||||
btn7 1
|
||||
end
|
||||
cnt71 = 0
|
||||
btn7 0
|
||||
cnt72 sec72
|
||||
end
|
||||
cnt72 = 0
|
||||
btn7 1
|
||||
cnt71 sec71
|
||||
end
|
||||
start = 0
|
||||
cnt71 0
|
||||
cnt72 0
|
||||
end*
|
||||
sens8 = 1 && on8 = 1
|
||||
txt81 обнаружено
|
||||
txt82 %date%
|
||||
telegram often Обнаружено#движение
|
||||
end
|
||||
rst8 = 1
|
||||
txt81 не#обнаружено
|
||||
txt82 %date%
|
||||
rst8 0
|
||||
end*
|
||||
sens9 = 1
|
||||
btn9 1
|
||||
cnt9 sec9
|
||||
end
|
||||
cnt9 = 0
|
||||
btn9 0
|
||||
end*
|
||||
sw10 = 1
|
||||
btn10 change
|
||||
end*
|
||||
5
data_esp/s.conf.csv
Normal file
5
data_esp/s.conf.csv
Normal file
@@ -0,0 +1,5 @@
|
||||
Удалить;Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета
|
||||
0;uptime;upt;anydataTime;IoTManager;%name%#uptime;8;int[60]
|
||||
0;output-value;ip;anydata;IoTManager;IP;9
|
||||
0;output-value;time;anydata;IoTManager;Время#на#устройстве;10
|
||||
0;output-value;weekday;anydata;IoTManager;День#недели#на#устройстве ;11
|
||||
|
5
data_esp/s.scen.txt
Normal file
5
data_esp/s.scen.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
timenow > 0
|
||||
weekday %weekday%
|
||||
ip %IP%
|
||||
time %date%
|
||||
end
|
||||
BIN
data_esp/set.developer.json.gz
Normal file
BIN
data_esp/set.developer.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.device.json.gz
Normal file
BIN
data_esp/set.device.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.manual.json.gz
Normal file
BIN
data_esp/set.manual.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.mqtt.json.gz
Normal file
BIN
data_esp/set.mqtt.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.telegram.json.gz
Normal file
BIN
data_esp/set.telegram.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.udp.json.gz
Normal file
BIN
data_esp/set.udp.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.utilities.json.gz
Normal file
BIN
data_esp/set.utilities.json.gz
Normal file
Binary file not shown.
BIN
data_esp/set.wifi.json.gz
Normal file
BIN
data_esp/set.wifi.json.gz
Normal file
Binary file not shown.
1
data_esp/setup/build/bundle.css
Normal file
1
data_esp/setup/build/bundle.css
Normal file
@@ -0,0 +1 @@
|
||||
.letter.svelte-1ls9om6{color:grey;font-size:60%;padding-left:0px;opacity:0.5}table.svelte-1ls9om6{margin:0px;background-color:#fafafa;line-height:1}td.svelte-1ls9om6{text-align:left;padding-left:1px}input[type="text"].svelte-1ls9om6{width:100%;padding:10px;border:1;box-shadow:0 0 15px 10px rgba(0, 0, 0, 0.06);border-radius:1px}.letter1.svelte-1ls9om6{color:grey;font-size:80%;padding-left:20px}.letter2.svelte-1ls9om6{text-align:left;padding-left:0px}select.svelte-1ls9om6{padding:10px;border-radius:10px;padding-left:20px;height:40px;font-size:13px}input[type="password"].svelte-1ls9om6{width:100%;padding:10px;border:1;box-shadow:0 0 15px 10px rgba(0, 0, 0, 0.06);border-radius:1px}input.svelte-1ls9om6:required:invalid:not(:placeholder-shown){border-color:crimson}.red.svelte-1ls9om6{border-color:crimson}progress.svelte-1ls9om6{height:4px}textarea.svelte-1ls9om6{width:100%}button.svelte-1ls9om6{height:30px;border-radius:4px;line-height:0}body.light-mode{background-color:white}body.dark-mode{background-color:#1d3040;color:#bfc2c7}body.dark-mode textarea.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode input.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode select.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode button.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode div.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode span.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}.Shutter.svelte-1ls9om6{background-color:hsl(200, 16%, 96%);color:blak;padding:10px;border-radius:5px}body.dark-mode .Shutter.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7;padding:10px;border-radius:5px}body.dark-mode table.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}body.dark-mode .letter1.svelte-1ls9om6{color:#bfc2c7}body.dark-mode .letter2.svelte-1ls9om6{color:#bfc2c7}body.dark-mode b.svelte-1ls9om6{color:#bfc2c7}body.dark-mode button.svelte-1ls9om6{background-color:#1d3040;color:#bfc2c7}h5.svelte-1ls9om6{display:inline}.box.svelte-hp9es9{width:93%;border:1px solid #aaa;border-radius:10px;box-shadow:10px 10px 8px rgba(0, 0, 0, 0.1);padding:1em;margin:0 0 1em 0}.tooltip.svelte-1vepdvs{border:1px solid #ddd;box-shadow:1px 1px 1px #ddd;background:rgb(185, 238, 241);border-radius:4px;padding:4px;position:absolute;color:black}.modal-background.svelte-10j5cq5{position:fixed;top:0;left:0;width:100%;height:100%;background:gray;opacity:0.8}.modal.svelte-10j5cq5{position:absolute;left:50%;top:50%;width:calc(100vw - 4em);max-width:32em;max-height:calc(100vh - 4em);overflow:auto;transform:translate(-50%, -50%);padding:1em;border-radius:0.2em;background:white}button.svelte-10j5cq5{display:block}.rotate-shadows.svelte-tks6xu{width:220px;height:220px;position:relative}.rotate-shadows.svelte-tks6xu:after,.rotate-shadows.svelte-tks6xu:before{content:"";border-radius:150%;position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:center center}.rotate-shadows.svelte-tks6xu:before{box-shadow:inset 0 20px 0 rgba(0, 250, 250, 0.2), inset 20px 0 0 rgba(0, 200, 200, 0.2), inset 0 -20px 0 rgba(0, 150, 200, 0.2), inset -20px 0 0 rgba(0, 200, 250, 0.2);animation:svelte-tks6xu-rotate-before 9s -0.5s linear infinite}.rotate-shadows.svelte-tks6xu:after{box-shadow:inset 0 20px 0 rgba(250, 250, 0, 0.2), inset 20px 0 0 rgba(250, 200, 0, 0.2), inset 0 -20px 0 rgba(250, 150, 0, 0.2), inset -20px 0 0 rgba(250, 100, 0, 0.2);animation:svelte-tks6xu-rotate-after 9s -0.5s linear infinite}@keyframes svelte-tks6xu-rotate-after{0%{transform:rotateZ(0deg) scaleX(1) scaleY(1)}50%{transform:rotateZ(180deg) scaleX(0.82) scaleY(0.95)}100%{transform:rotateZ(360deg) scaleX(1) scaleY(1)}}@keyframes svelte-tks6xu-rotate-before{0%{transform:rotateZ(0deg) scaleX(1) scaleY(1)}50%{transform:rotateZ(-180deg) scaleX(0.95) scaleY(0.85)}100%{transform:rotateZ(-360deg) scaleX(1) scaleY(1)}}
|
||||
BIN
data_esp/setup/build/bundle.js.gz
Normal file
BIN
data_esp/setup/build/bundle.js.gz
Normal file
Binary file not shown.
63
data_esp/setup/global.css
Normal file
63
data_esp/setup/global.css
Normal file
@@ -0,0 +1,63 @@
|
||||
html, body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgb(0,100,200);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(0,80,160);
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input, button, select, textarea {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
-webkit-padding: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
margin: 0 0 0.5em 0;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
input:disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
button {
|
||||
color: #333;
|
||||
background-color: #f4f4f4;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
button:not(:disabled):active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
border-color: #666;
|
||||
}
|
||||
103
data_esp/setup/index.html
Normal file
103
data_esp/setup/index.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>IotManager v 0.3.2</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/setup/global.css" />
|
||||
<link rel="stylesheet" href="/setup/build/bundle.css?0.3" />
|
||||
|
||||
<script defer src="/setup/build/bundle.js?0.3" onload="loadPage()"></script>
|
||||
<script>
|
||||
function get_cookie ( cookie_name ){
|
||||
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
|
||||
if ( results )
|
||||
return ( unescape ( results[2] ) );
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
if (get_cookie("darktheme") == "true"){
|
||||
var myColor = "#1d3040";
|
||||
document.write('\
|
||||
<style>\
|
||||
body{\
|
||||
background-color: '+myColor+';\
|
||||
}\
|
||||
</style>\
|
||||
');
|
||||
}
|
||||
|
||||
function loadPage() {
|
||||
document.getElementById("status").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.rotate-shadows {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
margin:0 auto;
|
||||
position: relative;
|
||||
}
|
||||
.rotate-shadows:after,
|
||||
.rotate-shadows:before {
|
||||
content: "";
|
||||
border-radius: 150%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-origin: center center;
|
||||
}
|
||||
.rotate-shadows:before {
|
||||
box-shadow: inset 0 20px 0 rgba(0, 250, 250, 0.2),
|
||||
inset 20px 0 0 rgba(0, 200, 200, 0.2),
|
||||
inset 0 -20px 0 rgba(0, 150, 200, 0.2),
|
||||
inset -20px 0 0 rgba(0, 200, 250, 0.2);
|
||||
animation: rotate-before 9s -0.5s linear infinite;
|
||||
}
|
||||
.rotate-shadows:after {
|
||||
box-shadow: inset 0 20px 0 rgba(250, 250, 0, 0.2),
|
||||
inset 20px 0 0 rgba(250, 200, 0, 0.2),
|
||||
inset 0 -20px 0 rgba(250, 150, 0, 0.2),
|
||||
inset -20px 0 0 rgba(250, 100, 0, 0.2);
|
||||
animation: rotate-after 9s -0.5s linear infinite;
|
||||
}
|
||||
@keyframes rotate-after {
|
||||
0% {
|
||||
transform: rotateZ(0deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(180deg) scaleX(0.82) scaleY(0.95);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(360deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
}
|
||||
@keyframes rotate-before {
|
||||
0% {
|
||||
transform: rotateZ(0deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(-180deg) scaleX(0.95) scaleY(0.85);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(-360deg) scaleX(1) scaleY(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p><div id="status" class="rotate-shadows"></div></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
data_esp/setup/progress.gif
Normal file
BIN
data_esp/setup/progress.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
35
data_esp/widgets.json
Normal file
35
data_esp/widgets.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"undef": "Ошибка",
|
||||
"toggleBtn": "Переключатель",
|
||||
"btn": "Кнопка",
|
||||
"select": "Кнопка переключатель",
|
||||
"range": "Ползунок",
|
||||
"inputDate": "Окно ввода даты",
|
||||
"inputTime": "Окно ввода времени 1",
|
||||
"inputTimeClock": "Окно ввода времени 2",
|
||||
"inputDigit": "Окно ввода цифры",
|
||||
"inputDigitTemp": "Окно ввода температуры",
|
||||
"inputText": "Окно ввода текста",
|
||||
"chart": "График без точек",
|
||||
"chart2": "График с точками",
|
||||
"chart3": "График дневного расхода (столбики)",
|
||||
"chart4": "График дневного расхода (плавный)",
|
||||
"fillgauge": "Бочка",
|
||||
"progress-line": "Линия",
|
||||
"progress-round": "Круг",
|
||||
"anydata": "Текст",
|
||||
"anydataHum": "Влажность (%)",
|
||||
"anydataPress": "Давление (mm)",
|
||||
"anydataTemp": "Температура (°С)",
|
||||
"anydataPpb": "Части на миллиард (ppb)",
|
||||
"anydataPpm": "Части на миллион (ppm)",
|
||||
"anydataVlt": "Напряжение (Vlt)",
|
||||
"anydataAmp": "Сила тока (Amp)",
|
||||
"anydataWtt": "Мощность (Wtt)",
|
||||
"anydataWhr": "Энергия (Whr)",
|
||||
"anydataHtz": "Частота (Htz)",
|
||||
"anydataTime": "Манометр",
|
||||
"alarm": "Тревожное сообщение 1",
|
||||
"anydataAlarm": "Тревожное сообщение 2",
|
||||
"na": "Без виджета"
|
||||
}
|
||||
6
data_esp/widgets/anydataAlarm.json
Normal file
6
data_esp/widgets/anydataAlarm.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "",
|
||||
"color":"red",
|
||||
"icon": "walk"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "",
|
||||
"after": "Amp",
|
||||
"icon": "speedometer"
|
||||
}
|
||||
5
data_esp/widgets/anydataHtz.json
Normal file
5
data_esp/widgets/anydataHtz.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "Htz",
|
||||
"icon": "speedometer"
|
||||
}
|
||||
6
data_esp/widgets/anydataHum.json
Normal file
6
data_esp/widgets/anydataHum.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "%",
|
||||
"icon": "water",
|
||||
"color": "#88AADF"
|
||||
}
|
||||
5
data_esp/widgets/anydataPpb.json
Normal file
5
data_esp/widgets/anydataPpb.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "ppb",
|
||||
"icon": "body"
|
||||
}
|
||||
5
data_esp/widgets/anydataPpm.json
Normal file
5
data_esp/widgets/anydataPpm.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "ppm",
|
||||
"icon": "body"
|
||||
}
|
||||
16
data_esp/widgets/anydataTemp.json
Normal file
16
data_esp/widgets/anydataTemp.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "°С",
|
||||
"icon": "thermometer",
|
||||
"font": "OCR A Std",
|
||||
"color": [
|
||||
{ "level": -20, "value": "#0000CC" },
|
||||
{ "level": -10, "value": "#0000CC" },
|
||||
{ "level": 0, "value": "#0000CC" },
|
||||
{ "level": 12, "value": "#3366FF" },
|
||||
{ "level": 16, "value": "#33CCFF" },
|
||||
{ "level": 18, "value": "#009933" },
|
||||
{ "level": 30, "value": "#FF9900" },
|
||||
{ "level": 40, "value": "red" }
|
||||
]
|
||||
}
|
||||
5
data_esp/widgets/anydataTime.json
Normal file
5
data_esp/widgets/anydataTime.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "",
|
||||
"icon": "speedometer"
|
||||
}
|
||||
5
data_esp/widgets/anydataVlt.json
Normal file
5
data_esp/widgets/anydataVlt.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "Vlt",
|
||||
"icon": "speedometer"
|
||||
}
|
||||
5
data_esp/widgets/anydataWhr.json
Normal file
5
data_esp/widgets/anydataWhr.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"widget": "anydata",
|
||||
"after": "Whr",
|
||||
"icon": "speedometer"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user