mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Merge pull request #11 from biveraxe/ver4dev
слито с основы, обновление веб
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
# поддерживаемые контроллеры (профили):
|
# поддерживаемые контроллеры (профили):
|
||||||
# esp8266_4mb
|
# esp8266_4mb
|
||||||
# esp32_4mb
|
# esp32_4mb
|
||||||
|
# esp32s2_4mb
|
||||||
# esp8266_1mb
|
# esp8266_1mb
|
||||||
# esp8266_1mb_ota
|
# esp8266_1mb_ota
|
||||||
# esp8285_1mb
|
# esp8285_1mb
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
# esp8266_2mb
|
# esp8266_2mb
|
||||||
# esp8266_2mb_ota
|
# esp8266_2mb_ota
|
||||||
|
|
||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import os, json, sys, getopt
|
import os, json, sys, getopt
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -4,12 +4,12 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
|
||||||
<title>IoT Manager 4.4.6</title>
|
<title>IoT Manager 4.5.0</title>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/build/bundle.css?446" />
|
<link rel="stylesheet" href="/build/bundle.css?450" />
|
||||||
|
|
||||||
<script defer src="/build/bundle.js?446"></script>
|
<script defer src="/build/bundle.js?450"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|||||||
@@ -192,7 +192,19 @@
|
|||||||
"header": "Сенсоры"
|
"header": "Сенсоры"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "13. Acs712 Ток",
|
"name": "13. A02 Дальность",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "A02Distance",
|
||||||
|
"id": "dist",
|
||||||
|
"widget": "anydataCm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "Дальность",
|
||||||
|
"int": 5,
|
||||||
|
"round": 1,
|
||||||
|
"num": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "14. Acs712 Ток",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Acs712",
|
"subtype": "Acs712",
|
||||||
"id": "amp",
|
"id": "amp",
|
||||||
@@ -207,11 +219,11 @@
|
|||||||
"sens": 100,
|
"sens": 100,
|
||||||
"adczero": 512,
|
"adczero": 512,
|
||||||
"btn-setZero": "nil",
|
"btn-setZero": "nil",
|
||||||
"num": 13
|
"num": 14
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "14. AHTXX Температура",
|
"name": "15. AHTXX Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "AhtXXt",
|
"subtype": "AhtXXt",
|
||||||
"id": "Temp20",
|
"id": "Temp20",
|
||||||
@@ -222,11 +234,11 @@
|
|||||||
"addr": "0x38",
|
"addr": "0x38",
|
||||||
"shtType": 1,
|
"shtType": 1,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 14
|
"num": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "15. AHTXX Влажность",
|
"name": "16. AHTXX Влажность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "AhtXXh",
|
"subtype": "AhtXXh",
|
||||||
"id": "Hum20",
|
"id": "Hum20",
|
||||||
@@ -237,11 +249,11 @@
|
|||||||
"addr": "0x38",
|
"addr": "0x38",
|
||||||
"shtType": 1,
|
"shtType": 1,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 15
|
"num": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "16. Аналоговый сенсор",
|
"name": "17. Аналоговый сенсор",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "AnalogAdc",
|
"subtype": "AnalogAdc",
|
||||||
"id": "t",
|
"id": "t",
|
||||||
@@ -255,11 +267,11 @@
|
|||||||
"pin": 0,
|
"pin": 0,
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"avgSteps": 1,
|
"avgSteps": 1,
|
||||||
"num": 16
|
"num": 17
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "17. BME280 Температура",
|
"name": "18. BME280 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bme280t",
|
"subtype": "Bme280t",
|
||||||
"id": "Tmp3",
|
"id": "Tmp3",
|
||||||
@@ -269,11 +281,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 17
|
"num": 18
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "18. BME280 Давление",
|
"name": "19. BME280 Давление",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bme280p",
|
"subtype": "Bme280p",
|
||||||
"id": "Press3",
|
"id": "Press3",
|
||||||
@@ -283,11 +295,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 18
|
"num": 19
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "19. BME280 Влажность",
|
"name": "20. BME280 Влажность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bme280h",
|
"subtype": "Bme280h",
|
||||||
"id": "Hum3",
|
"id": "Hum3",
|
||||||
@@ -297,11 +309,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 19
|
"num": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "20. BME280 Tочка росы",
|
"name": "21. BME280 Tочка росы",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bme280dp",
|
"subtype": "Bme280dp",
|
||||||
"id": "Dew3",
|
"id": "Dew3",
|
||||||
@@ -311,11 +323,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 20
|
"num": 21
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "21. BMP280 Температура",
|
"name": "22. BMP280 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bmp280t",
|
"subtype": "Bmp280t",
|
||||||
"id": "tmp3",
|
"id": "tmp3",
|
||||||
@@ -325,11 +337,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 21
|
"num": 22
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "22. BMP280 Давление",
|
"name": "23. BMP280 Давление",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Bmp280p",
|
"subtype": "Bmp280p",
|
||||||
"id": "Press3",
|
"id": "Press3",
|
||||||
@@ -339,11 +351,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0x77",
|
"addr": "0x77",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 22
|
"num": 23
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "23. DHT11 Температура",
|
"name": "24. DHT11 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Dht1122t",
|
"subtype": "Dht1122t",
|
||||||
"id": "tmp3",
|
"id": "tmp3",
|
||||||
@@ -353,11 +365,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"pin": 0,
|
"pin": 0,
|
||||||
"senstype": "dht11",
|
"senstype": "dht11",
|
||||||
"num": 23
|
"num": 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "24. DHT11 Влажность",
|
"name": "25. DHT11 Влажность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Dht1122h",
|
"subtype": "Dht1122h",
|
||||||
"id": "Hum3",
|
"id": "Hum3",
|
||||||
@@ -367,11 +379,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"pin": 0,
|
"pin": 0,
|
||||||
"senstype": "dht11",
|
"senstype": "dht11",
|
||||||
"num": 24
|
"num": 25
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "25. DS18B20 Температура",
|
"name": "26. DS18B20 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Ds18b20",
|
"subtype": "Ds18b20",
|
||||||
"id": "dstmp",
|
"id": "dstmp",
|
||||||
@@ -383,11 +395,49 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"addr": "",
|
"addr": "",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 25
|
"num": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "26. Аналоговый счетчик импульсов",
|
"name": "27. DS2423 счетчик 1",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ds2423a",
|
||||||
|
"id": "dscounta",
|
||||||
|
"widget": "anydataDef",
|
||||||
|
"page": "Счетчики",
|
||||||
|
"descr": "DS1 V",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"pin": 4,
|
||||||
|
"index": 0,
|
||||||
|
"addr": "",
|
||||||
|
"int": 10,
|
||||||
|
"round": 0,
|
||||||
|
"needSave": 0,
|
||||||
|
"num": 27
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "28. DS2423 счетчик 2",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ds2423b",
|
||||||
|
"id": "dscountb",
|
||||||
|
"widget": "anydataDef",
|
||||||
|
"page": "Счетчики",
|
||||||
|
"descr": "DS2 V",
|
||||||
|
"plus": 0,
|
||||||
|
"multiply": 1,
|
||||||
|
"pin": 4,
|
||||||
|
"index": 0,
|
||||||
|
"addr": "",
|
||||||
|
"int": 10,
|
||||||
|
"round": 0,
|
||||||
|
"needSave": 0,
|
||||||
|
"num": 28
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "29. Аналоговый счетчик импульсов",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "Impulse",
|
"subtype": "Impulse",
|
||||||
"id": "impulse",
|
"id": "impulse",
|
||||||
@@ -400,11 +450,32 @@
|
|||||||
"pinMode": "INPUT",
|
"pinMode": "INPUT",
|
||||||
"debounceDelay": 3,
|
"debounceDelay": 3,
|
||||||
"multiply": 1,
|
"multiply": 1,
|
||||||
"num": 26
|
"num": 29
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "27. PZEM 004t Напряжение",
|
"name": "30. Cенсор температуры NTC",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Ntc",
|
||||||
|
"id": "Ntctmp",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "NTC Температура",
|
||||||
|
"needSave": 0,
|
||||||
|
"val": "0",
|
||||||
|
"int": 15,
|
||||||
|
"pin": "35",
|
||||||
|
"R1": "10000",
|
||||||
|
"R0": "10000",
|
||||||
|
"Beta": "3950.0",
|
||||||
|
"T0": "25",
|
||||||
|
"Vs": "3.3",
|
||||||
|
"round": 1,
|
||||||
|
"num": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "31. PZEM 004t Напряжение",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004v",
|
"subtype": "Pzem004v",
|
||||||
"id": "v",
|
"id": "v",
|
||||||
@@ -414,11 +485,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 27
|
"num": 31
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "28. PZEM 004t Сила тока",
|
"name": "32. PZEM 004t Сила тока",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004a",
|
"subtype": "Pzem004a",
|
||||||
"id": "a",
|
"id": "a",
|
||||||
@@ -428,11 +499,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 28
|
"num": 32
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "29. PZEM 004t Мощность",
|
"name": "33. PZEM 004t Мощность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004w",
|
"subtype": "Pzem004w",
|
||||||
"id": "w",
|
"id": "w",
|
||||||
@@ -442,11 +513,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 29
|
"num": 33
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "30. PZEM 004t Энергия",
|
"name": "34. PZEM 004t Энергия",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004wh",
|
"subtype": "Pzem004wh",
|
||||||
"id": "wh",
|
"id": "wh",
|
||||||
@@ -456,11 +527,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 30
|
"num": 34
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "31. PZEM 004t Частота",
|
"name": "35. PZEM 004t Частота",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004hz",
|
"subtype": "Pzem004hz",
|
||||||
"id": "hz",
|
"id": "hz",
|
||||||
@@ -470,11 +541,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 31
|
"num": 35
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "32. PZEM 004t Косинус",
|
"name": "36. PZEM 004t Косинус",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004pf",
|
"subtype": "Pzem004pf",
|
||||||
"id": "pf",
|
"id": "pf",
|
||||||
@@ -484,11 +555,11 @@
|
|||||||
"int": 15,
|
"int": 15,
|
||||||
"addr": "0xF8",
|
"addr": "0xF8",
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 32
|
"num": 36
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "33. PZEM настройка",
|
"name": "37. PZEM настройка",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pzem004cmd",
|
"subtype": "Pzem004cmd",
|
||||||
"id": "set",
|
"id": "set",
|
||||||
@@ -500,11 +571,11 @@
|
|||||||
"changeaddr": 0,
|
"changeaddr": 0,
|
||||||
"setaddr": "0x01",
|
"setaddr": "0x01",
|
||||||
"reset": 0,
|
"reset": 0,
|
||||||
"num": 33
|
"num": 37
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "34. Часы реального времени",
|
"name": "38. Часы реального времени",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "RTC",
|
"subtype": "RTC",
|
||||||
"id": "rtc",
|
"id": "rtc",
|
||||||
@@ -520,11 +591,11 @@
|
|||||||
"int": 5,
|
"int": 5,
|
||||||
"btn-setUTime": "0",
|
"btn-setUTime": "0",
|
||||||
"btn-setSysTime": "nil",
|
"btn-setSysTime": "nil",
|
||||||
"num": 34
|
"num": 38
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "35. (S8) Cенсор качества воздуха",
|
"name": "39. (S8) Cенсор качества воздуха",
|
||||||
"num": 35,
|
"num": 39,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "S8co",
|
"subtype": "S8co",
|
||||||
"id": "s8co",
|
"id": "s8co",
|
||||||
@@ -538,7 +609,50 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "36. Sht20 Температура",
|
"name": "40. SCD40 Углекислый газ",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Scd40co2",
|
||||||
|
"id": "Scd40co2",
|
||||||
|
"widget": "anydataPpm",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "SCD40 Углекислый газ",
|
||||||
|
"int": 15,
|
||||||
|
"round": 0,
|
||||||
|
"lowPeriodic": 1,
|
||||||
|
"autoCalibration": 1,
|
||||||
|
"btn-Recalibration": 0,
|
||||||
|
"num": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "41. SCD40 Влажность",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Scd40h",
|
||||||
|
"id": "Scd40h",
|
||||||
|
"widget": "anydataHum",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "SCD40 Влажность",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1,
|
||||||
|
"num": 41
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "42. SCD40 Температура",
|
||||||
|
"type": "Reading",
|
||||||
|
"subtype": "Scd40t",
|
||||||
|
"id": "Scd40t",
|
||||||
|
"widget": "anydataTmp",
|
||||||
|
"page": "Сенсоры",
|
||||||
|
"descr": "SCD40 Температура",
|
||||||
|
"int": 15,
|
||||||
|
"round": 1,
|
||||||
|
"offset": 4,
|
||||||
|
"num": 42
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global": 0,
|
||||||
|
"name": "43. Sht20 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Sht20t",
|
"subtype": "Sht20t",
|
||||||
"id": "tmp2",
|
"id": "tmp2",
|
||||||
@@ -547,11 +661,11 @@
|
|||||||
"descr": "Температура",
|
"descr": "Температура",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 36
|
"num": 43
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "37. Sht20 Влажность",
|
"name": "44. Sht20 Влажность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Sht20h",
|
"subtype": "Sht20h",
|
||||||
"id": "Hum2",
|
"id": "Hum2",
|
||||||
@@ -560,11 +674,11 @@
|
|||||||
"descr": "Влажность",
|
"descr": "Влажность",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 37
|
"num": 44
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "38. Sht30 Температура",
|
"name": "45. Sht30 Температура",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Sht30t",
|
"subtype": "Sht30t",
|
||||||
"id": "tmp30",
|
"id": "tmp30",
|
||||||
@@ -573,11 +687,11 @@
|
|||||||
"descr": "SHT30 Температура",
|
"descr": "SHT30 Температура",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 38
|
"num": 45
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "39. Sht30 Влажность",
|
"name": "46. Sht30 Влажность",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Sht30h",
|
"subtype": "Sht30h",
|
||||||
"id": "Hum30",
|
"id": "Hum30",
|
||||||
@@ -586,12 +700,12 @@
|
|||||||
"descr": "SHT30 Влажность",
|
"descr": "SHT30 Влажность",
|
||||||
"int": 15,
|
"int": 15,
|
||||||
"round": 1,
|
"round": 1,
|
||||||
"num": 39
|
"num": 46
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "40. HC-SR04 Ультразвуковой дальномер",
|
"name": "47. HC-SR04 Ультразвуковой дальномер",
|
||||||
"num": 40,
|
"num": 47,
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Sonar",
|
"subtype": "Sonar",
|
||||||
"id": "sonar",
|
"id": "sonar",
|
||||||
@@ -603,7 +717,7 @@
|
|||||||
"int": 5
|
"int": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "41. UART",
|
"name": "48. UART",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "UART",
|
"subtype": "UART",
|
||||||
"page": "",
|
"page": "",
|
||||||
@@ -615,14 +729,14 @@
|
|||||||
"line": 2,
|
"line": 2,
|
||||||
"speed": 9600,
|
"speed": 9600,
|
||||||
"eventFormat": 0,
|
"eventFormat": 0,
|
||||||
"num": 41
|
"num": 48
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": "Исполнительные устройства"
|
"header": "Исполнительные устройства"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "42. Кнопка подключенная к пину",
|
"name": "49. Кнопка подключенная к пину",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "ButtonIn",
|
"subtype": "ButtonIn",
|
||||||
"id": "btn",
|
"id": "btn",
|
||||||
@@ -637,11 +751,11 @@
|
|||||||
"debounceDelay": 50,
|
"debounceDelay": 50,
|
||||||
"fixState": 0,
|
"fixState": 0,
|
||||||
"inv": 0,
|
"inv": 0,
|
||||||
"num": 42
|
"num": 49
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "43. Управление пином",
|
"name": "50. Управление пином",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "ButtonOut",
|
"subtype": "ButtonOut",
|
||||||
"needSave": 0,
|
"needSave": 0,
|
||||||
@@ -652,11 +766,11 @@
|
|||||||
"int": 0,
|
"int": 0,
|
||||||
"inv": 0,
|
"inv": 0,
|
||||||
"pin": 2,
|
"pin": 2,
|
||||||
"num": 43
|
"num": 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "44. Пассивный звуковой извещатель",
|
"name": "51. Пассивный звуковой извещатель",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "Buzzer",
|
"subtype": "Buzzer",
|
||||||
"id": "buzzer",
|
"id": "buzzer",
|
||||||
@@ -675,11 +789,11 @@
|
|||||||
"cycle": 0,
|
"cycle": 0,
|
||||||
"indication": 1,
|
"indication": 1,
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"num": 44
|
"num": 51
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "45. Энкодер",
|
"name": "52. Энкодер",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "Encoder",
|
"subtype": "Encoder",
|
||||||
"id": "enc",
|
"id": "enc",
|
||||||
@@ -692,11 +806,11 @@
|
|||||||
"step": 1,
|
"step": 1,
|
||||||
"stepOnPress": 5,
|
"stepOnPress": 5,
|
||||||
"pins": "4,5,2",
|
"pins": "4,5,2",
|
||||||
"num": 45
|
"num": 52
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "46. Сервопривод",
|
"name": "53. Сервопривод",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "IoTServo",
|
"subtype": "IoTServo",
|
||||||
"id": "servo",
|
"id": "servo",
|
||||||
@@ -707,11 +821,11 @@
|
|||||||
"pin": 12,
|
"pin": 12,
|
||||||
"apin": -1,
|
"apin": -1,
|
||||||
"amap": "0, 4096, 0, 180",
|
"amap": "0, 4096, 0, 180",
|
||||||
"num": 46
|
"num": 53
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "47. Расширитель портов Mcp23017",
|
"name": "54. Расширитель портов Mcp23017",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mcp23017",
|
"subtype": "Mcp23017",
|
||||||
"id": "Mcp",
|
"id": "Mcp",
|
||||||
@@ -721,11 +835,11 @@
|
|||||||
"int": "0",
|
"int": "0",
|
||||||
"addr": "0x20",
|
"addr": "0x20",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"num": 47
|
"num": 54
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "48. MP3 плеер",
|
"name": "55. MP3 плеер",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Mp3",
|
"subtype": "Mp3",
|
||||||
"id": "mp3",
|
"id": "mp3",
|
||||||
@@ -735,11 +849,11 @@
|
|||||||
"int": 1,
|
"int": 1,
|
||||||
"pins": "14,12",
|
"pins": "14,12",
|
||||||
"volume": 20,
|
"volume": 20,
|
||||||
"num": 48
|
"num": 55
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "49. Сенсорная кнопка",
|
"name": "56. Сенсорная кнопка",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "Multitouch",
|
"subtype": "Multitouch",
|
||||||
"id": "impulse",
|
"id": "impulse",
|
||||||
@@ -753,11 +867,11 @@
|
|||||||
"pinMode": "INPUT",
|
"pinMode": "INPUT",
|
||||||
"debounceDelay": 50,
|
"debounceDelay": 50,
|
||||||
"PWMDelay": 500,
|
"PWMDelay": 500,
|
||||||
"num": 49
|
"num": 56
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "50. Расширитель портов Pcf8574",
|
"name": "57. Расширитель портов Pcf8574",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Pcf8574",
|
"subtype": "Pcf8574",
|
||||||
"id": "Pcf",
|
"id": "Pcf",
|
||||||
@@ -767,29 +881,27 @@
|
|||||||
"int": "0",
|
"int": "0",
|
||||||
"addr": "0x20",
|
"addr": "0x20",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"num": 50
|
"num": 57
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "51. PWM ESP32",
|
"name": "58. PWM ESP8266",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "Pwm32",
|
"subtype": "Pwm8266",
|
||||||
"id": "pwm",
|
"id": "pwm",
|
||||||
"widget": "range",
|
"widget": "range",
|
||||||
"page": "Кнопки",
|
"page": "Кнопки",
|
||||||
"descr": "PWM",
|
"descr": "PWM",
|
||||||
"int": 0,
|
"int": 0,
|
||||||
"pin": 2,
|
"pin": 15,
|
||||||
"freq": 5000,
|
"freq": 5000,
|
||||||
"ledChannel": 2,
|
|
||||||
"PWM_resolution": 10,
|
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"apin": -1,
|
"apin": -1,
|
||||||
"num": 51
|
"num": 58
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "52. Телеграм-Лайт",
|
"name": "59. Телеграм-Лайт",
|
||||||
"type": "Writing",
|
"type": "Writing",
|
||||||
"subtype": "TelegramLT",
|
"subtype": "TelegramLT",
|
||||||
"id": "tg",
|
"id": "tg",
|
||||||
@@ -798,14 +910,14 @@
|
|||||||
"descr": "",
|
"descr": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
"chatID": "",
|
"chatID": "",
|
||||||
"num": 52
|
"num": 59
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": "Экраны"
|
"header": "Экраны"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
"name": "53. LCD экран 2004",
|
"name": "60. LCD экран 2004",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Lcd2004",
|
"subtype": "Lcd2004",
|
||||||
"id": "Lcd",
|
"id": "Lcd",
|
||||||
@@ -817,10 +929,10 @@
|
|||||||
"size": "20,4",
|
"size": "20,4",
|
||||||
"coord": "0,0",
|
"coord": "0,0",
|
||||||
"id2show": "id датчика",
|
"id2show": "id датчика",
|
||||||
"num": 53
|
"num": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "54. LCD экран 1602",
|
"name": "61. LCD экран 1602",
|
||||||
"type": "Reading",
|
"type": "Reading",
|
||||||
"subtype": "Lcd2004",
|
"subtype": "Lcd2004",
|
||||||
"id": "Lcd",
|
"id": "Lcd",
|
||||||
@@ -832,6 +944,6 @@
|
|||||||
"size": "16,2",
|
"size": "16,2",
|
||||||
"coord": "0,0",
|
"coord": "0,0",
|
||||||
"id2show": "id датчика",
|
"id2show": "id датчика",
|
||||||
"num": 54
|
"num": 61
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
},
|
},
|
||||||
"projectProp": {
|
"projectProp": {
|
||||||
"platformio": {
|
"platformio": {
|
||||||
"default_envs": "esp32_4mb",
|
"default_envs": "esp8266_4mb",
|
||||||
"comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota"
|
"comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp32s2_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules": {
|
||||||
|
|||||||
@@ -245,6 +245,17 @@
|
|||||||
"max": 100,
|
"max": 100,
|
||||||
"debounce": 500
|
"debounce": 500
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "range",
|
||||||
|
"label": "Ползунок (Servo)",
|
||||||
|
"widget": "range",
|
||||||
|
"descrColor": "red",
|
||||||
|
"after": "%",
|
||||||
|
"k": 1,
|
||||||
|
"min": 0,
|
||||||
|
"max": 180,
|
||||||
|
"debounce": 500
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "select",
|
"name": "select",
|
||||||
"label": "Выпадающий",
|
"label": "Выпадающий",
|
||||||
|
|||||||
308
data_svelte_lite/widgets copy.json
Normal file
308
data_svelte_lite/widgets copy.json
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "anydataRed",
|
||||||
|
"label": "Сообщение1",
|
||||||
|
"widget": "anydata",
|
||||||
|
"icon": "body",
|
||||||
|
"color": "red",
|
||||||
|
"descrColor": "red"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataDgr",
|
||||||
|
"label": "Сообщение2",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "",
|
||||||
|
"color": "red",
|
||||||
|
"icon": "walk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataDef",
|
||||||
|
"label": "Текст",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "",
|
||||||
|
"icon": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataVlt",
|
||||||
|
"label": "Вольты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "V",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataAmp",
|
||||||
|
"label": "Амперы",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "A",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataWt",
|
||||||
|
"label": "Ватты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "Wt",
|
||||||
|
"icon": "speedometer",
|
||||||
|
"color": [
|
||||||
|
{
|
||||||
|
"level": 0,
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 200,
|
||||||
|
"value": "#009933"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 2000,
|
||||||
|
"value": "#FF9900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 4000,
|
||||||
|
"value": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataWth",
|
||||||
|
"label": "Энергия",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "kWh",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataHtz",
|
||||||
|
"label": "Герцы",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "Hz",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataTmp",
|
||||||
|
"label": "Температура",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataMm",
|
||||||
|
"label": "Давление",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mm",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataHum",
|
||||||
|
"label": "Влажность",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "%",
|
||||||
|
"icon": "water",
|
||||||
|
"color": "#88AADF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataTm",
|
||||||
|
"label": "Время",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "button",
|
||||||
|
"label": "Кнопка",
|
||||||
|
"widget": "btn",
|
||||||
|
"size": "large",
|
||||||
|
"color": "green",
|
||||||
|
"send": "test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "toggle",
|
||||||
|
"label": "Переключатель",
|
||||||
|
"widget": "toggle",
|
||||||
|
"icon": "",
|
||||||
|
"iconOff": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chart1",
|
||||||
|
"label": "График без точек",
|
||||||
|
"widget": "chart",
|
||||||
|
"dateFormat": "HH:mm",
|
||||||
|
"maxCount": 86400,
|
||||||
|
"pointRadius": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chart2",
|
||||||
|
"label": "График с точками",
|
||||||
|
"widget": "chart",
|
||||||
|
"maxCount": 86400,
|
||||||
|
"dateFormat": "HH:mm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chart3",
|
||||||
|
"label": "График Дневной",
|
||||||
|
"widget": "chart",
|
||||||
|
"dateFormat": "DD.MM.YYYY",
|
||||||
|
"maxCount": 86400,
|
||||||
|
"type": "bar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fillgauge",
|
||||||
|
"label": "Бочка",
|
||||||
|
"widget": "fillgauge",
|
||||||
|
"circleColor": "#00FFFF",
|
||||||
|
"textColor": "#FFFFFF",
|
||||||
|
"waveTextColor": "#000000",
|
||||||
|
"waveColor": "#00FFFF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inputDate",
|
||||||
|
"label": "Ввод даты",
|
||||||
|
"widget": "input",
|
||||||
|
"size": "small",
|
||||||
|
"color": "orange",
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inputDgt",
|
||||||
|
"label": "Ввод числа",
|
||||||
|
"widget": "input",
|
||||||
|
"color": "blue",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inputTxt",
|
||||||
|
"label": "Ввод текста",
|
||||||
|
"widget": "input",
|
||||||
|
"size": "small",
|
||||||
|
"color": "orange",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inputTm",
|
||||||
|
"label": "Ввод времени",
|
||||||
|
"widget": "input",
|
||||||
|
"color": "blue",
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progressLine",
|
||||||
|
"label": "Статус линия",
|
||||||
|
"widget": "progress-line",
|
||||||
|
"icon": "sunny",
|
||||||
|
"max": "100",
|
||||||
|
"stroke": "10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progressRound",
|
||||||
|
"label": "Статус круг",
|
||||||
|
"widget": "progress-round",
|
||||||
|
"max": "100",
|
||||||
|
"stroke": "20",
|
||||||
|
"color": "#45ccce",
|
||||||
|
"background": "#777",
|
||||||
|
"semicircle": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "range",
|
||||||
|
"label": "Ползунок",
|
||||||
|
"widget": "range",
|
||||||
|
"descrColor": "red",
|
||||||
|
"after": "%",
|
||||||
|
"k": 0.0977,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"debounce": 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "range",
|
||||||
|
"label": "Ползунок (Servo)",
|
||||||
|
"widget": "range",
|
||||||
|
"descrColor": "red",
|
||||||
|
"after": "%",
|
||||||
|
"k": 1,
|
||||||
|
"min": 0,
|
||||||
|
"max": 180,
|
||||||
|
"debounce": 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "select",
|
||||||
|
"label": "Выпадающий",
|
||||||
|
"widget": "select",
|
||||||
|
"options": [
|
||||||
|
"Выключен",
|
||||||
|
"Включен"
|
||||||
|
],
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataPpm",
|
||||||
|
"label": "PPM",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "ppm",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamAmp",
|
||||||
|
"label": "миллиАмперы",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mAmp",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamVlt",
|
||||||
|
"label": "миллиВольты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mVlt",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamWt",
|
||||||
|
"label": "миллиВатты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mWt",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataCm",
|
||||||
|
"label": "Сантиметры",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "cm",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nil",
|
||||||
|
"label": "Без виджета"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -41,13 +41,31 @@
|
|||||||
"label": "Ватты",
|
"label": "Ватты",
|
||||||
"widget": "anydata",
|
"widget": "anydata",
|
||||||
"after": "Wt",
|
"after": "Wt",
|
||||||
"icon": "speedometer"
|
"icon": "speedometer",
|
||||||
|
"color": [
|
||||||
|
{
|
||||||
|
"level": 0,
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 200,
|
||||||
|
"value": "#009933"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 2000,
|
||||||
|
"value": "#FF9900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"level": 4000,
|
||||||
|
"value": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "anydataWth",
|
"name": "anydataWth",
|
||||||
"label": "Энергия",
|
"label": "Энергия",
|
||||||
"widget": "anydata",
|
"widget": "anydata",
|
||||||
"after": "kWt/Hr",
|
"after": "kWh",
|
||||||
"icon": "speedometer"
|
"icon": "speedometer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -62,7 +80,42 @@
|
|||||||
"label": "Температура",
|
"label": "Температура",
|
||||||
"widget": "anydata",
|
"widget": "anydata",
|
||||||
"after": "°С",
|
"after": "°С",
|
||||||
"icon": "thermometer"
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "anydataMm",
|
"name": "anydataMm",
|
||||||
@@ -192,6 +245,17 @@
|
|||||||
"max": 100,
|
"max": 100,
|
||||||
"debounce": 500
|
"debounce": 500
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "range",
|
||||||
|
"label": "Ползунок (Servo)",
|
||||||
|
"widget": "range",
|
||||||
|
"descrColor": "red",
|
||||||
|
"after": "%",
|
||||||
|
"k": 1,
|
||||||
|
"min": 0,
|
||||||
|
"max": 180,
|
||||||
|
"debounce": 500
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "select",
|
"name": "select",
|
||||||
"label": "Выпадающий",
|
"label": "Выпадающий",
|
||||||
@@ -209,6 +273,34 @@
|
|||||||
"after": "ppm",
|
"after": "ppm",
|
||||||
"icon": "speedometer"
|
"icon": "speedometer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamAmp",
|
||||||
|
"label": "миллиАмперы",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mAmp",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamVlt",
|
||||||
|
"label": "миллиВольты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mVlt",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydatamWt",
|
||||||
|
"label": "миллиВатты",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "mWt",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "anydataCm",
|
||||||
|
"label": "Сантиметры",
|
||||||
|
"widget": "anydata",
|
||||||
|
"after": "cm",
|
||||||
|
"icon": "speedometer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nil",
|
"name": "nil",
|
||||||
"label": "Без виджета"
|
"label": "Без виджета"
|
||||||
|
|||||||
80
include/BuildTime.h
Normal file
80
include/BuildTime.h
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
Парсинг и получение даты и времени компиляции из __DATE__ и __TIME__
|
||||||
|
Документация:
|
||||||
|
GitHub: https://github.com/GyverLibs/buildTime
|
||||||
|
Константы времени компиляции:
|
||||||
|
BUILD_YEAR - год
|
||||||
|
BUILD_MONTH - месяц
|
||||||
|
BUILD_DAY - день
|
||||||
|
BUILD_HOUR - час
|
||||||
|
BUILD_MIN - минута
|
||||||
|
BUILD_SEC - секунда
|
||||||
|
|
||||||
|
Исходник http://qaru.site/questions/186859/how-to-use-date-and-time-predefined-macros-in-as-two-integers-then-stringify
|
||||||
|
AlexGyver, alex@alexgyver.ru
|
||||||
|
https://alexgyver.ru/
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Версии:
|
||||||
|
v1.0 - релиз
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef buildTime_h
|
||||||
|
#define buildTime_h
|
||||||
|
// Example of __DATE__ string: "Jul 27 2012"
|
||||||
|
// 01234567890
|
||||||
|
|
||||||
|
#define BUILD_YEAR_CH0 (__DATE__[7] - '0')
|
||||||
|
#define BUILD_YEAR_CH1 (__DATE__[8] - '0')
|
||||||
|
#define BUILD_YEAR_CH2 (__DATE__[9] - '0')
|
||||||
|
#define BUILD_YEAR_CH3 (__DATE__[10] - '0')
|
||||||
|
#define BUILD_YEAR (BUILD_YEAR_CH0 * 1000 + BUILD_YEAR_CH1 * 100 + BUILD_YEAR_CH2 * 10 + BUILD_YEAR_CH3)
|
||||||
|
|
||||||
|
#define BUILD_MONTH_IS_JAN (__DATE__[0] == 'J' && __DATE__[1] == 'a' && __DATE__[2] == 'n')
|
||||||
|
#define BUILD_MONTH_IS_FEB (__DATE__[0] == 'F')
|
||||||
|
#define BUILD_MONTH_IS_MAR (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'r')
|
||||||
|
#define BUILD_MONTH_IS_APR (__DATE__[0] == 'A' && __DATE__[1] == 'p')
|
||||||
|
#define BUILD_MONTH_IS_MAY (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'y')
|
||||||
|
#define BUILD_MONTH_IS_JUN (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'n')
|
||||||
|
#define BUILD_MONTH_IS_JUL (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'l')
|
||||||
|
#define BUILD_MONTH_IS_AUG (__DATE__[0] == 'A' && __DATE__[1] == 'u')
|
||||||
|
#define BUILD_MONTH_IS_SEP (__DATE__[0] == 'S')
|
||||||
|
#define BUILD_MONTH_IS_OCT (__DATE__[0] == 'O')
|
||||||
|
#define BUILD_MONTH_IS_NOV (__DATE__[0] == 'N')
|
||||||
|
#define BUILD_MONTH_IS_DEC (__DATE__[0] == 'D')
|
||||||
|
|
||||||
|
#define BUILD_MONTH \
|
||||||
|
( \
|
||||||
|
(BUILD_MONTH_IS_JAN) ? 1 : (BUILD_MONTH_IS_FEB) ? 2 \
|
||||||
|
: (BUILD_MONTH_IS_MAR) ? 3 \
|
||||||
|
: (BUILD_MONTH_IS_APR) ? 4 \
|
||||||
|
: (BUILD_MONTH_IS_MAY) ? 5 \
|
||||||
|
: (BUILD_MONTH_IS_JUN) ? 6 \
|
||||||
|
: (BUILD_MONTH_IS_JUL) ? 7 \
|
||||||
|
: (BUILD_MONTH_IS_AUG) ? 8 \
|
||||||
|
: (BUILD_MONTH_IS_SEP) ? 9 \
|
||||||
|
: (BUILD_MONTH_IS_OCT) ? 10 \
|
||||||
|
: (BUILD_MONTH_IS_NOV) ? 11 \
|
||||||
|
: (BUILD_MONTH_IS_DEC) ? 12 \
|
||||||
|
: /* error default */ '?')
|
||||||
|
|
||||||
|
#define BUILD_DAY_CH0 (((__DATE__[4] >= '0') ? (__DATE__[4]) : '0') - '0')
|
||||||
|
#define BUILD_DAY_CH1 (__DATE__[5] - '0')
|
||||||
|
#define BUILD_DAY (BUILD_DAY_CH0 * 10 + BUILD_DAY_CH1)
|
||||||
|
|
||||||
|
// Example of __TIME__ string: "21:06:19"
|
||||||
|
// 01234567
|
||||||
|
|
||||||
|
#define BUILD_HOUR_CH0 (__TIME__[0] - '0')
|
||||||
|
#define BUILD_HOUR_CH1 (__TIME__[1] - '0')
|
||||||
|
#define BUILD_HOUR (BUILD_HOUR_CH0 * 10 + BUILD_HOUR_CH1)
|
||||||
|
|
||||||
|
#define BUILD_MIN_CH0 (__TIME__[3] - '0')
|
||||||
|
#define BUILD_MIN_CH1 (__TIME__[4] - '0')
|
||||||
|
#define BUILD_MIN (BUILD_MIN_CH0 * 10 + BUILD_MIN_CH1)
|
||||||
|
|
||||||
|
#define BUILD_SEC_CH0 (__TIME__[6] - '0')
|
||||||
|
#define BUILD_SEC_CH1 (__TIME__[7] - '0')
|
||||||
|
#define BUILD_SEC (BUILD_SEC_CH0 * 10 + BUILD_SEC_CH1)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include "BuildTime.h"
|
||||||
|
|
||||||
// Версия прошивки
|
// Версия прошивки
|
||||||
#define FIRMWARE_VERSION 436
|
#define FIRMWARE_VERSION 450
|
||||||
|
|
||||||
#ifdef esp8266_1mb_ota
|
#ifdef esp8266_1mb_ota
|
||||||
#define FIRMWARE_NAME "esp8266_1mb_ota"
|
#define FIRMWARE_NAME "esp8266_1mb_ota"
|
||||||
|
|||||||
BIN
iotm/esp32_4mb/400/firmware.bin
Normal file
BIN
iotm/esp32_4mb/400/firmware.bin
Normal file
Binary file not shown.
BIN
iotm/esp32_4mb/400/littlefs.bin
Normal file
BIN
iotm/esp32_4mb/400/littlefs.bin
Normal file
Binary file not shown.
BIN
iotm/esp32_4mb/400/partitions.bin
Normal file
BIN
iotm/esp32_4mb/400/partitions.bin
Normal file
Binary file not shown.
5
iotm/ver.json
Normal file
5
iotm/ver.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"esp32_4mb": {
|
||||||
|
"0": "400"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
},
|
},
|
||||||
"projectProp": {
|
"projectProp": {
|
||||||
"platformio": {
|
"platformio": {
|
||||||
"default_envs": "esp32_4mb",
|
"default_envs": "esp8266_4mb",
|
||||||
"comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota"
|
"comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp32s2_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules": {
|
||||||
@@ -116,6 +116,10 @@
|
|||||||
"path": "src/modules/sensors/DS2401",
|
"path": "src/modules/sensors/DS2401",
|
||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/sensors/Ds2423",
|
||||||
|
"active": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/sensors/Emon",
|
"path": "src/modules/sensors/Emon",
|
||||||
"active": false
|
"active": false
|
||||||
@@ -164,6 +168,10 @@
|
|||||||
"path": "src/modules/sensors/Mhz19",
|
"path": "src/modules/sensors/Mhz19",
|
||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/sensors/Ntc",
|
||||||
|
"active": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/sensors/Pzem004t",
|
"path": "src/modules/sensors/Pzem004t",
|
||||||
"active": true
|
"active": true
|
||||||
@@ -180,6 +188,10 @@
|
|||||||
"path": "src/modules/sensors/S8",
|
"path": "src/modules/sensors/S8",
|
||||||
"active": true
|
"active": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/sensors/Scd40",
|
||||||
|
"active": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/sensors/Sds011",
|
"path": "src/modules/sensors/Sds011",
|
||||||
"active": false
|
"active": false
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
default_envs = esp32_4mb
|
default_envs = esp8266_4mb
|
||||||
data_dir = data_svelte
|
data_dir = data_svelte
|
||||||
|
|
||||||
[common_env_data]
|
[common_env_data]
|
||||||
@@ -394,7 +394,11 @@ lib_deps =
|
|||||||
adafruit/Adafruit BMP280 Library
|
adafruit/Adafruit BMP280 Library
|
||||||
beegee-tokyo/DHT sensor library for ESPx
|
beegee-tokyo/DHT sensor library for ESPx
|
||||||
https://github.com/milesburton/Arduino-Temperature-Control-Library
|
https://github.com/milesburton/Arduino-Temperature-Control-Library
|
||||||
|
https://github.com/jbechter/arduino-onewire-DS2423
|
||||||
|
paulstoffregen/OneWire @ ^2.3.7
|
||||||
https://github.com/tremaru/iarduino_RTC
|
https://github.com/tremaru/iarduino_RTC
|
||||||
|
Sensirion I2C SCD4x @0.4.0
|
||||||
|
Sensirion Core @0.6.0
|
||||||
robtillaart/SHT2x@^0.1.1
|
robtillaart/SHT2x@^0.1.1
|
||||||
WEMOS SHT3x@1.0.0
|
WEMOS SHT3x@1.0.0
|
||||||
plerup/EspSoftwareSerial
|
plerup/EspSoftwareSerial
|
||||||
@@ -421,10 +425,13 @@ build_src_filter =
|
|||||||
+<modules/sensors/Bmp280>
|
+<modules/sensors/Bmp280>
|
||||||
+<modules/sensors/Dht1122>
|
+<modules/sensors/Dht1122>
|
||||||
+<modules/sensors/Ds18b20>
|
+<modules/sensors/Ds18b20>
|
||||||
|
+<modules/sensors/Ds2423>
|
||||||
+<modules/sensors/Impulse>
|
+<modules/sensors/Impulse>
|
||||||
|
+<modules/sensors/Ntc>
|
||||||
+<modules/sensors/Pzem004t>
|
+<modules/sensors/Pzem004t>
|
||||||
+<modules/sensors/RTC>
|
+<modules/sensors/RTC>
|
||||||
+<modules/sensors/S8>
|
+<modules/sensors/S8>
|
||||||
|
+<modules/sensors/Scd40>
|
||||||
+<modules/sensors/Sht20>
|
+<modules/sensors/Sht20>
|
||||||
+<modules/sensors/Sht30>
|
+<modules/sensors/Sht30>
|
||||||
+<modules/sensors/Sonar>
|
+<modules/sensors/Sonar>
|
||||||
@@ -444,23 +451,42 @@ build_src_filter =
|
|||||||
|
|
||||||
[env:esp32_4mb_fromitems]
|
[env:esp32_4mb_fromitems]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/enjoyneering/AHTxx.git
|
|
||||||
adafruit/Adafruit BME280 Library
|
|
||||||
adafruit/Adafruit BMP280 Library
|
|
||||||
beegee-tokyo/DHT sensor library for ESPx
|
|
||||||
https://github.com/milesburton/Arduino-Temperature-Control-Library
|
https://github.com/milesburton/Arduino-Temperature-Control-Library
|
||||||
|
https://github.com/jbechter/arduino-onewire-DS2423
|
||||||
|
paulstoffregen/OneWire @ ^2.3.7
|
||||||
https://github.com/tremaru/iarduino_RTC
|
https://github.com/tremaru/iarduino_RTC
|
||||||
robtillaart/SHT2x@^0.1.1
|
|
||||||
WEMOS SHT3x@1.0.0
|
WEMOS SHT3x@1.0.0
|
||||||
plerup/EspSoftwareSerial
|
plerup/EspSoftwareSerial
|
||||||
gyverlibs/EncButton @ ^2.0
|
gyverlibs/EncButton @ ^2.0
|
||||||
https://github.com/RoboticsBrno/ServoESP32
|
|
||||||
adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
|
|
||||||
adafruit/Adafruit BusIO @ ^1.13.2
|
adafruit/Adafruit BusIO @ ^1.13.2
|
||||||
dfrobot/DFRobotDFPlayerMini @ ^1.0.5
|
build_src_filter =
|
||||||
adafruit/Adafruit BusIO @ ^1.13.2
|
+<modules/virtual/Cron>
|
||||||
https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
|
+<modules/virtual/GoogleSheet>
|
||||||
marcoschwartz/LiquidCrystal_I2C@^1.1.4
|
+<modules/virtual/Loging>
|
||||||
|
+<modules/virtual/LogingDaily>
|
||||||
|
+<modules/virtual/Timer>
|
||||||
|
+<modules/virtual/Variable>
|
||||||
|
+<modules/virtual/VariableColor>
|
||||||
|
+<modules/virtual/VButton>
|
||||||
|
+<modules/sensors/AnalogAdc>
|
||||||
|
+<modules/sensors/Ds18b20>
|
||||||
|
+<modules/sensors/Ds2423>
|
||||||
|
+<modules/sensors/Impulse>
|
||||||
|
+<modules/sensors/Ntc>
|
||||||
|
+<modules/sensors/RTC>
|
||||||
|
+<modules/sensors/Sht30>
|
||||||
|
+<modules/sensors/Sonar>
|
||||||
|
+<modules/sensors/UART>
|
||||||
|
+<modules/exec/ButtonIn>
|
||||||
|
+<modules/exec/ButtonOut>
|
||||||
|
+<modules/exec/Buzzer>
|
||||||
|
+<modules/exec/Enconder>
|
||||||
|
+<modules/exec/Multitouch>
|
||||||
|
+<modules/exec/Pcf8574>
|
||||||
|
+<modules/exec/Pwm32>
|
||||||
|
|
||||||
|
[env:esp32s2_4mb_fromitems]
|
||||||
|
lib_deps =
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
+<modules/virtual/Cron>
|
+<modules/virtual/Cron>
|
||||||
+<modules/virtual/Loging>
|
+<modules/virtual/Loging>
|
||||||
@@ -470,33 +496,5 @@ build_src_filter =
|
|||||||
+<modules/virtual/VariableColor>
|
+<modules/virtual/VariableColor>
|
||||||
+<modules/virtual/VButton>
|
+<modules/virtual/VButton>
|
||||||
+<modules/sensors/Acs712>
|
+<modules/sensors/Acs712>
|
||||||
+<modules/sensors/AhtXX>
|
|
||||||
+<modules/sensors/AnalogAdc>
|
|
||||||
+<modules/sensors/Bme280>
|
|
||||||
+<modules/sensors/Bmp280>
|
|
||||||
+<modules/sensors/Dht1122>
|
|
||||||
+<modules/sensors/Ds18b20>
|
|
||||||
+<modules/sensors/Impulse>
|
|
||||||
+<modules/sensors/Pzem004t>
|
|
||||||
+<modules/sensors/RTC>
|
|
||||||
+<modules/sensors/S8>
|
|
||||||
+<modules/sensors/Sht20>
|
|
||||||
+<modules/sensors/Sht30>
|
|
||||||
+<modules/sensors/Sonar>
|
|
||||||
+<modules/sensors/UART>
|
|
||||||
+<modules/exec/ButtonIn>
|
|
||||||
+<modules/exec/ButtonOut>
|
|
||||||
+<modules/exec/Buzzer>
|
|
||||||
+<modules/exec/Enconder>
|
|
||||||
+<modules/exec/IoTServo>
|
|
||||||
+<modules/exec/Mcp23017>
|
|
||||||
+<modules/exec/Mp3>
|
|
||||||
+<modules/exec/Multitouch>
|
|
||||||
+<modules/exec/Pcf8574>
|
|
||||||
+<modules/exec/Pwm32>
|
|
||||||
+<modules/exec/TelegramLT>
|
+<modules/exec/TelegramLT>
|
||||||
+<modules/display/Lcd2004>
|
|
||||||
|
|
||||||
[env:esp32s2_4mb_fromitems]
|
|
||||||
lib_deps =
|
|
||||||
build_src_filter =
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "DeviceList.h"
|
#include "DeviceList.h"
|
||||||
|
|
||||||
// данная функция не записывает поле status из этого следует что поле равно false и поэтому весь список устройств отдаваемый мк
|
|
||||||
// уходит со статусом для всех устройств - offline
|
|
||||||
// приложение svelte хранит свой список и в нем поддерживает корректные статусы, а при получении этого списка
|
|
||||||
// лишь изменяет в своем те элементы массива которые добавились новые, не трогая остальные
|
|
||||||
const String getThisDevice() {
|
const String getThisDevice() {
|
||||||
String thisDevice = "{}";
|
String thisDevice = "{}";
|
||||||
// jsonWriteStr_(thisDevice, F("devicelist_"), ""); // метка для парсинга - она не нужна теперь
|
// jsonWriteStr_(thisDevice, F("devicelist_"), ""); // метка для парсинга - она не нужна теперь
|
||||||
@@ -11,6 +7,10 @@ const String getThisDevice() {
|
|||||||
jsonWriteStr_(thisDevice, F("ip"), jsonReadStr(settingsFlashJson, F("ip")));
|
jsonWriteStr_(thisDevice, F("ip"), jsonReadStr(settingsFlashJson, F("ip")));
|
||||||
jsonWriteStr_(thisDevice, F("id"), jsonReadStr(settingsFlashJson, F("id")));
|
jsonWriteStr_(thisDevice, F("id"), jsonReadStr(settingsFlashJson, F("id")));
|
||||||
jsonWriteStr_(thisDevice, F("name"), jsonReadStr(settingsFlashJson, F("name")));
|
jsonWriteStr_(thisDevice, F("name"), jsonReadStr(settingsFlashJson, F("name")));
|
||||||
|
// приложение svelte хранит свой список и в нем поддерживает корректные статусы, а при получении этого списка
|
||||||
|
// лишь изменяет в своем те элементы массива которые добавились новые, не трогая остальные
|
||||||
|
jsonWriteBool_(thisDevice, F("status"), false);
|
||||||
|
jsonWriteInt_(thisDevice, F("fv"), FIRMWARE_VERSION);
|
||||||
thisDevice = "[" + thisDevice + "]";
|
thisDevice = "[" + thisDevice + "]";
|
||||||
return thisDevice;
|
return thisDevice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ void setup() {
|
|||||||
Serial.println("FIRMWARE NAME " + String(FIRMWARE_NAME));
|
Serial.println("FIRMWARE NAME " + String(FIRMWARE_NAME));
|
||||||
Serial.println("FIRMWARE VERSION " + String(FIRMWARE_VERSION));
|
Serial.println("FIRMWARE VERSION " + String(FIRMWARE_VERSION));
|
||||||
Serial.println("WEB VERSION " + getWebVersion());
|
Serial.println("WEB VERSION " + getWebVersion());
|
||||||
|
const String buildTime = String(BUILD_DAY) + "/" + String(BUILD_MONTH) + "/" + String(BUILD_YEAR) + " " + String(BUILD_HOUR) + ":" + String(BUILD_MIN) + ":" + String(BUILD_SEC);
|
||||||
|
Serial.println("BUILD TIME " + buildTime);
|
||||||
|
jsonWriteStr_(errorsHeapJson, F("bt"), buildTime);
|
||||||
Serial.println(F("------------------------"));
|
Serial.println(F("------------------------"));
|
||||||
|
|
||||||
// получение chip id
|
// получение chip id
|
||||||
|
|||||||
@@ -48,17 +48,19 @@ bool upgradeFS() {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
httpUpdate.rebootOnUpdate(false);
|
httpUpdate.rebootOnUpdate(false);
|
||||||
//обновляем little fs с помощью метода обновления spiffs
|
// обновляем little fs с помощью метода обновления spiffs
|
||||||
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("littlefs.bin"));
|
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("littlefs.bin"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//если FS обновилась успешно
|
// если FS обновилась успешно
|
||||||
if (retFS == HTTP_UPDATE_OK) {
|
if (retFS == HTTP_UPDATE_OK) {
|
||||||
SerialPrint("!!!", F("Update"), F("FS upgrade done!"));
|
SerialPrint("!!!", F("Update"), F("FS upgrade done!"));
|
||||||
handleUpdateStatus(true, UPDATE_FS_COMPLETED);
|
handleUpdateStatus(true, UPDATE_FS_COMPLETED);
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
} else {
|
||||||
handleUpdateStatus(true, UPDATE_FS_FAILED);
|
handleUpdateStatus(true, UPDATE_FS_FAILED);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ bool upgradeBuild() {
|
|||||||
handleUpdateStatus(true, PATH_ERROR);
|
handleUpdateStatus(true, PATH_ERROR);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#if defined (esp8266_4mb) || defined (esp8266_1mb) || defined (esp8266_1mb_ota) || defined (esp8266_2mb) || defined (esp8266_2mb_ota)
|
#if defined(esp8266_4mb) || defined(esp8266_1mb) || defined(esp8266_1mb_ota) || defined(esp8266_2mb) || defined(esp8266_2mb_ota)
|
||||||
ESPhttpUpdate.rebootOnUpdate(false);
|
ESPhttpUpdate.rebootOnUpdate(false);
|
||||||
t_httpUpdate_return retBuild = ESPhttpUpdate.update(wifiClient, getBinPath("firmware.bin"));
|
t_httpUpdate_return retBuild = ESPhttpUpdate.update(wifiClient, getBinPath("firmware.bin"));
|
||||||
#endif
|
#endif
|
||||||
@@ -81,13 +83,14 @@ bool upgradeBuild() {
|
|||||||
HTTPUpdateResult retBuild = httpUpdate.update(wifiClient, getBinPath("firmware.bin"));
|
HTTPUpdateResult retBuild = httpUpdate.update(wifiClient, getBinPath("firmware.bin"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//если BUILD обновился успешно
|
// если BUILD обновился успешно
|
||||||
if (retBuild == HTTP_UPDATE_OK) {
|
if (retBuild == HTTP_UPDATE_OK) {
|
||||||
SerialPrint("!!!", F("Update"), F("BUILD upgrade done!"));
|
SerialPrint("!!!", F("Update"), F("BUILD upgrade done!"));
|
||||||
handleUpdateStatus(true, UPDATE_BUILD_COMPLETED);
|
handleUpdateStatus(true, UPDATE_BUILD_COMPLETED);
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
} else {
|
||||||
handleUpdateStatus(true, UPDATE_BUILD_FAILED);
|
handleUpdateStatus(true, UPDATE_BUILD_FAILED);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,5 +135,5 @@ void saveUserDataToFlash() {
|
|||||||
|
|
||||||
void handleUpdateStatus(bool send, int state) {
|
void handleUpdateStatus(bool send, int state) {
|
||||||
jsonWriteInt_(errorsHeapJson, F("upd"), state);
|
jsonWriteInt_(errorsHeapJson, F("upd"), state);
|
||||||
if (!send) sendStringToWs("errors", errorsHeapJson, -1);
|
if (send) sendStringToWs("errors", errorsHeapJson, -1);
|
||||||
}
|
}
|
||||||
@@ -163,9 +163,15 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
|||||||
// Страница веб интерфейса list
|
// Страница веб интерфейса list
|
||||||
//----------------------------------------------------------------------//
|
//----------------------------------------------------------------------//
|
||||||
|
|
||||||
// отвечаем данными на запрос страницы
|
// отвечаем данными на запрос страницы list
|
||||||
if (headerStr == "/list|") {
|
if (headerStr == "/list|") {
|
||||||
sendStringToWs("settin", settingsFlashJson, num);
|
sendStringToWs("settin", settingsFlashJson, num);
|
||||||
|
// отправим список устройств в зависимости от того что выбрал user
|
||||||
|
// sendDeviceList(num);
|
||||||
|
}
|
||||||
|
|
||||||
|
// отвечаем на запрос списка устройств (это отдельный запрос который делает приложение при подключении)
|
||||||
|
if (headerStr == "/devlist|") {
|
||||||
// отправим список устройств в зависимости от того что выбрал user
|
// отправим список устройств в зависимости от того что выбрал user
|
||||||
sendDeviceList(num);
|
sendDeviceList(num);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ void* getAPI_Timer(String subtype, String params);
|
|||||||
void* getAPI_Variable(String subtype, String params);
|
void* getAPI_Variable(String subtype, String params);
|
||||||
void* getAPI_VariableColor(String subtype, String params);
|
void* getAPI_VariableColor(String subtype, String params);
|
||||||
void* getAPI_VButton(String subtype, String params);
|
void* getAPI_VButton(String subtype, String params);
|
||||||
|
void* getAPI_A02Distance(String subtype, String params);
|
||||||
void* getAPI_Acs712(String subtype, String params);
|
void* getAPI_Acs712(String subtype, String params);
|
||||||
void* getAPI_AhtXX(String subtype, String params);
|
void* getAPI_AhtXX(String subtype, String params);
|
||||||
void* getAPI_AnalogAdc(String subtype, String params);
|
void* getAPI_AnalogAdc(String subtype, String params);
|
||||||
@@ -14,10 +15,13 @@ void* getAPI_Bme280(String subtype, String params);
|
|||||||
void* getAPI_Bmp280(String subtype, String params);
|
void* getAPI_Bmp280(String subtype, String params);
|
||||||
void* getAPI_Dht1122(String subtype, String params);
|
void* getAPI_Dht1122(String subtype, String params);
|
||||||
void* getAPI_Ds18b20(String subtype, String params);
|
void* getAPI_Ds18b20(String subtype, String params);
|
||||||
|
void* getAPI_Ds2423(String subtype, String params);
|
||||||
void* getAPI_Impulse(String subtype, String params);
|
void* getAPI_Impulse(String subtype, String params);
|
||||||
|
void* getAPI_Ntc(String subtype, String params);
|
||||||
void* getAPI_Pzem004(String subtype, String params);
|
void* getAPI_Pzem004(String subtype, String params);
|
||||||
void* getAPI_RTC(String subtype, String params);
|
void* getAPI_RTC(String subtype, String params);
|
||||||
void* getAPI_S8(String subtype, String params);
|
void* getAPI_S8(String subtype, String params);
|
||||||
|
void* getAPI_Scd40(String subtype, String params);
|
||||||
void* getAPI_Sht20(String subtype, String params);
|
void* getAPI_Sht20(String subtype, String params);
|
||||||
void* getAPI_Sht30(String subtype, String params);
|
void* getAPI_Sht30(String subtype, String params);
|
||||||
void* getAPI_Sonar(String subtype, String params);
|
void* getAPI_Sonar(String subtype, String params);
|
||||||
@@ -31,7 +35,7 @@ void* getAPI_Mcp23017(String subtype, String params);
|
|||||||
void* getAPI_Mp3(String subtype, String params);
|
void* getAPI_Mp3(String subtype, String params);
|
||||||
void* getAPI_Multitouch(String subtype, String params);
|
void* getAPI_Multitouch(String subtype, String params);
|
||||||
void* getAPI_Pcf8574(String subtype, String params);
|
void* getAPI_Pcf8574(String subtype, String params);
|
||||||
void* getAPI_Pwm32(String subtype, String params);
|
void* getAPI_Pwm8266(String subtype, String params);
|
||||||
void* getAPI_TelegramLT(String subtype, String params);
|
void* getAPI_TelegramLT(String subtype, String params);
|
||||||
void* getAPI_Lcd2004(String subtype, String params);
|
void* getAPI_Lcd2004(String subtype, String params);
|
||||||
|
|
||||||
@@ -44,6 +48,7 @@ if ((tmpAPI = getAPI_Timer(subtype, params)) != nullptr) return tmpAPI;
|
|||||||
if ((tmpAPI = getAPI_Variable(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Variable(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_VariableColor(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_VariableColor(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_VButton(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_VButton(subtype, params)) != nullptr) return tmpAPI;
|
||||||
|
if ((tmpAPI = getAPI_A02Distance(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Acs712(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Acs712(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_AhtXX(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_AhtXX(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_AnalogAdc(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_AnalogAdc(subtype, params)) != nullptr) return tmpAPI;
|
||||||
@@ -51,10 +56,13 @@ if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI;
|
|||||||
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
|
||||||
|
if ((tmpAPI = getAPI_Ds2423(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Impulse(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Impulse(subtype, params)) != nullptr) return tmpAPI;
|
||||||
|
if ((tmpAPI = getAPI_Ntc(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Pzem004(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Pzem004(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_RTC(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_RTC(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_S8(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_S8(subtype, params)) != nullptr) return tmpAPI;
|
||||||
|
if ((tmpAPI = getAPI_Scd40(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Sht30(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Sht30(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Sonar(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Sonar(subtype, params)) != nullptr) return tmpAPI;
|
||||||
@@ -68,7 +76,7 @@ if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
|
|||||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Multitouch(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Multitouch(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
||||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"esp8266_4mb": 15
|
"esp8266_4mb": 15
|
||||||
},
|
},
|
||||||
"title": "Будильник типа Cron",
|
"title": "Будильник типа Cron",
|
||||||
"moduleDesc": "Планировщик времени для периодического выполнения заданий в определённое время. Генерирует событие в указанное время по формату Cron https://ru.wikipedia.org/wiki/Cron ",
|
"moduleDesc": "Планировщик времени для периодического выполнения заданий в определённое время. Генерирует событие в указанное время по формату Cron https://ru.wikipedia.org/wiki/Cron . Но в данной реализации есть возможность задавать секундный интервал, поэтому слева необходимо добавить еще один разряд значений секунд - подробнее в базовой библиотеке https://github.com/staticlibs/ccronexpr",
|
||||||
"propInfo": {
|
"propInfo": {
|
||||||
"formatNextAlarm": "Формат представления даты и времени срабатывания следующего уведомления. http://cppstudio.com/post/621/",
|
"formatNextAlarm": "Формат представления даты и времени срабатывания следующего уведомления. http://cppstudio.com/post/621/",
|
||||||
"needSave": "Требуется сохранять(1) или нет(0) состояние в энерго независимую память."
|
"needSave": "Требуется сохранять(1) или нет(0) состояние в энерго независимую память."
|
||||||
|
|||||||
Reference in New Issue
Block a user