diff --git a/PrepareProject.py b/PrepareProject.py index f0b58f8d..55b4e383 100644 --- a/PrepareProject.py +++ b/PrepareProject.py @@ -32,6 +32,7 @@ import configparser import os, json, sys, getopt from pathlib import Path import shutil +from distutils.dir_util import copy_tree config = configparser.ConfigParser() # создаём объекта парсера INI @@ -125,23 +126,19 @@ else: # определяем какое устройство используется в профиле deviceName = profJson['projectProp']['platformio']['default_envs'] -# назначаем папку с файлами прошивки в зависимости от устройства и запоминаем в профиле -dataDir = 'data_svelte' +# заполняем папку /data файлами прошивки в зависимости от устройства if deviceName == 'esp8266_1mb_ota' or deviceName == 'esp8285_1mb_ota' or deviceName == 'esp8266_2mb_ota': - dataDir = 'data_svelte_lite' -profJson['projectProp'] = { - 'platformio': { - 'data_dir': dataDir - } -} + copy_tree("data_lite", "data_svelte") +else: + copy_tree("data_full", "data_svelte") # генерируем файлы проекта на основе подготовленного профиля # заполняем конфигурационный файл прошивки параметрами из профиля -with open(dataDir + "/settings.json", "r", encoding='utf-8') as read_file: +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(dataDir + "/settings.json", "w", encoding='utf-8') as write_file: +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) @@ -170,7 +167,7 @@ for section, modules in profJson['modules'].items(): configItemsJson['name'] = str(itemsCount) + ". " + configItemsJson['name'] itemsCount = itemsCount + 1 itemsJson.append(configItemsJson) -with open(dataDir + "/items.json", "w", encoding='utf-8') as write_file: +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) @@ -205,14 +202,23 @@ config.read("platformio.ini") config["env:" + deviceName + "_fromitems"]["lib_deps"] = allLibs config["env:" + deviceName + "_fromitems"]["build_src_filter"] = includeDirs config["platformio"]["default_envs"] = deviceName -config["platformio"]["data_dir"] = profJson['projectProp']['platformio']['data_dir'] +# 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 {dataDir}") -shutil.copy(profile, dataDir + "/" + profile) - + +# сохраняем часть применяемого профиля в папку 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: @@ -221,6 +227,7 @@ shutil.copy(profile, dataDir + "/" + profile) # 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: diff --git a/data_svelte/myProfile.json b/compilerProfile.json similarity index 99% rename from data_svelte/myProfile.json rename to compilerProfile.json index a6e193dc..a7087d24 100644 --- a/data_svelte/myProfile.json +++ b/compilerProfile.json @@ -120,6 +120,10 @@ "path": "src/modules/virtual/LogingDaily", "active": true }, + { + "path": "src/modules/virtual/owmWeather", + "active": true + }, { "path": "src/modules/virtual/Timer", "active": true diff --git a/data_full/build/bundle.css.gz b/data_full/build/bundle.css.gz new file mode 100644 index 00000000..1cf84b11 Binary files /dev/null and b/data_full/build/bundle.css.gz differ diff --git a/data_full/build/bundle.js.gz b/data_full/build/bundle.js.gz new file mode 100644 index 00000000..04dc22a5 Binary files /dev/null and b/data_full/build/bundle.js.gz differ diff --git a/data_full/favicon.ico b/data_full/favicon.ico new file mode 100644 index 00000000..50d908fa Binary files /dev/null and b/data_full/favicon.ico differ diff --git a/data_full/index.html b/data_full/index.html new file mode 100644 index 00000000..8b97c0b8 --- /dev/null +++ b/data_full/index.html @@ -0,0 +1,16 @@ + + + + + + + IoT Manager 4.5.2 + + + + + + + + + diff --git a/data_svelte_lite/dev_conf.txt b/data_lite/build/bundle.css.gz similarity index 100% rename from data_svelte_lite/dev_conf.txt rename to data_lite/build/bundle.css.gz diff --git a/data_svelte_lite/scenario.txt b/data_lite/build/bundle.js.gz similarity index 100% rename from data_svelte_lite/scenario.txt rename to data_lite/build/bundle.js.gz diff --git a/data_lite/favicon.ico b/data_lite/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/data_svelte_lite/index.html b/data_lite/index.html similarity index 100% rename from data_svelte_lite/index.html rename to data_lite/index.html diff --git a/data_svelte_lite/myProfile.json b/data_svelte/flashProfile.json similarity index 78% rename from data_svelte_lite/myProfile.json rename to data_svelte/flashProfile.json index 74f9bad7..4c908db4 100644 --- a/data_svelte_lite/myProfile.json +++ b/data_svelte/flashProfile.json @@ -1,31 +1,7 @@ { - "iotmSettings": { - "name": "IoTmanagerVer4", - "apssid": "IoTmanager", - "appass": "", - "routerssid": "rise", - "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_1mb_ota", - "comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota" + "default_envs": "esp8266_4mb" } }, "modules": { @@ -34,6 +10,10 @@ "path": "src/modules/virtual/Cron", "active": true }, + { + "path": "src/modules/virtual/GoogleSheet", + "active": false + }, { "path": "src/modules/virtual/Loging", "active": true @@ -42,6 +22,10 @@ "path": "src/modules/virtual/LogingDaily", "active": true }, + { + "path": "src/modules/virtual/owmWeather", + "active": true + }, { "path": "src/modules/virtual/Timer", "active": true @@ -64,6 +48,10 @@ } ], "sensors": [ + { + "path": "src/modules/sensors/A02Distance", + "active": true + }, { "path": "src/modules/sensors/Acs712", "active": true @@ -112,6 +100,10 @@ "path": "src/modules/sensors/Emon", "active": false }, + { + "path": "src/modules/sensors/ExampleModule", + "active": false + }, { "path": "src/modules/sensors/ExternalMQTT", "active": false @@ -144,10 +136,18 @@ "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 @@ -156,6 +156,10 @@ "path": "src/modules/sensors/Mhz19", "active": false }, + { + "path": "src/modules/sensors/Ntc", + "active": false + }, { "path": "src/modules/sensors/Pzem004t", "active": true @@ -168,6 +172,14 @@ "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 @@ -202,10 +214,22 @@ "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 @@ -262,9 +286,17 @@ "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": [ @@ -280,6 +312,18 @@ "path": "src/modules/display/NextionUpload", "active": false }, + { + "path": "src/modules/display/Oled128", + "active": false + }, + { + "path": "src/modules/display/Smi2_m", + "active": true + }, + { + "path": "src/modules/display/TM16XX", + "active": true + }, { "path": "src/modules/display/Ws2812b", "active": false diff --git a/data_svelte/items.json b/data_svelte/items.json index 3a180753..e796d869 100644 --- a/data_svelte/items.json +++ b/data_svelte/items.json @@ -68,7 +68,29 @@ }, { "global": 0, - "name": "5. Таймер", + "name": "5. Погода OWM", + "type": "Reading", + "subtype": "owmWeather", + "id": "owm", + "needSave": 0, + "widget": "nil", + "page": "Погода", + "descr": "Температура на улице", + "int": 30, + "API_key": "", + "сity": "Moscow", + "lon": "37.54", + "lat": "57.74", + "lang": "ru", + "param": "", + "round": 1, + "val": "...", + "debug": 0, + "num": 5 + }, + { + "global": 0, + "name": "6. Таймер", "type": "Writing", "subtype": "Timer", "id": "timer", @@ -80,11 +102,11 @@ "ticker": 1, "repeat": 1, "needSave": 0, - "num": 5 + "num": 6 }, { "global": 0, - "name": "6. Окно ввода числа (переменная)", + "name": "7. Окно ввода числа (переменная)", "type": "Reading", "subtype": "Variable", "id": "value", @@ -98,11 +120,11 @@ "plus": 0, "multiply": 1, "round": 0, - "num": 6 + "num": 7 }, { "global": 0, - "name": "7. Окно ввода времени", + "name": "8. Окно ввода времени", "type": "Reading", "subtype": "Variable", "id": "time", @@ -112,11 +134,11 @@ "descr": "Введите время", "int": "0", "val": "02:00", - "num": 7 + "num": 8 }, { "global": 0, - "name": "8. Окно ввода даты", + "name": "9. Окно ввода даты", "type": "Reading", "subtype": "Variable", "id": "time", @@ -126,11 +148,11 @@ "descr": "Введите дату", "int": "0", "val": "24.05.2022", - "num": 8 + "num": 9 }, { "global": 0, - "name": "9. Окно ввода текста", + "name": "10. Окно ввода текста", "type": "Reading", "subtype": "Variable", "id": "txt", @@ -140,11 +162,11 @@ "descr": "Введите текст", "int": "0", "val": "текст", - "num": 9 + "num": 10 }, { "global": 0, - "name": "10. Вывод значения", + "name": "11. Вывод значения", "type": "Reading", "subtype": "Variable", "id": "vout", @@ -158,11 +180,11 @@ "plus": 0, "multiply": 1, "round": 0, - "num": 10 + "num": 11 }, { "global": 0, - "name": "11. Цветной текст", + "name": "12. Цветной текст", "type": "Reading", "subtype": "VariableColor", "id": "color", @@ -172,11 +194,11 @@ "descr": "Цветной текст", "val": "...", "round": 0, - "num": 11 + "num": 12 }, { "global": 0, - "name": "12. Виртуальная кнопка", + "name": "13. Виртуальная кнопка", "type": "Reading", "subtype": "VButton", "id": "vbtn", @@ -186,13 +208,13 @@ "descr": "Кнопка", "int": "0", "val": "0", - "num": 12 + "num": 13 }, { "header": "sensors" }, { - "name": "13. A02 Дальность", + "name": "14. A02 Дальность", "type": "Reading", "subtype": "A02Distance", "id": "dist", @@ -201,10 +223,10 @@ "descr": "Дальность", "int": 5, "round": 1, - "num": 13 + "num": 14 }, { - "name": "14. Acs712 Ток", + "name": "15. Acs712 Ток", "type": "Reading", "subtype": "Acs712", "id": "amp", @@ -219,11 +241,11 @@ "sens": 100, "adczero": 512, "btn-setZero": "nil", - "num": 14 + "num": 15 }, { "global": 0, - "name": "15. AHTXX Температура", + "name": "16. AHTXX Температура", "type": "Reading", "subtype": "AhtXXt", "id": "Temp20", @@ -234,11 +256,11 @@ "addr": "0x38", "shtType": 1, "round": 1, - "num": 15 + "num": 16 }, { "global": 0, - "name": "16. AHTXX Влажность", + "name": "17. AHTXX Влажность", "type": "Reading", "subtype": "AhtXXh", "id": "Hum20", @@ -249,11 +271,11 @@ "addr": "0x38", "shtType": 1, "round": 1, - "num": 16 + "num": 17 }, { "global": 0, - "name": "17. Аналоговый сенсор", + "name": "18. Аналоговый сенсор", "type": "Reading", "subtype": "AnalogAdc", "id": "t", @@ -267,11 +289,11 @@ "pin": 0, "int": 15, "avgSteps": 1, - "num": 17 + "num": 18 }, { "global": 0, - "name": "18. BME280 Температура", + "name": "19. BME280 Температура", "type": "Reading", "subtype": "Bme280t", "id": "Tmp3", @@ -281,11 +303,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 18 + "num": 19 }, { "global": 0, - "name": "19. BME280 Давление", + "name": "20. BME280 Давление", "type": "Reading", "subtype": "Bme280p", "id": "Press3", @@ -295,11 +317,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 19 + "num": 20 }, { "global": 0, - "name": "20. BME280 Влажность", + "name": "21. BME280 Влажность", "type": "Reading", "subtype": "Bme280h", "id": "Hum3", @@ -309,11 +331,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 20 + "num": 21 }, { "global": 0, - "name": "21. BME280 Tочка росы", + "name": "22. BME280 Tочка росы", "type": "Reading", "subtype": "Bme280dp", "id": "Dew3", @@ -323,11 +345,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 21 + "num": 22 }, { "global": 0, - "name": "22. BMP280 Температура", + "name": "23. BMP280 Температура", "type": "Reading", "subtype": "Bmp280t", "id": "tmp3", @@ -337,11 +359,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 22 + "num": 23 }, { "global": 0, - "name": "23. BMP280 Давление", + "name": "24. BMP280 Давление", "type": "Reading", "subtype": "Bmp280p", "id": "Press3", @@ -351,11 +373,11 @@ "int": 15, "addr": "0x77", "round": 1, - "num": 23 + "num": 24 }, { "global": 0, - "name": "24. DHT11 Температура", + "name": "25. DHT11 Температура", "type": "Reading", "subtype": "Dht1122t", "id": "tmp3", @@ -365,11 +387,11 @@ "int": 15, "pin": 0, "senstype": "dht11", - "num": 24 + "num": 25 }, { "global": 0, - "name": "25. DHT11 Влажность", + "name": "26. DHT11 Влажность", "type": "Reading", "subtype": "Dht1122h", "id": "Hum3", @@ -379,11 +401,11 @@ "int": 15, "pin": 0, "senstype": "dht11", - "num": 25 + "num": 26 }, { "global": 0, - "name": "26. DS18B20 Температура", + "name": "27. DS18B20 Температура", "type": "Reading", "subtype": "Ds18b20", "id": "dstmp", @@ -395,11 +417,11 @@ "index": 0, "addr": "", "round": 1, - "num": 26 + "num": 27 }, { "global": 0, - "name": "27. Аналоговый счетчик импульсов", + "name": "28. Аналоговый счетчик импульсов", "type": "Writing", "subtype": "Impulse", "id": "impulse", @@ -412,11 +434,11 @@ "pinMode": "INPUT", "debounceDelay": 3, "multiply": 1, - "num": 27 + "num": 28 }, { "global": 0, - "name": "28. PZEM 004t Напряжение", + "name": "29. PZEM 004t Напряжение", "type": "Reading", "subtype": "Pzem004v", "id": "v", @@ -426,11 +448,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 28 + "num": 29 }, { "global": 0, - "name": "29. PZEM 004t Сила тока", + "name": "30. PZEM 004t Сила тока", "type": "Reading", "subtype": "Pzem004a", "id": "a", @@ -440,11 +462,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 29 + "num": 30 }, { "global": 0, - "name": "30. PZEM 004t Мощность", + "name": "31. PZEM 004t Мощность", "type": "Reading", "subtype": "Pzem004w", "id": "w", @@ -454,11 +476,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 30 + "num": 31 }, { "global": 0, - "name": "31. PZEM 004t Энергия", + "name": "32. PZEM 004t Энергия", "type": "Reading", "subtype": "Pzem004wh", "id": "wh", @@ -468,11 +490,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 31 + "num": 32 }, { "global": 0, - "name": "32. PZEM 004t Частота", + "name": "33. PZEM 004t Частота", "type": "Reading", "subtype": "Pzem004hz", "id": "hz", @@ -482,11 +504,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 32 + "num": 33 }, { "global": 0, - "name": "33. PZEM 004t Косинус", + "name": "34. PZEM 004t Косинус", "type": "Reading", "subtype": "Pzem004pf", "id": "pf", @@ -496,11 +518,11 @@ "int": 15, "addr": "0xF8", "round": 1, - "num": 33 + "num": 34 }, { "global": 0, - "name": "34. PZEM настройка", + "name": "35. PZEM настройка", "type": "Reading", "subtype": "Pzem004cmd", "id": "set", @@ -512,11 +534,11 @@ "changeaddr": 0, "setaddr": "0x01", "reset": 0, - "num": 34 + "num": 35 }, { "global": 0, - "name": "35. Часы реального времени", + "name": "36. Часы реального времени", "type": "Reading", "subtype": "RTC", "id": "rtc", @@ -532,11 +554,11 @@ "int": 5, "btn-setUTime": "0", "btn-setSysTime": "nil", - "num": 35 + "num": 36 }, { - "name": "36. (S8) Cенсор качества воздуха", - "num": 36, + "name": "37. (S8) Cенсор качества воздуха", + "num": 37, "type": "Reading", "subtype": "S8co", "id": "s8co", @@ -550,7 +572,7 @@ }, { "global": 0, - "name": "37. Sht20 Температура", + "name": "38. Sht20 Температура", "type": "Reading", "subtype": "Sht20t", "id": "tmp2", @@ -559,11 +581,11 @@ "descr": "Температура", "int": 15, "round": 1, - "num": 37 + "num": 38 }, { "global": 0, - "name": "38. Sht20 Влажность", + "name": "39. Sht20 Влажность", "type": "Reading", "subtype": "Sht20h", "id": "Hum2", @@ -572,11 +594,11 @@ "descr": "Влажность", "int": 15, "round": 1, - "num": 38 + "num": 39 }, { "global": 0, - "name": "39. Sht30 Температура", + "name": "40. Sht30 Температура", "type": "Reading", "subtype": "Sht30t", "id": "tmp30", @@ -585,11 +607,11 @@ "descr": "SHT30 Температура", "int": 15, "round": 1, - "num": 39 + "num": 40 }, { "global": 0, - "name": "40. Sht30 Влажность", + "name": "41. Sht30 Влажность", "type": "Reading", "subtype": "Sht30h", "id": "Hum30", @@ -598,12 +620,12 @@ "descr": "SHT30 Влажность", "int": 15, "round": 1, - "num": 40 + "num": 41 }, { "global": 0, - "name": "41. HC-SR04 Ультразвуковой дальномер", - "num": 41, + "name": "42. HC-SR04 Ультразвуковой дальномер", + "num": 42, "type": "Reading", "subtype": "Sonar", "id": "sonar", @@ -615,7 +637,7 @@ "int": 5 }, { - "name": "42. UART", + "name": "43. UART", "type": "Reading", "subtype": "UART", "page": "", @@ -627,14 +649,14 @@ "line": 2, "speed": 9600, "eventFormat": 0, - "num": 42 + "num": 43 }, { "header": "executive_devices" }, { "global": 0, - "name": "43. Кнопка подключенная к пину", + "name": "44. Кнопка подключенная к пину", "type": "Writing", "subtype": "ButtonIn", "id": "btn", @@ -649,11 +671,11 @@ "debounceDelay": 50, "fixState": 0, "inv": 0, - "num": 43 + "num": 44 }, { "global": 0, - "name": "44. Управление пином", + "name": "45. Управление пином", "type": "Writing", "subtype": "ButtonOut", "needSave": 0, @@ -664,11 +686,11 @@ "int": 0, "inv": 0, "pin": 2, - "num": 44 + "num": 45 }, { "global": 0, - "name": "45. Пассивный звуковой извещатель", + "name": "46. Пассивный звуковой извещатель", "type": "Writing", "subtype": "Buzzer", "id": "buzzer", @@ -687,11 +709,11 @@ "cycle": 0, "indication": 1, "val": 0, - "num": 45 + "num": 46 }, { "global": 0, - "name": "46. Энкодер", + "name": "47. Энкодер", "type": "Writing", "subtype": "Encoder", "id": "enc", @@ -704,11 +726,11 @@ "step": 1, "stepOnPress": 5, "pins": "4,5,2", - "num": 46 + "num": 47 }, { "global": 0, - "name": "47. Сервопривод", + "name": "48. Сервопривод", "type": "Writing", "subtype": "IoTServo", "id": "servo", @@ -719,11 +741,11 @@ "pin": 12, "apin": -1, "amap": "0, 4096, 0, 180", - "num": 47 + "num": 48 }, { "global": 0, - "name": "48. Расширитель портов Mcp23017", + "name": "49. Расширитель портов Mcp23017", "type": "Reading", "subtype": "Mcp23017", "id": "Mcp", @@ -733,11 +755,11 @@ "int": "0", "addr": "0x20", "index": 1, - "num": 48 + "num": 49 }, { "global": 0, - "name": "49. MP3 плеер", + "name": "50. MP3 плеер", "type": "Reading", "subtype": "Mp3", "id": "mp3", @@ -747,11 +769,11 @@ "int": 1, "pins": "14,12", "volume": 20, - "num": 49 + "num": 50 }, { "global": 0, - "name": "50. Сенсорная кнопка", + "name": "51. Сенсорная кнопка", "type": "Writing", "subtype": "Multitouch", "id": "impulse", @@ -765,11 +787,11 @@ "pinMode": "INPUT", "debounceDelay": 50, "PWMDelay": 500, - "num": 50 + "num": 51 }, { "global": 0, - "name": "51. Расширитель портов Pcf8574", + "name": "52. Расширитель портов Pcf8574", "type": "Reading", "subtype": "Pcf8574", "id": "Pcf", @@ -779,11 +801,11 @@ "int": "0", "addr": "0x20", "index": 1, - "num": 51 + "num": 52 }, { "global": 0, - "name": "52. PWM ESP8266", + "name": "53. PWM ESP8266", "type": "Writing", "subtype": "Pwm8266", "id": "pwm", @@ -795,11 +817,11 @@ "freq": 5000, "val": 0, "apin": -1, - "num": 52 + "num": 53 }, { "global": 0, - "name": "53. Телеграм-Лайт", + "name": "54. Телеграм-Лайт", "type": "Writing", "subtype": "TelegramLT", "id": "tg", @@ -808,14 +830,14 @@ "descr": "", "token": "", "chatID": "", - "num": 53 + "num": 54 }, { "header": "screens" }, { "global": 0, - "name": "54. LCD экран 2004", + "name": "55. LCD экран 2004", "type": "Reading", "subtype": "Lcd2004", "id": "Lcd", @@ -828,10 +850,10 @@ "id2show": "", "prefix": "", "postfix": "", - "num": 54 + "num": 55 }, { - "name": "55. LCD экран 1602", + "name": "56. LCD экран 1602", "type": "Reading", "subtype": "Lcd2004", "id": "Lcd", @@ -844,11 +866,11 @@ "id2show": "", "prefix": "", "postfix": "", - "num": 55 + "num": 56 }, { "global": 0, - "name": "56. 7 сегментный дисплей TM16XX", + "name": "57. 7 сегментный дисплей TM16XX", "type": "Writing", "subtype": "TM16XX", "id": "tm", @@ -864,6 +886,6 @@ "intensity": "5", "on": "1", "id2show": "", - "num": 56 + "num": 57 } ] \ No newline at end of file diff --git a/data_svelte_lite/config.json b/data_svelte_lite/config.json deleted file mode 100644 index 0637a088..00000000 --- a/data_svelte_lite/config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/data_svelte_lite/edit.htm.gz b/data_svelte_lite/edit.htm.gz deleted file mode 100644 index 06931fac..00000000 Binary files a/data_svelte_lite/edit.htm.gz and /dev/null differ diff --git a/data_svelte_lite/items.json b/data_svelte_lite/items.json deleted file mode 100644 index b3894185..00000000 --- a/data_svelte_lite/items.json +++ /dev/null @@ -1,694 +0,0 @@ -[ - { - "name": "Выберите элемент", - "num": 0 - }, - { - "header": "virtual_elments" - }, - { - "global": 0, - "name": "1. Будильник (Cron)", - "type": "Writing", - "subtype": "Cron", - "id": "cron", - "widget": "anydataDef", - "page": "Таймеры", - "descr": "Будильник", - "int": 1, - "val": "*/15 * * * * *", - "formatNextAlarm": "%H:%M:%S", - "needSave": 0, - "num": 1 - }, - { - "global": 0, - "name": "2. График", - "type": "Writing", - "subtype": "Loging", - "id": "log", - "widget": "chart2", - "page": "Графики", - "descr": "Температура", - "num": 2, - "int": 5, - "logid": "t", - "points": 300 - }, - { - "global": 0, - "name": "3. График по событию", - "type": "Writing", - "subtype": "Loging", - "id": "log", - "widget": "chart2", - "page": "Графики", - "descr": "Температура", - "int": 0, - "num": 3, - "points": 300 - }, - { - "global": 0, - "name": "4. График дневного расхода", - "type": "Writing", - "subtype": "LogingDaily", - "id": "log", - "widget": "chart3", - "page": "Графики", - "descr": "Температура", - "num": 4, - "int": 1, - "logid": "t", - "points": 365, - "telegram": 0, - "test": 0, - "btn-defvalue": 0, - "btn-reset": "nil" - }, - { - "global": 0, - "name": "5. Таймер", - "type": "Writing", - "subtype": "Timer", - "id": "timer", - "widget": "anydataDef", - "page": "Таймеры", - "descr": "Таймер", - "int": 1, - "countDown": 15, - "ticker": 1, - "repeat": 1, - "needSave": 0, - "num": 5 - }, - { - "global": 0, - "name": "6. Окно ввода числа (переменная)", - "type": "Reading", - "subtype": "Variable", - "id": "value", - "needSave": 0, - "widget": "inputDgt", - "page": "Ввод", - "descr": "Введите число", - "int": "0", - "val": "0.0", - "map": "1024,1024,1,100", - "plus": 0, - "multiply": 1, - "round": 0, - "num": 6 - }, - { - "global": 0, - "name": "7. Окно ввода времени", - "type": "Reading", - "subtype": "Variable", - "id": "time", - "needSave": 0, - "widget": "inputTm", - "page": "Ввод", - "descr": "Введите время", - "int": "0", - "val": "02:00", - "num": 7 - }, - { - "global": 0, - "name": "8. Окно ввода даты", - "type": "Reading", - "subtype": "Variable", - "id": "time", - "needSave": 0, - "widget": "inputDate", - "page": "Ввод", - "descr": "Введите дату", - "int": "0", - "val": "24.05.2022", - "num": 8 - }, - { - "global": 0, - "name": "9. Окно ввода текста", - "type": "Reading", - "subtype": "Variable", - "id": "txt", - "needSave": 0, - "widget": "inputTxt", - "page": "Ввод", - "descr": "Введите текст", - "int": "0", - "val": "текст", - "num": 9 - }, - { - "global": 0, - "name": "10. Вывод значения", - "type": "Reading", - "subtype": "Variable", - "id": "vout", - "needSave": 0, - "widget": "anydataDef", - "page": "Вывод", - "descr": "Значение", - "int": "0", - "val": "0.0", - "map": "1024,1024,1,100", - "plus": 0, - "multiply": 1, - "round": 0, - "num": 10 - }, - { - "global": 0, - "name": "11. Цветной текст", - "type": "Reading", - "subtype": "VariableColor", - "id": "color", - "needSave": 0, - "widget": "anydataDef", - "page": "Вывод", - "descr": "Цветной текст", - "val": "...", - "round": 0, - "num": 11 - }, - { - "global": 0, - "name": "12. Виртуальная кнопка", - "type": "Reading", - "subtype": "VButton", - "id": "vbtn", - "needSave": 0, - "widget": "toggle", - "page": "Кнопки", - "descr": "Кнопка", - "int": "0", - "val": "0", - "num": 12 - }, - { - "header": "sensors" - }, - { - "name": "13. Acs712 Ток", - "type": "Reading", - "subtype": "Acs712", - "id": "amp", - "widget": "anydataAmp", - "page": "sensors", - "descr": "Ток", - "round": 3, - "pin": 39, - "int": 5, - "rms": 1, - "vref": 5000, - "sens": 100, - "adczero": 512, - "btn-setZero": "nil", - "num": 13 - }, - { - "global": 0, - "name": "14. Аналоговый сенсор", - "type": "Reading", - "subtype": "AnalogAdc", - "id": "t", - "widget": "anydataTmp", - "page": "sensors", - "descr": "Температура", - "map": "1,1024,1,100", - "plus": 0, - "multiply": 1, - "round": 1, - "pin": 0, - "int": 15, - "avgSteps": 1, - "num": 14 - }, - { - "global": 0, - "name": "15. BME280 Температура", - "type": "Reading", - "subtype": "Bme280t", - "id": "Tmp3", - "widget": "anydataTmp", - "page": "sensors", - "descr": "Температура", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 15 - }, - { - "global": 0, - "name": "16. BME280 Давление", - "type": "Reading", - "subtype": "Bme280p", - "id": "Press3", - "widget": "anydataMm", - "page": "sensors", - "descr": "Давление", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 16 - }, - { - "global": 0, - "name": "17. BME280 Влажность", - "type": "Reading", - "subtype": "Bme280h", - "id": "Hum3", - "widget": "anydataHum", - "page": "sensors", - "descr": "Влажность", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 17 - }, - { - "global": 0, - "name": "18. BME280 Tочка росы", - "type": "Reading", - "subtype": "Bme280dp", - "id": "Dew3", - "widget": "anydataTmp", - "page": "sensors", - "descr": "Точка росы", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 18 - }, - { - "global": 0, - "name": "19. BMP280 Температура", - "type": "Reading", - "subtype": "Bmp280t", - "id": "tmp3", - "widget": "anydataTmp", - "page": "sensors", - "descr": "280 Температура", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 19 - }, - { - "global": 0, - "name": "20. BMP280 Давление", - "type": "Reading", - "subtype": "Bmp280p", - "id": "Press3", - "widget": "anydataMm", - "page": "sensors", - "descr": "280 Давление", - "int": 15, - "addr": "0x77", - "round": 1, - "num": 20 - }, - { - "global": 0, - "name": "21. DS18B20 Температура", - "type": "Reading", - "subtype": "Ds18b20", - "id": "dstmp", - "widget": "anydataTmp", - "page": "sensors", - "descr": "DS Температура", - "int": 15, - "pin": 2, - "index": 0, - "addr": "", - "round": 1, - "num": 21 - }, - { - "global": 0, - "name": "22. Аналоговый счетчик импульсов", - "type": "Writing", - "subtype": "Impulse", - "id": "impulse", - "widget": "anydataDef", - "page": "Счетчики", - "descr": "Импульсов", - "needSave": 0, - "int": 1, - "pin": 16, - "pinMode": "INPUT", - "debounceDelay": 3, - "multiply": 1, - "num": 22 - }, - { - "global": 0, - "name": "23. PZEM 004t Напряжение", - "type": "Reading", - "subtype": "Pzem004v", - "id": "v", - "widget": "anydataVlt", - "page": "PZEM", - "descr": "Напряжение", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 23 - }, - { - "global": 0, - "name": "24. PZEM 004t Сила тока", - "type": "Reading", - "subtype": "Pzem004a", - "id": "a", - "widget": "anydataAmp", - "page": "PZEM", - "descr": "Сила тока", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 24 - }, - { - "global": 0, - "name": "25. PZEM 004t Мощность", - "type": "Reading", - "subtype": "Pzem004w", - "id": "w", - "widget": "anydataWt", - "page": "PZEM", - "descr": "Мощность", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 25 - }, - { - "global": 0, - "name": "26. PZEM 004t Энергия", - "type": "Reading", - "subtype": "Pzem004wh", - "id": "wh", - "widget": "anydataWth", - "page": "PZEM", - "descr": "Энергия", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 26 - }, - { - "global": 0, - "name": "27. PZEM 004t Частота", - "type": "Reading", - "subtype": "Pzem004hz", - "id": "hz", - "widget": "anydataHtz", - "page": "PZEM", - "descr": "Частота", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 27 - }, - { - "global": 0, - "name": "28. PZEM 004t Косинус", - "type": "Reading", - "subtype": "Pzem004pf", - "id": "pf", - "widget": "anydata", - "page": "PZEM", - "descr": "Косинус F", - "int": 15, - "addr": "0xF8", - "round": 1, - "num": 28 - }, - { - "global": 0, - "name": "29. PZEM настройка", - "type": "Reading", - "subtype": "Pzem004cmd", - "id": "set", - "widget": "nil", - "page": "", - "descr": "", - "int": 15, - "addr": "0xF8", - "changeaddr": 0, - "setaddr": "0x01", - "reset": 0, - "num": 29 - }, - { - "global": 0, - "name": "30. Часы реального времени", - "type": "Reading", - "subtype": "RTC", - "id": "rtc", - "widget": "anydataDef", - "page": "Таймеры", - "descr": "Время RTC", - "chipCode": 1, - "timeFormat": "d-m-Y H:i:s", - "RST": -1, - "CLK": -1, - "DAT": -1, - "ticker": 0, - "int": 5, - "btn-setUTime": "0", - "btn-setSysTime": "nil", - "num": 30 - }, - { - "global": 0, - "name": "31. Sht20 Температура", - "type": "Reading", - "subtype": "Sht20t", - "id": "tmp2", - "widget": "anydataTmp", - "page": "sensors", - "descr": "Температура", - "int": 15, - "round": 1, - "num": 31 - }, - { - "global": 0, - "name": "32. Sht20 Влажность", - "type": "Reading", - "subtype": "Sht20h", - "id": "Hum2", - "widget": "anydataHum", - "page": "sensors", - "descr": "Влажность", - "int": 15, - "round": 1, - "num": 32 - }, - { - "global": 0, - "name": "33. Sht30 Температура", - "type": "Reading", - "subtype": "Sht30t", - "id": "tmp30", - "widget": "anydataTmp", - "page": "sensors", - "descr": "SHT30 Температура", - "int": 15, - "round": 1, - "num": 33 - }, - { - "global": 0, - "name": "34. Sht30 Влажность", - "type": "Reading", - "subtype": "Sht30h", - "id": "Hum30", - "widget": "anydataHum", - "page": "sensors", - "descr": "SHT30 Влажность", - "int": 15, - "round": 1, - "num": 34 - }, - { - "global": 0, - "name": "35. HC-SR04 Ультразвуковой дальномер", - "num": 35, - "type": "Reading", - "subtype": "Sonar", - "id": "sonar", - "widget": "anydataTmp", - "page": "sensors", - "descr": "Расстояние (см)", - "pinTrig": 5, - "pinEcho": 4, - "int": 5 - }, - { - "name": "36. UART", - "type": "Reading", - "subtype": "UART", - "page": "", - "descr": "", - "widget": "nil", - "id": "u", - "tx": 4, - "rx": 5, - "line": 2, - "speed": 9600, - "eventFormat": 0, - "num": 36 - }, - { - "header": "executive_devices" - }, - { - "global": 0, - "name": "37. Кнопка подключенная к пину", - "type": "Writing", - "subtype": "ButtonIn", - "id": "btn", - "widget": "toggle", - "page": "Кнопки", - "descr": "Освещение", - "needSave": 0, - "int": 0, - "pin": 16, - "execLevel": "1", - "pinMode": "INPUT", - "debounceDelay": 50, - "fixState": 0, - "inv": 0, - "num": 37 - }, - { - "global": 0, - "name": "38. Управление пином", - "type": "Writing", - "subtype": "ButtonOut", - "needSave": 0, - "id": "btn", - "widget": "toggle", - "page": "Кнопки", - "descr": "Освещение", - "int": 0, - "inv": 0, - "pin": 2, - "num": 38 - }, - { - "global": 0, - "name": "39. Расширитель портов Mcp23017", - "type": "Reading", - "subtype": "Mcp23017", - "id": "Mcp", - "widget": "", - "page": "", - "descr": "", - "int": "0", - "addr": "0x20", - "index": 1, - "num": 39 - }, - { - "global": 0, - "name": "40. Сенсорная кнопка", - "type": "Writing", - "subtype": "Multitouch", - "id": "impulse", - "widget": "anydataDef", - "page": "Кнопки", - "descr": "Количество нажаний", - "needSave": 0, - "int": 300, - "inv": 1, - "pin": 16, - "pinMode": "INPUT", - "debounceDelay": 50, - "PWMDelay": 500, - "num": 40 - }, - { - "global": 0, - "name": "41. Расширитель портов Pcf8574", - "type": "Reading", - "subtype": "Pcf8574", - "id": "Pcf", - "widget": "", - "page": "", - "descr": "", - "int": "0", - "addr": "0x20", - "index": 1, - "num": 41 - }, - { - "global": 0, - "name": "42. PWM ESP8266", - "type": "Writing", - "subtype": "Pwm8266", - "id": "pwm", - "widget": "range", - "page": "Кнопки", - "descr": "PWM", - "int": 0, - "pin": 15, - "freq": 5000, - "val": 0, - "apin": -1, - "num": 42 - }, - { - "global": 0, - "name": "43. Телеграм-Лайт", - "type": "Writing", - "subtype": "TelegramLT", - "id": "tg", - "widget": "", - "page": "", - "descr": "", - "token": "", - "chatID": "", - "num": 43 - }, - { - "header": "screens" - }, - { - "global": 0, - "name": "44. LCD экран 2004", - "type": "Reading", - "subtype": "Lcd2004", - "id": "Lcd", - "widget": "", - "page": "", - "descr": "T", - "int": 15, - "addr": "0x27", - "size": "20,4", - "coord": "0,0", - "id2show": "id датчика", - "num": 44 - }, - { - "name": "45. LCD экран 1602", - "type": "Reading", - "subtype": "Lcd2004", - "id": "Lcd", - "widget": "", - "page": "", - "descr": "T", - "int": 15, - "addr": "0x27", - "size": "16,2", - "coord": "0,0", - "id2show": "id датчика", - "num": 45 - } -] \ No newline at end of file diff --git a/data_svelte_lite/layout.json b/data_svelte_lite/layout.json deleted file mode 100644 index 0637a088..00000000 --- a/data_svelte_lite/layout.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/data_svelte_lite/settings.json b/data_svelte_lite/settings.json deleted file mode 100644 index cf3a7ac8..00000000 --- a/data_svelte_lite/settings.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "IoTmanagerVer4", - "apssid": "IoTmanager", - "appass": "", - "routerssid": "rise", - "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, - "settings_": "", - "wg": "group1", - "udps": 1 -} \ No newline at end of file diff --git a/data_svelte_lite/values.json b/data_svelte_lite/values.json deleted file mode 100644 index 0e0dcd23..00000000 --- a/data_svelte_lite/values.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/data_svelte_lite/widgets.json b/data_svelte_lite/widgets.json deleted file mode 100644 index 76a4712c..00000000 --- a/data_svelte_lite/widgets.json +++ /dev/null @@ -1,315 +0,0 @@ -[ - { - "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": "rangeServo", - "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": "anydataLiter", - "label": "Литры", - "widget": "anydata", - "after": "ltr", - "icon": "speedometer" - }, - { - "name": "nil", - "label": "Без виджета" - } -] \ No newline at end of file diff --git a/myProfile.json b/myProfile.json index a6e193dc..a7087d24 100644 --- a/myProfile.json +++ b/myProfile.json @@ -120,6 +120,10 @@ "path": "src/modules/virtual/LogingDaily", "active": true }, + { + "path": "src/modules/virtual/owmWeather", + "active": true + }, { "path": "src/modules/virtual/Timer", "active": true diff --git a/myProfileDef.json b/myProfileDef.json deleted file mode 100644 index 0170a5e1..00000000 --- a/myProfileDef.json +++ /dev/null @@ -1,415 +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 esp32s2_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_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" - } - ] - } - }, - "modules": { - "virtual_elments": [ - { - "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/Timer", - "active": true - }, - { - "path": "src/modules/virtual/Variable", - "active": true - }, - { - "path": "src/modules/virtual/VariableColor", - "active": true - }, - { - "path": "src/modules/virtual/VButton", - "active": true - }, - { - "path": "src/modules/virtual/Weather", - "active": false - } - ], - "sensors": [ - { - "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/Ble", - "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/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/Ntc", - "active": false - }, - { - "path": "src/modules/sensors/Pzem004t", - "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/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/SysExt", - "active": false - }, - { - "path": "src/modules/exec/Telegram", - "active": false - }, - { - "path": "src/modules/exec/TelegramLT", - "active": true - }, - { - "path": "src/modules/exec/Thermostat", - "active": false - }, - { - "path": "src/modules/sensors/Ds2423", - "active": false - } - ], - "screens": [ - { - "path": "src/modules/display/DwinI", - "active": false - }, - { - "path": "src/modules/display/Lcd2004", - "active": true - }, - { - "path": "src/modules/display/NextionUpload", - "active": false - }, - { - "path": "src/modules/display/Oled128", - "active": false - }, - { - "path": "src/modules/display/Smi2_m", - "active": true - }, - { - "path": "src/modules/display/TM16XX", - "active": true - }, - { - "path": "src/modules/display/Ws2812b", - "active": false - } - ] - } -} \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 2b2e296c..a65c323f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -487,6 +487,7 @@ build_src_filter = + + + + + + + + diff --git a/src/modules/API.cpp b/src/modules/API.cpp index f40b7c13..532ec78a 100644 --- a/src/modules/API.cpp +++ b/src/modules/API.cpp @@ -3,6 +3,7 @@ void* getAPI_Cron(String subtype, String params); void* getAPI_Loging(String subtype, String params); void* getAPI_LogingDaily(String subtype, String params); +void* getAPI_owmWeather(String subtype, String params); void* getAPI_Timer(String subtype, String params); void* getAPI_Variable(String subtype, String params); void* getAPI_VariableColor(String subtype, String params); @@ -42,6 +43,7 @@ void* tmpAPI; if ((tmpAPI = getAPI_Cron(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Loging(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_LogingDaily(subtype, params)) != nullptr) return tmpAPI; +if ((tmpAPI = getAPI_owmWeather(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Timer(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Variable(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_VariableColor(subtype, params)) != nullptr) return tmpAPI; diff --git a/src/modules/display/Oled128/Oled128.cpp b/src/modules/display/Oled128/Oled128.cpp index 91ebee55..fc25ca96 100644 --- a/src/modules/display/Oled128/Oled128.cpp +++ b/src/modules/display/Oled128/Oled128.cpp @@ -35,7 +35,7 @@ class Oled128 : public IoTItem { jsonRead(parameters, "addr", addr); if (addr == "") { - // scanI2C(); + scanI2C(); return; } diff --git a/tools/patch8266_16m.py b/tools/patch8266_16m.py index 048290f8..c0358cec 100644 --- a/tools/patch8266_16m.py +++ b/tools/patch8266_16m.py @@ -3,9 +3,16 @@ import os import shutil +from sys import platform +if platform == "linux" or platform == "linux2": + # linux + mainPyPath = '~/.platformio/platforms/espressif8266@4.0.1/builder/main.py' +else: + # windows + mainPyPath = os.environ['USERPROFILE'] + '\\.platformio\\platforms\\espressif8266@4.0.1\\builder\\main.py' -mainPyPath = os.environ['USERPROFILE'] + '\\.platformio\\platforms\\espressif8266@4.0.1\\builder\\main.py' +# print(mainPyPath) with open(mainPyPath) as fr: oldData = fr.read()