64 Commits

Author SHA1 Message Date
Dmitry Borisenko
6fe10441b1 Merge pull request #112 from biveraxe/ver3dev
Завершаем перенос ButtonOut в новую систему классов, требуется дорабо…
2022-01-12 13:10:43 +01:00
c002bafc1c Завершаем перенос ButtonOut в новую систему классов, требуется доработка взаимодействия с виджитами 2021-12-31 10:55:38 +03:00
IoT Manager
6b481de207 Merge pull request #111 from biveraxe/ver3dev
Класс IoTSensor вроде готов
2021-12-31 01:52:44 +01:00
b0fb71832c Убираем глобальные переменные из модулей, есть веростность, что получится при линковке не включать модули, которые исключены из api.cpp 2021-12-30 12:11:19 +03:00
6a7653c7ff Добавляем IoTVariable для дальнейшей доработки 2021-12-30 11:56:08 +03:00
ee94853ad9 Переносм функционал физической кнопки в класс IoTSensor 2021-12-28 11:04:14 +03:00
ede9092a73 Исправляем проблему начала измерений. Не все строки перенесены были из основной версии модуля. 2021-12-27 22:47:30 +03:00
30cf9cc3bb Исправляем ошибку при очистке глобальных списков в модуле Dallas 2021-12-27 22:05:23 +03:00
41f4be6139 Добавляем работу сенсоров с несколькими измерениями. Добавляем первую версию класса Variable. 2021-12-27 21:24:55 +03:00
IoT Manager
c8df0de972 Merge pull request #109 from biveraxe/ver3dev
Первая интеграция глобальных векторов в ver3dev
2021-12-26 18:39:57 +01:00
bebea0732a Добавляем в модуль далласа поддержку нескольких линий одновременно 2021-12-24 20:03:38 +03:00
5fecb51d69 Добавляем комментарии и наводим порядок 2021-12-23 13:02:06 +03:00
faa865e78d Добавляем механизм глобальных векторов для модулей и сенсоров. Модуль Dallas полностью интегрирован поновому 2021-12-23 09:09:26 +03:00
Dmitry Borisenko
66f21a5001 Merge pull request #106 from DmitryBorisenko33/ver3
добавил BH1750
2021-12-19 22:56:01 +01:00
Dmitry Borisenko
e9032365b4 добавил BH1750 2021-12-19 22:52:26 +01:00
Dmitry Borisenko
f39b16f787 Merge pull request #105 from DmitryBorisenko33/ver3
добавил название параметра
2021-12-19 22:37:45 +01:00
Dmitry Borisenko
fd09ec9d6b добавил название параметра 2021-12-19 22:36:52 +01:00
Dmitry Borisenko
9ce2cea94a Merge pull request #104 from DmitryBorisenko33/ver3
добавил LCD
2021-12-19 22:21:05 +01:00
Dmitry Borisenko
b0e06707bd добавил LCD 2021-12-19 22:19:35 +01:00
Dmitry Borisenko
cf7599e367 Merge pull request #103 from DmitryBorisenko33/ver3
Merge pull request #1 from IoTManagerProject/ver3
2021-12-19 21:26:50 +01:00
Dmitry Borisenko
5b87cedd78 Merge pull request #1 from IoTManagerProject/ver3
fix
2021-12-15 21:09:54 +01:00
Dmitry Borisenko
5e24d7aec0 Merge pull request #99 from DmitryBorisenko33/ver3
добавил AHTX0 HDC1080
2021-12-15 21:08:34 +01:00
Dmitry Borisenko
a4fe4f6c1a добавил AHTX0 HDC1080 2021-12-15 21:06:53 +01:00
Dmitry Borisenko
3d93141e2c Merge pull request #98 from avaksru/ver3
lunix fix
2021-12-15 21:04:21 +01:00
avaksru
e9d3750e1b linux fix 2 2021-12-15 18:40:32 +03:00
avaksru
03b347b630 lunix fix 2021-12-15 17:20:44 +03:00
Dmitry Borisenko
3fc86fb173 Merge pull request #97 from DmitryBorisenko33/ver3
Возможность добавлять любой сенсор
2021-12-15 00:24:59 +01:00
Dmitry Borisenko
9dde5942f0 test 2021-12-15 00:23:01 +01:00
Dmitry Borisenko
3bb13de0a9 Merge branch 'IoTManagerProject:ver3' into ver3 2021-12-15 00:20:04 +01:00
Dmitry Borisenko
f5b5bd78ec 304 2021-12-14 23:56:30 +01:00
Dmitry Borisenko
b68fa1b0f6 финальная версия с сенсором 2021-12-14 23:55:17 +01:00
Dmitry Borisenko
1529da443b wifi 2021-12-14 23:22:30 +01:00
Dmitry Borisenko
8984a8d143 кастомный сенсор 2021-12-14 23:20:14 +01:00
Dmitry Borisenko
93a6a24254 новый сенсор 2021-12-14 23:08:35 +01:00
Dmitry Borisenko
d2a375dc9e добавил шаблон любого сенсора 2021-12-14 23:05:42 +01:00
IoT Manager
acf9e2bd5d Merge pull request #96 from biveraxe/ver3
Исправляем ошибку чтения температуры для Dallas на ESP32 и добавляем адресацию
2021-12-14 17:55:52 +01:00
4a946ff3eb Исправляем ошибку чтения температуры для Dallas на ESP32 и добавляем возможность указать для каждого датчика Dallas Ds18b20 свой адрес на шине. 2021-12-14 17:02:42 +03:00
Dmitry Borisenko
9c1604e9cc Merge pull request #95 from DmitryBorisenko33/ver3
fixed preset
2021-12-14 13:55:33 +01:00
Dmitry Borisenko
bc8f683c79 fixed preset 2021-12-14 13:53:11 +01:00
Dmitry Borisenko
65c1449cde 304 2021-12-13 23:51:04 +01:00
Dmitry Borisenko
1a88298fd4 esp32 compiling version 2021-12-13 23:35:29 +01:00
Dmitry Borisenko
fbb5ba7e64 partitions 2021-12-13 23:23:12 +01:00
Dmitry Borisenko
ca9444bbd9 add castom partition for esp32 2021-12-13 22:43:53 +01:00
IoT Manager
e9f36e7d20 Merge pull request #94 from avaksru/ver3
add weekday, IP, ESP_NAME
2021-12-13 21:03:57 +01:00
avaksru
32350ddaf1 webUI 2021-12-13 16:40:44 +03:00
avaksru
d083fbf9cf websocket & function 2021-12-13 16:26:43 +03:00
avaksru
e46a6247f9 del 2021-12-13 10:03:27 +03:00
avaksru
b125986fb3 telegram add weekday, IP, ESP_NAME, date 2021-12-13 09:59:43 +03:00
avaksru
a020c09928 add weekday, IP, ESP_NAME 2021-12-13 09:43:10 +03:00
Dmitry Borisenko
7c423ddea6 test 2021-12-07 19:51:46 +01:00
Dmitry Borisenko
f28bafa277 Исправил косяк со слетающим config json 2021-12-07 05:58:06 +01:00
Dmitry Borisenko
35923eca7d merge pr 2021-12-07 05:16:19 +01:00
Dmitry Borisenko
495488a52f Merge pull request #93 from biveraxe/biveraddons
Увеличиваем макимальное количество возможных кнопок до 8 для ESP32
2021-12-07 05:06:31 +01:00
96b80dfd28 Увеличиваем макимальное количество возможных кнопок до 8 для ESP32 2021-12-04 23:50:49 +03:00
Dmitry Borisenko
b8f2cb2716 версия 303 2021-12-03 21:41:17 +01:00
Dmitry Borisenko
bb5eed987e Merge pull request #92 from biveraxe/biveraddons
Добавки от Biver
2021-12-03 21:33:16 +01:00
2b1ab1df50 Исправляем ошибку в алгоритме чтения директории. openNextFile() возвращает файл. 2021-12-03 11:18:48 +03:00
f668b5783e Удаляем мусор от касперского 7 строка и добавляем возможность редактировать CSV в веб-редакторе в файле edit.htm 2021-12-03 11:04:55 +03:00
70d2926f55 Добавляем пункт 25.Датчик температуры, влажности SHT2x, HTU2x and Si70xx 2021-12-03 10:51:10 +03:00
f1c573b882 Добавляем пункт 25.Датчик температуры, влажности SHT2x, HTU2x and Si70xx 2021-12-03 10:34:25 +03:00
de2075664b Интегрируем датчик SHT20 в основные фалы проекта кроме set.device.json 2021-12-03 10:30:56 +03:00
55ee70849f Добавляем библиотеку SHT2x к проекту 2021-12-03 10:05:44 +03:00
725cf26d41 Добавляем файлы для нового сенсора SHT20 2021-12-03 10:03:20 +03:00
7e5b611c23 Добавляем использование всех пинов на ESP32 в качестве кнопки путем явного указания режима порта. 2021-12-03 09:52:45 +03:00
1346 changed files with 22771 additions and 174454 deletions

View File

@@ -1,55 +0,0 @@
env:
BOARDS: '["esp8266_4mb", "esp8266_16mb", "esp32_4mb3f", "esp32c3m_4mb", "esp32s2_4mb", "esp32s3_16mb"]'
name: Build Firmware
on:
workflow_dispatch:
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set_matrix.outputs.json }}
steps:
- name: Prepare matrix JSON Object
id: set_matrix
uses: nickofthyme/object-remap@v2.0.0
with:
__case: kebab
board: ${{ env.BOARDS }}
build:
needs: [ generate-matrix ]
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
with:
ref: 'ver4dev'
- name: Run PrepareProject.py -b ${{ matrix.board }}
run: python3 ./PrepareProject.py -b ${{ matrix.board }}
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Run PlatformIO
if: always()
run: platformio run
- name: Build FS
if: always()
run: platformio run -t buildfs --disable-auto-clean
- name: Rearrange Artifacts
run: |
mkdir -p artifacts/${{ matrix.board }}
find .pio/build/${{ matrix.board }} -name "*.bin" -exec mv {} artifacts/${{ matrix.board }} \;
working-directory: ${{ github.workspace }}
- name: Attach artifact
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}-${{ github.run_number }}
path: artifacts/${{ matrix.board }}

7
.gitignore vendored
View File

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

View File

@@ -3,8 +3,5 @@
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

54
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,54 @@
{
"files.associations": {
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"numeric": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"cinttypes": "cpp",
"regex": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "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": false
}

View File

@@ -1,293 +0,0 @@
# PrepareProject.py - инструмент для подготовки проекта к компиляции.
# Необходимо вызвать при изменении персональных настроек или состава модулей.
#
# При отсутствии файла с персональными настройками, myProfile.json будет создан автоматически
# python PrepareProject.py
#
# Если myProfile.json уже существует, можно запустить PrepareProject.py с параметром -u или --update для обновления списка модулей.
# Данная функция будет полезна для разработчиков при добавлении модуля в папку src/modules
# python PrepareProject.py --update
# python PrepareProject.py -u
#
# Возможно использовать несколько вариантов персональных настроек и уточнять имя файла при запуске с использованием параметра -p или -profile
# python PrepareProject.py --profile <ИмяФайла>
# python PrepareProject.py -p <ИмяФайла>
#
# Используя параметры -b или --board <board_name> можно уточнить для какой платы нужно подготовить проект
#
# поддерживаемые контроллеры (профили):
# esp8266_4mb
# esp8266_16mb
# esp32_4mb
# esp32cam_4mb
# esp32_16mb
# esp32s2_4mb
# esp8266_1mb
# esp8266_1mb_ota
# esp8285_1mb
# esp8285_1mb_ota
# esp8266_2mb
# esp8266_2mb_ota
import configparser
import os, json, sys, getopt
from pathlib import Path
import shutil
config = configparser.ConfigParser() # создаём объекта парсера INI
def printHelp():
print('''Usage:
PrepareProject.py
-p --profile <file.json_in_root_folder>
-u --update
-h --help
-b --board <board_name>''')
with open('myProfile.json', "r", encoding='utf-8') as read_file:
profJson = json.load(read_file)
print ('')
print ('Choose a board from the list:')
# print(profJson['projectProp']['platformio']['comments_default_envs'])
print (' ', end='')
cnt = 0
for envs in profJson['projectProp']['platformio']['envs']:
if cnt == 5:
cnt = 0
print('')
print(' ', end='')
print(envs['name'] + ', ', end='')
cnt = cnt + 1
def updateModulesInProfile(profJson):
profJson["modules"] = {}
for root,d_names,f_names in os.walk("src/modules"):
for fname in f_names:
if fname == "modinfo.json":
with open(os.path.join(root, fname), "r", encoding='utf-8') as read_file:
modinfoJson = json.load(read_file)
# проверяем есть ли уже узловой элемент и если нет, то создаем
if not modinfoJson['menuSection'] in profJson["modules"]:
listFromFirstElement = {modinfoJson['menuSection']: []}
listFromFirstElement.update(profJson["modules"])
profJson["modules"] = listFromFirstElement
# добавляем информацию о модуле в узловой элемент
profJson["modules"][modinfoJson['menuSection']].append({
'path': os.path.normpath(root).replace("\\", "/"),
'active': modinfoJson['defActive']
})
update = False # признак необходимости обновить список модулей
profile = 'myProfile.json' # имя профиля. Будет заменено из консоли, если указано при старте
selectDevice = '' # имя платы для которой хотим собрать, если её указали к командной строке -b <board>
argv = sys.argv[1:]
try:
opts, args = getopt.getopt(argv, 'hp:ub:', ['help', 'profile=', 'update', 'board='])
except getopt.GetoptError:
print('Ошибка обработки параметров!')
printHelp()
sys.exit(2)
for opt, arg in opts:
if opt in ("-h", "--help"):
printHelp()
sys.exit()
elif opt in ("-p", "--profile"):
print('Загрузка профиля из файла:' + arg)
profile = arg
elif opt in ("-u", "--update"):
print('Создание новой конфигурации по исходным файлам!')
update = True
elif opt in ("-b", "--board"):
print('Создание профиля для платы:' + arg)
selectDevice = arg
if Path(profile).is_file():
# подтягиваем уже существующий профиль
with open(profile, "r", encoding='utf-8') as read_file:
profJson = json.load(read_file)
# если хотим обновить список модулей в существующем профиле
if update:
updateModulesInProfile(profJson)
# sortedListNames = sorted(profJson["modules"])
# sortedModules = {}
# for sortedModulName in sortedList:
# print(profJson)
with open(profile, "w", encoding='utf-8') as write_file:
json.dump(profJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
else:
# если файла нет - создаем по образу настроек из проекта
profJson = json.loads('{}')
# копируем параметры IOTM из settings.json в новый профиль
with open("data_svelte/settings.json", "r", encoding='utf-8') as read_file:
profJson['iotmSettings'] = json.load(read_file)
# устанавливаем параметры сборки
profJson['projectProp'] = {
'platformio': {
'default_envs': 'esp8266_4mb'
}
}
# загружаем список модулей для сборки
updateModulesInProfile(profJson)
# сохраняем новый профиль
with open(profile, "w", encoding='utf-8') as write_file:
json.dump(profJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
deviceName = ''
if selectDevice == '':
# определяем какое устройство используется в профиле
deviceName = profJson['projectProp']['platformio']['default_envs']
else:
for envs in profJson['projectProp']['platformio']['envs']:
if envs['name'] == selectDevice:
deviceName = selectDevice
if deviceName == '':
deviceName = profJson['projectProp']['platformio']['default_envs']
print(f"\x1b[1;31;31m Board ", selectDevice, " not found in ",profile,"!!! Use ",deviceName," \x1b[0m")
# заполняем папку /data файлами прошивки в зависимости от устройства
if deviceName == 'esp8266_1mb_ota' or deviceName == 'esp8285_1mb_ota' or deviceName == 'esp8266_2mb_ota':
shutil.copytree("data_lite", "data_svelte", symlinks=False, ignore=None, ignore_dangling_symlinks=False, dirs_exist_ok=True)
else:
shutil.copytree("data_full", "data_svelte", symlinks=False, ignore=None, ignore_dangling_symlinks=False, dirs_exist_ok=True)
deviceType = 'esp32*'
if not 'esp32' in deviceName:
deviceType = 'esp82*'
if 'bk72' in deviceName:
deviceType = 'bk72*'
# генерируем файлы проекта на основе подготовленного профиля
# заполняем конфигурационный файл прошивки параметрами из профиля
with open("data_svelte/settings.json", "r", encoding='utf-8') as read_file:
iotmJson = json.load(read_file)
for key, value in profJson['iotmSettings'].items():
iotmJson[key] = value
with open("data_svelte/settings.json", "w", encoding='utf-8') as write_file:
json.dump(iotmJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
# собираем меню прошивки из модулей
# параллельно формируем список имен активных модулей
# параллельно собираем необходимые активным модулям библиотеки для включения в компиляцию для текущего типа устройства (esp8266_4m, esp32_4mb, esp8266_1m, esp8266_1m_ota)
activeModulesName = [] # список имен активных модулей
allLibs = "" # подборка всех библиотек необходимых модулям для дальнейшей записи в конфигурацию platformio
allDefs = "\n" # для каждого модуля создаем глобальный define
itemsCount = 1
includeDirs = "" # подборка путей ко всем модулям для дальнейшей записи в конфигурацию platformio
itemsJson = json.loads('[{"name": "Выберите элемент", "num": 0}]')
for section, modules in profJson['modules'].items():
itemsJson.append({"header": section})
for module in modules:
if module['active']:
with open(module['path'] + "/modinfo.json", "r", encoding='utf-8') as read_file:
moduleJson = json.load(read_file)
if 'moduleDefines' in moduleJson['about']:
allDefs = allDefs + "\n".join("-D" + d for d in moduleJson['about']['moduleDefines'])
if deviceName in moduleJson['usedLibs']: # проверяем поддерживает ли модуль текущее устройство
if not 'exclude' in moduleJson['usedLibs'][deviceName]: # смотрим не нужно ли исключить данный модуль из указанной платы deviceName
activeModulesName.append(moduleJson['about']['moduleName']) # запоминаем имена для использования на след шагах
includeDirs = includeDirs + "\n+<" + module['path'].replace("src/", "") + ">" # запоминаем пути к модулям для компиляции
for libPath in moduleJson['usedLibs'][deviceName]: # запоминаем библиотеки необходимые модулю для текущей платы
allLibs = allLibs + "\n" + libPath
for configItemsJson in moduleJson['configItem']:
configItemsJson['num'] = itemsCount
configItemsJson['name'] = str(itemsCount) + ". " + configItemsJson['name']
itemsCount = itemsCount + 1
configItemsJson['moduleName'] = moduleJson['about']['moduleName']
itemsJson.append(configItemsJson)
else: # В первую очередь ищем по имени deviceName, чтобы для данной платы можно было уточнить либы. Если не нашли плату по имени в usedLibs пробуем найти её по типу deviceType
if deviceType in moduleJson['usedLibs']: # проверяем поддерживает ли модуль текущее устройство
activeModulesName.append(moduleJson['about']['moduleName']) # запоминаем имена для использования на след шагах
includeDirs = includeDirs + "\n+<" + module['path'].replace("src/", "") + ">" # запоминаем пути к модулям для компиляции
for libPath in moduleJson['usedLibs'][deviceType]: # запоминаем библиотеки необходимые модулю для текущей платы
allLibs = allLibs + "\n" + libPath
for configItemsJson in moduleJson['configItem']:
configItemsJson['num'] = itemsCount
configItemsJson['name'] = str(itemsCount) + ". " + configItemsJson['name']
itemsCount = itemsCount + 1
itemsJson.append(configItemsJson)
configItemsJson['moduleName'] = moduleJson['about']['moduleName']
with open("data_svelte/items.json", "w", encoding='utf-8') as write_file:
json.dump(itemsJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
# учитываем вызовы модулей в API.cpp
allAPI_head = ""
allAPI_exec = ""
for activModuleName in activeModulesName:
allAPI_head = allAPI_head + "\nvoid* getAPI_" + activModuleName + "(String subtype, String params);"
allAPI_exec = allAPI_exec + "\nif ((tmpAPI = getAPI_" + activModuleName + "(subtype, params)) != nullptr) foundAPI = tmpAPI;"
apicpp = '#include "ESPConfiguration.h"\n'
apicpp = apicpp + allAPI_head
apicpp = apicpp + '\n\nvoid* getAPI(String subtype, String params) {\nvoid* tmpAPI; void* foundAPI = nullptr;'
apicpp = apicpp + allAPI_exec
apicpp = apicpp + '\nreturn foundAPI;\n}'
with open('src/modules/API.cpp', 'w') as f:
f.write(apicpp)
# корректируем параметры platformio
# собираем пути всех отключенных модулей для исключения их из процесса компиляции
# excludeDirs = ""
# for root,d_names,f_names in os.walk("src\\modules"):
# for fname in f_names:
# if fname == "modinfo.json":
# with open(root + "\\" + fname, "r", encoding='utf-8') as read_file:
# modinfoJson = json.load(read_file)
# if not modinfoJson['about']['moduleName'] in activeModulesName:
# excludeDirs = excludeDirs + "\n-<" + root.replace("src\\", "") + ">"
# фиксируем изменения в platformio.ini
config.clear()
config.read("platformio.ini")
config["env:" + deviceName + "_fromitems"]["lib_deps"] = allLibs
config["env:" + deviceName + "_fromitems"]["build_src_filter"] = includeDirs
config["env:" + deviceName + "_fromitems"]["build_flags"] = allDefs
config["platformio"]["default_envs"] = deviceName
if "${env:" + deviceName + "_fromitems.build_flags}" not in config["env:" + deviceName]["build_flags"]:
config["env:" + deviceName]["build_flags"] += "\n${env:" + deviceName + "_fromitems.build_flags}"
# config["platformio"]["data_dir"] = profJson['projectProp']['platformio']['data_dir']
with open("platformio.ini", 'w') as configFile:
config.write(configFile)
# сохраняем часть применяемого профиля в папку data_svelte для загрузки на контроллер и дальнейшего переиспользования
print(f"Saving profile {profile} in /data_svelte/flashProfile.json")
shortProfJson = json.loads('{}')
shortProfJson['projectProp'] = {
'platformio': {
'default_envs': deviceName
}
}
shortProfJson['modules'] = profJson['modules']
with open("data_svelte/flashProfile.json", "w", encoding='utf-8') as write_file:
json.dump(shortProfJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
# import ctypes # An included library with Python install.
# if update:
# ctypes.windll.user32.MessageBoxW(0, "Модули профиля " + profile + " обновлены, а сам профиль применен, можно запускать компиляцию и прошивку.", "Операция завершена.", 0)
# else:
# ctypes.windll.user32.MessageBoxW(0, "Профиль " + profile + " применен, можно запускать компиляцию и прошивку.", "Операция завершена.", 0)
if update:
shutil.copy(profile, "compilerProfile.json")
print(f"\x1b[1;31;42m Profile modules " + profile + " updated, profile applied, you can run compilation and firmware.\x1b[0m")
else:
print(f"\x1b[1;31;42m Profile ", profile, " applied, you can run compilation and firmware.\x1b[0m")
# print(f"\x1b[1;32;41m Операция завершена. \x1b[0m")

View File

@@ -1,37 +0,0 @@
# подготавливаем папку для локального сервера обновлений
# для этого компилируем проект и получаем бинарные файлы:
# firmware.bin, littlefs.bin, partitions.bin и ver.json
import shutil
import configparser
import os, json, sys, getopt
from pathlib import Path
def copyFileIfExist(fileName, deviceName):
srcFilePath = ".pio/build/" + deviceName + "/" + fileName
dstFilePath = "iotm/" + deviceName + "/400/" + fileName
if Path(srcFilePath).is_file():
print("Ok...... \"" + srcFilePath + "\" на месте!")
Path(dstFilePath).parent.mkdir(parents=True, exist_ok=True)
shutil.copy(srcFilePath, dstFilePath)
return True
else:
print("Error...... \"" + srcFilePath + "\" НЕ существует!")
return False
config = configparser.ConfigParser() # создаём объекта парсера INI
config.read("platformio.ini")
deviceName = config["platformio"]["default_envs"]
homeDir = os.path.expanduser('~')
os.system(homeDir + "/.platformio/penv/Scripts/pio run")
os.system(homeDir + "/.platformio/penv/Scripts/pio run -t buildfs --disable-auto-clean")
if copyFileIfExist("firmware.bin", deviceName) and copyFileIfExist("littlefs.bin", deviceName):
copyFileIfExist("partitions.bin", deviceName)
versionsJson = json.loads('{"' + deviceName + '": {"0": "400"}}')
with open("iotm/ver.json", "w", encoding='utf-8') as write_file:
json.dump(versionsJson, write_file, ensure_ascii=False, indent=4, sort_keys=False)
print(f"\x1b[1;31;42m Сервер для обновления 'по воздуху' для " + deviceName + " подготовлен. Не забудьте установить расширение Live Server, запустить его и прописать в ESP IP вашего компьютера. Подробнее смотрите в WIKI: https://iotmanager.org/wiki.\x1b[0m")

View File

@@ -1,15 +1,6 @@
# IoTManager
Это модульная система беспроводной автоматизации на базе ESP32/ESP8266 микроконтроллеров и приложения IoT Manager.
Телеграм канал обсуждения приложения и системы автоматизации https://t.me/IoTmanager
# [Инструкция](https://github.com/IoTManagerProject/IoTManager/wiki)
This is a smart home based on esp8266 and esp32 microcontrollers. These microcontrollers gained their popularity due to their low cost. Each such microcontroller is able to connect to your home wifi router. They can be purchased at any robotics store or on aliexpress, there are also ready-made devices based on them. This microcontroller has a certain number of pins on which digital signals are generated. Various peripheral devices can be connected to it: sensors, relays, stepper motors, servo drives, etc.
Our firmware allows you to receive data from all these devices and manage them. The iot manager app available for ios and android is used to display the data. In order to connect devices and the application, a special mqtt server is needed, in other words, an mqtt broker. All devices are first connected to a wifi router, and then to this mqtt broker, the application is also connected to it. As a result, through the application you can manage devices from anywhere in the world, monitor sensor readings, build graphs and much more. Broker mqtt can be used in the cloud, such as wqtt.ru, or your own, raised, for example, on a single-board computer raspberry pi. There is also a second way to manage devices, it works even when you do not have the Internet - control through a web browser. All your devices will be available on one page. Both methods, through the application or through the web, work simultaneously with full mutual synchronization.
To achieve your goal, you only need three things:
1. Buy an esp microcontroller
2. Download the app
3. Get a cloud broker
If remote control and the application are not needed, then the last step can be omitted.
The logic of each device is configured using scripts. They are needed in order to teach the device to carry out your invented algorithms. You can assign any reaction to any action. The temperature has risen - the device will turn off the heater. Humidity has fallen and the level in the tank is more than 10% - the device will start watering, if not, it will send you a telegram notification that there is not enough water. These are just a few examples. Scenarios are created by you, and their flexibility will allow you to fulfill your every desire.
![](https://github.com/IoTManagerProject/IoTManager/blob/beta/doc/pictures/007%20iot%20manager.jpg)

Binary file not shown.

Binary file not shown.

BIN
bin/esp8266_1mb/spiffs.bin Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

View File

@@ -1,515 +0,0 @@
{
"iotmSettings": {
"name": "IoTmanagerVer4",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "iot",
"routerpass": "hostel3333",
"timezone": 2,
"ntp": "pool.ntp.org",
"weblogin": "admin",
"webpass": "admin",
"mqttServer": "",
"mqttPort": 8021,
"mqttPrefix": "/risenew",
"mqttUser": "rise",
"mqttPass": "3hostel3",
"serverip": "http://iotmanager.org",
"log": 0,
"mqttin": 0,
"pinSCL": 0,
"pinSDA": 0,
"i2cFreq": 100000,
"wg": "group1"
},
"projectProp": {
"platformio": {
"default_envs": "esp8266_4mb",
"comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp32cam_4mb or esp32s2_4mb or esp32_4mb3f or esp32s3_16mb or esp32c3m_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota",
"envs": [
{
"name": "esp8266_4mb",
"firmware": "0x00000",
"littlefs": "0x300000"
},
{
"name": "esp8266_16mb",
"firmware": "0x00000",
"littlefs": "0x200000"
},
{
"name": "esp32_4mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x290000"
},
{
"name": "esp32_4mb3f",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x310000"
},
{
"name": "esp32cam_4mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x310000"
},
{
"name": "esp32_16mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x910000"
},
{
"name": "esp8266_1mb",
"firmware": "0x00000000",
"littlefs": "0x000bb000"
},
{
"name": "esp8266_1mb_ota",
"firmware": "0x00000000",
"littlefs": "0x000eb000"
},
{
"name": "esp8266_2mb",
"firmware": "0x00000000",
"littlefs": "0x00100000"
},
{
"name": "esp8266_2mb_ota",
"firmware": "0x00000000",
"littlefs": "0x001c0000"
},
{
"name": "esp8285_1mb",
"firmware": "0x00000000",
"littlefs": "0x000bb000"
},
{
"name": "esp8285_1mb_ota",
"firmware": "0x00000000",
"littlefs": "0x000eb000"
},
{
"name": "esp32s2_4mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x290000"
},
{
"name": "esp32c3m_4mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x310000"
},
{
"name": "esp32s3_16mb",
"boot_app0": "0xe000",
"bootloader_qio_80m": "0x1000",
"firmware": "0x10000",
"partitions": "0x8000",
"littlefs": "0x910000"
}
]
}
},
"modules": {
"virtual_elments": [
{
"path": "src/modules/virtual/Benchmark",
"active": false
},
{
"path": "src/modules/virtual/Cron",
"active": true
},
{
"path": "src/modules/virtual/GoogleSheet",
"active": false
},
{
"path": "src/modules/virtual/Loging",
"active": true
},
{
"path": "src/modules/virtual/LogingDaily",
"active": true
},
{
"path": "src/modules/virtual/Math",
"active": true
},
{
"path": "src/modules/virtual/owmWeather",
"active": true
},
{
"path": "src/modules/virtual/Ping",
"active": true
},
{
"path": "src/modules/virtual/Timer",
"active": true
},
{
"path": "src/modules/virtual/Variable",
"active": true
},
{
"path": "src/modules/virtual/VButton",
"active": true
},
{
"path": "src/modules/virtual/Weather",
"active": false
}
],
"sensors": [
{
"path": "src/modules/exec/Pcf8591",
"active": false
},
{
"path": "src/modules/sensors/A02Distance",
"active": true
},
{
"path": "src/modules/sensors/Acs712",
"active": true
},
{
"path": "src/modules/sensors/Ads1115",
"active": false
},
{
"path": "src/modules/sensors/AhtXX",
"active": true
},
{
"path": "src/modules/sensors/AnalogAdc",
"active": true
},
{
"path": "src/modules/sensors/BH_1750",
"active": false
},
{
"path": "src/modules/sensors/BL0937",
"active": true
},
{
"path": "src/modules/sensors/Ble",
"active": false
},
{
"path": "src/modules/sensors/Ble_part1",
"active": false
},
{
"path": "src/modules/sensors/Ble_part2",
"active": false
},
{
"path": "src/modules/sensors/Bme280",
"active": true
},
{
"path": "src/modules/sensors/Bmp280",
"active": true
},
{
"path": "src/modules/sensors/Dht1122",
"active": true
},
{
"path": "src/modules/sensors/Ds18b20",
"active": true
},
{
"path": "src/modules/sensors/DS2401",
"active": false
},
{
"path": "src/modules/sensors/Emon",
"active": false
},
{
"path": "src/modules/sensors/EnergyMon485",
"active": false
},
{
"path": "src/modules/sensors/ExampleModule",
"active": false
},
{
"path": "src/modules/sensors/ExternalMQTT",
"active": false
},
{
"path": "src/modules/sensors/FreqMeter",
"active": false
},
{
"path": "src/modules/sensors/GY21",
"active": false
},
{
"path": "src/modules/sensors/Hdc1080",
"active": false
},
{
"path": "src/modules/sensors/Hx710",
"active": false
},
{
"path": "src/modules/sensors/Hx711",
"active": false
},
{
"path": "src/modules/sensors/Impulse",
"active": true
},
{
"path": "src/modules/sensors/Ina219",
"active": false
},
{
"path": "src/modules/sensors/Ina226",
"active": false
},
{
"path": "src/modules/sensors/IoTWiegand",
"active": false
},
{
"path": "src/modules/sensors/ld2410",
"active": false
},
{
"path": "src/modules/sensors/Max6675",
"active": false
},
{
"path": "src/modules/sensors/Mhz19",
"active": false
},
{
"path": "src/modules/sensors/MQgas",
"active": true
},
{
"path": "src/modules/sensors/Ntc",
"active": false
},
{
"path": "src/modules/sensors/Pzem004t",
"active": false
},
{
"path": "src/modules/sensors/Pzem004t_v2",
"active": true
},
{
"path": "src/modules/sensors/RCswitch",
"active": false
},
{
"path": "src/modules/sensors/RTC",
"active": true
},
{
"path": "src/modules/sensors/S8",
"active": true
},
{
"path": "src/modules/sensors/Scd40",
"active": false
},
{
"path": "src/modules/sensors/Sds011",
"active": false
},
{
"path": "src/modules/sensors/Sgp30",
"active": false
},
{
"path": "src/modules/sensors/Sht20",
"active": true
},
{
"path": "src/modules/sensors/Sht30",
"active": true
},
{
"path": "src/modules/sensors/Sonar",
"active": true
},
{
"path": "src/modules/sensors/UART",
"active": true
}
],
"executive_devices": [
{
"path": "src/modules/exec/AnalogBtn",
"active": true
},
{
"path": "src/modules/exec/BrokerMQTT",
"active": false
},
{
"path": "src/modules/exec/ButtonIn",
"active": true
},
{
"path": "src/modules/exec/ButtonOut",
"active": true
},
{
"path": "src/modules/exec/Buzzer",
"active": true
},
{
"path": "src/modules/exec/Enconder",
"active": true
},
{
"path": "src/modules/exec/EspCam",
"active": false
},
{
"path": "src/modules/exec/Ftp",
"active": false
},
{
"path": "src/modules/exec/HttpGet",
"active": false
},
{
"path": "src/modules/exec/IoTServo",
"active": true
},
{
"path": "src/modules/exec/Mcp23008",
"active": false
},
{
"path": "src/modules/exec/Mcp23017",
"active": true
},
{
"path": "src/modules/exec/Mp3",
"active": true
},
{
"path": "src/modules/exec/Multitouch",
"active": true
},
{
"path": "src/modules/exec/MySensors",
"active": false
},
{
"path": "src/modules/exec/Pcf8574",
"active": true
},
{
"path": "src/modules/exec/Pwm32",
"active": true
},
{
"path": "src/modules/exec/Pwm8266",
"active": true
},
{
"path": "src/modules/exec/SDcard",
"active": false
},
{
"path": "src/modules/exec/SIM800",
"active": false
},
{
"path": "src/modules/exec/SmartBoiler",
"active": false
},
{
"path": "src/modules/exec/SysExt",
"active": false
},
{
"path": "src/modules/exec/Telegram",
"active": false
},
{
"path": "src/modules/exec/TelegramLT",
"active": true
},
{
"path": "src/modules/exec/Telegram_v2",
"active": false
},
{
"path": "src/modules/exec/Thermostat",
"active": false
},
{
"path": "src/modules/sensors/Ds2423",
"active": false
}
],
"screens": [
{
"path": "src/modules/display/DwinI",
"active": true
},
{
"path": "src/modules/display/Lcd2004",
"active": true
},
{
"path": "src/modules/display/Nextion",
"active": false
},
{
"path": "src/modules/display/NextionUpload",
"active": false
},
{
"path": "src/modules/display/Oled128",
"active": false
},
{
"path": "src/modules/display/Oled64",
"active": true
},
{
"path": "src/modules/display/Smi2_m",
"active": true
},
{
"path": "src/modules/display/TM16XX",
"active": false
},
{
"path": "src/modules/display/Ws2812b",
"active": false
}
]
}
}

37
data_esp/config.json Normal file
View 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"
}

BIN
data_esp/css/build.css.gz Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View 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

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
data_esp/index.htm.gz Normal file

Binary file not shown.

BIN
data_esp/index.json.gz Normal file

Binary file not shown.

43
data_esp/items/items.txt Normal file
View 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]*

Binary file not shown.

BIN
data_esp/js/function.js.gz Normal file

Binary file not shown.

View File

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

View File

@@ -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]*

View 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
View 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
1 Удалить;Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета
2 0;uptime;upt;anydataTime;IoTManager;%name%#uptime;8;int[60]
3 0;output-value;ip;anydata;IoTManager;IP;9
4 0;output-value;time;anydata;IoTManager;Время#на#устройстве;10
5 0;output-value;weekday;anydata;IoTManager;День#недели#на#устройстве ;11

5
data_esp/s.scen.txt Normal file
View File

@@ -0,0 +1,5 @@
timenow > 0
weekday %weekday%
ip %IP%
time %date%
end

Binary file not shown.

BIN
data_esp/set.device.json.gz Normal file

Binary file not shown.

BIN
data_esp/set.manual.json.gz Normal file

Binary file not shown.

BIN
data_esp/set.mqtt.json.gz Normal file

Binary file not shown.

Binary file not shown.

BIN
data_esp/set.udp.json.gz Normal file

Binary file not shown.

Binary file not shown.

BIN
data_esp/set.wifi.json.gz Normal file

Binary file not shown.

View 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)}}

Binary file not shown.

63
data_esp/setup/global.css Normal file
View 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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

35
data_esp/widgets.json Normal file
View 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": "Без виджета"
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
{
"widget": "anydata",
"after": "%",
"icon": "water",
"color": "#88AADF"
}

View File

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

View File

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

View File

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

View 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" }
]
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
{
"widget": "chart",
"dateFormat": "DD.MM.YYYY",
"type":"bar"
}

View File

@@ -0,0 +1,4 @@
{
"widget": "chart",
"dateFormat": "DD.MM.YYYY"
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Binary file not shown.

View File

@@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>IoT Manager 4.6.2</title>
<link rel="icon" type="image/png" href="/favicon.ico" />
<link rel="stylesheet" href="/build/bundle.css?4550" />
<script defer src="/build/bundle.js?4550"></script>
</head>
<body></body>
</html>

View File

View File

@@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>IoT Manager 4.4.3</title>
<link rel="icon" type="image/png" href="/favicon.ico" />
<link
rel="stylesheet"
href="https://iotmanager.org/esp01ota/build/bundle.css?450"
/>
</head>
<body>
<script>
let script = document.createElement("script");
script.src = "https://iotmanager.org/esp01ota/build/bundle.js?450";
script.onload = execute;
document.head.append(script);
script.onerror = error;
function error() {
console.log("ошибка при загрузке ресурса");
}
function execute() {
console.log("скрипт загружен");
document.getElementById("my-form").style.display = "none";
}
</script>
<div style="display: flex; align-items: center; justify-content: center">
<form method="GET" action="http://192.168.4.1/set" id="my-form">
<br /><br />
<h1>Настройка WiFi</h1>
<br />
<div>
<input name="routerssid" type="text" placeholder="WIFI" />
</div>
<br />
<div>
<input name="routerpass" placeholder="Password" />
</div>
<br /><br />
<input type="submit" value="сохранить" />
</form>
</div>
</body>
</html>

37
data_ms/config.json Normal file
View File

@@ -0,0 +1,37 @@
{
"name": "IoTmanager",
"chipID": "",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "Mikro",
"routerpass": "4455667788",
"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"
}

BIN
data_ms/css/build.css.gz Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View 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;
}

View 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_ms/edit.htm.gz Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
data_ms/index.htm.gz Normal file

Binary file not shown.

BIN
data_ms/index.json.gz Normal file

Binary file not shown.

10
data_ms/items/items.txt Normal file
View File

@@ -0,0 +1,10 @@
0;button-out;btnid;toggleBtn;Кнопки;Освещение;order*
0;button-out;100-0;toggleBtn;Кнопки;Освещение;order;type[ms]*
0;input;dgtid;inputDigit;Ввод;Введите#цифру;order*
0;input;tmid;inputTime;Ввод;Введите#время;order*
0;output;txtid;anydata;Вывод;Сигнализация;order*
0;count-down;cntid;anydata;Таймер;Обратный#отчет;order*
0;sensor-node;100-0;anydataTemp;MySensors;Температура;order;tm1[30];tm2[60];c[1];k[0]*
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]*

View File

@@ -0,0 +1,2 @@
0;sensor-node;id;file;MySensors;descr;order;tm1[30];tm2[60];c[1];k[0]*
0;button-out;id;toggleBtn;Кнопки;descr;order;type[ms]*

Binary file not shown.

BIN
data_ms/js/function.js.gz Normal file

Binary file not shown.

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