Merge branch 'mega' into feature/ESP8285_detect
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -11,15 +11,18 @@ on:
|
||||
pull_request:
|
||||
branches: [mega]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
documentation:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
|
||||
@@ -31,7 +34,7 @@ jobs:
|
||||
make html
|
||||
cd ..
|
||||
zip -r -qq ESPEasy_docs.zip docs/build/*
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Documentation
|
||||
path: ESPEasy_docs.zip
|
||||
@@ -40,8 +43,8 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- id: set-matrix
|
||||
@@ -55,26 +58,27 @@ jobs:
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
if: ${{ contains(matrix.env, 'esp32') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }}
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
if: ${{ contains(matrix.env, 'esp8266') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-esp8266-${{ hashFiles('platformio*.ini') }}
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install binutils build-essential libffi-dev python-dev libgit2-dev
|
||||
pip install -r requirements.txt
|
||||
platformio update
|
||||
@@ -85,7 +89,7 @@ jobs:
|
||||
ENV: ${{ matrix.env }}
|
||||
run: |
|
||||
python tools/ci/build-and-archive.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Binaries
|
||||
path: ESPEasy_${{ matrix.env }}.zip
|
||||
|
||||
@@ -18,8 +18,8 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- id: set-matrix
|
||||
@@ -33,20 +33,20 @@ jobs:
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
if: ${{ contains(matrix.env, 'esp32') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }}
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
if: ${{ contains(matrix.env, 'esp8266') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
ENV: ${{ matrix.env }}
|
||||
run: |
|
||||
python tools/ci/build-and-archive.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Binaries
|
||||
path: ESPEasy_${{ matrix.env }}.zip
|
||||
@@ -73,11 +73,11 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
cd dist
|
||||
zip -r -qq ../ESPEasy_dist.zip *
|
||||
cd ..
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Distribution
|
||||
path: |
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
notes: ${{ steps.release-notes.outputs.result }}
|
||||
steps:
|
||||
- id: release-notes
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
@@ -128,10 +128,10 @@ jobs:
|
||||
needs: [build, prepare-dist, prepare-notes]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/download-artifact@v2
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: artifacts/
|
||||
- run: |
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "AI Thinker ESP32-CAM, 4M Flash 4MB PSRAM, ESPEasy 1810k Code/OTA, 316k FS",
|
||||
"name": "AI Thinker ESP32-CAM 4M Flash 4MB PSRAM ESPEasy 1810k Code/OTA 316k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "M5Stack Core2 16M Flash, 4MB PSRAM, ESPEasy 4M Code/OTA, 8M FS",
|
||||
"name": "M5Stack Core2 16M Flash 4MB PSRAM ESPEasy 4M Code/OTA 8M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "ESP32 ODROID-GO 16M Flash, 4MB PSRAM, ESPEasy 4M Code/OTA, 8M FS",
|
||||
"name": "ESP32 ODROID-GO 16M Flash 4MB PSRAM ESPEasy 4M Code/OTA 8M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 16M Flash, ESPEasy 4M Code/OTA, 1M FS",
|
||||
"name": "Espressif Generic ESP32 16M Flash ESPEasy 4M Code/OTA 1M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_16M",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_16M",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@@ -25,11 +25,11 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 16M Flash, ESPEasy 4M Code/OTA, 8M FS",
|
||||
"name": "Espressif Generic ESP32 16M Flash ESPEasy 4M Code/OTA 8M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, ESPEasy 1810k Code/OTA, 316k FS",
|
||||
"name": "Espressif Generic ESP32 4M Flash ESPEasy 1810k Code/OTA 316k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 8M Flash, ESPEasy 2944k Code/OTA, 2112k FS",
|
||||
"name": "Espressif Generic ESP32 8M Flash ESPEasy 2944k Code/OTA 2112k FS",
|
||||
"upload": {
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DCORE32SOLO1",
|
||||
"f_cpu": "240000000L",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
@@ -25,11 +25,11 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, ESPEasy 1810k Code/OTA, 316k FS",
|
||||
"name": "Espressif Generic ESP32 4M Flash ESPEasy 1810k Code/OTA 316k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 1900544,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C3 4M Flash, ESPEasy 1810k Code/OTA, 316k FS",
|
||||
"name": "Espressif Generic ESP32-C3 4M Flash ESPEasy 1810k Code/OTA 316k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, ESPEasy 1810k Code/OTA, 316k FS",
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash ESPEasy 1810k Code/OTA 316k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
|
||||
@@ -1,3 +1,289 @@
|
||||
-------------------------------------------------
|
||||
Changes in release mega-20220616 (since mega-20220427)
|
||||
-------------------------------------------------
|
||||
|
||||
Release date: do 16 jun 2022 21:56:25 CEST
|
||||
|
||||
Bartłomiej Zimoń (8):
|
||||
[P2P] set default port to 8266, plus warn about port, partly fix for #3982
|
||||
[p2p] more defaults
|
||||
[p2p] warn about int number equals 0
|
||||
[p2p] update text plus check for port on rootpage
|
||||
[p2p] update text info
|
||||
[p2p] typo
|
||||
Update AdvancedConfigPage.cpp
|
||||
[p2p] typo of typo of typo
|
||||
|
||||
Boris Krivonog (2):
|
||||
Should resolve #3531 and #3158.
|
||||
Removed invalid (no longer working) url ...
|
||||
|
||||
Gijs Noorlander (2):
|
||||
[MQTT commands] Support commands with arbitrary argument position
|
||||
[MQTT commands] Fix parsing full command
|
||||
|
||||
Mateusz Skowroński (1):
|
||||
P031 - fix timing for SHT1X
|
||||
|
||||
TD-er (198):
|
||||
[Provisioning] Allow to fetch config via commands from HTTP server
|
||||
[Provisioning] Add factory default defines to ease deployment of nodes
|
||||
[Provisioning] Add documentation
|
||||
[Cleanup] Missing include in C013
|
||||
[Cleanup] Fix return value of gpio_mode_range_helper (real bug)
|
||||
[Cleanup] Uncrustify Commands/GPIO.cpp
|
||||
[ESP32] Update to IDF 4.4 Arduino-ESP32 2.0.1
|
||||
[ESP32] Allow building LittleFS builds on ESP32
|
||||
[Build] Fix case sensitive include
|
||||
[Windows Build] Convert IRremoteESP8266 to single cpp file
|
||||
[IR build] Fix build issue on IR plugins
|
||||
[WiFi ESP32] Disable WiFi TX power settings for ESP32 (IDF4.4)
|
||||
[ESP32 IDF4.4] Update to the latest Arduino ESP32 2.0.1.1
|
||||
[Webserver] Change chunked buffer size to 1360 bytes
|
||||
[Web UI] Small tweaks improving speed serving pages
|
||||
[Cleanup] Use .clear() on strings instead of assigning empty string
|
||||
[Webserver] Fix serving CSS
|
||||
[Web] Allow to stream from file system (e.g. CSS inline)
|
||||
[ESP32-S2] Add PlatformIO envs for ESP32-s2
|
||||
[IR] Cleanup check for redefine IR plugin USES
|
||||
Revert "[Windows Build] Convert IRremoteESP8266 to single cpp file"
|
||||
[Build] Fix build of ESP32 max LittleFS build on Windows
|
||||
[PIO] Simplify ESP32 env definitions.
|
||||
[PIO] Simplify WROVER kit envs and remove WROVER kit ETH builds
|
||||
[PIO] Add missing ESP32-S2 build envs
|
||||
[IDF4.4] Use Tasmota's IDF 4.4 platform-tasmota-espressif32
|
||||
[IDF4.4-v2.0.2] Now actually using the latest espressif/Arduino-esp32
|
||||
[LittleFS] Make sure to always define USE_LITTLEFS on LittleFS envs
|
||||
[PIO build ESP32] Attempt to fix boot loop on ESP32 with IDF4.4
|
||||
[Cleanup] Misc optimisations to reduce build size
|
||||
[LittleFS] Some cleanup to fix boot loops ESP32 IDF4.4 for 16M flash
|
||||
[IDF4.4 + 16M] Make normal builds with IDF4.4 work on 16M flash
|
||||
[IDF4.4 + 16M] Restore missing ESP32 builds
|
||||
[Cleanup] Make ESP32 PIO envs a bit more readable
|
||||
[Cleanup] Split ESP32S2 envs to separate ini file.
|
||||
[PIO build] Do not use commas in build_flags (Linux build fail)
|
||||
[PIO] fix incorrect esp32 IRExt envs
|
||||
[PIO] add labels to envs which wil later adjusted in extends
|
||||
[PIO] Use shorter extends chain for ESP32 max builds
|
||||
[PIO] Apparently when referring an env, the 'env:' prefix is needed
|
||||
[P096 eink] Fix failing build
|
||||
[ESP32 LittleFS] Add old LittleFS library to lib_ignore
|
||||
[P118] Disable P118 ITHO for now as it crashes on IDF4.4
|
||||
[ESP32 Factory] Fix boot loop on 16M flash nodes using factory image
|
||||
[ESP32 factory] Use esptool.py to generate and patch combined binary
|
||||
[Build] Add missing esptool==3.2 in requirements.txt
|
||||
[ESP32 factory] Revert factory image script to not use esptool.py
|
||||
[ESP32 factory] Final fix using esptool.py by Jason2866
|
||||
[ESP32 factory] Change -factory.bin to .factory.bin
|
||||
[ESP32 factory] using the pio env to find esptool
|
||||
[ESP32 build] Restore ESP32 build for 16M1M (using SPIFFS) with Ethernet
|
||||
[Libs] Update adafruit/Adafruit BusIO @ ^1.10.0
|
||||
[ESP32 IDF4.4] Set CPU frequency to 240 MHz
|
||||
[ESP32 Max] Do not use "LIMIT_BUILD_SIZE" on Max builds
|
||||
[ESP32 PSRAM] Rename define ESP32_ENABLE_PSRAM to BOARD_HAS_PSRAM
|
||||
[Ethernet] Add selector for newer supported Ethernet chips
|
||||
[PSRAM] Fix 40 MHz signal on GPIO-17 using Tasmota PSRAM functions
|
||||
[Build] Fix build on ESP8266
|
||||
[Ethernet] Work-around for bug in IDF4.4 in ETH.linkUp()
|
||||
[Cleanup] Fix parameter mismatch floating point formatting String
|
||||
[ESP32 IDF4.4] Update to include latest merges
|
||||
[PSRAM] Fix incorrect log of found PSRAM
|
||||
[Eth] Show state of actual active network device in logs
|
||||
[Eth] Power cycle Ethernet device if power pin is defined
|
||||
[PWM] Fix PWM and status LED on ESP32 IDF4.4
|
||||
[Eth] Add option to autodetect Eth PHY address + documentation
|
||||
[ESP32-S2] Disable -flto on ESP32-S2
|
||||
Disable -flto on ESP32 due to linker errors.
|
||||
[Cleanup] Move defines from Commands/GPIO to DataStructs/PinMode.h
|
||||
[ESP32 IDF4.4] Move to platform-espressif32 v2.0.2.1
|
||||
[Bugfix] Fix possible crash when printing floating point values
|
||||
[Cleanup] Fix define paths on .h files
|
||||
[Cleanup] Fix missing paths on #include statements + update I2Cdev lib
|
||||
[I2Cdev lib] Change `byte` to `uint8_t`
|
||||
[ESP32] Update to IDF 4.4 Arduino-ESP32 2.0.1
|
||||
[ESP32] Allow building LittleFS builds on ESP32
|
||||
[Build] Fix case sensitive include
|
||||
[Windows Build] Convert IRremoteESP8266 to single cpp file
|
||||
[IR build] Fix build issue on IR plugins
|
||||
[WiFi ESP32] Disable WiFi TX power settings for ESP32 (IDF4.4)
|
||||
[ESP32 IDF4.4] Update to the latest Arduino ESP32 2.0.1.1
|
||||
[Cleanup] Use .clear() on strings instead of assigning empty string
|
||||
[Web] Allow to stream from file system (e.g. CSS inline)
|
||||
[ESP32-S2] Add PlatformIO envs for ESP32-s2
|
||||
[IR] Cleanup check for redefine IR plugin USES
|
||||
Revert "[Windows Build] Convert IRremoteESP8266 to single cpp file"
|
||||
[Build] Fix build of ESP32 max LittleFS build on Windows
|
||||
[PIO] Simplify ESP32 env definitions.
|
||||
[PIO] Simplify WROVER kit envs and remove WROVER kit ETH builds
|
||||
[PIO] Add missing ESP32-S2 build envs
|
||||
[IDF4.4] Use Tasmota's IDF 4.4 platform-tasmota-espressif32
|
||||
[IDF4.4-v2.0.2] Now actually using the latest espressif/Arduino-esp32
|
||||
[LittleFS] Make sure to always define USE_LITTLEFS on LittleFS envs
|
||||
[PIO build ESP32] Attempt to fix boot loop on ESP32 with IDF4.4
|
||||
[Cleanup] Misc optimisations to reduce build size
|
||||
[LittleFS] Some cleanup to fix boot loops ESP32 IDF4.4 for 16M flash
|
||||
[IDF4.4 + 16M] Make normal builds with IDF4.4 work on 16M flash
|
||||
[IDF4.4 + 16M] Restore missing ESP32 builds
|
||||
[Cleanup] Make ESP32 PIO envs a bit more readable
|
||||
[Cleanup] Split ESP32S2 envs to separate ini file.
|
||||
[PIO build] Do not use commas in build_flags (Linux build fail)
|
||||
[PIO] fix incorrect esp32 IRExt envs
|
||||
[PIO] add labels to envs which wil later adjusted in extends
|
||||
[PIO] Use shorter extends chain for ESP32 max builds
|
||||
[PIO] Apparently when referring an env, the 'env:' prefix is needed
|
||||
[P096 eink] Fix failing build
|
||||
[ESP32 LittleFS] Add old LittleFS library to lib_ignore
|
||||
[P118] Disable P118 ITHO for now as it crashes on IDF4.4
|
||||
[ESP32 Factory] Fix boot loop on 16M flash nodes using factory image
|
||||
[ESP32 factory] Use esptool.py to generate and patch combined binary
|
||||
[Build] Add missing esptool==3.2 in requirements.txt
|
||||
[ESP32 factory] Revert factory image script to not use esptool.py
|
||||
[ESP32 factory] Final fix using esptool.py by Jason2866
|
||||
[ESP32 factory] Change -factory.bin to .factory.bin
|
||||
[ESP32 factory] using the pio env to find esptool
|
||||
[ESP32 build] Restore ESP32 build for 16M1M (using SPIFFS) with Ethernet
|
||||
[Libs] Update adafruit/Adafruit BusIO @ ^1.10.0
|
||||
[ESP32 IDF4.4] Set CPU frequency to 240 MHz
|
||||
[ESP32 Max] Do not use "LIMIT_BUILD_SIZE" on Max builds
|
||||
[ESP32 PSRAM] Rename define ESP32_ENABLE_PSRAM to BOARD_HAS_PSRAM
|
||||
[Ethernet] Add selector for newer supported Ethernet chips
|
||||
[PSRAM] Fix 40 MHz signal on GPIO-17 using Tasmota PSRAM functions
|
||||
[Build] Fix build on ESP8266
|
||||
[Ethernet] Work-around for bug in IDF4.4 in ETH.linkUp()
|
||||
[Cleanup] Fix parameter mismatch floating point formatting String
|
||||
[ESP32 IDF4.4] Update to include latest merges
|
||||
[PSRAM] Fix incorrect log of found PSRAM
|
||||
[Eth] Show state of actual active network device in logs
|
||||
[Eth] Power cycle Ethernet device if power pin is defined
|
||||
[PWM] Fix PWM and status LED on ESP32 IDF4.4
|
||||
[Eth] Add option to autodetect Eth PHY address + documentation
|
||||
[ESP32-S2] Disable -flto on ESP32-S2
|
||||
Disable -flto on ESP32 due to linker errors.
|
||||
[Cleanup] Move defines from Commands/GPIO to DataStructs/PinMode.h
|
||||
[ESP32 IDF4.4] Move to platform-espressif32 v2.0.2.1
|
||||
[Cleanup] Fix missing paths on #include statements + update I2Cdev lib
|
||||
[I2Cdev lib] Change `byte` to `uint8_t`
|
||||
[EDP32 IDF4.4] Fix merge issues
|
||||
[IDF 4.4] Update to platform-espressif32 v2.0.2.2
|
||||
Temporary revert move operator on RamTracker
|
||||
[MQTT commands] Add command via MQTT with variable parameters
|
||||
[IDF 4.4] Update to espressif/arduino-esp32 tag 2.0.3
|
||||
[WiFi] Prevent stack overflow when WiFi connection isn't successful
|
||||
[WiFi] Properly clear duplicates from WiFi scans
|
||||
[WiFi] Fix connecting to the strongest WiFi AP
|
||||
[Build] Add missing include in Servo.cpp
|
||||
[IDF 4.4] Update to platform-espressif32-2.0.3rc1
|
||||
Revert "[IDF 4.4] Update to platform-espressif32-2.0.3rc1"
|
||||
[Build] Fix build on display plugins using NodeMCU pin labels
|
||||
[MQTT] Reduce rate of MQTT reconnects when failing to reconnect
|
||||
[IDF 4.4] Update to latest platform espressif32 zip file
|
||||
[Web flash] Let user choose to erase flash or not upon flashing
|
||||
[Eth] Fix loosing DNS info when disabling WiFi after ETH got IP
|
||||
[ETH] Cleanup unused variable
|
||||
[Rules] Fix issues with rules one-liners (#4025)
|
||||
[ESP32] Fix PWM on IDF4.4
|
||||
[Docs] Fix formatting of C005 OpenHab MQTT documentation
|
||||
[MQTT Events] Allow receiving events + eventvalues via MQTT (C005)
|
||||
[Provisioning] Cleanup code to manage internal file names
|
||||
[Provisioning] Cleanup of no longer needed strings + use RULESETS_MAX
|
||||
[Misc] pre-merge small fixes from pending ESPEasy-NOW PR
|
||||
[Web] Cleanup code to show MAC address input field
|
||||
[MQTT events] Do not add '=' when no eventvalues present + dedup
|
||||
[WiFi] Revert accidentally reject SSID < 8 chars
|
||||
Access extra GPS values + document setLevel command
|
||||
[Tools page] Fix to keep original command instead of showing parsed one
|
||||
[ESP32] Update to platform-espressif32-v.2.0.3
|
||||
[PlatformIO] Revert to PlatformIO 5.2.5
|
||||
[PIO lib_deps] Set Adafruit ILI9341 library version
|
||||
[PIO] Make lib_deps multi-line definitions
|
||||
[PlatformIO] Change to multi-line lib_ignore
|
||||
[PlatformIO] Remove normal_ESP32_16M8M_LittleFS env.
|
||||
[PlatformIO] Clean up ini files.
|
||||
[PlatformIO] Update to PIO 6.0.1
|
||||
[PlatformIO] Clean requirements.txt files to only the essentials
|
||||
[PVS Studio] Fix a number of issues reported by PVS Studio (#4066)
|
||||
[Sysvars] Add various system variables to hardware info
|
||||
[System Variables] Clean-up parsing system variables
|
||||
[System Variables] Clean-up to reduce build size for sysvars parsing
|
||||
[Build] Fix warnings on unused enums in switch statements
|
||||
[Cleanup] Small optimizations to reduce bin size
|
||||
[Cleanup] Reduce loading controller settings when not ready to process
|
||||
[Cleanup] Add function addFormSelector_YesNo to remove code duplication
|
||||
[Cleanup] Reduce build size by combining controller queue types
|
||||
[Controller Queue] Add missing includes
|
||||
[PVS Studio] Fix some hints provided by PVS Studio
|
||||
[P073, PVS Studio] Fix bug in font handling for Siekoo display
|
||||
[Cleanup] Various PVS-Studio hints
|
||||
[Build] switch case does not (yet) exist in the 'mega' branch
|
||||
[PIO] Add build_flags to every intermediate PIO env.
|
||||
[PIO] Add lib_ignore to all 1M non-Custom builds
|
||||
[Build] Set lib_ignore for all ESP8266 Testing builds
|
||||
[Build] Remove test_X_alt_wifi_ESP8266_4M1M_VCC envs
|
||||
[MQTT command[ Fix unintended change of MQTT command syntax (#4093)
|
||||
[Build] Warnings when building with -Wswitch enabled on ESP32 (#4085)
|
||||
[Build] Fix warning of 0x99 not in 'esp_partition_subtype_t'
|
||||
[LoRaWAN TTN] Fix serial port selector on LoRaWAN TTN controller
|
||||
[ESPEasySerial] Update to 2.0.10
|
||||
|
||||
Ton Huisman (56):
|
||||
[P128] Migrate NeoPixelBuxFX from playground / djcysmic/NeopixelBusFX
|
||||
[P128] Fix ESP32 issues, add config for GPIO pin (only ESP32)
|
||||
[P128] Move all code & variables to Plugin_data_struct
|
||||
[P128] Initialization improvements, code optimizations
|
||||
[P128] Forgot some code-debug
|
||||
[P128] Code optimizations, review feedback
|
||||
[P128] Small UI fixes while writing documentation
|
||||
[P128] Add plugin documentation
|
||||
[P128] Add compile-time pixel-type selection #defines
|
||||
[Build] Add NeoPixel builds for ESP8266 4M and 1M, ESP32 and ESP32s2 with all NeoPixel plugins
|
||||
[Docs] Update documentation to reflect NeoPixel builds, and improved Display and Energy build labels
|
||||
[P128] Fix JSON assembly, some bugfixes and code improvements
|
||||
[P128] Log optimization
|
||||
[P133] Add plugin for LTR390 UV Sensor
|
||||
[P133] Add to TEST_E build configuration
|
||||
[P128] Doc: Bring command syntax in line with other commands by using commas
|
||||
[P128] Fix define clash with library method
|
||||
[P133] Add documentation
|
||||
[P132] New plugin INA3221 3 channel DC Voltage/Current
|
||||
[P132] Add separate Conversion rate setting for Voltage and Current
|
||||
[P132] Add documentation
|
||||
[P073] Correct endless loop in max7219_ShowTime
|
||||
[Build] Move ESP32s2 neopixel build to ESP32s2 pio config file
|
||||
[P022] Fix [taskname].gpio,all,n command
|
||||
[C002] Handle P029 and P088 as if enabled for this controller
|
||||
[Sysvars] Add %systm_hm_0%, %systm_hm_sp%, %systm_hm_am_0%, %systm_hm_am_sp%, %systime_am_0% and %systime_am_sp%
|
||||
[Sysvars] Update documentation
|
||||
[Build] Include Display plugin-set in ESP32 Display build
|
||||
[P007] Add Input mode selection, Enable Analog output, analogout command, updated documentation
|
||||
[P007] Fix typo
|
||||
[P128] Fix NEOPIXEL_ESP32[s2] build configurations
|
||||
[GPIO] Remove unwanted colon from GPIO log
|
||||
[P028] Add Error State Value option (BMx280)
|
||||
[P028] Minor UI correction
|
||||
[P028] Update/overhaul of documentation
|
||||
[P028] Set error value -1 for Humidity and Pressure
|
||||
[Core] Add support for Error State Values
|
||||
[Core UI] Add support for Error State Values
|
||||
[P028] Use core Error State Value support
|
||||
[P028] Update documentation for Error State Values
|
||||
[P028] Minor documentation corrections
|
||||
[P028] Reduce codesize
|
||||
[P020] Add option to process events without network client connected
|
||||
[P020] Fix and simplify saving settings on ESP8266 (was working on ESP32)
|
||||
[P020] Add option for processing multi-line messages
|
||||
[P020] Scrape off a few bytes from buildsize by disabling some debug messages
|
||||
[P020] Improvements for processing multi-line messages, optimize String handling
|
||||
[P020] Add some extra checks to avoid crashes because of optimized String handling
|
||||
[P020] Improved string parsing for multi-line support
|
||||
[Settings] Add PCONFIG_ULONG(n), union with PCONFIG_LONG(n)
|
||||
[Build] Restore TEST_E builds for ESP and ESP32s2
|
||||
[Fix] Complete implementation for changed addFormSelector() definition
|
||||
[P128] [Build] Fix pio config issue, revert NeoPixelBus library to previous version (C++17 compatibility errors)
|
||||
[P128] Optimizations
|
||||
[Settings] Replace long by int32_t for PCONFIG_LONG(n)
|
||||
[P128] [Build] Fix pio config issue missed earlier
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
Changes in release mega-20220427 (since mega-20220328)
|
||||
-------------------------------------------------
|
||||
|
||||
@@ -12,17 +12,27 @@ for more documentation which has not been moved here.
|
||||
|
||||
Needed Python packages::
|
||||
|
||||
pip install sphinx recommonmark sphinx_bootstrap_theme
|
||||
cd docs
|
||||
|
||||
PlatformIO with Atom
|
||||
====================
|
||||
pip install -r requirements.txt
|
||||
|
||||
With the ESPEasy project open in Atom, open the PIO terminal in Atom.
|
||||
PlatformIO with VSCode
|
||||
======================
|
||||
|
||||
.. note::
|
||||
|
||||
Here used to be a reference to the Atom editor, but both Atom, and the PlatformIO plugin for Atom, are no longer maintained by their owners, so it was removed from this documentation.
|
||||
|
||||
As an alternative, VSCode can be used as a development environment. See also :ref:`PlatformIO_page`
|
||||
|
||||
With the ESPEasy project open in VSCode, open the PIO terminal in VSCode.
|
||||
|
||||
.. image:: VSCode_OpenPIOTerminal.png
|
||||
|
||||
Install dependencies::
|
||||
|
||||
cd docs
|
||||
pip install ... (see needed Python packages above)
|
||||
pip install -r requirements.txt
|
||||
|
||||
Build on Windows::
|
||||
|
||||
@@ -32,14 +42,10 @@ Build on Windows::
|
||||
Build on Linux/Mac::
|
||||
|
||||
cd docs
|
||||
./make html
|
||||
make html
|
||||
|
||||
Any build errors are shown in the output in ``red`` (and should be acted upon, except for magick not being found). On Windows, an error may be shown about the magick tool not being found, but this Linux image processing tool is usually not installed on Windows (not a Python tool), but the images will show unaltered when previewing. In the actual processing for Read The Docs, this tool *is* available, so the images will be re-scaled when needed.
|
||||
|
||||
After the build is completed, the result can be reviewed by opening the ``index.html`` file, that can be found in ``docs\build\html`` (for Linux/MacOS adjust ``\`` to ``/``).
|
||||
|
||||
|
||||
LaTeX (PDF) build on Linux
|
||||
==========================
|
||||
|
||||
To build a PDF document of this documentation, you need to have LaTeX installed and some texlive packages.
|
||||
|
||||
Via apt-get installed packages::
|
||||
|
||||
sudo apt-get install xzdec texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _PlatformIO_page:
|
||||
|
||||
PlatformIO
|
||||
**********
|
||||
|
||||
@@ -10,14 +12,13 @@ PlatformIO is just the build, test and upload environment for many micro control
|
||||
|
||||
On top of that you need to use an editor, or so called IDE in which PlatformIO will be used.
|
||||
|
||||
The two main choices are:
|
||||
The current choice is:
|
||||
|
||||
* Atom
|
||||
* Microsoft Visual Studio Code. (MS VS-Code)
|
||||
* Microsoft Visual Studio Code. (MS VSCode)
|
||||
|
||||
Both are free to use and are available for Windows, MacOS and Linux.
|
||||
VSCode is free to use and available for Windows, MacOS and Linux.
|
||||
|
||||
Apart from these two, there are more available, like Eclipse and probably more.
|
||||
Apart from VSCode, there are more available, like Eclipse, MS Visual Studio (IDE) and probably more.
|
||||
|
||||
|
||||
PlatformIO Prerequisites
|
||||
@@ -36,53 +37,47 @@ install Pyton in Windows for PlatformIO.
|
||||
|
||||
**Do not forget to check "Add Python xxx to PATH".**
|
||||
|
||||
Windows ExecutionPolicy
|
||||
-----------------------
|
||||
.. Windows ExecutionPolicy
|
||||
.. -----------------------
|
||||
|
||||
For PlatformIO 4.1.x and newer in Windows, you may need to change the Windows ExecutionPolicy
|
||||
to be able to start a powershell script.
|
||||
PlatformIO does use a PowerShell script to activate the Python virtual environment.
|
||||
.. For PlatformIO 4.1.x and newer in Windows, you may need to change the Windows ExecutionPolicy
|
||||
.. to be able to start a powershell script.
|
||||
.. PlatformIO does use a PowerShell script to activate the Python virtual environment.
|
||||
|
||||
Default Windows security settings prevent execution of a PowerShell script.
|
||||
.. Default Windows security settings prevent execution of a PowerShell script.
|
||||
|
||||
Enter in the PowerShell terminal window in VScode:
|
||||
.. Enter in the PowerShell terminal window in VScode:
|
||||
|
||||
.. code-block:: none
|
||||
.. .. code-block:: none
|
||||
|
||||
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
||||
.. Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
||||
|
||||
Please note this does lower your security, so make sure you know its implications.
|
||||
See `Microsoft - About Execution Policies <https:/go.microsoft.com/fwlink/?LinkID=135170>`_ for more details.
|
||||
.. Please note this does lower your security, so make sure you know its implications.
|
||||
.. See `Microsoft - About Execution Policies <https:/go.microsoft.com/fwlink/?LinkID=135170>`_ for more details.
|
||||
|
||||
|
||||
PlatformIO with Atom
|
||||
====================
|
||||
|
||||
|
||||
|
||||
PlatformIO with VS-Code
|
||||
=======================
|
||||
PlatformIO with VSCode
|
||||
======================
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
For development of ESPeasy, a number of extensions has to be installed in VS-Code:
|
||||
For development of ESPEasy, a number of extensions has to be installed in VS-Code:
|
||||
|
||||
* PlatformIO IDE (by PlatformIO)
|
||||
* C/C++ IntelliSense (by Microsoft)
|
||||
* Arduino for Visual Studio Code (by Microsoft)
|
||||
* Uncrustify (by Zachary Flower, originally by Laurent Tréguier)
|
||||
|
||||
Optional, but highly recommended:
|
||||
|
||||
* Bookmarks (by Alessandro Fragnani)
|
||||
* GitLens - Git supercharged (by Eric Amodio)
|
||||
* GitLens - Git supercharged (by Gitkraken)
|
||||
* Todo Tree (by Gruntfuggly)
|
||||
* All Autocomplete (by Atishay Jain)
|
||||
* Excel Viewer (by GrapeCity)
|
||||
* esbonio - An extension for editing sphinx projects (by Swyddfa)
|
||||
* reStructuredText - for .rst language support (by LeXtudio Inc.)
|
||||
* Esbonio - An extension for editing sphinx projects (by Swyddfa)
|
||||
* reStructuredText Syntax highlighting (by Trond Snekvik)
|
||||
* Extension pack for reStructuredText (by LeXtudio Inc.)
|
||||
* Markdown All in One (by Yu Zhang)
|
||||
|
||||
|
||||
@@ -93,6 +88,8 @@ The extension Uncrustify is mainly to format the code using a standard code form
|
||||
This code format standard is defined in the file uncrustify.cfg in the main directory of this repository.
|
||||
For new code contributions, it is highly appreciated if the code is formatted using this tool.
|
||||
|
||||
NB: Uncrustify has to be installed separately, as it is not included in the plugin! Download `Uncrustify from Sourceforge.net <https://sourceforge.net/projects/uncrustify/>`_
|
||||
|
||||
To do so:
|
||||
|
||||
* Right click mouse in editor
|
||||
@@ -102,12 +99,15 @@ The first time (after installing uncrustify) it must be confirmed to use Uncrust
|
||||
|
||||
After setting it as the default formatter, the hotkey Alt-Shift-F (Cmd-Shift-F on MacOS) can be used to format the entire document.
|
||||
|
||||
.. note::
|
||||
|
||||
There used to be a reference to the Atom editor, but both Atom, and the PlatformIO plugin for Atom, are no longer maintained by their owners, so it was removed from this documentation.
|
||||
|
||||
Load a project using PlatformIO
|
||||
-------------------------------
|
||||
|
||||
If you have PIO installed and the source tree cloned to your hard drive, then you can open the main dir of the repository.
|
||||
The main directory of the repository is the level with platformio.ini in it.
|
||||
The main directory of the repository is the level with the file platformio.ini in it.
|
||||
|
||||
Then in a few moments after opening the directory, on the left there will appear an alien logo, the logo of PlatformIO.
|
||||
If you click that one, you will get a tree with lots and lots of project tasks and environments.
|
||||
@@ -134,7 +134,8 @@ For example:
|
||||
* ..._ESP8266_4Mnn -> ESP8266 has external flash, which can vary in size from 512 kB to 16 MB, with nn configured as filesystem.
|
||||
* ..._ESP8266_1M -> ESP8285 has the flash internal, which is almost always 1 MB. ESP8266 does have an external flash chip, which allows for exchanging it for a larger flash chip (recommended).
|
||||
* ..._ESP32_4M316k -> ESP32 with 4 MB flash and a 1.8 MB partition for the sketch. (316k SPIFFS)
|
||||
* ..._ESP32_16M8M_LittleFS -> ESP32 with 16 MB flash and a 4 MB partition for the sketch. (8MB LittleFS)
|
||||
* ..._ESP32s2_4M316k -> ESP32s2 with 4 MB flash and a 1.8 MB partition for the sketch. (316k SPIFFS)
|
||||
* ..._ESP32_16M2M_LittleFS -> ESP32 with 16 MB flash and a 4 MB partition for the sketch. (2MB LittleFS)
|
||||
* ..._ESP32_16M1M_ETH -> ESP32 with 16 MB flash and a 4 MB partition for the sketch. (1MB SPIFFS, Wired ethernet support)
|
||||
|
||||
Make a custom build using PlatformIO
|
||||
@@ -366,6 +367,14 @@ Documentation for writing in reStructuredtext format can be found on the `Sphinx
|
||||
|
||||
Building the documentation into html files, for reviewing locally, can be done by running this command from the ``docs`` folder:
|
||||
|
||||
Start a new PIO Terminal:
|
||||
|
||||
.. image:: VSCode_OpenPIOTerminal.png
|
||||
|
||||
.. code-block::
|
||||
|
||||
cd docs
|
||||
|
||||
On Windows:
|
||||
|
||||
.. highlight::bat
|
||||
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -41,6 +41,23 @@
|
||||
LogEntry,'TaskExit task: %eventvalue1% result: %eventvalue2%'
|
||||
endon
|
||||
|
||||
"
|
||||
"
|
||||
``TaskError#<taskname>``
|
||||
Added: 2022-06-21
|
||||
Triggered when a tasks ``PLUGIN_READ`` caused an error.
|
||||
The reason to trigger this error is plugin specific and this is not implemented for all plugins.
|
||||
For example, the BMx280 plugin will trigger this event when it was unable to start a measurement, for example when the sensor does not reply or its reply is unexpected.
|
||||
","
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
on TaskError#bme do
|
||||
LogEntry,'TaskError task: %eventvalue1% result: %eventvalue2%'
|
||||
endon
|
||||
|
||||
The first event value is the task index, the second event value is a plugin specific indicator of the error that occured.
|
||||
N.B. The second event value can be a string.
|
||||
"
|
||||
"
|
||||
``System#Wake``
|
||||
|
||||
@@ -24,13 +24,170 @@ Used libraries: |P002_usedlibraries|
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ESP82xx has 1 ADC included.
|
||||
This one can be set either to measure the Vdd pin (supplied voltage to the ESP) or to ``TOUT``, so it can measure the voltage on the ``A0`` pin.
|
||||
All ESP chips have one or more ADCs available to measure an analog signal.
|
||||
|
||||
The ESP32 has 18 pins that can be used as ADC. It also has a Hall Effect sensor included.
|
||||
* ESP8266: 1x 12-bit ADC on the A0 pin or the supplied voltage (on ``VCC`` Builds)
|
||||
* ESP32: 1 Hall Effect sensor + 18 pins which can be configured to read supplied voltage.
|
||||
* ESP32-S2: 20 pins which can be configured to read supplied voltage.
|
||||
|
||||
The ESP32 chips have 2 ADCs.
|
||||
Each pin that can be set to read an analog voltage will then be hard-wired to one of both ADCs.
|
||||
See below for the limitations on sampling analog values with WiFi active.
|
||||
|
||||
See the `ESP32 API reference <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc.html>`_ for more detailed information on the features and limitations of these pins.
|
||||
|
||||
Range and Calibration
|
||||
---------------------
|
||||
|
||||
2022/07/11: Added support for Attenuation selection + Factory calibration
|
||||
|
||||
|
||||
The ESP8266 ADC has a fixed range of 0...1V.
|
||||
However, almost all boards do have some resistors to act as a voltage divider to extend this range to 3.6V
|
||||
|
||||
All ESP32 versions allow for changing the range per pin (channel) by setting some attentuation resistor active.
|
||||
The default active attentuation is 11 dB, which allows for a maximum input voltage of 3.1V
|
||||
Upto roughly 2.5V the ADC does show a nearly linear response.
|
||||
|
||||
Suggested ranges ESP32:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
+----------+-------------+-----------------+
|
||||
| | attenuation | suggested range |
|
||||
| SoC | (dB) | (mV) |
|
||||
+==========+=============+=================+
|
||||
| | 0 | 100 ~ 950 |
|
||||
| +-------------+-----------------+
|
||||
| | 2.5 | 100 ~ 1250 |
|
||||
| ESP32 +-------------+-----------------+
|
||||
| | 6 | 150 ~ 1750 |
|
||||
| +-------------+-----------------+
|
||||
| | 11 | 150 ~ 2450 |
|
||||
+----------+-------------+-----------------+
|
||||
| | 0 | 0 ~ 750 |
|
||||
| +-------------+-----------------+
|
||||
| | 2.5 | 0 ~ 1050 |
|
||||
| ESP32-S2 +-------------+-----------------+
|
||||
| | 6 | 0 ~ 1300 |
|
||||
| +-------------+-----------------+
|
||||
| | 11 | 0 ~ 2500 |
|
||||
+----------+-------------+-----------------+
|
||||
|
||||
N.B. The ESP32 cannot measure down to 0V. The minimum Voltage depends on the set attenuation.
|
||||
|
||||
Each (recent) ESP32 chip does have a factory calibration burnt in to compensate for the non-linear behavior of the ADC and to correct for the used internal voltage reference.
|
||||
|
||||
Only the really early production runs of the ESP32 do not have such factory calibration.
|
||||
|
||||
.. image:: P002_FactoryCalibration.png
|
||||
|
||||
N.B. The initial chart on the setup page of an Analog Input task will only show the active attenuation. Others can be shown by clicking on the labels in the chart legend.
|
||||
|
||||
With ``Apply Factory Calibration`` checked, the Analog Input plugin in ESPEasy will perform the reading in mV.
|
||||
|
||||
|
||||
Oversampling
|
||||
------------
|
||||
|
||||
With ``Oversampling`` selected, the task will take a sample 10x per second.
|
||||
These are averaged over the period set by the ``Interval`` timer. (or shorter interval when the task is executed via the ``TaskRun`` command)
|
||||
This mode also takes out the highest and lowest sample values to make sure a single fluke measurement is not affecting the output value too much.
|
||||
|
||||
Binning
|
||||
-------
|
||||
|
||||
Added: 2022/07/11
|
||||
|
||||
For some use cases, a strict classification of data is needed.
|
||||
|
||||
A typical use case is the wind vane of a very popular set, the DS-15901.
|
||||
|
||||
.. image:: P002_DS-15901_wind_vane_schematics.png
|
||||
|
||||
This wind vane uses a magnet to trigger a number of reed switches which will then activate a resistor.
|
||||
What makes this setup rather complex is that for some angles 2 resistors will be active and thus effectively lower the seen resistance between 2 other wind directions.
|
||||
|
||||
Plot of voltage measured over the wind vane when using a 10k resistor in series with the wind vane:
|
||||
|
||||
.. image:: P002_voltage_vs_wind_dir.png
|
||||
|
||||
|
||||
For this use case, it is not possible to use oversampling as this may result in very unstable readings.
|
||||
We need to map a range of values to a single output value.
|
||||
|
||||
Plotting the resistance range from the wind vane datasheet:
|
||||
|
||||
.. image:: P002_range_resistance_per_bin.png
|
||||
|
||||
As can be seen, the ranges are quite small for some and quite large for others.
|
||||
But also the wind direction is not increasing when the resistance increases.
|
||||
|
||||
Therefore we need a look-up table. (see Multipoint Processing below)
|
||||
|
||||
What binning does is it tries to match each sample to a specific bin (an entry in the Multipoint Processing table) and simply counts each occurence per bin.
|
||||
After a measurement period (the time between 2 calls to "run" the task, typically the "interval") the bin with the highest count is picked and the output value of this bin will be returned as output.
|
||||
|
||||
|
||||
Two Point Calibration
|
||||
---------------------
|
||||
|
||||
The measured sample taken by the ADC (either a raw value, or mV when ESP32 Factory Calibration is enabled) often has to be mapped on a specific range.
|
||||
For example when measuring the voltage of a car battery, one needs to have some voltage divider to transform the battery voltage to a range suitable for the ADC.
|
||||
|
||||
On the output, one may want to see the actual battery voltage again.
|
||||
This mapping can be done using the "Two Point Calibration".
|
||||
|
||||
For this, one must measure 2 known voltages and input the raw ADC value.
|
||||
|
||||
Example of some Two Point Calibration:
|
||||
|
||||
.. image:: P002_two_point_calibration.png
|
||||
|
||||
(Chart option added: 2022/07/11)
|
||||
|
||||
The values below the chart only taking the Two Point Calibration into account.
|
||||
|
||||
* The current ADC value with the corresponding output when the set Two Point Calibration is applied.
|
||||
* The minimum and maximum values are based on the maximum range which can be measured with the set attenuation.
|
||||
* The step size is the minimal step size of the output value.
|
||||
|
||||
|
||||
Multipoint Processing
|
||||
---------------------
|
||||
|
||||
Added: 2022/07/11
|
||||
|
||||
The values entered in the "Multipoint Processing" section can be considered a look-up table.
|
||||
|
||||
* For "Binning", these represent the bins and their output values.
|
||||
* For just taking samples, these can be seen as an extention to the "Two Point Calibration" to model a more elaborate response curve of a sensor. (e.g. measuring water level in a round tank)
|
||||
|
||||
Often such curves will be modeled first in a spreadsheet program.
|
||||
To simply copy/paste 2 columns of data from a spreadsheet into the task settings, one has to check "Split-Paste Multipoint Fields" first and then paste these columns into the first field.
|
||||
By checking this checkbox, some JavaScript will be set active to decode the values and place them in separate fields.
|
||||
|
||||
|
||||
When using "Binning", it can be useful to also have some formula to process the data first before mapping the data to the correct bin.
|
||||
|
||||
For example the wind vane with a 10k in series, connected to 3.3V.
|
||||
To convert the measured voltage into a resistance, one can use this formula: ``(-10000*%value%)/(%value%-3.3)``
|
||||
|
||||
With the values converted into a resistance, one can simply use the stated values in the sensor datasheet.
|
||||
|
||||
.. image:: P002_multipoint_binning.png
|
||||
|
||||
|
||||
Processing Order
|
||||
----------------
|
||||
|
||||
All steps between ADC and output of the task are processed in the order they appear on the settings page:
|
||||
|
||||
* Attenuation (ESP32 only)
|
||||
* Factory Calibration (ESP32 only)
|
||||
* Two Point Calibration
|
||||
* Multipoint Processing ("Binning formula" first when set to Binning)
|
||||
* Formula at the bottom, when set.
|
||||
|
||||
|
||||
Hall Effect Sensor (ESP32)
|
||||
@@ -56,23 +213,38 @@ ESP32 has 2 ADCs present.
|
||||
Since the ``ADC2`` is shared with the WIFI module, which has higher priority, reading operation of ``adc2_get_raw()`` may fail between ``esp_wifi_start()`` and ``esp_wifi_stop()``.
|
||||
|
||||
|
||||
Oversampling
|
||||
------------
|
||||
Use of Formula
|
||||
--------------
|
||||
|
||||
When ``Oversampling`` is enabled, the plugin will take a reading 10 times a second.
|
||||
This reading is averaged over the entire interval time as set in the task configuration.
|
||||
A very typical use case for using the ADC is to measure some resistance.
|
||||
The best way to do this, is to have a constant current applied to this resistor.
|
||||
This way the measured voltage over the resistor has a linear correlation with the resistance.
|
||||
But that makes it somewhat complicated to connect such a sensor and it may also become rather difficult to find a good compromise between resolution and noise when the measured resistor can vary over a wide range.
|
||||
|
||||
The highest and lowest values are subtracted from the recorded values, to filter out single flukes.
|
||||
Measured values which are clipped either on the lower range or higher range are only added once per interval as they may occur for more than a single sample per interval.
|
||||
This is done to prevent a relative large offset in the averaging due to clipping or maybe unforceen interaction of the WiFi chip on the ADC measurements.
|
||||
The simplest way to connect such a resistor is by adding a second resistor in series.
|
||||
However this makes the measured voltage no longer linear to the measured resistance.
|
||||
|
||||
Then we only need a way to compute the measured resistance instead of the voltage.
|
||||
|
||||
Calibration
|
||||
-----------
|
||||
For this we first need to make sure the calibration is done so the ADC plugin outputs the correct voltage applied to the configured analog input pin.
|
||||
|
||||
The plugin supports a 2-point calibration.
|
||||
The user can set these to convert the raw values into the desired unit of measure.
|
||||
When set, the configuration screen also displays the minimum, maximum and step size values based on the calibration settings.
|
||||
Then we must derive a formula to convert the voltage into a resistance value.
|
||||
|
||||
For example the unknown resistor is r1 and the series resistor is r2.
|
||||
|
||||
With 3V3 applied to both resistors in series, the measured voltage ``v`` is:
|
||||
|
||||
``v = 3v3 / (r1 + r2) * r1``
|
||||
|
||||
This can be derived into:
|
||||
|
||||
``(-1 * r2 * v) / (v - 3v3)``
|
||||
|
||||
When using 10k as a value for r2, we can use this in the formula field:
|
||||
|
||||
``(-10000*%value%)/(%value%-3.3)``
|
||||
|
||||
With proper calibration and this formula present, we now get the measured resistance on the output.
|
||||
|
||||
|
||||
Supported hardware
|
||||
|
||||
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 94 KiB |
@@ -152,7 +152,7 @@ Change log
|
||||
|added|
|
||||
2021-08-06 Selection of 1 to 4 input values to be read.
|
||||
|
||||
|added|
|
||||
|changed|
|
||||
2021-08-03 Replaced single Port inputfield with separate I2CAddress and Port selections.
|
||||
|
||||
|added|
|
||||
|
||||
@@ -136,7 +136,7 @@ Change log
|
||||
.. versionchanged:: 2.0
|
||||
...
|
||||
|
||||
|added|
|
||||
|changed|
|
||||
2021-08-04 Replaced single Port inputfield with separate I2CAddress and Port selections.
|
||||
|
||||
|added|
|
||||
|
||||
@@ -140,7 +140,7 @@ Change log
|
||||
.. versionchanged:: 2.0
|
||||
...
|
||||
|
||||
|added|
|
||||
|changed|
|
||||
2021-08-03 Replaced single Port inputfield with separate I2CAddress and Port selections.
|
||||
|
||||
|added|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
|
||||
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
|
||||
.. _P028_page:
|
||||
|
||||
|P028_typename|
|
||||
@@ -24,7 +24,85 @@ Used libraries: |P028_usedlibraries|
|
||||
Supported hardware
|
||||
------------------
|
||||
|
||||
|P028_usedby|
|
||||
.. image:: P028_BME280_1.jpg
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Specifications:
|
||||
* Temperature (-40C to +85C)
|
||||
* Relative humidity (0-100 %RH) (Only available from BME280 sensor)
|
||||
* Barometric pressure (300-1100 hPa)
|
||||
|
||||
.. warning::
|
||||
The **BME280** is easily mistaken for its sibling the **BMP280**. Sometimes the PCB have both BME *and* BMP280
|
||||
written on it, it's probably because the footprint is the same for BME and BMP = the same PCB board is used
|
||||
by both. Luckily, this plugin supports both types of sensors.
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
ESP BMx280
|
||||
GPIO (4) <--> SDA
|
||||
GPIO (5) <--> SCL
|
||||
|
||||
Power
|
||||
3.3V <--> VIN
|
||||
GND <--> GND
|
||||
|
||||
.. note::
|
||||
If you have changed the I2C settings in the hardware setup you need to connect to those instead of GPIO 4 and 5.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
.. image:: P028_DeviceConfiguration.png
|
||||
|
||||
* **Name** A unique name should be entered here.
|
||||
|
||||
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
|
||||
|
||||
I2C Options
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The available settings here depend on the build used. At least the **Force Slow I2C speed** option is available, but selections for the I2C Multiplexer can also be shown. For details see the :ref:`Hardware_page`
|
||||
|
||||
* **I2C Address**: The address the device is using. Depending on the board used, when available a SDO pin, or soldering a 0 ohm resistor on a different location, can be used to select the used address. If that address selection is not available, then an I2C multiplexer (in a matching ESPEasy build) can be used to use multiple sensors on a single ESPEasy unit. Below are instructions for selecting the alternate address.
|
||||
|
||||
Device Settings
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
* **Altitude** When not at sea-level, the plugin can apply an altitude compensation on the **Pressure** value.
|
||||
|
||||
* **Temperature offset** Depending on the sensor and the location of the sensor, it may be required to apply some temperature compensation. This can be set in steps of 0.1 degree. When using a BME280 sensor, this also applies a compensation to the **Humidity** reading.
|
||||
|
||||
Data Acquisition
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
* **Temperature Error Value** If no sensor is connected, or the sensor suffers from read errors for some reason, the **Temperature** value to report in that situation can be set here. Both **Humidity** and **Pressure** will be set to -1 when such read errors occur.
|
||||
|
||||
.. image:: P028_TemperatureErrorValueOptions.png
|
||||
:alt: Temperature Error Value options
|
||||
|
||||
* *Ignore* : Do not return any value (does log the error once per second at INFO level).
|
||||
* *Min -1 (-41C°)* : Set to the out-of-range value, below sensor minimum, of -41°C.
|
||||
* *0* : Set to an unknown value of 0.
|
||||
* *max +1 (+85°C)* : Set to the out-of-range value, above sensor maximum, of 86°C.
|
||||
* *NaN* : Set to the error value ``NaN`` (Not a number).
|
||||
* *-1°K (-274°C)* : Set to the impossible temperature value of -1° Kelvin.
|
||||
|
||||
The Temperature range of the sensor, according to the datasheet, is -40 to +85 °C, so the out of range values of -41 and +86 can be selected as error state values.
|
||||
|
||||
Single event with all values, Send to Controller and Interval settings are standard available configuration items. Send to Controller only when one or more Controllers are configured.
|
||||
|
||||
* **Interval** By default, Interval will be set to 60 sec. The minimum value allowed is 1 sec.
|
||||
|
||||
Values
|
||||
^^^^^^
|
||||
|
||||
The measured values are available in ``Temperature``, ``Humidity`` and ``Pressure``. A formula can be set to recalculate. The number of decimals is by default set to 2, and can be set to 0 for ``Humidity`` and ``Pressure``, as no decimals are provided from the measurement.
|
||||
|
||||
.. Commands available
|
||||
.. ^^^^^^^^^^^^^^^^^^
|
||||
@@ -36,12 +114,44 @@ Supported hardware
|
||||
|
||||
.. .. include:: P028_events.repl
|
||||
|
||||
Rules examples
|
||||
--------------
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
on BME#Pressure do
|
||||
if %eventvalue1%>999
|
||||
Publish,%sysname%/pressure,Is normal
|
||||
endif
|
||||
endon
|
||||
|
||||
Change I2C address
|
||||
------------------
|
||||
|
||||
You may change the i2c address from the default 0x76 to 0x77 by cutting the line between the two left pads (as seen in the pictures below) and solder a bridge between the two right pads.
|
||||
|
||||
.. image:: P028_BME280_2.jpg
|
||||
|
||||
Default i2c address 0x76.
|
||||
|
||||
.. image:: P028_BME280_3.jpg
|
||||
|
||||
Changed i2c address 0x77.
|
||||
|
||||
.. image:: P028_BME280_4.jpg
|
||||
|
||||
:green:`Cut` :red:`Solder/bridge`
|
||||
|
||||
|
||||
Change log
|
||||
----------
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
...
|
||||
|
||||
|added|
|
||||
2022-05-10 Added Error State Value option, documentation overhaul.
|
||||
|
||||
|added|
|
||||
Major overhaul for 2.0 release.
|
||||
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
|
||||
.. _P028_BME280_page:
|
||||
|
||||
BME280
|
||||
======
|
||||
|
||||
|P028_typename|
|
||||
|P028_status|
|
||||
|
||||
.. image:: P028_BME280_1.jpg
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Specifications:
|
||||
* Temperature (-40C to +85C)
|
||||
* Relative humidity (0-100 %RH)
|
||||
* Barometric pressure (300-1100 hPa)
|
||||
|
||||
.. warning:: The BME280 is easily mistaken for its sibling the BM**P**280. Sometimes the PCB have both BME and BMP280
|
||||
written on it, it's probably because the footprint is the same for BME and BMP = the same PCB board is used
|
||||
by both.
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
ESP BME280
|
||||
GPIO (4) <--> SDA
|
||||
GPIO (5) <--> SCL
|
||||
|
||||
Power
|
||||
3.3V <--> VIN
|
||||
GND <--> GND
|
||||
|
||||
.. note:: If you have change the I2C settings in the hardware setup you need to connect to those instead of GPIO 4 and 5.
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
.. image:: P028_Setup_BME280_1.png
|
||||
|
||||
Task settings
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
* **Device**: Name of plugin
|
||||
* **Name**: Name of the task (example name **BME**)
|
||||
* **Enable**: Should the task be enabled or not
|
||||
|
||||
Sensor
|
||||
^^^^^^
|
||||
|
||||
* **i2C address**: You can use two BME280 at the same time, choose address here. If you only use one, stay with the default address.
|
||||
* **Altitude**: Set the level above sea for your unit. This is done in order to get a correct pressure value.
|
||||
* **Temperature offset**: Linear software calibration. One tenth of a degree Celsius, used to compensate for deviation of real temperature.
|
||||
|
||||
Data acquisition
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
|
||||
* **Interval**: How often should the task publish its value (5..15 seconds is normal).
|
||||
|
||||
Indicators (recommended settings)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table::
|
||||
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
|
||||
:widths: 8, 5, 5, 5, 40
|
||||
|
||||
"Temperature", "Celsius", "10", "1", ""
|
||||
"Humidity", "RH", "10", "0", ""
|
||||
"Pressure", "hPa", "10", "0", ""
|
||||
|
||||
Rules examples
|
||||
--------------
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
on BME#hPa do
|
||||
if BME#hPa>999
|
||||
Publish,%sysname%/pressure,Is normal
|
||||
endif
|
||||
endon
|
||||
|
||||
.. Commands available
|
||||
.. ~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. .. include:: P028_commands.repl
|
||||
|
||||
Change I2C address
|
||||
------------------
|
||||
|
||||
You may change the i2c address from the default 0x76 to 0x77 by cutting the line between the two left pads (as seen in the pictures below) and solder a bridge between the two right pads.
|
||||
|
||||
.. image:: P028_BME280_2.jpg
|
||||
|
||||
Default i2c address 0x76.
|
||||
|
||||
.. image:: P028_BME280_3.jpg
|
||||
|
||||
Changed i2c address 0x77.
|
||||
|
||||
.. image:: P028_BME280_4.jpg
|
||||
|
||||
:green:`Cut` :red:`Solder/bridge`
|
||||
|
||||
Where to buy
|
||||
------------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Store", "Link"
|
||||
:widths: 5, 40
|
||||
|
||||
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/sZWPuEM>`_"
|
||||
"Banggood","`Link 2 ($) <https://www.banggood.com/CJMCU-280E-BME280-High-Precision-Atmospheric-Pressure-Sensor-For-Arduino-p-1103115.html?p=V3270422659778201806>`_ `Link 3 ($) <https://www.banggood.com/CJMCU-BME280-Embedded-High-Precision-Atmospheric-Pressure-Altitude-Sensor-Module-For-Arduino-p-1103112.html?p=V3270422659778201806>`_"
|
||||
"eBay","`Link 4 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DBME280%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DINA219>`_"
|
||||
|
||||
|affiliate|
|
||||
|
||||
|
||||
.. More pictures
|
||||
.. -------------
|
||||
|
||||
.. .. image:: P028_BME280_5.jpg
|
||||
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -1,4 +1,4 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
|
||||
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
|
||||
.. _P030_page:
|
||||
|
||||
|P030_typename|
|
||||
@@ -26,6 +26,8 @@ Supported hardware
|
||||
|
||||
|P030_usedby|
|
||||
|
||||
:red:`RETIRED` This plugin has been retired, all functionality is available in :ref:`P028_page`
|
||||
|
||||
.. Commands available
|
||||
.. ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -51,68 +51,68 @@ Change log
|
||||
Description
|
||||
===========
|
||||
|
||||
This Plugin reads the data from Thermocouples and Resistor Temperature Detector sensors. You have to use an Adapter Board with a respective
|
||||
adapter/converter in order to read the values. Take a look at the usual sources to find such boards.
|
||||
This Plugin reads the data from Thermocouples and Resistor Temperature Detector sensors. You have to use an Adapter Board with a respective
|
||||
adapter/converter in order to read the values. Take a look at the usual sources to find such boards.
|
||||
|
||||
You can only use ESP8266 boards which expose the SPI Interface. This Plugin uses only the Hardware SPI Interface - no software SPI at the moment.
|
||||
Nevertheless you need at least 3 Pins to use SPI. So using an very simple ESP-01 is unfortunately no option.
|
||||
You can only use ESP8266 boards which expose the SPI Interface. This Plugin uses only the Hardware SPI Interface - no software SPI at the moment.
|
||||
Nevertheless you need at least 3 Pins to use SPI. So using an very simple ESP-01 is unfortunately no option.
|
||||
|
||||
**Basic Information on Thermocouples**
|
||||
**Basic Information on Thermocouples**
|
||||
`Wikipedia: Thrmocouples <https://en.wikipedia.org/wiki/Thermocouple>`_
|
||||
|
||||
**Basic Information on Resistor Temperature Detector Sensors**
|
||||
**Basic Information on Resistor Temperature Detector Sensors**
|
||||
`Wikipedia: Resistance Thermometers <https://en.wikipedia.org/wiki/Resistance_thermometer>`_
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
Basic Information on SPI Bus you can find in `Wikipedia: SPI Bus <https://en.wikipedia.org/wiki/Serial_Peripheral_Interface>`_
|
||||
Basic Information on SPI Bus you can find in `Wikipedia: SPI Bus <https://en.wikipedia.org/wiki/Serial_Peripheral_Interface>`_
|
||||
|
||||
You need an ESP8266 device with accessible SPI Pins. These Pins are:
|
||||
You need an ESP8266 device with accessible SPI Pins. These Pins are:
|
||||
|
||||
==== ============= ====== ======== =========================================================================
|
||||
Name Description PIO NodeMCU Notes
|
||||
==== ============= ====== ======== =========================================================================
|
||||
MOSI Master Output GPIO13 D7 Hardware SPI (only required in case of write access to device registers)
|
||||
MISO Master Input GPIO12 D6 Hardware SPI
|
||||
SCK Clock Output GPIO14 D5 Hardware SPI
|
||||
CS Chip Select GPIO15 D8 Hardware SPI (CS is configurable through the web interface)
|
||||
MOSI Master Output GPIO13 D7 Hardware SPI (only required in case of write access to device registers)
|
||||
MISO Master Input GPIO12 D6 Hardware SPI
|
||||
SCK Clock Output GPIO14 D5 Hardware SPI
|
||||
CS Chip Select GPIO15 D8 Hardware SPI (CS is configurable through the web interface)
|
||||
==== ============= ====== ======== =========================================================================
|
||||
|
||||
.. note:: Write Access to device registers is required for MAX 31856 and MAX 31865 devices so far.
|
||||
|
||||
Supported Hardware
|
||||
Supported Hardware
|
||||
------------------
|
||||
|
||||
**[2021-05-03]: Added support for RTD sensor adapters based on Maxim Device MAX21865.**
|
||||
**[2021-05-03]: Added support for RTD sensor adapters based on Maxim Device MAX21865.**
|
||||
|
||||
This adapter device requires write access to internal configuration registers. For this device you will need to wire MOSI signal to your adapter.
|
||||
For MAX31865 multiple shields are available in the usual sources. Those are mostly based on `Adafruit MAX 31865 shield <https://www.adafruit.com/product/3328>`_
|
||||
and follow the original schematics and element values.
|
||||
This adapter device requires write access to internal configuration registers. For this device you will need to wire MOSI signal to your adapter.
|
||||
For MAX31865 multiple shields are available in the usual sources. Those are mostly based on `Adafruit MAX 31865 shield <https://www.adafruit.com/product/3328>`_
|
||||
and follow the original schematics and element values.
|
||||
|
||||
.. image:: https://cdn-shop.adafruit.com/970x728/3328-01.jpg
|
||||
:width: 400
|
||||
:alt: image showing the Adafruit MAX 31865 adapter shield for SPI bus
|
||||
|
||||
The adapter can be purchased prepared for the required senor type (PT 100 or PT 1000). Basically this will influence the choice of the reference
|
||||
resistor. Those resistors are usualy chosen with the following values, but can be adjusted to the needs of the user and the application.
|
||||
The adapter can be purchased prepared for the required senor type (PT 100 or PT 1000). Basically this will influence the choice of the reference
|
||||
resistor. Those resistors are usualy chosen with the following values, but can be adjusted to the needs of the user and the application.
|
||||
|
||||
============ ===============================
|
||||
Sensor Type Reference Resistor Value
|
||||
Sensor Type Reference Resistor Value
|
||||
============ ===============================
|
||||
PT 100 Rref = 430 Ohm
|
||||
PT 1000 Rref = 4300 Ohm
|
||||
PT 100 Rref = 430 Ohm
|
||||
PT 1000 Rref = 4300 Ohm
|
||||
============ ===============================
|
||||
|
||||
The populated value can be directly stated in the device configuration and therefore adjusted to any desired resistor value.
|
||||
The populated value can be directly stated in the device configuration and therefore adjusted to any desired resistor value.
|
||||
|
||||
The modules often allow usage of 2-wire, 3-wire and 4-wire connection of an appropriate sensor. For activation of the connection type, it requires
|
||||
closing/opening of hardware bridges on the adapter **and** adjustment of the configuration in the ESPEasy device configuration.
|
||||
The modules often allow usage of 2-wire, 3-wire and 4-wire connection of an appropriate sensor. For activation of the connection type, it requires
|
||||
closing/opening of hardware bridges on the adapter **and** adjustment of the configuration in the ESPEasy device configuration.
|
||||
|
||||
MAX31865 devices support filtering of noise frequencies resulting from the frequency of your power net. Basic filtering of 50/60 Hz noise
|
||||
contributions can be adjusted in the device configuration. See configuration examples below.
|
||||
MAX31865 devices support filtering of noise frequencies resulting from the frequency of your power net. Basic filtering of 50/60 Hz noise
|
||||
contributions can be adjusted in the device configuration. See configuration examples below.
|
||||
|
||||
**[2021-02-xx]: Initial support of thermocouple sensors via Maxim devices MAX6675, MAX31855 and MAX31856**
|
||||
**[2021-02-xx]: Initial support of thermocouple sensors via Maxim devices MAX6675, MAX31855 and MAX31856**
|
||||
|
||||
From the start this device allows usage of thermocouple sensors and adapters. Most of them are rather simple to use and access, as they only require read access to their SPI interface.
|
||||
Nevertheless they provide powerful options to sense high temperature ranges and difficult sensing scenarios. See system advantages and limitations on above mentioned Wikipedia page on Thermocouples.
|
||||
@@ -129,7 +129,7 @@ Supported Hardware
|
||||
:alt: image of Adafruit MAX 31855 shield
|
||||
|
||||
|
||||
Configuration in ESPEasy
|
||||
Configuration in ESPEasy
|
||||
------------------------
|
||||
|
||||
.. image:: P039_select_plugin.png
|
||||
@@ -144,25 +144,25 @@ Within ESPEasy tab "Devices" chose the plugin "Environment - Thermosensors" to u
|
||||
|
||||
In the plugin configuration page you will be initially asked to define the unique name of the task and the CS pin used for activating the SPI communication.
|
||||
|
||||
At first you need to select the name of the task and the GPIO pin you want to use as CS for your SPI interface. You can select every GPIO that
|
||||
is not blocked by another device or which is limited by its function capabilities, e.g. not possible to configure as OUTPUT.
|
||||
At first you need to select the name of the task and the GPIO pin you want to use as CS for your SPI interface. You can select every GPIO that
|
||||
is not blocked by another device or which is limited by its function capabilities, e.g. not possible to configure as OUTPUT.
|
||||
|
||||
Keep in mind some of the GPIOs require dedicated states during boot or have limited configuration options. E.g. D8 need to be pulled to GND during
|
||||
boot to allow proper boot. Some of the shields provide 10k pull-up resistors overriding any weak pull-down on an ESP 8266 and such avoid correct
|
||||
start up of ESP. In such cases solder an additional 4,7k resistor between GND and D8.
|
||||
Keep in mind some of the GPIOs require dedicated states during boot or have limited configuration options. E.g. D8 need to be pulled to GND during
|
||||
boot to allow proper boot. Some of the shields provide 10k pull-up resistors overriding any weak pull-down on an ESP 8266 and such avoid correct
|
||||
start up of ESP. In such cases solder an additional 4,7k resistor between GND and D8.
|
||||
|
||||
.. image:: P039_overview_after_initial_open.png
|
||||
:width: 800
|
||||
:alt: image showing the overview of configuration after initial call of the plugin
|
||||
|
||||
After that, the configuration page of the device provides a three step configuration:
|
||||
After that, the configuration page of the device provides a three step configuration:
|
||||
|
||||
#. **Choose the type of sensor you want to use**
|
||||
#. **Choose the type of sensor you want to use**
|
||||
|
||||
Inital configuration step is to decide on which sensor family you want to use. This device support two:
|
||||
Inital configuration step is to decide on which sensor family you want to use. This device support two:
|
||||
|
||||
* Thermocouple --> Thermocoupling Sensors
|
||||
* RTD --> Resistor Temperature Device Sensors
|
||||
* Thermocouple --> Thermocoupling Sensors
|
||||
* RTD --> Resistor Temperature Device Sensors
|
||||
|
||||
|
||||
|
||||
@@ -172,34 +172,34 @@ After that, the configuration page of the device provides a three step
|
||||
|
||||
With the drop down field you can chose the sensor type you want to use.
|
||||
|
||||
#. **Choose the type of the adapter device you use**
|
||||
#. **Choose the type of the adapter device you use**
|
||||
|
||||
In case you want to use RTD adatpers the further configuration looks like the following:
|
||||
|
||||
When page has been updated after the submit you can decide on which adapter device you plan to use.
|
||||
When page has been updated after the submit you can decide on which adapter device you plan to use.
|
||||
|
||||
.. image:: P039_select_device_type.png
|
||||
:width: 800
|
||||
:alt: image showing the configuration section to select used adapter devices
|
||||
|
||||
Depending on the chosen sensor type the drop box will adjust the possible choices to the supported devices
|
||||
Depending on the chosen sensor type the drop box will adjust the possible choices to the supported devices
|
||||
|
||||
|
||||
#. **Configure the device details to match your needs**
|
||||
#. **Configure the device details to match your needs**
|
||||
|
||||
When page has been updated after the submit you can configure the device according to your needs.
|
||||
When page has been updated after the submit you can configure the device according to your needs.
|
||||
|
||||
.. image:: P039_MAX31865_device_settings.png
|
||||
:width: 800
|
||||
:alt: image showing the configuration section for setting all options for your device
|
||||
:alt: image showing the configuration section for setting all options for your device
|
||||
|
||||
In this section you can detail the configuration to adjust the behavior to your technical needs.
|
||||
|
||||
.. image:: P039_press_submit.png
|
||||
:width: 200
|
||||
:alt: image showing the configuration section to submit the configuration so far
|
||||
:alt: image showing the configuration section to submit the configuration so far
|
||||
|
||||
After this selection select the enable check box in the upper section of this configuration page and submit the configuration to finalize the set up.
|
||||
After this selection select the enable check box in the upper section of this configuration page and submit the configuration to finalize the set up.
|
||||
|
||||
Details on Device Settings
|
||||
==========================
|
||||
|
||||
@@ -260,7 +260,7 @@ Commands available
|
||||
.. include:: P082_commands.repl
|
||||
|
||||
Events
|
||||
~~~~~~
|
||||
^^^^^^
|
||||
|
||||
.. include:: P082_events.repl
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ Available options:
|
||||
* *ST7735 128 x 128px* Allows about 12 lines of text in the smallest font scaling setting (the 13th line will be distorted, as the bottom 2 pixellines aren't available)
|
||||
* *ST7735 128 x 160px* Allows 16 lines of text in the smallest font scaling setting.
|
||||
* *ST7735 80 x 160px* Allows 16 lines of text in the smallest font scaling setting.
|
||||
* *ST7735 80 x 160px (Color inverted)* Special color inverted configuration as used in f.e. M5Stack StickC.
|
||||
* *ST7789 240 x 320px* Allows 32 lines of text in the smallest font scaling setting. Predefined text only goes to 24, extra lines can be displayed from rules or external commands.
|
||||
* *ST7789 240 x 240px* Allows 24 lines of text in the smallest font scaling setting.
|
||||
* *ST7789 240 x 280px* Allows 28 lines of text in the smallest font scaling setting. Predefined text only goes to 24, extra lines can be displayed from rules or external commands.
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,98 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p12x.repl
|
||||
.. _P128_page:
|
||||
|
||||
|P128_typename|
|
||||
==================================================
|
||||
|
||||
|P128_shortinfo|
|
||||
|
||||
Plugin details
|
||||
--------------
|
||||
|
||||
Type: |P128_type|
|
||||
|
||||
Name: |P128_name|
|
||||
|
||||
Status: |P128_status|
|
||||
|
||||
GitHub: |P128_github|_
|
||||
|
||||
Maintainer: |P128_maintainer|
|
||||
|
||||
Used libraries: |P128_usedlibraries|
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The NeoPixel (BusFX) plugin is designed to use strings of NeoPixel LEDs, like the WS2811/WS2812/WS2813, to show light-effects.
|
||||
|
||||
Supported hardware
|
||||
------------------
|
||||
|
||||
LED strips (sometimes called stripes) using the WS281x type (and clones) of multi-color LEDs, capable of displaying 24 bits of color (16 million colors). Each LED is separately addressable, and the entire stripe can be controlled using a single GPIO pin on the ESP.
|
||||
|
||||
|P128_usedby|
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
.. image:: P128_DeviceConfiguration.png
|
||||
:alt: Device Configuration
|
||||
|
||||
* **Name** A unique name should be entered here.
|
||||
|
||||
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
|
||||
|
||||
Actuator
|
||||
^^^^^^^^
|
||||
|
||||
* **GPIO -> Stripe data**: Select the GPIO pin the stripe is connected to (Only available on ESP32!)
|
||||
|
||||
Due to the design of the used library and the methods used, on ESP8266 only GPIO-2 can be used to connect the LED stripe:
|
||||
|
||||
.. image:: P128_GPIO_ESP8266.png
|
||||
:alt: ESP8266 GPIO instruction
|
||||
|
||||
* **Led Count**: Set up the number of leds that are available on the stripe. (Current maximum is 300).
|
||||
|
||||
* **Max brightness**: The maximum brightness allowed for the stripe. Range: 1..255. This is also the initial brightness set during initialization. Can *not* be overridden by the ``dim`` subcommand, and also the maximum value for the ``rainbow`` subcommand.
|
||||
|
||||
Data Aquisition
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The Data Acquisition, Send to Controller and Interval settings are standard available configuration items. Send to Controller only when one or more Controllers are configured.
|
||||
|
||||
**Interval** By default, Interval will be set to 0 sec. This is optional. When set, the **Values** will be sent to any configured controllers, and events generated to be handled in rules.
|
||||
|
||||
Values
|
||||
^^^^^^
|
||||
|
||||
The value names are fixed and not configurable. These names are:
|
||||
|
||||
* **Mode**: The currently active **mode** (numeric value)
|
||||
* **Lastmode**: The previously active mode (numeric value)
|
||||
* **Fadetime**: Currently set fade time value (milliseconds)
|
||||
* **Fadedelay**: The delay time used during fade in or out (milliseconds)
|
||||
|
||||
|
||||
Commands available
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include:: P128_commands.repl
|
||||
|
||||
Change log
|
||||
----------
|
||||
|
||||
.. versionadded:: 2.0
|
||||
...
|
||||
|
||||
|added|
|
||||
2022-07-02: Max brightness setting.
|
||||
|
||||
|added|
|
||||
Initial release version.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,179 @@
|
||||
.. csv-table::
|
||||
:header: "Command Syntax", "Extra information"
|
||||
:widths: 20, 30
|
||||
|
||||
"
|
||||
NB: The ``neopixelfx`` command can be abbreviated to ``nfx``.
|
||||
","
|
||||
"
|
||||
| For brevity the ``nfx`` command is used here.
|
||||
|
||||
| Led count == Number of pixels.
|
||||
"
|
||||
| ``nfx,off[,fadetime[,delay]]``
|
||||
","
|
||||
| Switches the stripe off, using the optional fadetime and delay timings (milliseconds).
|
||||
"
|
||||
"
|
||||
| ``nfx,on[,fadetime[,delay]]``
|
||||
","
|
||||
| Restores the last state of the stripe, active before a ``nfx off`` command was applied, using the optional fadetime and delay timings (milliseconds).
|
||||
"
|
||||
"
|
||||
| ``nfx,dim[,dimvalue]``
|
||||
","
|
||||
| Set the brightness of the stripe, range ``0`` to ``255`` (max. brightness), set to 0 when not specified. If the provided dimvalue exceeds the configured Max brightness configuration setting, or is negative, it is ignored (invalid command).
|
||||
"
|
||||
"
|
||||
| ``nfx,line,<startpixel>,<endpixel>,<color>``
|
||||
","
|
||||
| Light up the pixels from startpixel (range: 1..number of pixels) to endpixel (range: number of pixels..startpixel) with the specified color. Color is to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,hsvline,<startpixel>.<endpixel>,<hue>,<saturation>,<brightness>``
|
||||
","
|
||||
| Light up the pixels from startpixel (range: 1..number of pixels) to endpixel (range: number of pixels..startpixel) with the specified hsvcolor values.
|
||||
"
|
||||
"
|
||||
| ``nfx,one,<pixel>,<color>``
|
||||
","
|
||||
| Light up 1 pixel (range: 1..number of pixels) with the specified color. Color is to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,hsvone,<pixel>,<hue>,<saturation>,<brightness>``
|
||||
","
|
||||
| Light up 1 pixel (range: 1..number of pixels) with the specified hsvcolor values.
|
||||
"
|
||||
"
|
||||
| ``nfx,all,<color>[,fadetime[,delay]]``
|
||||
|
||||
| ``nfx,rgb,<color>[,fadetime[,delay]]``
|
||||
|
||||
| ``nfx,fade,<color>[,fadetime[,delay]]``
|
||||
","
|
||||
| Light up all pixels with the specified color, using the optional fadetime and delay timings (milliseconds). Color is to be specified in a hex RRGGBB value.
|
||||
|
||||
| For the ``all`` and ``rgb`` subcommands, the delay is set to 0 if not specified. When using the ``fade`` subcommand, a previously set delay is used.
|
||||
"
|
||||
"
|
||||
| ``nfx,hsv,<hue>,<saturation>,<brightness>[,fadetime[,delay]]``
|
||||
","
|
||||
| Light up all pixels with the specified hsvcolor values, using the optional fadetime and delay timings (milliseconds).
|
||||
|
||||
| Delay is set to 0 if not specified.
|
||||
"
|
||||
"
|
||||
| ``nfx,colorfade,<startcolor>,<endcolor>[,startpixel[,endpixel]]``
|
||||
","
|
||||
| Change the color for all or specified start- to end-pixels, from startcolor to endcolor. Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,rainbow[,speed[,fadetime]]``
|
||||
","
|
||||
| Run a rainbow effect color loop effect using speed and fadetime timings (in milliseconds).
|
||||
"
|
||||
"
|
||||
| ``nfx,kitt,<color>[,speed]``
|
||||
","
|
||||
| Run a ``kitt`` (from the TV-series Knight Rider) effect across the pixels, using an optional speed value (range: -50..50, default: 25, negative = reverse).
|
||||
"
|
||||
"
|
||||
| ``nfx,comet,<color>[,speed]``
|
||||
","
|
||||
| Run a comet effect across the pixels, using an optional speed value (range: -50..50, default: 25, negative = reverse).
|
||||
"
|
||||
"
|
||||
| ``nfx,theatre,<color>[,backgroundcolor[,count[,speed]]]``
|
||||
","
|
||||
| Run a theatre effect across the pixels, using optional backgroundcolor, count (default: 1) and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,scan,<color>[,backgroundcolor[,speed]]``
|
||||
","
|
||||
| Run a scan effect across the pixels, using optional backgroundcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,dualscan,<color>[,backgroundcolor[,speed]]``
|
||||
","
|
||||
| Run a dual scan effect, 2 scans in opposite direction, across the pixels, using optional backgroundcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,twinkle,<color>[,backgroundcolor[,speed]]``
|
||||
","
|
||||
| Run a twinkle effect across the pixels, using optional backgroundcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,twinklefade,<color>[,count[,speed]]``
|
||||
","
|
||||
| Run a fading twinkle effect across the pixels, using optional count (default: 1) and speed values (range: -50..50, default: 25, negative = reverse). Color is to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,sparkle,<color>[,backgroundcolor[,speed]]``
|
||||
","
|
||||
| Run a sparkle effect across the pixels, using optional backgroundcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,wipe,<color>[,dotcolor[,speed]]``
|
||||
","
|
||||
| Run a wipe effect across the pixels, using optional dotcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,dualwipe[,dotcolor[,speed]]``
|
||||
","
|
||||
| Run a dual wipe effect, in opposite direction, across the pixels, using optional dotcolor and speed values (range: -50..50, default: 25, negative = reverse). Colors are to be specified in a hex RRGGBB value.
|
||||
"
|
||||
"
|
||||
| ``nfx,fire[,fps[,brightness[,cooling[,sparking]]]]``
|
||||
","
|
||||
| Run a fire effect accross the pixels, with optional fps (default: 50), brightness (default: 31), cooling (range 20..100, default: 50) and sparking (range: 20..200, default: 120) values.
|
||||
"
|
||||
"
|
||||
| ``nfx,fireflicker[,intensity[,speed]]``
|
||||
","
|
||||
| Run a flickering fire effect across the pixels, with optional intensity (default: 3) and speed (range -50..50, default: 25, negative = reverse) values.
|
||||
"
|
||||
"
|
||||
| ``nfx,faketv[,startpixel[,endpixel]]``
|
||||
","
|
||||
| Run a fake TV effect on the pixels, optionally specifying a start- end end-pixel. Used for simulating an active TV-set, f.e. when not at home during the evening, to scare off potential burglars.
|
||||
"
|
||||
"
|
||||
| ``nfx,simpleclock[,bigtickcolor[,smalltickcolor[,hourcolor[,minutecolor[,secondcolor (set 'off' to disable)[,backgroundcolor]]]]]]``
|
||||
","
|
||||
| Display a simple clock on the pixels. TODO: Optional arguments and setup to be determined.
|
||||
"
|
||||
"
|
||||
| ``nfx,stop``
|
||||
","
|
||||
| Stops the effect.
|
||||
"
|
||||
"
|
||||
| ``nfx,statusrequest``
|
||||
","
|
||||
| Send back the status as a JSON message to the source it was requested from.
|
||||
"
|
||||
"
|
||||
| ``nfx,fadetime,<time>``
|
||||
","
|
||||
| Set the fade time per pixel in milliseconds.
|
||||
"
|
||||
"
|
||||
| ``nfx,fadedelay,<delay>``
|
||||
","
|
||||
| Set the fade delay to next pixel in milliseconds.
|
||||
"
|
||||
"
|
||||
| ``nfx,speed,<speed>``
|
||||
","
|
||||
| Set the default effect speed, range -50..50. Negative value will revert the direction.
|
||||
"
|
||||
"
|
||||
| ``nfx,count,<count>``
|
||||
","
|
||||
| Set the NeoPixel LED-count.
|
||||
"
|
||||
"
|
||||
| ``nfx,bgcolor,<backgroundcolor>``
|
||||
","
|
||||
| Sets the default background color. Backgroundcolor is to be specified in a hex RRGGBB value.
|
||||
"
|
||||
@@ -0,0 +1,106 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p13x.repl
|
||||
.. _P133_page:
|
||||
|
||||
|P133_typename|
|
||||
==================================================
|
||||
|
||||
|P133_shortinfo|
|
||||
|
||||
Plugin details
|
||||
--------------
|
||||
|
||||
Type: |P133_type|
|
||||
|
||||
Name: |P133_name|
|
||||
|
||||
Status: |P133_status|
|
||||
|
||||
GitHub: |P133_github|_
|
||||
|
||||
Maintainer: |P133_maintainer|
|
||||
|
||||
Used libraries: |P133_usedlibraries|
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
I2C UV and Ambient light sensor with UVIndex and Lux calculation.
|
||||
|
||||
Configuration
|
||||
--------------
|
||||
|
||||
.. image:: P133_DeviceConfiguration.png
|
||||
:alt: Device configuration
|
||||
|
||||
* **Name** A unique name should be entered here.
|
||||
|
||||
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
|
||||
|
||||
I2C Options
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The available settings here depend on the build used. At least the **Force Slow I2C speed** option is available, but selections for the I2C Multiplexer can also be shown. For details see the :ref:`Hardware_page`
|
||||
|
||||
Device Settings
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
* **Read mode**: As the sensor has 2 measuring options, the kind of measurement can be selected. By default, Dual mode is selected.
|
||||
|
||||
Available options:
|
||||
|
||||
.. image:: P133_ReadModeOptions.png
|
||||
:alt: Read mode options
|
||||
|
||||
* **Dual mode, read alternating UV/Ambient** Read both UV and Ambient alternating, and apply separate settings for Gain and Resolution when switching the measuring mode. Calculates both the UVIndex and Lux values.
|
||||
* **UV reading only** Read only UV, and calculate the UVIndex from it (according to manufacurer specification).
|
||||
* **Ambient reading only** Read Ambient light sensor value (ALS), and calculate the Lux value from that.
|
||||
|
||||
When selecting a different Read mode, the settings will be saved and the page reloaded, as the available options change when choosing a different option.
|
||||
|
||||
.. image:: P133_UVConfiguration.png
|
||||
:alt: UV Only configuration
|
||||
|
||||
.. image:: P133_ALSConfiguration.png
|
||||
:alt: Ambient Only configuration
|
||||
|
||||
* **UV Gain** The Gain determains the amplification of the signal measured. Depending on the desired range of values, this can be adjusted.
|
||||
* **Ambient Gain**
|
||||
|
||||
.. image:: P133_GainOptions.png
|
||||
:alt: Gain options
|
||||
|
||||
* **UV Resolution** The sensor is capable of returning the measurement in different resolutions, as selected here.
|
||||
* **Ambient Resolution**
|
||||
|
||||
.. image:: P133_ResolutionOptions.png
|
||||
:alt: Resolution options
|
||||
|
||||
The time that is needed to determine the measurement increases with the resolution selected. The sensor is only read if a new measurement is actually available.
|
||||
|
||||
The Gain and Resolution are factored in for the calculation of the UVIndex and Lux values.
|
||||
|
||||
Data Acquisition
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This group of settings, **Single event with all values**, **Send to Controller** and **Interval** settings are standard available configuration items. Send to Controller is only visible when one or more Controllers are configured.
|
||||
|
||||
**Interval** By default, Interval will be set to 60 sec. It is the frequency used to read sensor values and send these to any Controllers configured for this device.
|
||||
|
||||
Values
|
||||
^^^^^^
|
||||
|
||||
The measured values are available in ``UV`` and ``Ambient``, and the calculated values in ``UVIndex`` and ``Lux``. A formula can be set to recalculate. The number of decimals is by default set to 0 for UV and Ambient, as decimals are not available from the sensor, but after calculating the UVIndex and Lux they are.
|
||||
|
||||
.. Commands
|
||||
.. ~~~~~~~~
|
||||
|
||||
.. .. include:: P133_commands.repl
|
||||
|
||||
|
||||
|
||||
Change log
|
||||
----------
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
|added| 2022-03-26 Initially added.
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 73 KiB |
@@ -1,12 +1,218 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions.repl
|
||||
.. include:: _plugin_categories.repl
|
||||
|
||||
#######
|
||||
Plugins
|
||||
#######
|
||||
############
|
||||
Devices Page
|
||||
############
|
||||
|
||||
ESPEasy supports lots of sensors and displays via "Plugins".
|
||||
A plugin is a piece of code tailored specifically to communicate with some hardware like a sensor.
|
||||
|
||||
There are several builds made of ESPEasy which mainly differ in the plugins included during build.
|
||||
See below to check which build is needed to support specific sensors.
|
||||
|
||||
In ESPEasy, one can setup a number of "Tasks".
|
||||
A task is an instance of a plugin and may yield upto 4 "task values". (typically measurements taken from the connected sensor)
|
||||
These task values can be sent to connected controllers to send the data to some other system, like a MQTT broker.
|
||||
|
||||
There can be multiple instances of the same plugin, however this might not be implemented for all plugins yet.
|
||||
For example, it makes perfect sense to have multiple temperature sensors on a single ESPEasy node.
|
||||
|
||||
|
||||
The Devices page shows a list of all tasks, including the last task values.
|
||||
These task values may be updated live. The update interval depends on the lowest set task interval of any (enabled) task.
|
||||
|
||||
Task Config Page
|
||||
================
|
||||
|
||||
Via the "Edit" button on the "Devices Page", one can see and edit the configuration of a task.
|
||||
|
||||
A typical layout of a task setup page.
|
||||
|
||||
.. image:: Task_config_page_layout.png
|
||||
|
||||
Each task needs to have an unique name and has to be enabled in order to actually start collecting task values.
|
||||
The reason to have unique task names is to make sure task values can be used elsewhere in the ESPEasy system. (e.g. showing a task value on a display)
|
||||
|
||||
Sensor
|
||||
------
|
||||
|
||||
Next section is about how to communicate with the device.
|
||||
Typically:
|
||||
|
||||
* For I2C sensors: I2C address, I2C speed
|
||||
* For UART/Serial sensors: Serial port, type of serial port (hardware/software serial), baudrate, GPIO pins used.
|
||||
* GPIO pins for other sensor types, whether pull-up resistors should be enabled etc.
|
||||
|
||||
|
||||
Device Settings
|
||||
---------------
|
||||
|
||||
Some other plugins support several variants of the same sensor. (e.g. PMSx003 plugin)
|
||||
This can then be configured here.
|
||||
|
||||
A lot of sensors allow for some options to operate.
|
||||
For example in the shown screenshot above, one can set the voltage range.
|
||||
|
||||
Output
|
||||
------
|
||||
|
||||
Some sensors can collect more than 4 types of data.
|
||||
GPS is one of those, which can collect values like:
|
||||
|
||||
* Longitude
|
||||
* Latitude
|
||||
* Altitude
|
||||
* Speed
|
||||
* Satellites tracked
|
||||
* HDOP
|
||||
* etc.
|
||||
|
||||
These can then be selected to be output as task value.
|
||||
|
||||
|
||||
Statistics
|
||||
----------
|
||||
|
||||
.. _Task Value Statistics:
|
||||
|
||||
(Added: 2022/07/11)
|
||||
|
||||
A chart is shown with the recorded task values for all task values which have
|
||||
the "Stats" option is checked in the "Values" section at the bottom of the page.
|
||||
|
||||
.. image:: Task_config_page_Statistics.png
|
||||
|
||||
As can be seen in the screenshot taken from a "sysinfo" task, a dataset can be disabled in the chart by clicking on the item in the legend.
|
||||
This will scale the chart to fit the other data sets.
|
||||
For example the amount of free memory on an ESP32 is several orders of magnitude larger than the typical system load.
|
||||
|
||||
Enabling "Stats" on a task value also extends how task values can be addressed within ESPEasy.
|
||||
|
||||
For example using just like normal task value data:
|
||||
|
||||
* ``[bme#temp.avg]`` Compute the average over the last N samples in the historic buffer (typically: 64 samples on ESP32, 16 on ESP8266)
|
||||
* ``[bme#temp.avgX]`` Compute the average over the last X samples (or less if there are less samples available)
|
||||
* ``[bme#temp.max]`` Refer to the maximum recorded sample since the last ``resetpeaks``. N.B. Not all tasks log the min and max peaks.
|
||||
* ``[bme#temp.min]`` See ``[bme#temp.max]``
|
||||
|
||||
|
||||
Commands on "Stats" data:
|
||||
|
||||
* ``bme.resetpeaks`` Reset the recorded "max" and "min" value of all task values of that task.
|
||||
* ``bme.clearsamples`` Clear the recorded historic samples of all task values of that task.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Data Acquisition
|
||||
----------------
|
||||
|
||||
Each time a task is "run", it may collect some data.
|
||||
When successful, other parts of the ESPEasy system should be notified.
|
||||
|
||||
If rules are enabled, a task may generate several events.
|
||||
Each event consists of the task name, value name and the new sample.
|
||||
|
||||
For a task named "bme" with a task value "temperature", the events looks like this: ``bme#temperature=23.45``
|
||||
|
||||
Please note the number of decimals as this will be discussed below.
|
||||
|
||||
Such events will be generated for all task values of this task.
|
||||
|
||||
To limit the number of events, one may also check the "Single event with all values" checkbox.
|
||||
This will then generate only a single event like this: ``bme#All=23.45,78.90,1001.23`` (the assumed order of task values: Temp/Humidity/Pressure)
|
||||
|
||||
Below this checkbox is a number of options to send this data to a controller.
|
||||
This only shows controllers which are configured.
|
||||
Some controllers, like Domoticz MQTT and Domoticz HTTP, also require some IDX value to identify the sample origin.
|
||||
|
||||
|
||||
This Interval is the number of seconds between repeated calls to ``TaskRun``, which will perform a read of the sensor.
|
||||
|
||||
Some plugins allow this to be set to ``0``, which then effectively disables repetitive calls to run this task.
|
||||
However, most plugins consider ``0`` to be the default of 60 seconds.
|
||||
|
||||
A task can also be called to run via the command ``TaskRun`` from the rules.
|
||||
This can be useful to trigger a read based on an event.
|
||||
|
||||
A nice use case can be to take samples on a number of sensors as soon as the GPS task sends new coordinates.
|
||||
Since a GPS task can be configured to send updates each N meters travelled, this allows for collecting samples at an equal distance spaced, regardless the driving speed.
|
||||
|
||||
Values
|
||||
------
|
||||
|
||||
At the bottom of the task config page, one can configure the task values.
|
||||
|
||||
.. image:: Task_config_page_Values_section.png
|
||||
|
||||
Task Value Name
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Each task value has to have an unique name within that task.
|
||||
It does not have to be unique on the entire ESPEasy system, as long as the combination of task name and task value name is unique.
|
||||
|
||||
For example ``bme#temp`` and ``bme2#temp`` are perfectly fine as each can be addressed.
|
||||
|
||||
Formula
|
||||
^^^^^^^
|
||||
|
||||
ESP Easy can use a simple formula to change the task value before it is processed further.
|
||||
|
||||
A few samples will be provided here. Remember that this is just a simple build-in 'calculator' with only the basic stuff like add, substract, multiply, devide.
|
||||
|
||||
On a successful "task run", the new task values will be processed by the formula.
|
||||
To refer to the new task value, use ``%value%`` in the formula.
|
||||
|
||||
For example to convert a temperature from Celsius to Fahrenheit, one may use:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
(%value%*9/5)+32
|
||||
|
||||
For some very common conversions, see also the "Standard Conversions" section on the ``sysvars`` page in ESPEasy.
|
||||
This conversion from Celsius to Fahrenheit is so common, one may also use this in the formula field:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
%c_c2f%(%value%)
|
||||
|
||||
To use the previous task value in a formula, use ``%pvalue%``.
|
||||
|
||||
It is also possible to refer to other task values and system variables. (added: 2021/08/06)
|
||||
|
||||
.. note:: The syntax in the formula field is nearly the same as in the rules. Only the ``%value%`` and ``%pvalue%`` cannot be used in rules.
|
||||
|
||||
|
||||
Stats
|
||||
^^^^^
|
||||
|
||||
(Added: 2022/07/11)
|
||||
|
||||
This checkbox allows to collect some historic data of this task value.
|
||||
On ESP32 it will collect upto 64 samples. On ESP8266 this is limited to 16 samples due to memory.
|
||||
|
||||
When checked, the last N samples of each checked task value will be shown in a chart in the "Statistics" section.
|
||||
|
||||
|
||||
|
||||
Decimals
|
||||
^^^^^^^^
|
||||
|
||||
The number of decimals set here will be used throughout ESPEasy whenever a task value has to be formatted.
|
||||
For example, when referring to a task value on a display via ``[bme#temperature]``, the value formatting will include the set number of decimals.
|
||||
|
||||
See :ref:`Rules: Formatting refered values <Formatting values>` on how this can be customized.
|
||||
Just remember such formatting cannot "make up" more decimals than what was set here in the task setup.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Similar to a smartphones "apps" the ESP Easy plugins extends the functionality of
|
||||
the core operating system. You can use as many plugins as you available tasks.
|
||||
|
||||
List of official plugins
|
||||
========================
|
||||
@@ -15,14 +221,16 @@ There are different released versions of ESP Easy:
|
||||
|
||||
:green:`NORMAL` is the stable release, you can consider these plugins reliable and you can use these in production.
|
||||
|
||||
:yellow:`TESTING` (split into A/B/C/D/E sets) with new plugins that have not yet been fully tested and proven stable. Because of space limitations, this is split into 5 sets. When only TESTING is mentioned, the plugin is available in all TESTING builds.
|
||||
:yellow:`TESTING` (split into A/B/C/D/E sets) with new plugins that have not yet been fully tested and proven stable. Because of space limitations, this collection is split into 5 sets. When only TESTING is mentioned, the plugin is available in all TESTING builds.
|
||||
|
||||
.. comment :red:`DEVELOPMENT` is used for plugins that are still being developed and are not considered stable at all.
|
||||
:red:`DEVELOPMENT` is used for plugins that are still being developed and are not considered stable at all.
|
||||
|
||||
:yellow:`ENERGY` :yellow:`DISPLAY` :yellow:`IR` :yellow:`IRext` are specialized builds holding all Energy-, Display- and Infra Red- (extended) related plugins.
|
||||
:yellow:`ENERGY` :yellow:`DISPLAY` :yellow:`IR` :yellow:`IRext` :yellow:`NEOPIXEL` are specialized builds holding all Energy-, Display-, Infra Red- (extended) and NeoPixel related plugins.
|
||||
|
||||
:yellow:`MAX` is the build that has all plugins that are available in the ESPEasy repository. Only available for ESP32 16MB Flash units.
|
||||
|
||||
:gray:`RETIRED` plugin has been retired from ESPEasy (though the source code is still available). Not included in any build.
|
||||
|
||||
.. csv-table::
|
||||
:header: "Plugin name", "Build set", "Plugin number"
|
||||
:widths: 10, 8, 5
|
||||
@@ -150,7 +358,9 @@ There are different released versions of ESP Easy:
|
||||
":ref:`P125_page`","|P125_status|","P125"
|
||||
":ref:`P126_page`","|P126_status|","P126"
|
||||
":ref:`P127_page`","|P127_status|","P127"
|
||||
":ref:`P128_page`","|P128_status|","P128"
|
||||
":ref:`P132_page`","|P132_status|","P132"
|
||||
":ref:`P133_page`","|P133_status|","P133"
|
||||
|
||||
|
||||
Internal GPIO handling
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
.. |Plugin_Hardware| replace:: :ref:`P046_page`
|
||||
.. |Plugin_Keypad| replace:: :ref:`P058_page`, :ref:`P061_page`, :ref:`P062_page`, :ref:`P063_page`
|
||||
.. |Plugin_Light_Color| replace:: :ref:`P050_page`, :ref:`P066_page`
|
||||
.. |Plugin_Light_UV| replace:: :ref:`P084_page`, :ref:`P107_page`, :ref:`P114_page`
|
||||
.. |Plugin_Light_UV| replace:: :ref:`P084_page`, :ref:`P107_page`, :ref:`P114_page`, :ref:`P133_page`
|
||||
.. |Plugin_Light_Lux| replace:: :ref:`P010_page`, :ref:`P015_page`, :ref:`P074_page`
|
||||
.. |Plugin_Motor| replace:: :ref:`P048_page`, :ref:`P079_page`
|
||||
.. |Plugin_Notify| replace:: :ref:`P055_page`, :ref:`P065_page`
|
||||
.. |Plugin_Output| replace:: :ref:`P029_page`, :ref:`P038_page`, :ref:`P041_page`, :ref:`P042_page`, :ref:`P043_page`, :ref:`P070_page`, :ref:`P124_page`, :ref:`P126_page`
|
||||
.. |Plugin_Output| replace:: :ref:`P029_page`, :ref:`P038_page`, :ref:`P041_page`, :ref:`P042_page`, :ref:`P043_page`, :ref:`P070_page`, :ref:`P124_page`, :ref:`P126_page`, :ref:`P128_page`
|
||||
.. |Plugin_Position| replace:: :ref:`P013_page`, :ref:`P082_page`, :ref:`P121_page`
|
||||
.. |Plugin_Regulator| replace:: :ref:`P021_page`
|
||||
.. |Plugin_RFID| replace:: :ref:`P008_page`, :ref:`P017_page`, :ref:`P040_page`, :ref:`P111_page`
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
.. |P012_type| replace:: :cyan:`Display`
|
||||
.. |P012_typename| replace:: :cyan:`Display - LCD2004`
|
||||
.. |P012_porttype| replace:: `.`
|
||||
.. |P012_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P012_status| replace:: :green:`NORMAL` :yellow:`DISPLAY`
|
||||
.. |P012_github| replace:: P012_LCD.ino
|
||||
.. _P012_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P012_LCD.ino
|
||||
.. |P012_usedby| replace:: `.`
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
.. |P023_type| replace:: :cyan:`Display`
|
||||
.. |P023_typename| replace:: :cyan:`Display - OLED SSD1306`
|
||||
.. |P023_porttype| replace:: `.`
|
||||
.. |P023_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P023_status| replace:: :green:`NORMAL` :yellow:`DISPLAY`
|
||||
.. |P023_github| replace:: P023_OLED.ino
|
||||
.. _P023_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P023_OLED.ino
|
||||
.. |P023_usedby| replace:: `.`
|
||||
@@ -67,7 +67,7 @@
|
||||
.. |P025_type| replace:: :cyan:`Analog input`
|
||||
.. |P025_typename| replace:: :cyan:`Analog input - ADS1115`
|
||||
.. |P025_porttype| replace:: `.`
|
||||
.. |P025_status| replace:: :green:`ENERGY, NORMAL`
|
||||
.. |P025_status| replace:: :green:`NORMAL` :yellow:`ENERGY`
|
||||
.. |P025_github| replace:: P025_ADS1115.ino
|
||||
.. _P025_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P025_ADS1115.ino
|
||||
.. |P025_usedby| replace:: `.`
|
||||
@@ -93,7 +93,7 @@
|
||||
.. |P027_type| replace:: :cyan:`Energy (DC)`
|
||||
.. |P027_typename| replace:: :cyan:`Energy (DC) - INA219`
|
||||
.. |P027_porttype| replace:: `.`
|
||||
.. |P027_status| replace:: :green:`ENERGY, NORMAL`
|
||||
.. |P027_status| replace:: :green:`NORMAL` :yellow:`ENERGY`
|
||||
.. |P027_github| replace:: P027_INA219.ino
|
||||
.. _P027_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P027_INA219.ino
|
||||
.. |P027_usedby| replace:: `.`
|
||||
@@ -109,8 +109,8 @@
|
||||
.. |P028_status| replace:: :green:`NORMAL`
|
||||
.. |P028_github| replace:: P028_BME280.ino
|
||||
.. _P028_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P028_BME280.ino
|
||||
.. |P028_usedby| replace:: :ref:`P028_BME280_page`
|
||||
.. |P028_shortinfo| replace:: Temperature and pressure for the BM**E**280 and BM**P**280 sensors.
|
||||
.. |P028_usedby| replace:: :ref:`P028_page`
|
||||
.. |P028_shortinfo| replace:: Temperature and pressure for the **BME280** and **BMP280** sensors.
|
||||
.. |P028_maintainer| replace:: `.`
|
||||
.. |P028_compileinfo| replace:: `.`
|
||||
.. |P028_usedlibraries| replace:: `.`
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.. |P030_type| replace:: :cyan:`Environment`
|
||||
.. |P030_typename| replace:: :cyan:`Environment - BMP280`
|
||||
.. |P030_porttype| replace:: `.`
|
||||
.. |P030_status| replace:: :green:`NORMAL`
|
||||
.. |P030_status| replace:: :gray:`RETIRED`
|
||||
.. |P030_github| replace:: P030_BMP280.ino
|
||||
.. _P030_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P030_BMP280.ino
|
||||
.. |P030_usedby| replace:: :ref:`P030_BMP280_page`
|
||||
@@ -80,7 +80,7 @@
|
||||
.. |P036_type| replace:: :cyan:`Display`
|
||||
.. |P036_typename| replace:: :cyan:`Display - OLED SSD1306/SH1106 Framed`
|
||||
.. |P036_porttype| replace:: `.`
|
||||
.. |P036_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P036_status| replace:: :green:`NORMAL` :yellow:`DISPLAY`
|
||||
.. |P036_github| replace:: P036_FrameOLED.ino
|
||||
.. _P036_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P036_FrameOLED.ino
|
||||
.. |P036_usedby| replace:: `.`
|
||||
@@ -106,7 +106,7 @@
|
||||
.. |P038_type| replace:: :cyan:`Output`
|
||||
.. |P038_typename| replace:: :cyan:`Output - NeoPixel (Basic)`
|
||||
.. |P038_porttype| replace:: `.`
|
||||
.. |P038_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P038_status| replace:: :green:`NORMAL` :yellow:`DISPLAY, NEOPIXEL`
|
||||
.. |P038_github| replace:: P038_NeoPixel.ino
|
||||
.. _P038_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P038_NeoPixel.ino
|
||||
.. |P038_usedby| replace:: `NeoPixel RGB and RGBW LEDs and LED Strips`
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
.. |P041_type| replace:: :cyan:`Output`
|
||||
.. |P041_typename| replace:: :cyan:`Output - NeoPixel (Word Clock)`
|
||||
.. |P041_porttype| replace:: `.`
|
||||
.. |P041_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P041_status| replace:: :green:`NORMAL` :yellow:`DISPLAY, NEOPIXEL`
|
||||
.. |P041_github| replace:: P041_NeoClock.ino
|
||||
.. _P041_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P041_NeoClock.ino
|
||||
.. |P041_usedby| replace:: `.`
|
||||
@@ -28,7 +28,7 @@
|
||||
.. |P042_type| replace:: :cyan:`Output`
|
||||
.. |P042_typename| replace:: :cyan:`Output - NeoPixel (Candle)`
|
||||
.. |P042_porttype| replace:: `.`
|
||||
.. |P042_status| replace:: :green:`DISPLAY, NORMAL`
|
||||
.. |P042_status| replace:: :green:`NORMAL` :yellow:`DISPLAY, NEOPIXEL`
|
||||
.. |P042_github| replace:: P042_Candle.ino
|
||||
.. _P042_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P042_Candle.ino
|
||||
.. |P042_usedby| replace:: `.`
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.. |P070_type| replace:: :cyan:`Output`
|
||||
.. |P070_typename| replace:: :cyan:`Output - NeoPixel Ring Clock`
|
||||
.. |P070_porttype| replace:: `.`
|
||||
.. |P070_status| replace:: :yellow:`DISPLAY, TESTING A`
|
||||
.. |P070_status| replace:: :yellow:`DISPLAY, NEOPIXEL, TESTING A`
|
||||
.. |P070_github| replace:: P070_NeoPixel_Clock.ino
|
||||
.. _P070_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P070_NeoPixel_Clock.ino
|
||||
.. |P070_usedby| replace:: `.`
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
.. |P109_type| replace:: :cyan:`UV`
|
||||
.. |P109_typename| replace:: :cyan:`Display - ThermoOLED`
|
||||
.. |P109_porttype| replace:: `.`
|
||||
.. |P109_status| replace:: :yellow:`TESTING`
|
||||
.. |P109_status| replace:: :yellow:`DISPLAY`
|
||||
.. |P109_github| replace:: P109_ThermoOLED.ino
|
||||
.. _P109_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P109_ThermoOLED.ino
|
||||
.. |P109_usedby| replace:: `.`
|
||||
|
||||
@@ -75,3 +75,16 @@
|
||||
.. |P127_maintainer| replace:: `tonhuisman, V0JT4`
|
||||
.. |P127_compileinfo| replace:: `.`
|
||||
.. |P127_usedlibraries| replace:: `.`
|
||||
|
||||
.. |P128_name| replace:: :cyan:`NeoPixel (BusFX)`
|
||||
.. |P128_type| replace:: :cyan:`Output`
|
||||
.. |P128_typename| replace:: :cyan:`Output - NeoPixel (BusFX)`
|
||||
.. |P128_porttype| replace:: `.`
|
||||
.. |P128_status| replace:: :yellow:`NEOPIXEL`
|
||||
.. |P128_github| replace:: P128_NeoPixelBusFX.ino
|
||||
.. _P128_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P128_NeoPixelBusFX.ino
|
||||
.. |P128_usedby| replace:: `.`
|
||||
.. |P128_shortinfo| replace:: `NeoPixel special effects library BusFX`
|
||||
.. |P128_maintainer| replace:: `tonhuisman`
|
||||
.. |P128_compileinfo| replace:: `.`
|
||||
.. |P128_usedlibraries| replace:: `https://github.com/Makuna/NeoPixelBus and https://github.com/djcysmic/NeopixelBusFX (forked from ESPEasyPluginPlayground)`
|
||||
|
||||
@@ -10,3 +10,16 @@
|
||||
.. |P132_maintainer| replace:: `tonhuisman`
|
||||
.. |P132_compileinfo| replace:: `.`
|
||||
.. |P132_usedlibraries| replace:: `.`
|
||||
|
||||
.. |P133_name| replace:: :cyan:`LTR390 UV`
|
||||
.. |P133_type| replace:: :cyan:`UV`
|
||||
.. |P133_typename| replace:: :cyan:`UV - LTR390`
|
||||
.. |P133_porttype| replace:: `.`
|
||||
.. |P133_status| replace:: :yellow:`TESTING E`
|
||||
.. |P133_github| replace:: P133_LTR390.ino
|
||||
.. _P133_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P133_LTR390.ino
|
||||
.. |P133_usedby| replace:: `.`
|
||||
.. |P133_shortinfo| replace:: `Ultra violet and Ambient sensor`
|
||||
.. |P133_maintainer| replace:: `tonhuisman`
|
||||
.. |P133_compileinfo| replace:: `.`
|
||||
.. |P133_usedlibraries| replace:: `https://github.com/RAKWireless/RAK12019_LTR390 (modified local copy)`
|
||||
|
||||
@@ -47,11 +47,11 @@ ESP Easy offers a set of commands to control hardware devices and provide some b
|
||||
|
||||
Commands are divided into several classes:
|
||||
|
||||
:red:`Internal` can be run from serial and rules engine
|
||||
:red:`Internal` Commands not related to plugins, controllers or notifications. Can be run from serial and rules engine
|
||||
|
||||
:green:`Rules` can be run from serial and rules engine
|
||||
:green:`Rules` Related to rules processing. Can be run from serial and rules engine
|
||||
|
||||
:cyan:`Plugin` can be run from serial, rules engine, HTTP, MQTT
|
||||
:cyan:`Plugin` Commands specific for a plugin. Can be run from serial, rules engine, HTTP, MQTT
|
||||
|
||||
:blue:`Special` can be used from any source
|
||||
|
||||
@@ -114,6 +114,19 @@ Ringtone Internal GPIO
|
||||
|
||||
.. include:: ../Plugin/P001_commands_RTTTL.repl
|
||||
|
||||
Task Value Stats Commands
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
(Added: 2022/07/11)
|
||||
For task values with "Stats" enabled, one can call commands on this statistical data.
|
||||
|
||||
Commands on "Stats" data:
|
||||
|
||||
* ``bme.resetpeaks`` Reset the recorded "max" and "min" value of all task values of the task called "bme".
|
||||
* ``bme.clearsamples`` Clear the recorded historic samples of all task values of the task called "bme".
|
||||
|
||||
|
||||
|
||||
|
||||
Plugin based commands
|
||||
---------------------
|
||||
|
||||
@@ -28,7 +28,7 @@ They are sorted with the most important files on top.
|
||||
|
||||
* ``espeasy_default.css`` Without this file the web UI does look rather unusable and horrible. Make sure to rename the file to ``esp.css`` when saving to the ESP's file system.
|
||||
* ``rules_save.js`` JavaScript to actually perform saving the rules. Rules cannot be saved without this file.
|
||||
* ``update_sensor_values_device_page.js`` JavaScript to perform value updates of tasks on the "Devices" tab.
|
||||
* ``update_sensor_values_device_page.js`` JavaScript to perform value updates of tasks on the "Devices" tab. (see note below)
|
||||
* ``fetch_and_parse_log.js`` JavaScript to fetch new logs on the web based log viewer.
|
||||
* ``reboot.js`` JavaScript to check whether it is best to perform a reboot of the ESP node.
|
||||
* ``toasting.js`` Showing an acknowledgement toasting message when submitting settings.
|
||||
@@ -38,6 +38,10 @@ They are sorted with the most important files on top.
|
||||
|
||||
When storing a local copy of one of these files, make sure you're using the same name as presented here.
|
||||
|
||||
Changed: 2022-06-23:
|
||||
Only exception is for the ``update_sensor_values_device_page.js`` file.
|
||||
Due to maximum file name length, the file should be renamed to ``upd_values_device_page.js`` when storing on the local file system.
|
||||
|
||||
.. note::
|
||||
|
||||
When storing files on a node with 1M flash, be aware the small file system size may cause issues, so only store those files which are really needed.
|
||||
|
||||
@@ -115,134 +115,176 @@ Best pins to use on ESP32
|
||||
There is also a NodeMCU version using the ESP32.
|
||||
Fortunately the designers used the GPIO numbers as labels on the board.
|
||||
|
||||
N.B. This table does NOT describe the pins of other ESP32 variants like the ESP32-S2.
|
||||
|
||||
.. list-table:: Sorted in reverse GPIO pinnr order
|
||||
:widths: 10 25 25 40
|
||||
:widths: 10 15 15 10 50
|
||||
:header-rows: 1
|
||||
|
||||
* - GPIO
|
||||
- Input
|
||||
- Output
|
||||
- ADC
|
||||
- Remarks
|
||||
* - 36
|
||||
- :green:`OK`
|
||||
-
|
||||
- :yellow:`input only`
|
||||
* - 39
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH3
|
||||
- :yellow:`input only` :yellow:`See Notes`
|
||||
* - 38
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH2
|
||||
- :yellow:`input only`
|
||||
* - 37
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH1
|
||||
- :yellow:`input only`
|
||||
* - 36
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH0
|
||||
- :yellow:`input only` :yellow:`See Notes`
|
||||
* - 35
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH7
|
||||
- :yellow:`input only`
|
||||
* - 34
|
||||
- :green:`OK`
|
||||
-
|
||||
- ADC1_CH6
|
||||
- :yellow:`input only`
|
||||
* - 33
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC1_CH5
|
||||
-
|
||||
* - 32
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC1_CH4
|
||||
-
|
||||
* - 27
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH7
|
||||
-
|
||||
* - 26
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH9
|
||||
-
|
||||
* - 25
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH8
|
||||
-
|
||||
* - 23
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
-
|
||||
* - 22
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
-
|
||||
* - 21
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
-
|
||||
* - 19
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
-
|
||||
* - 18
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
-
|
||||
* - 17
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
- :yellow:`See notes`
|
||||
* - 16
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
- :yellow:`See notes`
|
||||
* - 15
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH3
|
||||
- :yellow:`output PWM signal at boot, internal pull-up` Silences boot messages when pulled low at boot.
|
||||
* - 14
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH6
|
||||
- :yellow:`output PWM signal at boot`
|
||||
* - 13
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH4
|
||||
-
|
||||
* - 12
|
||||
-
|
||||
- :green:`OK`
|
||||
- ADC2_CH5
|
||||
- :yellow:`Boot fail if pulled high` :red:`May damage flash if low at boot on 1.8V flash chips`
|
||||
* - 9, 10, 11
|
||||
- :red:`High at boot`
|
||||
-
|
||||
-
|
||||
- :red:`See notes`
|
||||
* - 6, 7, 8
|
||||
-
|
||||
-
|
||||
-
|
||||
- :red:`See notes`
|
||||
* - 5
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
-
|
||||
- :yellow:`output PWM signal at boot, internal pull-up`
|
||||
* - 4
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH0
|
||||
- :yellow:`Internal pull-down`
|
||||
* - 3 (RX)
|
||||
- :yellow:`High at boot`
|
||||
- :red:`is RX`
|
||||
-
|
||||
- RX channel of serial0
|
||||
* - 2
|
||||
- :green:`OK`
|
||||
- :green:`OK`
|
||||
- ADC2_CH2
|
||||
- Often connected to LED, :yellow:`Internal pull-down`
|
||||
* - 1 (TX)
|
||||
- :red:`is TX`
|
||||
- :yellow:`debug output at boot`
|
||||
-
|
||||
- TX channel of serial0
|
||||
* - 0
|
||||
- :yellow:`pulled up`
|
||||
- :yellow:`OK`
|
||||
- ADC2_CH1
|
||||
- :yellow:`Boot fail if pulled low & output PWM signal at boot`
|
||||
|
||||
Source used:
|
||||
|
||||
* `The Hook Up - How To: Pick the right pins on the NodeMCU ESP8266 and ESP32 <https://www.youtube.com/watch?v=7h2bE2vNoaY>`_
|
||||
* `Random Nerd Tutorials - ESP32 Pinout Reference: Which GPIO pins should you use? <https://randomnerdtutorials.com/esp32-pinout-reference-gpios/>`_
|
||||
* `Espressif Docs - GPIO & RTC GPIO <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/gpio.html>`_
|
||||
|
||||
Special notes on GPIO 6 - 11
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Special notes on GPIO 6 - 11 & 16, 17
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Almost any ESP32 board has a flash chip connected to some or all of GPIO6-GPIO11.
|
||||
|
||||
@@ -251,6 +293,45 @@ It is best not to use any of the GPIO pins 6 - 11.
|
||||
GPIO 6, 7 & 8 may output some PWM signals at boot.
|
||||
GPIO 9, 10 & 11 output high at boot and may fail to boot of pulled either high or low.
|
||||
|
||||
GPIO 16 & 17 are usually connected to the SPI flash and PSRAM. These do show some activity during boot to detect the presence of PSRAM.
|
||||
For example GPIO 17 may still show some high frequency signal until it is specifically set to a high or low output state.
|
||||
When PSRAM is present, these pins should not be used.
|
||||
|
||||
Special notes on GPIO 34-39
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
GPIO 34-39 can only be set as input mode and do not have software-enabled pullup or pulldown functions.
|
||||
|
||||
GPIO 36 & 39 should not be used for interrupts when also using ADC or WiFi and Bluetooth.
|
||||
These pins are on some boards labelled as:
|
||||
|
||||
* ``VP``: GPIO 36 (ADC1_CH0)
|
||||
* ``VN``: GPIO 39 (ADC1_CH3)
|
||||
|
||||
The internal Hall sensor in the ESP32 is connected to these two pins.
|
||||
|
||||
The Hall Sensor uses channels 0 and 3 of ADC1.
|
||||
Do not configure these channels for use as ADC channels when also reading from the Hall sensor.
|
||||
|
||||
|
||||
Typical uses in ESPEasy where an interrupt of a GPIO pin is used are:
|
||||
|
||||
* Switch input
|
||||
* Monitoring of a pin in rules
|
||||
* Pulse Count plugin
|
||||
* RX pin of a serial port
|
||||
|
||||
Special notes on ADC pins
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ADC2: ADC2 pins cannot be used when Wi-Fi is used.
|
||||
So, if you are having trouble getting the value from an ADC2 GPIO while using Wi-Fi, you may consider using an ADC1 GPIO instead, which should solve your problem.
|
||||
|
||||
Some ADC pins are strapped to a pull-up or pull-down resistor to set the ESP in a specific state during boot.
|
||||
This requires special attention when applying some voltage to these pins which may be present at boot.
|
||||
|
||||
|
||||
|
||||
Boot Strapping Pins
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
@@ -1,5 +1,6 @@
|
||||
#####
|
||||
Rules
|
||||
*****
|
||||
#####
|
||||
|
||||
Introduction
|
||||
============
|
||||
@@ -16,10 +17,30 @@ Enable Rules
|
||||
|
||||
To enable rules, :menuselection:`Tools --> Advanced` and check the Rules checkbox.
|
||||
|
||||
After clicking Submit, you will find a new page added. Here you can start
|
||||
experimenting with Rules:
|
||||
After clicking Submit, you will find the Rules tab added. Here you can start experimenting with Rules:
|
||||
|
||||
.. image:: Advanced_RulesOptions.png
|
||||
:alt: Rules options
|
||||
|
||||
* **Rules**: Enable the use of rules. If disabled, also (most) events will no longer be generated, as they won't be processed, though data will still be sent to Controllers.
|
||||
* **Enable Rules Cache**: For faster processing of rules they can be (partially) cached in memory. If memory is really low this option can be disabled.
|
||||
* **Tolerant last parameter**: A few commands can use, for backward compatibility, a more tolerant handling of the last parameter, as suggested in the note. This feature should be enabled if it is needed.
|
||||
|
||||
.. code:: none
|
||||
|
||||
on System#Boot do
|
||||
GPIO,12,0
|
||||
LoopTimerSet,1,10
|
||||
endon
|
||||
|
||||
on Rules#Timer=1 do
|
||||
if [E1SW1#State]=1
|
||||
GPIO,12,0
|
||||
else
|
||||
GPIO,12,1
|
||||
endif
|
||||
endon
|
||||
|
||||
[ADD_GUI_PICTURE]
|
||||
|
||||
The example above shows an experiment with a LED, connected via a resistor of
|
||||
1k to GPIO12 and to ground.
|
||||
@@ -66,6 +87,23 @@ Special Notations
|
||||
If a previous value is needed, one has to use variables for it.
|
||||
|
||||
|
||||
Dot Notation
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The dot (``.``) can be used to refer to something "belonging" to something else.
|
||||
For example calling a command on a specific task (``pulsecounter.resetpulsecounter``) to reset the pulse counter on a specific Pulse Counter task.
|
||||
|
||||
(Added: 2022/07/11)
|
||||
For task values with "Stats" enabled, one can also access statistical properties of the data or call commands on this statistical data.
|
||||
|
||||
For example using just like normal task value data:
|
||||
|
||||
* ``[bme#temp.avg]`` Compute the average over the last N samples in the historic buffer (typically: 64 samples on ESP32, 16 on ESP8266)
|
||||
|
||||
See :ref:`Task Value Statistics: <Task Value Statistics>` for more examples.
|
||||
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
@@ -155,6 +193,8 @@ consumption of stack space (IRAM). Depending on plug-ins in use this might
|
||||
lead to unpredictable, unreliable behavior, advice is not to exceed 3 levels
|
||||
of nesting.
|
||||
|
||||
To avoid nesting of events, ``AsyncEvent`` can be used, using the same syntax as ``Event``, that will add the event to the end of the current event queue, for processing after other events are completed.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
on <trigger> do
|
||||
@@ -744,6 +784,8 @@ The reason this behavior was changed from before 2019/11 was that the old implem
|
||||
Formatting refered values
|
||||
-------------------------
|
||||
|
||||
.. _Formatting values:
|
||||
|
||||
When referring another value, some basic formatting can be used.
|
||||
|
||||
Referring a value using some pre-defined format: ``[TaskName#ValueName#transformation#justification]``
|
||||
|
||||
@@ -227,7 +227,7 @@ Rules Settings
|
||||
* Rules - Check to enable rules functionality (on next page load, extra Rules tab will appear)
|
||||
* Old Engine - Default checked.
|
||||
* Enable Rules Cache - Rules cache will keep track of where in the rules files each ``on ... do`` block is located. This significantly improves the time it takes to handle events. (Enabled by default, Added 2022/04/17)
|
||||
* Allow Rules Event Reorder - It is best to have the rules blocks for the most frequently occuring events placed at the top of the first rules file. (also for frequently happening events, which you don't want to act on) The cached event positions can be reordered in memory based on how often an event was matched. (Enabled by default, Added 2022/04/17)
|
||||
* Allow Rules Event Reorder - It is best to have the rules blocks for the most frequently occuring events placed at the top of the first rules file. (also for frequently happening events, which you don't want to act on) The cached event positions can be reordered in memory based on how often an event was matched. (Enabled by default, Added 2022/04/17, disabled 2022/06/24)
|
||||
* Tolerant last parameter - When checked, the last parameter of a command will have less strict parsing.
|
||||
* SendToHTTP wait for ack - When checked, the command SendToHTTP will wait for an acknowledgement from the server.
|
||||
|
||||
@@ -252,6 +252,24 @@ This allows ESPEasy to know the correct date and time after been powered off for
|
||||
|
||||
N.B. these modules all use I2C, so they need to be connected to the configured I2C pins and those pins should be set.
|
||||
|
||||
Procedure to configure a real time clock (RTC) chip:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* Connect the RTC chip to the configured I2C pins, and boot up the ESPEasy unit.
|
||||
* From Tools/Advanced, enable the use of NTP, and set DST option in the DST settings and the Timezone offset, Latitude and Longitude in the Location settings **correctly**.
|
||||
* Select the used RTC chip from the list.
|
||||
* Submit the page to save the settings.
|
||||
* Reboot the unit.
|
||||
* The time will be retrieved using NTP once more, and set into the RTC chip.
|
||||
* Check on the Main tab if the time is displayed correctly.
|
||||
* On the Tools/Advanced page, the NTP setting can now be disabled, if so desired, as it won't be used anymore (unless the External Time Source is set to None).
|
||||
|
||||
Besides using NTP to set the date/time to the RTC chip, other supported options are:
|
||||
|
||||
* Using the ``DateTime`` command to set the date and time.
|
||||
* Having a GPS receiver connected, using the GPS plugin (:ref:`P082_page`), the ESPEasy date/time will be set when GPS date/time is valid, as that is more accurate than the RTC date/time. The RTC date/time will be used from boot, and be updated once the GPS has a fix, which may take some time, depending on conditions.
|
||||
|
||||
|
||||
DST Settings
|
||||
------------
|
||||
|
||||
@@ -909,7 +927,7 @@ See the ``Custom-sample.h`` file for some examples.
|
||||
|
||||
|
||||
Allow Fetch by Command
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
----------------------
|
||||
|
||||
This checkbox allows provisioning via commands.
|
||||
These commands are not restricted, so they can also be given via HTTP or MQTT.
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
}
|
||||
.red {
|
||||
background-color: #EF483D;
|
||||
color: #000000;
|
||||
color: #FFFFFF;
|
||||
padding: 4px 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.green {
|
||||
background-color: #00AE41;
|
||||
color: #000000;
|
||||
color: #FFFFFF;
|
||||
padding: 4px 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
@@ -40,6 +40,12 @@
|
||||
padding: 4px 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.gray {
|
||||
background-color: gray;
|
||||
color: #FFFFFF;
|
||||
padding: 4px 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.reference.external {
|
||||
border-style: solid;
|
||||
border-color: #3492E2;
|
||||
|
||||
@@ -299,11 +299,13 @@ rst_prolog = """
|
||||
.. role:: orange
|
||||
.. role:: cyan
|
||||
.. role:: purple
|
||||
.. role:: gray
|
||||
|
||||
.. |affiliate| replace:: :yellow:`$` = affiliate links which will give us some money to keep this project running, thank you for using those.
|
||||
|
||||
.. |added| replace:: :green:`added`
|
||||
.. |improved| replace:: :orange:`improved`
|
||||
.. |changed| replace:: :yellow:`changed`
|
||||
.. |removed| replace:: :red:`removed`
|
||||
.. |fixed| replace:: :purple:`fixed`
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ public:
|
||||
DateTime(const char *date, const char *time);
|
||||
DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
|
||||
DateTime(const char *iso8601date);
|
||||
DateTime& operator=(const DateTime ©) = delete;
|
||||
bool isValid() const;
|
||||
char *toString(char *buffer);
|
||||
|
||||
@@ -217,6 +218,7 @@ public:
|
||||
TimeSpan(int32_t seconds = 0);
|
||||
TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds);
|
||||
TimeSpan(const TimeSpan ©);
|
||||
TimeSpan& operator=(const TimeSpan ©) = delete;
|
||||
|
||||
/*!
|
||||
@brief Number of days in the TimeSpan
|
||||
|
||||
@@ -234,6 +234,15 @@ void Adafruit_ST7735::initR(uint8_t options) {
|
||||
displayInit(Rcmd2green160x80);
|
||||
_colstart = 24;
|
||||
_rowstart = 0;
|
||||
} else if (options == INITR_GREENTAB160x80) {
|
||||
_height = ST7735_TFTWIDTH_80;
|
||||
_width = ST7735_TFTHEIGHT_160;
|
||||
displayInit(Rcmd2green160x80);
|
||||
const uint8_t data = 0x00;
|
||||
sendCommand(ST77XX_INVON, &data, 0);
|
||||
sendCommand(ST77XX_INVON, &data, 0); // Write twice...
|
||||
_colstart = 26;
|
||||
_rowstart = 1;
|
||||
} else {
|
||||
// colstart, rowstart left at default '0' values
|
||||
displayInit(Rcmd2red);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#define INITR_144GREENTAB 0x01
|
||||
#define INITR_MINI160x80 0x04
|
||||
#define INITR_HALLOWING 0x05
|
||||
#define INITR_GREENTAB160x80 0x06
|
||||
|
||||
// Some register settings
|
||||
#define ST7735_MADCTL_BGR 0x08
|
||||
|
||||
@@ -36,6 +36,9 @@ bool pinsChanged(ESPEasySerialPort port,
|
||||
#ifndef ESP32S2
|
||||
case ESPEasySerialPort::serial2: return receivePin != receivePin2 || transmitPin != transmitPin2;
|
||||
#endif
|
||||
default:
|
||||
// No other hardware serial ports
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -61,6 +64,9 @@ void setPinsCache(ESPEasySerialPort port,
|
||||
break;
|
||||
|
||||
#endif
|
||||
default:
|
||||
// No other hardware serial ports
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include <ESPeasySerial.h>
|
||||
|
||||
|
||||
String ESPeasySerial::getLogString() const {
|
||||
String log;
|
||||
|
||||
log.reserve(48);
|
||||
log = F("ESPEasy serial: ");
|
||||
|
||||
if (isI2Cserial()) {
|
||||
log += F("I2C: addr:");
|
||||
log += String(_receivePin);
|
||||
log += F(" ch:");
|
||||
log += _transmitPin == 0 ? 'A' : 'B';
|
||||
} else {
|
||||
if (isSWserial()) {
|
||||
log += F("SW");
|
||||
} else {
|
||||
log += F("HW");
|
||||
}
|
||||
log += F(": rx:");
|
||||
log += String(_receivePin);
|
||||
log += F(" tx:");
|
||||
log += String(_transmitPin);
|
||||
}
|
||||
log += F(" baud:");
|
||||
log += String(_baud);
|
||||
return log;
|
||||
}
|
||||
@@ -3,36 +3,8 @@
|
||||
|
||||
#define DETECT_BAUDATE_TIMEOUT 250
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
String ESPeasySerial::getLogString() const {
|
||||
String log;
|
||||
|
||||
log.reserve(48);
|
||||
log = F("ESPEasy serial: ");
|
||||
|
||||
if (isI2Cserial()) {
|
||||
log += F("I2C: addr:");
|
||||
log += String(_receivePin);
|
||||
log += F(" ch:");
|
||||
log += _transmitPin == 0 ? 'A' : 'B';
|
||||
} else {
|
||||
if (isSWserial()) {
|
||||
log += F("SW");
|
||||
} else {
|
||||
log += F("HW");
|
||||
}
|
||||
log += F(": rx:");
|
||||
log += String(_receivePin);
|
||||
log += F(" tx:");
|
||||
log += String(_transmitPin);
|
||||
}
|
||||
log += F(" baud:");
|
||||
log += String(_baud);
|
||||
return log;
|
||||
}
|
||||
|
||||
// ****************************************
|
||||
// ESP8266 implementation wrapper
|
||||
// ****************************************
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ESPeasySerial",
|
||||
"version": "2.0.8",
|
||||
"version": "2.0.10",
|
||||
"keywords": [
|
||||
"serial", "io", "softwareserial", "hardwareserial"
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name=ESPeasySerial
|
||||
version=2.0.8
|
||||
version=2.0.10
|
||||
author=Gijs Noorlander
|
||||
maintainer=Gijs Noorlander <gijs.noorlander@gmail.com>
|
||||
sentence=Wrapper for SoftwareSerial, SC16IS752 I2C to UART bridge and HardwareSerial for ESP8266 and ESP32/ESP32S2.
|
||||
|
||||
@@ -7,3 +7,5 @@ category=Sensor driver
|
||||
architectures=*
|
||||
includes=ITG3205.h
|
||||
license=Unknown
|
||||
paragraph=
|
||||
url=
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "RAK12019_LTR390_UV_Light",
|
||||
"version": "1.0.1",
|
||||
"keywords": [
|
||||
"touch",
|
||||
"cap1293",
|
||||
"RAKWireless",
|
||||
"WisBlock",
|
||||
"RAK14002"
|
||||
],
|
||||
"description": "RAKWireless library for the RAK12019 module with the LTR390 UV light sensor",
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
],
|
||||
"platforms": [
|
||||
"*"
|
||||
],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"email": "bernd.giesecke@rakwireless.com",
|
||||
"url": "https://rakwireless.com",
|
||||
"maintainer": true,
|
||||
"name": "Bernd Giesecke"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/RAKWireless/RAK12019_LTR390"
|
||||
},
|
||||
"homepage": "https://rakwireless.com"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
name=RAK12019_LTR390_UV_Light
|
||||
version=1.0.1
|
||||
author=RAKWireless <rakwireless.com>
|
||||
maintainer=RAKWireless <rakwireless.com>
|
||||
sentence=RAKWireless library for the RAK12019 module with the LTR390 UV light sensor
|
||||
paragraph=UV light intensity measuring using the RAK12019 module from RAKWireless. Checkout the <a href="https://store.rakwireless.com/collections/wisblock-io">WisBlock RAK12019</a> today!
|
||||
category=Sensors
|
||||
url=https://github.com/RAKWireless/RAK12019_LTR390
|
||||
architectures=*
|
||||
@@ -0,0 +1,26 @@
|
||||
Software License Agreement (BSD License)
|
||||
|
||||
Copyright (c) 2012, Adafruit Industries
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,363 @@
|
||||
/** Based on Adafruit LTR390 Arduino Library **/
|
||||
/** Changed to work with RAKWireless RAK12019 UV Light Sensor **/
|
||||
|
||||
/*!
|
||||
* @file Adafruit_LTR390.cpp
|
||||
*
|
||||
* @mainpage Adafruit LTR390 I2C UV and Light Sensor
|
||||
*
|
||||
* @section intro_sec Introduction
|
||||
*
|
||||
* I2C Driver for the LTR390 I2C UV and Light sensor
|
||||
*
|
||||
* This is a library for the Adafruit LTR390 breakout:
|
||||
* https://www.adafruit.com/product/4831
|
||||
*
|
||||
* Adafruit invests time and resources providing this open source code,
|
||||
* please support Adafruit and open-source hardware by purchasing products from
|
||||
* Adafruit!
|
||||
*
|
||||
* @section author Author
|
||||
*
|
||||
* Limor Fried (Adafruit Industries)
|
||||
*
|
||||
* @section license License
|
||||
*
|
||||
* BSD (see license.txt)
|
||||
*
|
||||
* @section HISTORY
|
||||
*
|
||||
* v1.0 - First release
|
||||
*
|
||||
* Modifications:
|
||||
* 2021-12 RAKWireless: Make it work with the RAK12019 sensor
|
||||
* 2022-03-28 tonhuisman: Format source using Uncrustify, use f postfix on float constants, add optional doReset argument to init(),
|
||||
* inhibit unused constructors, add virtual destructor
|
||||
*/
|
||||
|
||||
#include "UVlight_LTR390.h"
|
||||
|
||||
// UVlight_LTR390::UVlight_LTR390(int addr) {
|
||||
// _wire = &Wire;
|
||||
// i2cAddress = addr;
|
||||
// }
|
||||
|
||||
UVlight_LTR390::UVlight_LTR390() {
|
||||
_wire = &Wire;
|
||||
i2cAddress = LTR390_ADDRESS;
|
||||
}
|
||||
|
||||
// UVlight_LTR390::UVlight_LTR390(TwoWire *w, int addr) {
|
||||
// _wire = w;
|
||||
// i2cAddress = addr;
|
||||
// }
|
||||
|
||||
// UVlight_LTR390::UVlight_LTR390(TwoWire *w) {
|
||||
// _wire = w;
|
||||
// i2cAddress = LTR390_ADDRESS;
|
||||
// }
|
||||
|
||||
/*!
|
||||
@brief LTR390 Initialization
|
||||
@returns True on success, Fail on false.
|
||||
*/
|
||||
bool UVlight_LTR390::init(bool doReset) {
|
||||
ltrId = readRegister(LTR390_PART_ID);
|
||||
|
||||
// check part ID!
|
||||
if ((ltrId >> 4) != 0x0B) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// OK now we can do a soft reset
|
||||
// Reset disabled for RAK12019 sensor
|
||||
|
||||
if (doReset && !reset()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// main screen turn on
|
||||
enable(true);
|
||||
|
||||
if (!enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// RAK12019 specific settings, default in plugin
|
||||
// setGain(LTR390_GAIN_3); // set gain
|
||||
// setResolution(LTR390_RESOLUTION_18BIT); // set resolution
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Perform a soft reset with 10ms delay.
|
||||
@returns True on success (reset bit was cleared post-write)
|
||||
*/
|
||||
bool UVlight_LTR390::reset(void) {
|
||||
uint8_t readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
readData |= B00010000;
|
||||
|
||||
writeRegister(LTR390_MAIN_CTRL, readData);
|
||||
delay(10);
|
||||
readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
if (readData != 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Checks if new data is available in data register
|
||||
@returns True on new data available
|
||||
*/
|
||||
bool UVlight_LTR390::newDataAvailable(void) {
|
||||
uint8_t readStatus = readRegister(LTR390_MAIN_STATUS);
|
||||
|
||||
readStatus >>= 3;
|
||||
readStatus &= 1;
|
||||
return readStatus;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Read 3-bytes out of ambient data register, does not check if data is new!
|
||||
@returns Up to 20 bits, right shifted into a 32 bit int
|
||||
*/
|
||||
uint32_t UVlight_LTR390::readALS(void) {
|
||||
// uint8_t readLsb = readRegister(LTR390_ALSDATA_LSB);
|
||||
// uint8_t readMsb = readRegister(LTR390_ALSDATA_MSB);
|
||||
// uint8_t readHsb = readRegister(LTR390_ALSDATA_HSB);
|
||||
|
||||
// readHsb &= 0x0F;
|
||||
// uint32_t readData = (readHsb << 16) | (readMsb << 8) | readLsb;
|
||||
uint32_t readData = read3Register(LTR390_ALSDATA_LSB);
|
||||
|
||||
return readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Read 3-bytes out of UV data register, does not check if data is new!
|
||||
@returns Up to 20 bits, right shifted into a 32 bit int
|
||||
*/
|
||||
uint32_t UVlight_LTR390::readUVS(void) {
|
||||
// readLsb = readRegister(LTR390_UVSDATA_LSB);
|
||||
// readMsb = readRegister(LTR390_UVSDATA_MSB);
|
||||
// readHsb = readRegister(LTR390_UVSDATA_HSB);
|
||||
|
||||
// readHsb &= 0x0F;
|
||||
// uint32_t readData = (readHsb << 16) | (readMsb << 8) | readLsb;
|
||||
uint32_t readData = read3Register(LTR390_UVSDATA_LSB);
|
||||
|
||||
return readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief get lux data,LUX is calculated according to the formula
|
||||
@returns the ambient light data ,unit lux.
|
||||
*/
|
||||
float UVlight_LTR390::getLUX() {
|
||||
uint32_t raw = readALS();
|
||||
uint8_t _gain = (uint8_t)(getGain());
|
||||
uint8_t readResolution = (uint8_t)(getResolution());
|
||||
float lux = 0.6f * (float)(raw) / (gain_Buf[_gain] * resolution_Buf[readResolution]) * (WFAC);
|
||||
|
||||
return lux;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief get UVI data,UVI is calculated according to the formula
|
||||
@returns the ultraviolet light data,unit uw/cm2.
|
||||
*/
|
||||
float UVlight_LTR390::getUVI() {
|
||||
uint32_t raw = readUVS();
|
||||
uint8_t _gain = (uint8_t)(getGain());
|
||||
uint8_t readResolution = (uint8_t)(getResolution());
|
||||
float uvi = (float)(raw) /
|
||||
((gain_Buf[_gain] / gain_Buf[LTR390_GAIN_18]) *
|
||||
(resolution_Buf[readResolution] / resolution_Buf[LTR390_RESOLUTION_20BIT]) *
|
||||
(float)(LTR390_SENSITIVITY)) * (WFAC);
|
||||
|
||||
return uvi;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@brief Enable or disable the light sensor
|
||||
@param en True to enable, False to disable
|
||||
*/
|
||||
void UVlight_LTR390::enable(bool en) {
|
||||
uint8_t readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
readData |= (1 << 1);
|
||||
writeRegister(LTR390_MAIN_CTRL, (uint8_t)readData);
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Read the enabled-bit from the sensor
|
||||
@returns True if enabled
|
||||
*/
|
||||
bool UVlight_LTR390::enabled(void) {
|
||||
uint8_t readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
readData >>= 1;
|
||||
readData &= 1;
|
||||
return readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Set the sensor mode to EITHER ambient (LTR390_MODE_ALS) or UV
|
||||
* (LTR390_MODE_UVS)
|
||||
* @param mode The desired mode - LTR390_MODE_UVS or LTR390_MODE_ALS
|
||||
*/
|
||||
void UVlight_LTR390::setMode(ltr390_mode_t mode) {
|
||||
uint8_t readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
readData &= 0xF7;
|
||||
readData |= ((uint8_t)mode << 3);
|
||||
writeRegister(LTR390_MAIN_CTRL, (uint8_t)readData);
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief get the sensor's mode
|
||||
* @returns The current mode - LTR390_MODE_UVS or LTR390_MODE_ALS
|
||||
*/
|
||||
ltr390_mode_t UVlight_LTR390::getMode(void) {
|
||||
uint8_t readData = readRegister(LTR390_MAIN_CTRL);
|
||||
|
||||
readData >>= 3;
|
||||
readData &= 1;
|
||||
return (ltr390_mode_t)readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Set the sensor gain
|
||||
* @param gain The desired gain: LTR390_GAIN_1, LTR390_GAIN_3, LTR390_GAIN_6
|
||||
* LTR390_GAIN_9 or LTR390_GAIN_18
|
||||
*/
|
||||
void UVlight_LTR390::setGain(ltr390_gain_t gain) {
|
||||
writeRegister(LTR390_GAIN, (uint8_t)gain);
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Get the sensor's gain
|
||||
* @returns gain The current gain: LTR390_GAIN_1, LTR390_GAIN_3, LTR390_GAIN_6
|
||||
* LTR390_GAIN_9 or LTR390_GAIN_18
|
||||
*/
|
||||
ltr390_gain_t UVlight_LTR390::getGain(void) {
|
||||
uint8_t readData = readRegister(LTR390_GAIN);
|
||||
|
||||
readData &= 7;
|
||||
return (ltr390_gain_t)readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Set the sensor resolution. Higher resolutions take longer to read!
|
||||
* @param res The desired resolution: LTR390_RESOLUTION_13BIT,
|
||||
* LTR390_RESOLUTION_16BIT, LTR390_RESOLUTION_17BIT, LTR390_RESOLUTION_18BIT,
|
||||
* LTR390_RESOLUTION_19BIT or LTR390_RESOLUTION_20BIT
|
||||
*/
|
||||
void UVlight_LTR390::setResolution(ltr390_resolution_t res) {
|
||||
uint8_t readData = 0;
|
||||
|
||||
readData |= (res << 4);
|
||||
writeRegister(LTR390_MEAS_RATE, (uint8_t)readData);
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Get the sensor's resolution
|
||||
* @returns The current resolution: LTR390_RESOLUTION_13BIT,
|
||||
* LTR390_RESOLUTION_16BIT, LTR390_RESOLUTION_17BIT, LTR390_RESOLUTION_18BIT,
|
||||
* LTR390_RESOLUTION_19BIT or LTR390_RESOLUTION_20BIT
|
||||
*/
|
||||
ltr390_resolution_t UVlight_LTR390::getResolution(void) {
|
||||
uint8_t readData = readRegister(LTR390_MEAS_RATE);
|
||||
|
||||
readData &= 0x70;
|
||||
readData = 7 & (readData >> 4);
|
||||
return (ltr390_resolution_t)readData;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Set the interrupt output threshold range for lower and upper.
|
||||
When the sensor is below the lower, or above upper, interrupt will fire
|
||||
@param lower The lower value to compare against the data register.
|
||||
@param higher The higher value to compare against the data register.
|
||||
*/
|
||||
void UVlight_LTR390::setThresholds(uint32_t lower, uint32_t higher) {
|
||||
uint8_t readData = higher;
|
||||
|
||||
writeRegister(LTR390_THRESH_UP, readData);
|
||||
readData = higher >> 8;
|
||||
writeRegister(LTR390_THRESH_UP + 1, readData);
|
||||
readData = higher >> 16;
|
||||
readData &= 0x0F;
|
||||
writeRegister(LTR390_THRESH_UP + 2, readData);
|
||||
readData = lower;
|
||||
writeRegister(LTR390_THRESH_LOW, readData);
|
||||
readData = lower >> 8;
|
||||
writeRegister(LTR390_THRESH_LOW + 1, readData);
|
||||
readData = lower >> 16;
|
||||
readData &= 0x0F;
|
||||
writeRegister(LTR390_THRESH_LOW + 2, readData);
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief Configure the interrupt based on the thresholds in setThresholds()
|
||||
When the sensor is below the lower, or above upper thresh, interrupt will
|
||||
fire
|
||||
@param enable Whether the interrupt output is enabled
|
||||
@param source Whether to use the ALS or UVS data register to compare
|
||||
@param persistance The number of consecutive out-of-range readings before
|
||||
we fire the IRQ. Default is 0 (each reading will fire)
|
||||
*/
|
||||
void UVlight_LTR390::configInterrupt(bool enable, ltr390_mode_t source, uint8_t persistance) {
|
||||
uint8_t readData = 0;
|
||||
|
||||
readData |= (enable << 2) | (1 << 4) | (source << 5);
|
||||
writeRegister(LTR390_INT_CFG, readData);
|
||||
|
||||
if (persistance > 0x0F) { persistance = 0x0F; }
|
||||
uint8_t _p = 0;
|
||||
|
||||
_p |= persistance << 4;
|
||||
writeRegister(LTR390_INT_PST, _p);
|
||||
}
|
||||
|
||||
uint8_t UVlight_LTR390::writeRegister(uint8_t reg, uint8_t data) {
|
||||
_wire->beginTransmission(i2cAddress);
|
||||
_wire->write(reg);
|
||||
_wire->write(data);
|
||||
return _wire->endTransmission();
|
||||
}
|
||||
|
||||
uint8_t UVlight_LTR390::readRegister(uint8_t reg) {
|
||||
uint8_t regValue = 0;
|
||||
|
||||
_wire->beginTransmission(i2cAddress);
|
||||
_wire->write(reg);
|
||||
_wire->endTransmission();
|
||||
_wire->requestFrom(i2cAddress, 1);
|
||||
|
||||
if (_wire->available()) {
|
||||
regValue = _wire->read();
|
||||
}
|
||||
return regValue;
|
||||
}
|
||||
|
||||
uint32_t UVlight_LTR390::read3Register(uint8_t reg) {
|
||||
uint32_t regValue = 0;
|
||||
|
||||
_wire->beginTransmission(i2cAddress);
|
||||
_wire->write(reg);
|
||||
_wire->endTransmission();
|
||||
_wire->requestFrom(i2cAddress, 3);
|
||||
|
||||
for (uint8_t n = 0; n < 3; n++) {
|
||||
if (_wire->available()) {
|
||||
regValue += (_wire->read() << (n * 8));
|
||||
}
|
||||
}
|
||||
regValue &= 0xFFFFF; // max 20 bit
|
||||
return regValue;
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/** Based on Adafruit LTR390 Arduino Library **/
|
||||
/** Changed to work with RAKWireless RAK12019 UV Light Sensor **/
|
||||
|
||||
/*!
|
||||
* @file Adafruit_LTR390.h
|
||||
*
|
||||
* I2C Driver for LTR390 UV and light sensor
|
||||
*
|
||||
* This is a library for the Adafruit LTR390 breakout:
|
||||
* http://www.adafruit.com/
|
||||
*
|
||||
* Adafruit invests time and resources providing this open source code,
|
||||
* please support Adafruit and open-source hardware by purchasing products from
|
||||
* Adafruit!
|
||||
*
|
||||
*
|
||||
* BSD license (see license.txt)
|
||||
*/
|
||||
|
||||
#ifndef _UVLIGHT_LTR390_H
|
||||
#define _UVLIGHT_LTR390_H
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Wire.h>
|
||||
|
||||
#define LTR390_SENSITIVITY 1400.0f
|
||||
|
||||
#define WFAC 1
|
||||
|
||||
/*
|
||||
For device under tinted window with coated-ink of flat transmission rate at 400-600nm wavelength,
|
||||
window factor is to compensate light loss due to the lower transmission rate from the coated-ink.
|
||||
a. WFAC = 1 for NO window / clear window glass.
|
||||
b. WFAC >1 device under tinted window glass. Calibrate under white LED.
|
||||
*/
|
||||
|
||||
#define LTR390_ADDRESS 0x53 ///< I2C address
|
||||
#define LTR390_MAIN_CTRL 0x00 ///< Main control register
|
||||
#define LTR390_MEAS_RATE 0x04 ///< Resolution and data rate
|
||||
#define LTR390_GAIN 0x05 ///< ALS and UVS gain range
|
||||
#define LTR390_PART_ID 0x06 ///< Part id/revision register
|
||||
#define LTR390_MAIN_STATUS 0x07 ///< Main status register
|
||||
#define LTR390_ALSDATA_LSB 0x0D ///< ALS data lowest byte
|
||||
#define LTR390_ALSDATA_MSB 0x0E ///< ALS data middle byte
|
||||
#define LTR390_ALSDATA_HSB 0x0F ///< ALS data highest byte
|
||||
#define LTR390_UVSDATA_LSB 0x10 ///< UVS data lowest byte
|
||||
#define LTR390_UVSDATA_MSB 0x11 ///< UVS data middle byte
|
||||
#define LTR390_UVSDATA_HSB 0x12 ///< UVS data highest byte
|
||||
#define LTR390_INT_CFG 0x19 ///< Interrupt configuration
|
||||
#define LTR390_INT_PST 0x1A ///< Interrupt persistance config
|
||||
#define LTR390_THRESH_UP 0x21 ///< Upper threshold, low byte
|
||||
#define LTR390_THRESH_LOW 0x24 ///< Lower threshold, low byte
|
||||
|
||||
/*! @brief Whether we are measuring ambient or UV light */
|
||||
typedef enum {
|
||||
LTR390_MODE_ALS,
|
||||
LTR390_MODE_UVS,
|
||||
} ltr390_mode_t;
|
||||
|
||||
/*! @brief Sensor gain for UV or ALS */
|
||||
typedef enum {
|
||||
LTR390_GAIN_1 = 0,
|
||||
LTR390_GAIN_3,
|
||||
LTR390_GAIN_6,
|
||||
LTR390_GAIN_9,
|
||||
LTR390_GAIN_18,
|
||||
} ltr390_gain_t;
|
||||
|
||||
/*! @brief Measurement resolution (higher res means slower reads!) */
|
||||
typedef enum {
|
||||
LTR390_RESOLUTION_20BIT,
|
||||
LTR390_RESOLUTION_19BIT,
|
||||
LTR390_RESOLUTION_18BIT,
|
||||
LTR390_RESOLUTION_17BIT,
|
||||
LTR390_RESOLUTION_16BIT,
|
||||
LTR390_RESOLUTION_13BIT,
|
||||
} ltr390_resolution_t;
|
||||
|
||||
|
||||
class UVlight_LTR390 {
|
||||
public:
|
||||
|
||||
UVlight_LTR390();
|
||||
|
||||
// UVlight_LTR390(TwoWire *w);
|
||||
// UVlight_LTR390(int addr);
|
||||
// UVlight_LTR390(TwoWire *w,
|
||||
// int addr);
|
||||
virtual ~UVlight_LTR390() {}
|
||||
|
||||
bool init(bool doReset = false);
|
||||
|
||||
bool reset(void);
|
||||
|
||||
void enable(bool en);
|
||||
bool enabled(void);
|
||||
|
||||
void setMode(ltr390_mode_t mode);
|
||||
ltr390_mode_t getMode(void);
|
||||
|
||||
void setGain(ltr390_gain_t gain);
|
||||
ltr390_gain_t getGain(void);
|
||||
|
||||
void setResolution(ltr390_resolution_t res);
|
||||
ltr390_resolution_t getResolution(void);
|
||||
|
||||
void setThresholds(uint32_t lower,
|
||||
uint32_t higher);
|
||||
|
||||
void configInterrupt(bool enable,
|
||||
ltr390_mode_t source,
|
||||
uint8_t persistance = 0);
|
||||
|
||||
bool newDataAvailable(void);
|
||||
uint32_t readUVS(void);
|
||||
uint32_t readALS(void);
|
||||
|
||||
float getLUX(void);
|
||||
|
||||
float getUVI(void);
|
||||
|
||||
uint8_t writeRegister(uint8_t reg,
|
||||
uint8_t data);
|
||||
uint8_t readRegister(uint8_t reg);
|
||||
uint32_t read3Register(uint8_t reg);
|
||||
uint8_t getChipID() {
|
||||
return ltrId;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
TwoWire *_wire;
|
||||
int i2cAddress;
|
||||
float gain_Buf[5] = { 1, 3, 6, 9, 18 };
|
||||
float resolution_Buf[6] = { 4, 2, 1, 0.5, 0.25, 0.03125 };
|
||||
uint8_t ltrId = 0;
|
||||
};
|
||||
|
||||
#endif // ifndef _UVLIGHT_LTR390_H
|
||||
@@ -0,0 +1,34 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For UVLIGHT
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
UVlight_LTR390 KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
init KEYWORD2
|
||||
reset KEYWORD2
|
||||
enable KEYWORD2
|
||||
enabled KEYWORD2
|
||||
setMode KEYWORD2
|
||||
getMode KEYWORD2
|
||||
setGain KEYWORD2
|
||||
getGain KEYWORD2
|
||||
setResolution KEYWORD2
|
||||
getResolution KEYWORD2
|
||||
setThresholds KEYWORD2
|
||||
newDataAvailable KEYWORD2
|
||||
configInterrupt KEYWORD2
|
||||
readALS KEYWORD2
|
||||
readUVS KEYWORD2
|
||||
getLUX KEYWORD2
|
||||
getUVI KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "ccronexpr",
|
||||
"version": "1.0.0",
|
||||
"description": "Cron expression parsing in ANSI C",
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/staticlibs/ccronexpr"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": [
|
||||
"espressif8266","espressif32","espressif32s2"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
name=ccronexpr
|
||||
version=1.0.0
|
||||
sentence=Cron expression parsing in ANSI C
|
||||
paragraph=
|
||||
url=https://github.com/staticlibs/ccronexpr
|
||||
architectures=esp8266,esp32,esp32s2
|
||||
@@ -164,8 +164,28 @@ platform_packages =
|
||||
mcspr/toolchain-xtensa @ ~5.100300.211127
|
||||
build_flags = ${esp82xx_3_0_x.build_flags}
|
||||
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
|
||||
lib_ignore = ${esp82xx_defaults.lib_ignore}
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
LittleFS(esp8266)
|
||||
ServoESP32
|
||||
TinyWireM
|
||||
|
||||
[core_stage]
|
||||
[core_4_0_1]
|
||||
extends = esp82xx_3_0_x
|
||||
platform = espressif8266@4.0.1
|
||||
platform_packages =
|
||||
build_flags = ${esp82xx_3_0_x.build_flags}
|
||||
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
|
||||
lib_ignore = ${esp82xx_defaults.lib_ignore}
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
LittleFS(esp8266)
|
||||
ServoESP32
|
||||
TinyWireM
|
||||
|
||||
|
||||
[core_stage_2ndheap]
|
||||
extends = esp82xx_3_0_x
|
||||
platform = https://github.com/platformio/platform-espressif8266.git
|
||||
build_flags = ${esp82xx_3_0_x.build_flags}
|
||||
@@ -173,19 +193,22 @@ build_flags = ${esp82xx_3_0_x.build_flags}
|
||||
-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48_SECHEAP_SHARED
|
||||
-DUSE_SECOND_HEAP
|
||||
-DPHASE_LOCKED_WAVEFORM
|
||||
|
||||
|
||||
platform_packages =
|
||||
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
|
||||
mcspr/toolchain-xtensa @ ~5.100300.211127
|
||||
|
||||
[core_stage]
|
||||
extends = esp82xx_3_0_x
|
||||
platform = https://github.com/platformio/platform-espressif8266.git
|
||||
build_flags = ${esp82xx_3_0_x.build_flags}
|
||||
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
|
||||
-DPHASE_LOCKED_WAVEFORM
|
||||
platform_packages =
|
||||
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
|
||||
mcspr/toolchain-xtensa @ ~5.100300.211127
|
||||
|
||||
|
||||
|
||||
[core_esp32_2_1_0]
|
||||
platform = espressif32@2.1.0
|
||||
build_flags = -DESP32_STAGE
|
||||
|
||||
|
||||
; Updated ESP-IDF to the latest stable 4.0.1
|
||||
; See: https://github.com/platformio/platform-espressif32/releases
|
||||
@@ -196,11 +219,6 @@ platform = https://github.com/tasmota/platform-espressif32/re
|
||||
platform_packages =
|
||||
build_flags = -DESP32_STAGE
|
||||
|
||||
[core_esp32_3_5_0]
|
||||
platform = espressif32 @ 3.5.0
|
||||
platform_packages =
|
||||
build_flags = -DESP32_STAGE
|
||||
|
||||
[core_esp32_stage]
|
||||
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master
|
||||
platform_packages = framework-arduinoespressif32 @ https://github.com/tasmota/arduino-esp32/releases/download/2.0.1/framework-arduinoespressif32-release_IDF4.4.tar.gz
|
||||
|
||||
@@ -20,12 +20,15 @@ lib_ignore = ESP8266Ping
|
||||
extends = common, core_esp32_IDF4_4__2_0_3
|
||||
lib_deps =
|
||||
Adafruit_ST77xx
|
||||
Adafruit TSL2591 Library
|
||||
Adafruit NeoPixel
|
||||
ArduinoOTA
|
||||
ESP32HTTPUpdateServer
|
||||
FrogmoreScd30
|
||||
I2Cdevlib-Core
|
||||
ITG3205
|
||||
LOLIN_EPD
|
||||
Makuna/NeoPixelBus @ 2.6.9
|
||||
Multi Channel Relay Arduino Library
|
||||
ShiftRegister74HC595_NonTemplate
|
||||
SparkFun ADXL345 Arduino Library
|
||||
@@ -34,8 +37,11 @@ lib_deps =
|
||||
adafruit/Adafruit BusIO @ ^1.10.0
|
||||
adafruit/Adafruit GFX Library@^1.11.1
|
||||
adafruit/Adafruit ILI9341@^1.5.10
|
||||
td-er/ESPeasySerial @ 2.0.8
|
||||
ccronexpr
|
||||
rlogiacco/CircularBuffer
|
||||
td-er/ESPeasySerial @ 2.0.10
|
||||
td-er/SparkFun MAX1704x Fuel Gauge Arduino Library @ ^1.0.1
|
||||
RAK12019_LTR390_UV_Light
|
||||
extra_scripts = post:tools/pio/post_esp32.py
|
||||
${extra_scripts_default.extra_scripts}
|
||||
build_unflags = -Wall
|
||||
@@ -44,6 +50,7 @@ build_flags = ${core_esp32_IDF4_4__2_0_3.build_flags}
|
||||
-DCONFIG_FREERTOS_ASSERT_DISABLE
|
||||
-DCONFIG_LWIP_ESP_GRATUITOUS_ARP
|
||||
-fno-strict-aliasing
|
||||
-Wswitch
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
monitor_filters = esp32_exception_decoder
|
||||
|
||||
@@ -121,6 +128,7 @@ board = esp32_4M
|
||||
[env:custom_ESP32_16M8M_LittleFS]
|
||||
extends = esp32_custom_base_LittleFS
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
|
||||
[env:custom_IR_ESP32_4M316k]
|
||||
extends = esp32_base
|
||||
@@ -182,6 +190,14 @@ build_flags = ${esp32_common.build_flags}
|
||||
-DPLUGIN_SET_TEST_D_ESP32
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_E_ESP32_4M316k]
|
||||
extends = esp32_common
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA
|
||||
-DPLUGIN_SET_TEST_E_ESP32
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
|
||||
[env:test_A_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
@@ -205,6 +221,12 @@ board = esp32_4M
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_TEST_D_ESP32
|
||||
|
||||
[env:test_E_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_TEST_E_ESP32
|
||||
|
||||
[env:energy_ESP32_4M316k]
|
||||
extends = esp32_common
|
||||
board = esp32_4M
|
||||
@@ -223,6 +245,15 @@ build_flags = ${esp32_common.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA
|
||||
-DPLUGIN_DISPLAY_COLLECTION
|
||||
|
||||
[env:neopixel_ESP32_4M316k]
|
||||
extends = esp32_common
|
||||
board = esp32_4M
|
||||
lib_deps = ${esp32_common.lib_deps}
|
||||
ServoESP32
|
||||
build_flags = ${esp32_common.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA
|
||||
-D PLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
|
||||
[env:custom_ESP32_4M316k_ETH]
|
||||
extends = env:custom_ESP32_4M316k
|
||||
@@ -258,6 +289,12 @@ build_flags = ${env:test_D_ESP32_4M316k.build_flags}
|
||||
-DHAS_ETHERNET
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_E_ESP32_4M316k_ETH]
|
||||
extends = env:test_E_ESP32_4M316k
|
||||
build_flags = ${env:test_E_ESP32_4M316k.build_flags}
|
||||
-DHAS_ETHERNET
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
|
||||
|
||||
; ESP32 MAX builds 16M flash ------------------------------
|
||||
@@ -266,6 +303,7 @@ build_flags = ${env:test_D_ESP32_4M316k.build_flags}
|
||||
[env:max_ESP32_16M1M]
|
||||
extends = esp32_base
|
||||
board = esp32_16M1M
|
||||
board_upload.flash_size = 16MB
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
build_flags = ${esp32_base.build_flags}
|
||||
@@ -283,6 +321,7 @@ build_flags = ${env:max_ESP32_16M1M.build_flags}
|
||||
[env:max_ESP32_16M8M_LittleFS]
|
||||
extends = esp32_base
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
build_flags = ${esp32_base.build_flags}
|
||||
|
||||
@@ -33,6 +33,15 @@ build_flags = ${esp32s2_common.build_flags}
|
||||
extra_scripts = ${esp32s2_common.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
[env:neopixel_ESP32s2_4M316k]
|
||||
extends = esp32s2_common
|
||||
board = esp32s2
|
||||
lib_deps = ${esp32s2_common.lib_deps}
|
||||
ServoESP32
|
||||
build_flags = ${esp32s2_common.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA
|
||||
-DPLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
|
||||
[env:custom_IR_ESP32s2_4M316k]
|
||||
extends = esp32s2_common
|
||||
@@ -82,6 +91,13 @@ build_flags = ${esp32s2_common.build_flags}
|
||||
-DPLUGIN_SET_TEST_D_ESP32
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_E_ESP32s2_4M316k]
|
||||
extends = esp32s2_common
|
||||
board = esp32s2
|
||||
build_flags = ${esp32s2_common.build_flags}
|
||||
-DPLUGIN_SET_TEST_E_ESP32
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
|
||||
[env:energy_ESP32s2_4M316k]
|
||||
extends = esp32s2_common
|
||||
|
||||
@@ -17,12 +17,18 @@ lib_ignore = ${core_2_7_4_alt_wifi.lib_ignore}
|
||||
|
||||
|
||||
[core302_platform]
|
||||
build_flags = ${core_3_0_2.build_flags}
|
||||
platform = ${core_3_0_2.platform}
|
||||
platform_packages = ${core_3_0_2.platform_packages}
|
||||
lib_ignore = ${core_3_0_2.lib_ignore}
|
||||
build_flags = ${core_4_0_1.build_flags}
|
||||
platform = ${core_4_0_1.platform}
|
||||
platform_packages = ${core_4_0_1.platform_packages}
|
||||
lib_ignore = ${core_4_0_1.lib_ignore}
|
||||
|
||||
|
||||
[beta_platform_2ndheap]
|
||||
build_flags = ${core_stage_2ndheap.build_flags}
|
||||
platform = ${core_stage_2ndheap.platform}
|
||||
platform_packages = ${core_stage_2ndheap.platform_packages}
|
||||
lib_ignore = ${core_stage_2ndheap.lib_ignore}
|
||||
|
||||
[beta_platform]
|
||||
build_flags = ${core_stage.build_flags}
|
||||
platform = ${core_stage.platform}
|
||||
@@ -53,24 +59,30 @@ build_unflags = -DDEBUG_ESP_PORT
|
||||
-fexceptions
|
||||
lib_deps =
|
||||
Adafruit_ST77xx
|
||||
Adafruit TSL2591 Library
|
||||
Adafruit NeoPixel
|
||||
ESP8266HTTPUpdateServer
|
||||
ESP8266WebServer
|
||||
FrogmoreScd30
|
||||
I2Cdevlib-Core
|
||||
ITG3205
|
||||
LOLIN_EPD
|
||||
Makuna/NeoPixelBus @ 2.6.9
|
||||
Multi Channel Relay Arduino Library
|
||||
ShiftRegister74HC595_NonTemplate
|
||||
SparkFun ADXL345 Arduino Library
|
||||
SparkFun VL53L1X 4m Laser Distance Sensor @ 1.2.9
|
||||
VL53L0X @ 1.3.0
|
||||
ccronexpr
|
||||
adafruit/Adafruit BusIO @ ^1.10.0
|
||||
adafruit/Adafruit GFX Library@^1.11.1
|
||||
adafruit/Adafruit ILI9341@^1.5.10
|
||||
bblanchon/ArduinoJson @ ^6.17.2
|
||||
td-er/ESPeasySerial @ 2.0.8
|
||||
rlogiacco/CircularBuffer
|
||||
td-er/ESPeasySerial @ 2.0.10
|
||||
td-er/RABurton ESP8266 Mutex @ ^1.0.2
|
||||
td-er/SparkFun MAX1704x Fuel Gauge Arduino Library @ ^1.0.1
|
||||
RAK12019_LTR390_UV_Light
|
||||
lib_ignore = ${esp82xx_defaults.lib_ignore}
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
|
||||
@@ -70,15 +70,14 @@ extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
[env:custom_302_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${core_3_0_2.platform}
|
||||
platform_packages = ${core_3_0_2.platform_packages}
|
||||
build_flags = ${core_3_0_2.build_flags}
|
||||
platform = ${core302_platform.platform}
|
||||
platform_packages = ${core302_platform.platform_packages}
|
||||
build_flags = ${core302_platform.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
[env:custom_beta_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${beta_platform.platform}
|
||||
@@ -89,6 +88,17 @@ build_flags = ${beta_platform.build_flags}
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
[env:custom_beta_2ndheap_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${beta_platform_2ndheap.platform}
|
||||
platform_packages = ${beta_platform_2ndheap.platform_packages}
|
||||
build_flags = ${beta_platform_2ndheap.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
[env:custom_beta_IR_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${beta_platform.platform}
|
||||
@@ -110,21 +120,21 @@ lib_ignore = ESP32_ping
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
|
||||
[env:custom_beta_debug_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${beta_platform.platform}
|
||||
platform_packages = ${beta_platform.platform_packages}
|
||||
build_flags = ${beta_platform.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
-g
|
||||
-DDEBUG_ESP_OOM
|
||||
-DUMM_POISON_CHECK
|
||||
-DDEBUG_ESP_PORT=Serial
|
||||
build_unflags =
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
; TD-er: Disabled as it will no longer fit
|
||||
;[env:custom_beta_debug_ESP8266_4M1M]
|
||||
;extends = esp8266_4M1M
|
||||
;platform = ${beta_platform.platform}
|
||||
;platform_packages = ${beta_platform.platform_packages}
|
||||
;build_flags = ${beta_platform.build_flags}
|
||||
; ${esp8266_4M1M.build_flags}
|
||||
; -DPLUGIN_BUILD_CUSTOM
|
||||
; -g
|
||||
; -DDEBUG_ESP_OOM
|
||||
; -DUMM_POISON_CHECK
|
||||
; -DDEBUG_ESP_PORT=Serial
|
||||
;build_unflags =
|
||||
;lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
;extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
; Custom: 4M2M version -- SPIFFS --------------
|
||||
@@ -230,9 +240,9 @@ lib_ignore = ${regular_platform_alt_wifi.lib_ignore}
|
||||
|
||||
;[env:normal_302_ESP8266_1M]
|
||||
;extends = esp8266_1M
|
||||
;platform = ${core_3_0_2.platform}
|
||||
;platform_packages = ${core_3_0_2.platform_packages}
|
||||
;build_flags = ${core_3_0_2.build_flags}
|
||||
;platform = ${core302_platform.platform}
|
||||
;platform_packages = ${core302_platform.platform_packages}
|
||||
;build_flags = ${core302_platform.build_flags}
|
||||
; ${esp8266_1M.build_flags}
|
||||
|
||||
|
||||
@@ -315,11 +325,11 @@ lib_ignore = ${regular_platform_alt_wifi.lib_ignore}
|
||||
|
||||
[env:normal_302_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${core_3_0_2.platform}
|
||||
platform_packages = ${core_3_0_2.platform_packages}
|
||||
build_flags = ${core_3_0_2.build_flags}
|
||||
platform = ${core302_platform.platform}
|
||||
platform_packages = ${core302_platform.platform_packages}
|
||||
build_flags = ${core302_platform.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
lib_ignore = ${core_3_0_2.lib_ignore}
|
||||
lib_ignore = ${core302_platform.lib_ignore}
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
@@ -378,9 +388,9 @@ build_flags = ${regular_platform.build_flags}
|
||||
|
||||
[env:minimal_core_302_ESP8266_1M_OTA_Domoticz]
|
||||
extends = esp8266_1M_OTA
|
||||
platform = ${core_3_0_2.platform}
|
||||
platform_packages = ${core_3_0_2.platform_packages}
|
||||
build_flags = ${core_3_0_2.build_flags}
|
||||
platform = ${core302_platform.platform}
|
||||
platform_packages = ${core302_platform.platform_packages}
|
||||
build_flags = ${core302_platform.build_flags}
|
||||
${esp8266_1M_OTA.build_flags}
|
||||
${minimal_OTA_domoticz.build_flags}
|
||||
|
||||
@@ -396,9 +406,9 @@ build_flags = ${regular_platform.build_flags}
|
||||
|
||||
[env:minimal_core_302_ESP8266_1M_OTA_FHEM_HA]
|
||||
extends = esp8266_1M_OTA
|
||||
platform = ${core_3_0_2.platform}
|
||||
platform_packages = ${core_3_0_2.platform_packages}
|
||||
build_flags = ${core_3_0_2.build_flags}
|
||||
platform = ${core302_platform.platform}
|
||||
platform_packages = ${core302_platform.platform_packages}
|
||||
build_flags = ${core302_platform.build_flags}
|
||||
${esp8266_1M_OTA.build_flags}
|
||||
${minimal_OTA_FHEM_HA.build_flags}
|
||||
|
||||
@@ -681,7 +691,7 @@ build_flags = ${testing_ESP8266_4M1M.build_flags}
|
||||
|
||||
;;; Collection builds ************************************************
|
||||
; Collection of similar plugins for a specific use case ;
|
||||
; for example "Display" or "energy meter" ;
|
||||
; for example "Display", "energy meter" or "NeoPixel" ;
|
||||
; *********************************************************************
|
||||
|
||||
; energy : 4096k version ----------------------------
|
||||
@@ -702,6 +712,34 @@ build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-D PLUGIN_DISPLAY_COLLECTION
|
||||
|
||||
; neopixel : 4096k version ----------------------------
|
||||
[env:neopixel_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-D PLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
; neopixel : 1024k version ----------------------------
|
||||
[env:neopixel_ESP8266_1M_Domoticz]
|
||||
extends = esp8266_1M_OTA
|
||||
platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M_OTA.build_flags}
|
||||
${minimal_OTA_domoticz.build_flags}
|
||||
-D PLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
[env:neopixel_ESP8266_1M_FHEM_HA]
|
||||
extends = esp8266_1M_OTA
|
||||
platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M_OTA.build_flags}
|
||||
${minimal_OTA_FHEM_HA.build_flags}
|
||||
-D PLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
|
||||
;;; HARDWARE SPECIFIC VERSIONS ***********************************************************
|
||||
; versions specially designed to fit, and contents only needed plugins for each hardware ;
|
||||
|
||||
@@ -82,7 +82,6 @@ check_flags = ${debug_pio.check_flags}
|
||||
platform = ${esp32_common.platform}
|
||||
build_flags = ${esp32_common.build_flags} ${debug_pio.build_flags} -DPLUGIN_BUILD_CUSTOM
|
||||
board = esp32_16M8M
|
||||
board_upload.maximum_size = 4194304
|
||||
extra_scripts = ${esp32_common.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
@@ -93,7 +92,6 @@ check_tool = ${debug_pio.check_tool}
|
||||
check_flags = ${debug_pio.check_flags}
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
board_upload.maximum_size = 4194304
|
||||
build_flags = ${esp32_base.build_flags}
|
||||
${debug_pio.build_flags}
|
||||
-DUSE_LITTLEFS
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
esptool==4.0
|
||||
esptool==3.3.1
|
||||
platformio>=6.0.2
|
||||
pygit2==1.9.1
|
||||
@@ -116,6 +116,8 @@
|
||||
#define DEFAULT_RULES_OLDENGINE true
|
||||
|
||||
#define DEFAULT_MQTT_RETAIN false // (true|false) Retain MQTT messages?
|
||||
#define DEFAULT_CONTROLLER_DELETE_OLDEST false // (true|false) to delete oldest message when queue is full
|
||||
#define DEFAULT_CONTROLLER_MUST_CHECK_REPLY false // (true|false) Check Acknowledgment
|
||||
#define DEFAULT_MQTT_DELAY 100 // Time in milliseconds to retain MQTT messages
|
||||
#define DEFAULT_MQTT_LWT_TOPIC "" // Default lwt topic
|
||||
#define DEFAULT_MQTT_LWT_CONNECT_MESSAGE "Connected" // Default lwt message
|
||||
@@ -179,6 +181,16 @@
|
||||
|
||||
#define USE_EXT_RTC // Support for external RTC clock modules like PCF8563/PCF8523/DS3231/DS1307
|
||||
|
||||
#define USES_PLUGIN_STATS // Support collecting historic data + computing stats on historic data
|
||||
#ifdef ESP8266
|
||||
# define PLUGIN_STATS_NR_ELEMENTS 16
|
||||
#endif // ifdef ESP8266
|
||||
# ifdef ESP32
|
||||
# define PLUGIN_STATS_NR_ELEMENTS 64
|
||||
#endif // ifdef ESP32
|
||||
#define USES_CHART_JS // Support for drawing charts, like PluginStats historic data
|
||||
|
||||
|
||||
|
||||
// #define USE_SETTINGS_ARCHIVE
|
||||
// #define FEATURE_I2CMULTIPLEXER
|
||||
@@ -245,6 +257,7 @@
|
||||
|
||||
//#define WEBPAGE_TEMPLATE_HIDE_HELP_BUTTON
|
||||
|
||||
#define SHOW_SYSINFO_JSON //Enables the sysinfo_json page (by default is enabled when WEBSERVER_NEW_UI is enabled too)
|
||||
|
||||
/*
|
||||
#######################################################################################################
|
||||
@@ -428,6 +441,15 @@ static const char DATA_ESPEASY_DEFAULT_MIN_CSS[] PROGMEM = {
|
||||
// #define USES_P126 // 74HC595 Shift register
|
||||
// #define USES_P127 // CDM7160
|
||||
// #define USES_P132 // INA3221
|
||||
// #define USES_P133 // LTR390 UV
|
||||
|
||||
// #define USES_P128 // NeoPixelBusFX
|
||||
// #define P128_USES_GRB // Default
|
||||
// #define P128_USES_GRBW // Select 1 option, only first one enabled from this list will be used
|
||||
// #define P128_USES_RGB
|
||||
// #define P128_USES_RGBW
|
||||
// #define P128_USES_BRG
|
||||
// #define P128_USES_RBG
|
||||
|
||||
|
||||
// Special plugins needing IR library
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace std
|
||||
#include "src/CustomBuild/ESPEasyDefaults.h"
|
||||
#include "src/DataStructs/NodeStruct.h"
|
||||
#include "src/Globals/RamTracker.h"
|
||||
|
||||
#include "src/ESPEasyCore/ESPEasy_Log.h"
|
||||
#include "src/Helpers/ESPEasy_math.h"
|
||||
|
||||
#ifndef FS_NO_GLOBALS
|
||||
#define FS_NO_GLOBALS
|
||||
|
||||