mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into feature/Build-add-collection-h-split-climate-into-a-and-b
This commit is contained in:
@@ -26,7 +26,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- name: Build documentation
|
||||
run: |
|
||||
cd docs
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
make html
|
||||
cd ..
|
||||
zip -r -qq ESPEasy_docs.zip docs/build/*
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: Documentation
|
||||
path: ESPEasy_docs.zip
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- id: set-matrix
|
||||
run: |
|
||||
pip install uv
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1
|
||||
with:
|
||||
string: ${{ matrix.chip }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
# FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473
|
||||
name: Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }}-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} # Sort by ESP type
|
||||
@@ -104,13 +104,13 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: |
|
||||
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: artifacts/Binaries/bin/
|
||||
pattern: Bin-*
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
run: |
|
||||
cd artifacts/Binaries/
|
||||
ls -R
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
# FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473
|
||||
name: ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }}
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- id: set-matrix
|
||||
run: |
|
||||
pip install uv
|
||||
@@ -39,6 +39,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt install binutils build-essential libffi-dev libgit2-dev
|
||||
@@ -56,7 +58,7 @@ jobs:
|
||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1
|
||||
with:
|
||||
string: ${{ matrix.chip }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }}
|
||||
path: |
|
||||
@@ -83,7 +85,7 @@ jobs:
|
||||
cd dist
|
||||
zip -r -qq ../ESPEasy_dist.zip *
|
||||
cd ..
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: Distribution
|
||||
path: |
|
||||
@@ -121,19 +123,19 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.13'
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: |
|
||||
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
|
||||
- name: Download all successfully compiled artifacts
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: artifacts/bin/
|
||||
pattern: Bin-*
|
||||
merge-multiple: true
|
||||
- name: Download dist and docs zip files
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: distribution/
|
||||
name: Distribution
|
||||
|
||||
+12
-10
@@ -72,19 +72,21 @@ docs/source/Plugin/_plugin_sets_overview.repl
|
||||
|
||||
.platformio/
|
||||
.pio/
|
||||
|
||||
managed_components/
|
||||
|
||||
managed_components/
|
||||
|
||||
CMakeLists.txt
|
||||
|
||||
sdkconfig.max_ESP32s3_16M8M_LittleFS_OPI_PSRAM_ETH
|
||||
sdkconfig.max_ESP32s3_16M8M_OPI_PSRAM
|
||||
|
||||
sdkconfig.defaults
|
||||
|
||||
dependencies.lock
|
||||
|
||||
.dummy/
|
||||
|
||||
.cache/
|
||||
|
||||
src/src/CustomBuild/CompiletimeDefines_generated.h
|
||||
dependencies.lock
|
||||
|
||||
.dummy/
|
||||
|
||||
.cache/
|
||||
|
||||
src/src/CustomBuild/CompiletimeDefines_generated.h
|
||||
|
||||
bhutan_16m.bin
|
||||
|
||||
@@ -115,6 +115,8 @@ Flash size | Description |
|
||||
|
||||
N.B. Starting with release 2023/12/25, All ESP32 LittleFS builds use IDF 5.3, to support newer ESP32 chips like ESP32-C2 and ESP32-C6, and SPI Ethernet. Other SPIFFS based ESP32 builds will be migrated to LittleFS as SPIFFS is no longer officially available in IDF 5 and later. As a temporary solution, a specially crafted IDF 5.1 build that still includes SPIFFS, is used for the SPIFFS builds. A migration plan will be made available in 2025.
|
||||
|
||||
N.B.2 Starting with builds made after 2025/11/04, ESP32 builds will no longer have ``_LittleFS`` in the name as all ESP32 builds use LittleFS. Also the suffix ``_ETH`` has been removed since all builds will have Ethernet support, except for ESP32C2 builds.
|
||||
|
||||
*[opt-build-features]* can be any of:
|
||||
Build features | Description |
|
||||
----------------|-----------------------------------------------------------------------------------------------------------|
|
||||
@@ -132,18 +134,18 @@ noOTA/NO_OTA | Does not support OTA (Over The Air-updating of the firmware) U
|
||||
N.B. Starting ca. 2025/02/27, many ESP32 builds are *only* available with _ETH suffix, indicating that Ethernet support is enabled, to reduce the (rather high) number of builds.
|
||||
|
||||
Some example firmware names:
|
||||
Firmware name | Hardware | Included plugins |
|
||||
----------------------------------------------------------------------|-------------------------------------------------|----------------------------------|
|
||||
ESPEasy_mega-20230822_normal_ESP8266_1M.bin | ESP8266/ESP8285 with 1MB flash | Stable |
|
||||
ESPEasy_mega-20230822_normal_ESP8266_4M1M.bin | ESP8266 with 4MB flash | Stable |
|
||||
ESPEasy_mega-20230822_collection_A_ESP8266_4M1M.bin | ESP8266 with 4MB flash | Stable + Collection base + set A |
|
||||
ESPEasy_mega-20230822_normal_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable |
|
||||
ESPEasy_mega-20230822_collection_A_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable + Collection base + set A |
|
||||
ESPEasy_mega-20230822_collection_B_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable + Collection base + set B |
|
||||
ESPEasy_mega-20230822_max_ESP32s3_8M1M_LittleFS_ETH.bin | ESP32-S3 with 8MB flash, CDC-serial, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32s3_8M1M_LittleFS_OPI_PSRAM_ETH.bin | ESP32-S3 8MB flash, PSRAM, CDC-serial, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32_16M1M_ETH.bin | ESP32 with 16MB flash, SPIFFS, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32_16M8M_LittleFS_ETH.bin | ESP32 with 16MB flash, LittleFS, Ethernet | All available plugins |
|
||||
Firmware name | Hardware | Included plugins |
|
||||
--------------------------------------------------------|-------------------------------------------------|----------------------------------|
|
||||
ESPEasy_mega-20230822_normal_ESP8266_1M.bin | ESP8266/ESP8285 with 1MB flash | Stable |
|
||||
ESPEasy_mega-20230822_normal_ESP8266_4M1M.bin | ESP8266 with 4MB flash | Stable |
|
||||
ESPEasy_mega-20230822_collection_A_ESP8266_4M1M.bin | ESP8266 with 4MB flash | Stable + Collection base + set A |
|
||||
ESPEasy_mega-20230822_normal_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable |
|
||||
ESPEasy_mega-20230822_collection_A_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable + Collection base + set A |
|
||||
ESPEasy_mega-20230822_collection_B_ESP32_4M316k_ETH.bin | ESP32 with 4MB flash | Stable + Collection base + set B |
|
||||
ESPEasy_mega-20230822_max_ESP32s3_8M1M.bin | ESP32-S3 with 8MB flash, CDC-serial, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32s3_8M1M_OPI_PSRAM.bin | ESP32-S3 8MB flash, PSRAM, CDC-serial, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32_16M1M_ETH.bin | ESP32 with 16MB flash, SPIFFS, Ethernet | All available plugins |
|
||||
ESPEasy_mega-20230822_max_ESP32_16M8M.bin | ESP32 with 16MB flash, LittleFS, Ethernet | All available plugins |
|
||||
|
||||
The binary files for the different ESP32 variants (S2, C3, S3, C2, C6, Solo1, 'Classic') are available in separate archives.
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@ Generic fields
|
||||
- **Controller Port** - TCP/UDP Port number (0...65536)
|
||||
- **Enabled** - Whether or not the controller is active.
|
||||
|
||||
When **TLS** is included in the build, some of the Controllers have a setting to enable a TLS option. For HTTP-based controller protocols, this usually expects the port to adjusted from 80 to 443, but of course any custom port can be used. For MQTT controllers, the port is automatically updated from 1883 (No TLS) to 8883 when a TLS-enabled setting is selected.
|
||||
|
||||
- **Use TLS** - Select the desired TLS type. The available options depend on what's implemented, and will change when development progresses. The default setting is **No TLS**.
|
||||
|
||||
Send queue parameters
|
||||
---------------------
|
||||
|
||||
|
||||
@@ -521,6 +521,12 @@
|
||||
Added: 2023-01-15
|
||||
"
|
||||
"
|
||||
PostToHTTPS","
|
||||
:green:`Rules`","
|
||||
Like ``PostToHTTP`` but using a TLS connection, by default on port 443
|
||||
|
||||
NB: No certificate validation is done!
|
||||
"
|
||||
ProvisionConfig","
|
||||
:red:`Internal`","
|
||||
Fetch ``config.dat`` as configured in the Provisioning configuration (see Settings Archive)
|
||||
@@ -622,6 +628,12 @@
|
||||
Added: 2023-04-17
|
||||
"
|
||||
"
|
||||
PutToHTTPS","
|
||||
:green:`Rules`","
|
||||
Like ``PutToHTTP`` but using a TLS connection, by default on port 443
|
||||
|
||||
NB: No certificate validation is done!
|
||||
"
|
||||
Reboot","
|
||||
:red:`Internal`","
|
||||
Reboot the ESP
|
||||
@@ -696,6 +708,12 @@
|
||||
On completion of the command, the returned status code can be handled in a generated event, f.e. ``http#hostname=404`` for not found error, or ``http#hostname=200`` for success.
|
||||
"
|
||||
"
|
||||
SendToHTTPS","
|
||||
:green:`Rules`","
|
||||
Like ``SendToHTTP`` but using a TLS connection, by default on port 443
|
||||
|
||||
NB: No certificate validation is done!
|
||||
"
|
||||
SendToUDP","
|
||||
:green:`Rules`","
|
||||
Send command to other network device using UDP (non-ESP Easy units)
|
||||
|
||||
@@ -370,7 +370,7 @@ Command sequence explanation:
|
||||
* ``value.1``: Store value in first **Values** field.
|
||||
* ``get.str.=%value%+2``: Read a string from the code-reader, for indicated length, and including the 2 byte lengthe prefix.
|
||||
* ``eval``: Load the value to be used.
|
||||
* ``letstr.qrtxt.`{substring:1::'%value%'}``: Save the received string into a String variable named ``qrtxt``, skipping the first character, that holds the length. De actual size prefix is 2 bytes, but ``\0`` characters are ignored when reading a string, and the max. length that the reader will return is 255 characters, so the first byte is always 0 and thus skipped.
|
||||
* ``letstr.qrtxt.`{substring:1::'%value%'}```: Save the received string into a String variable named ``qrtxt``, skipping the first character, that holds the length. De actual size prefix is 2 bytes, but ``\0`` characters are ignored when reading a string, and the max. length that the reader will return is 255 characters, so the first byte is always 0 and thus skipped.
|
||||
|
||||
Additionally, for de-duplicating of reading and handling a QR code, this code can be appended to **I2C Commands 1** to reset the Size value after 10 seconds, and Rules code to handle the received text.
|
||||
|
||||
@@ -409,6 +409,69 @@ This device needs a Rule to handle the result, as we can't store string values i
|
||||
|
||||
|
|
||||
|
||||
Sensirion SDP-810 Differential pressure sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Based on this data sheet `Sensirion Differential Pressure Datasheet SDP8xx <https://sensirion.com/media/documents/90500156/6167E43B/Sensirion_Differential_Pressure_Datasheet_SDP8xx_Digital.pdf>`_
|
||||
|
||||
.. note:: The checksum available from the sensor measurements is ignored!
|
||||
|
||||
The plugin should be configured with these settings:
|
||||
|
||||
* **I2C Address (Hex)**: ``0x25`` (or ``0x26`` when the model number is SDP-8x1)
|
||||
|
||||
* **Output Data Type**: ``Temp / Baro``
|
||||
|
||||
* **Interval**: can be set to 60 seconds to retrieve a measurement every minute.
|
||||
|
||||
* **Values**: the names can be changed to Temp or Temperature and Baro or Pressure, and the number of decimals adjusted as desired (usually 1 or 2 decimals is fine for temperature, and 0 for pressure). Stats can be enabled, best would be to set the Axis to L1 for Temperature, and R1 for Pressure, as the scales don't match the same range.
|
||||
|
||||
* **I2C Init Commands** sequence for initializing the sensor:
|
||||
|
||||
``put.b.2.0x36.0x03``: Start continuous measurement.
|
||||
|
||||
* **I2C Exit Commands** sequence for shutting down the sensor:
|
||||
|
||||
``put.b.2.0x3f.0xf9``: Stop continuous measurement.
|
||||
|
||||
* **Cache-Name 1 (optional)**: Fill with a useable name, f.e. ``sdp``, so the I2C Command sequence is cached for much improved execution-performance.
|
||||
|
||||
* **I2C Commands 1**:
|
||||
|
||||
``get.b.9;eval;let.tmp.0x{substring:8:12:%h%};if.{and:%v_tmp%:0x8000}.1;let.tmp.%v_tmp%-0x10000;calc.%v_tmp%/0x{substring:14:18:%h%};value.1;let.prs.0x{substring:2:6:%h%};if.{and:%v_prs%:0x8000}.1;let.prs.%v_prs%-0x10000;calc.%v_prs%/0x{substring:14:18:%h%};value.2``
|
||||
|
||||
Command sequence explanation:
|
||||
|
||||
* ``get.b.9``: Read 9 bytes from the sensor.
|
||||
* ``eval``: Load the value to be used.
|
||||
* ``let.tmp.0x{substring:8:12:%h%}``: Assign the raw temperature to variable ``tmp``.
|
||||
* ``if.{and:%v_tmp%:0x8000}.1``: Check if positive, if so, skip next 1 command.
|
||||
* ``let.tmp.%v_tmp%-0x10000``: Subtract 65536 to get the correct negative value.
|
||||
* ``calc.%v_tmp%/0x{substring:14:18:%h%}``: Divide the raw temperature by the scale factor.
|
||||
* ``value.1``: Store the temperature in Value 1.
|
||||
* ``let.prs.0x{substring:2:6:%h%}``: Assign the raw pressure to variable ``prs``.
|
||||
* ``if.{and:%v_prs%:0x8000}.1``: Check if positive, if so, skip next 1 command.
|
||||
* ``let.prs.%v_prs%-0x10000``: Subtract 65536 to get the correct negative value.
|
||||
* ``calc.%v_prs%/0x{substring:14:18:%h%}``: Divide the raw pressure by the scale factor.
|
||||
* ``value.2``: Store the pressure in Value 2.
|
||||
|
||||
Alternative read method
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Instead of having the sensor doing continuous measurements, and returning the average value since the last read, a single measurement can be started, wait a little to complete the measurement, and read the results.
|
||||
|
||||
In this case, the **I2C Init Commands** and **I2C Exit Commands** fields must be made empty, and **I2C Commands 1** should be set to:
|
||||
|
||||
``put.b.2.0x36.0x24;delay.50;get.b.9;eval;let.tmp.0x{substring:8:12:%h%};if.{and:%v_tmp%:0x8000}.1;let.tmp.%v_tmp%-0x10000;calc.%v_tmp%/0x{substring:14:18:%h%};value.1;let.prs.0x{substring:2:6:%h%};if.{and:%v_prs%:0x8000}.1;let.prs.%v_prs%-0x10000;calc.%v_prs%/0x{substring:14:18:%h%};value.2``
|
||||
|
||||
This command sequence is nearly the same as with the Continuous measurement, except there are a few commands added *before* the values are read.
|
||||
|
||||
* ``put.b.2.0x36.0x24``: Send the command to start a single measurement.
|
||||
* ``delay.50``: Insert an asynchronous delay of 50 msec, as the sensor needs ca. 45 msec to complete a measurement. This delay does **not** block processing, as is described above.
|
||||
* The rest of the commands is already explained in the Continuous measurement description, above this paragraph.
|
||||
|
||||
|
|
||||
|
||||
Change log
|
||||
----------
|
||||
|
||||
|
||||
@@ -961,6 +961,18 @@ System Variables
|
||||
|
||||
Shows an overview of the available variables set from rules, and available ``%variable%`` variables in several categories.
|
||||
|
||||
Included Plugins
|
||||
================
|
||||
|
||||
Show a list of all plugins available in the build, Plugins, Controllers and Notifications.
|
||||
|
||||
For Devices, the plugins are listed both sorted by Description and by Plugin ID, for easier retrieval.
|
||||
|
||||
Controller plugins also show columns for MQTT and TLS (when included in the build).
|
||||
|
||||
.. image:: images/Tools_PluginList_Controllers.png
|
||||
|
||||
|
||||
|
||||
Interfaces
|
||||
**********
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
+2
-2
@@ -31,8 +31,8 @@ extra_configs =
|
||||
|
||||
|
||||
;default_envs = normal_ESP32_4M
|
||||
default_envs = max_ESP32_16M8M_LittleFS_ETH
|
||||
;default_envs = max_ESP32c5_8M1M_LittleFS_ETH
|
||||
default_envs = max_ESP32_16M8M
|
||||
;default_envs = max_ESP32c5_8M1M
|
||||
|
||||
;default_envs = normal_ESP32c6_4M316k_LittleFS_CDC
|
||||
; default_envs = custom_ESP8266_4M1M
|
||||
|
||||
@@ -168,6 +168,7 @@ extra_scripts = ${esp82xx_common.extra_scripts}
|
||||
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF54
|
||||
platform_packages =
|
||||
;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3743/framework-arduinoespressif32-all-release_v5.4-a4437683.zip
|
||||
custom_remove_include = true
|
||||
build_flags = -DESP32_STAGE
|
||||
-DESP_IDF_VERSION_MAJOR=5
|
||||
-DLIBRARIES_NO_LOG=1
|
||||
@@ -187,7 +188,7 @@ build_flags = -DESP32_STAGE
|
||||
-include "ESPEasy_config.h"
|
||||
-include "esp32x_fixes.h"
|
||||
; -Wnull-dereference
|
||||
lib_ignore =
|
||||
lib_ignore = BLE
|
||||
lib_extra_dirs =
|
||||
lib/lib_ssl
|
||||
|
||||
|
||||
+54
-54
@@ -66,7 +66,7 @@ lib_ignore = ${esp32_always.lib_ignore}
|
||||
${esp32_base_idf5.lib_ignore}
|
||||
|
||||
|
||||
[esp32_IRExt_LittleFS_ETH]
|
||||
[esp32_IRExt]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
@@ -88,21 +88,21 @@ extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
|
||||
[env:custom_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32_4M316k]
|
||||
extends = esp32_custom_base_LittleFS
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_custom_base_LittleFS.build_flags}
|
||||
-DFEATURE_ETHERNET=1
|
||||
|
||||
|
||||
[env:custom_ESP32_16M8M_LittleFS_ETH]
|
||||
extends = env:custom_ESP32_4M316k_LittleFS_ETH
|
||||
[env:custom_ESP32_16M8M]
|
||||
extends = env:custom_ESP32_4M316k
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
build_flags = ${env:custom_ESP32_4M316k_LittleFS_ETH.build_flags}
|
||||
build_flags = ${env:custom_ESP32_4M316k.build_flags}
|
||||
|
||||
|
||||
[env:custom_IR_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:custom_IR_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -115,15 +115,15 @@ extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32_IR.py
|
||||
pre:tools/pio/ir_build_check.py
|
||||
|
||||
[env:custom_ESP32_4M2M_NO_OTA_LittleFS_ETH]
|
||||
extends = env:custom_ESP32_4M316k_LittleFS_ETH
|
||||
[env:custom_ESP32_4M2M_NO_OTA]
|
||||
extends = env:custom_ESP32_4M316k
|
||||
board = esp32_4M2M
|
||||
build_flags = ${env:custom_ESP32_4M316k_LittleFS_ETH.build_flags}
|
||||
build_flags = ${env:custom_ESP32_4M316k.build_flags}
|
||||
-DNO_HTTP_UPDATER
|
||||
|
||||
|
||||
|
||||
[env:collection_A_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_A_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -132,7 +132,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_B_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_B_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -141,7 +141,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_C_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_C_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -150,7 +150,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_D_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_D_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -159,7 +159,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_E_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_E_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -168,7 +168,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_F_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_F_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -177,7 +177,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_G_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_G_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -186,7 +186,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:collection_H_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:collection_H_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -196,55 +196,55 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:collection_A_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_A_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_ESP32
|
||||
|
||||
[env:collection_B_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_B_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_B_ESP32
|
||||
|
||||
[env:collection_C_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_C_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_C_ESP32
|
||||
|
||||
[env:collection_D_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_D_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_D_ESP32
|
||||
|
||||
[env:collection_E_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_E_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_E_ESP32
|
||||
|
||||
[env:collection_F_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_F_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_F_ESP32
|
||||
|
||||
[env:collection_G_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_G_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_G_ESP32
|
||||
|
||||
[env:collection_H_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:collection_H_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_H_ESP32
|
||||
|
||||
[env:energy_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -252,7 +252,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DPLUGIN_ENERGY_COLLECTION
|
||||
|
||||
|
||||
[env:display_A_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:display_A_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -261,7 +261,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:display_B_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:display_B_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -272,7 +272,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:climate_A_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
@@ -282,7 +282,7 @@ lib_ignore = ${esp32_always.lib_ignore}
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DPLUGIN_CLIMATE_A_COLLECTION
|
||||
|
||||
[env:climate_B_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
@@ -293,7 +293,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
-DPLUGIN_CLIMATE_B_COLLECTION
|
||||
|
||||
|
||||
[env:neopixel_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:neopixel_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
@@ -304,7 +304,7 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:custom_IR_ESP32_16M8M_LittleFS_ETH]
|
||||
[env:custom_IR_ESP32_16M8M]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
@@ -320,7 +320,7 @@ extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts}
|
||||
|
||||
|
||||
|
||||
[env:normal_ESP32_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32_4M316k]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_4M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
@@ -331,10 +331,10 @@ build_flags = ${esp32_common_LittleFS_ETH.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:normal_ESP32_IRExt_4M316k_LittleFS_ETH]
|
||||
extends = esp32_IRExt_LittleFS_ETH
|
||||
[env:normal_ESP32_IRExt_4M316k]
|
||||
extends = esp32_IRExt
|
||||
board = esp32_4M
|
||||
build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
build_flags = ${esp32_IRExt.build_flags}
|
||||
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags}
|
||||
; ESP32 MAX builds 16M flash ------------------------------
|
||||
|
||||
; A Lolin D32 PRO with 16MB Flash, allowing 4MB sketch size, and file storage using LittleFS filesystem
|
||||
[env:max_ESP32_16M8M_LittleFS_ETH]
|
||||
[env:max_ESP32_16M8M]
|
||||
extends = esp32_common_LittleFS_ETH
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
@@ -359,7 +359,7 @@ extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts}
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
; If you have a board with Ethernet integrated and 16MB Flash, then this configuration could be enabled, it's based on the max_ESP32_16M8M_LittleFS definition
|
||||
; [env:max_ESP32_16M8M_LittleFS_ETH]
|
||||
; [env:max_ESP32_16M8M]
|
||||
; extends = env:max_ESP32_16M8M_LittleFS
|
||||
; board = ${env:max_ESP32_16M8M_LittleFS.board}
|
||||
; build_flags = ${env:max_ESP32_16M8M_LittleFS.build_flags}
|
||||
|
||||
@@ -16,7 +16,7 @@ build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
[env:custom_ESP32solo1_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32solo1_4M316k]
|
||||
extends = esp32_solo1_common_LittleFS
|
||||
build_flags = ${esp32_solo1_common_LittleFS.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
@@ -25,7 +25,7 @@ extra_scripts = ${esp32_solo1_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
|
||||
[env:normal_ESP32solo1_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32solo1_4M316k]
|
||||
extends = esp32_solo1_common_LittleFS
|
||||
build_flags = ${esp32_solo1_common_LittleFS.build_flags}
|
||||
-DFEATURE_ETHERNET=1
|
||||
@@ -34,21 +34,21 @@ lib_ignore = ${esp32_solo1_common_LittleFS.lib_ignore}
|
||||
extra_scripts = ${esp32_solo1_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
[env:energy_ESP32solo1_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32solo1_4M316k]
|
||||
extends = esp32_solo1_common_LittleFS
|
||||
build_flags = ${esp32_solo1_common_LittleFS.build_flags}
|
||||
-D PLUGIN_ENERGY_COLLECTION
|
||||
-DFEATURE_ETHERNET=1
|
||||
extra_scripts = ${esp32_solo1_common_LittleFS.extra_scripts}
|
||||
|
||||
[env:climate_A_ESP32solo1_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32solo1_4M316k]
|
||||
extends = esp32_solo1_common_LittleFS
|
||||
build_flags = ${esp32_solo1_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_A_COLLECTION
|
||||
-DFEATURE_ETHERNET=1
|
||||
extra_scripts = ${esp32_solo1_common_LittleFS.extra_scripts}
|
||||
|
||||
[env:climate_B_ESP32solo1_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32solo1_4M316k]
|
||||
extends = esp32_solo1_common_LittleFS
|
||||
build_flags = ${esp32_solo1_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_B_COLLECTION
|
||||
|
||||
+17
-17
@@ -13,7 +13,7 @@ lib_ignore = ${esp32_base_idf5.lib_ignore}
|
||||
board = esp32c3cdc
|
||||
|
||||
|
||||
[env:custom_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
@@ -22,99 +22,99 @@ extra_scripts = ${esp32c3_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
|
||||
[env:normal_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
lib_ignore = ${esp32c3_common_LittleFS.lib_ignore}
|
||||
${no_ir.lib_ignore}
|
||||
|
||||
[env:collection_A_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_A_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_B_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_B_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_B_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_C_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_C_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_C_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_D_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_D_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_D_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_E_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_E_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_E_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_F_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_F_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_F_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_G_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_G_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_G_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_H_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:collection_H_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_H_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:energy_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_ENERGY_COLLECTION
|
||||
|
||||
|
||||
[env:display_A_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:display_A_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_DISPLAY_A_COLLECTION
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:display_B_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:display_B_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_DISPLAY_B_COLLECTION
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:climate_A_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_A_COLLECTION
|
||||
|
||||
[env:climate_B_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_B_COLLECTION
|
||||
|
||||
[env:neopixel_ESP32c3_4M316k_LittleFS_ETH]
|
||||
[env:neopixel_ESP32c3_4M316k]
|
||||
extends = esp32c3_common_LittleFS
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DFEATURE_SD=1
|
||||
-DPLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
[env:max_ESP32c3_16M8M_LittleFS_ETH]
|
||||
[env:max_ESP32c3_16M8M]
|
||||
extends = esp32c3_common_LittleFS
|
||||
board = esp32c3cdc-16M
|
||||
build_flags = ${esp32c3_common_LittleFS.build_flags}
|
||||
|
||||
+10
-10
@@ -12,7 +12,7 @@ lib_ignore = ${esp32_base_idf5.lib_ignore}
|
||||
board = esp32c6cdc
|
||||
|
||||
|
||||
[env:custom_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
@@ -21,44 +21,44 @@ extra_scripts = ${esp32c6_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32c6.py
|
||||
|
||||
|
||||
[env:normal_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-DFEATURE_ETHERNET=1
|
||||
lib_ignore = ${esp32c6_common_LittleFS.lib_ignore}
|
||||
${no_ir.lib_ignore}
|
||||
|
||||
[env:energy_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-D PLUGIN_ENERGY_COLLECTION
|
||||
|
||||
|
||||
[env:display_A_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:display_A_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-D PLUGIN_DISPLAY_A_COLLECTION
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:display_B_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:display_B_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-D PLUGIN_DISPLAY_B_COLLECTION
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:climate_A_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_A_COLLECTION
|
||||
|
||||
[env:climate_B_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_B_COLLECTION
|
||||
|
||||
[env:neopixel_ESP32c6_4M316k_LittleFS_ETH]
|
||||
[env:neopixel_ESP32c6_4M316k]
|
||||
extends = esp32c6_common_LittleFS
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
@@ -66,7 +66,7 @@ build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
-DPLUGIN_NEOPIXEL_COLLECTION
|
||||
|
||||
|
||||
[env:max_ESP32c6_8M1M_LittleFS_ETH]
|
||||
[env:max_ESP32c6_8M1M]
|
||||
extends = esp32c6_common_LittleFS
|
||||
board = esp32c6cdc-8M
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
@@ -79,7 +79,7 @@ build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32c6_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
[env:max_ESP32c6_16M8M_LittleFS_ETH]
|
||||
[env:max_ESP32c6_16M8M]
|
||||
extends = esp32c6_common_LittleFS
|
||||
board = esp32c6cdc-16M
|
||||
build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
|
||||
+17
-17
@@ -12,7 +12,7 @@ board_build.filesystem = littlefs
|
||||
lib_ignore = ${esp32_base_idf5.lib_ignore}
|
||||
|
||||
|
||||
[env:neopixel_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:neopixel_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -22,7 +22,7 @@ build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:custom_IR_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:custom_IR_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -35,7 +35,7 @@ extra_scripts = ${esp32s2_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/ir_build_check.py
|
||||
|
||||
|
||||
[env:custom_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
lib_ignore = ${esp32s2_common_LittleFS.lib_ignore}
|
||||
@@ -48,7 +48,7 @@ extra_scripts = ${esp32s2_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
|
||||
[env:normal_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -56,56 +56,56 @@ build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
lib_ignore = ${esp32s2_common_LittleFS.lib_ignore}
|
||||
${no_ir.lib_ignore}
|
||||
|
||||
[env:collection_A_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_A_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_B_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_B_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_B_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_C_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_C_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_C_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_D_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_D_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_D_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_E_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_E_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_E_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_F_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_F_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_F_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_G_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_G_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_G_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_H_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:collection_H_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -113,13 +113,13 @@ build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:energy_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-D PLUGIN_ENERGY_COLLECTION
|
||||
|
||||
[env:display_A_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:display_A_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -127,7 +127,7 @@ build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:display_B_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:display_B_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
@@ -135,13 +135,13 @@ build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:climate_A_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_A_COLLECTION
|
||||
|
||||
[env:climate_B_ESP32s2_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32s2_4M316k]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2cdc
|
||||
build_flags = ${esp32s2_common_LittleFS.build_flags}
|
||||
|
||||
+28
-28
@@ -15,7 +15,7 @@ build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
[env:custom_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:custom_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -24,7 +24,7 @@ extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
|
||||
[env:custom_IR_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:custom_IR_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -37,7 +37,7 @@ extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/ir_build_check.py
|
||||
|
||||
|
||||
[env:normal_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:normal_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
lib_ignore = ${esp32s3_common_LittleFS.lib_ignore}
|
||||
@@ -47,56 +47,56 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DFEATURE_SD=1
|
||||
|
||||
|
||||
[env:collection_A_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_A_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_B_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_B_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_B_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_C_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_C_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_C_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_D_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_D_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_D_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_E_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_E_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_E_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_F_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_F_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_F_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_G_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_G_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DPLUGIN_SET_COLLECTION_G_ESP32
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
[env:collection_H_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:collection_H_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -104,13 +104,13 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DCOLLECTION_FEATURE_RTTTL=1
|
||||
|
||||
|
||||
[env:energy_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:energy_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_ENERGY_COLLECTION
|
||||
|
||||
[env:display_A_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:display_A_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -118,7 +118,7 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:display_B_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:display_B_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -126,20 +126,20 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
|
||||
[env:climate_A_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:climate_A_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_A_COLLECTION
|
||||
|
||||
[env:climate_B_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:climate_B_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-D PLUGIN_CLIMATE_B_COLLECTION
|
||||
|
||||
|
||||
[env:neopixel_ESP32s3_4M316k_LittleFS_ETH]
|
||||
[env:neopixel_ESP32s3_4M316k]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -149,7 +149,7 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
|
||||
|
||||
|
||||
[env:custom_ESP32s3_8M1M_LittleFS_ETH]
|
||||
[env:custom_ESP32s3_8M1M]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-8M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -159,12 +159,12 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
[env:custom_ESP32s3_8M1M_LittleFS_OPI_PSRAM_ETH]
|
||||
extends = env:custom_ESP32s3_8M1M_LittleFS_ETH
|
||||
[env:custom_ESP32s3_8M1M_OPI_PSRAM]
|
||||
extends = env:custom_ESP32s3_8M1M
|
||||
board = esp32s3cdc-qio_opi-8M
|
||||
|
||||
|
||||
[env:max_ESP32s3_8M1M_LittleFS_ETH]
|
||||
[env:max_ESP32s3_8M1M]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-8M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -176,12 +176,12 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
[env:max_ESP32s3_8M1M_LittleFS_OPI_PSRAM_ETH]
|
||||
extends = env:max_ESP32s3_8M1M_LittleFS_ETH
|
||||
[env:max_ESP32s3_8M1M_OPI_PSRAM]
|
||||
extends = env:max_ESP32s3_8M1M
|
||||
board = esp32s3cdc-qio_opi-8M
|
||||
|
||||
|
||||
[env:custom_ESP32s3_16M8M_LittleFS_ETH]
|
||||
[env:custom_ESP32s3_16M8M]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-16M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -192,12 +192,12 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
pre:tools/pio/pre_custom_esp32.py
|
||||
|
||||
[env:custom_ESP32s3_16M8M_LittleFS_OPI_PSRAM_ETH]
|
||||
extends = env:custom_ESP32s3_16M8M_LittleFS_ETH
|
||||
[env:custom_ESP32s3_16M8M_OPI_PSRAM]
|
||||
extends = env:custom_ESP32s3_16M8M
|
||||
board = esp32s3cdc-qio_opi-16M
|
||||
|
||||
|
||||
[env:max_ESP32s3_16M8M_LittleFS_ETH]
|
||||
[env:max_ESP32s3_16M8M]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-16M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
@@ -209,7 +209,7 @@ build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32s3_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
[env:max_ESP32s3_16M8M_LittleFS_OPI_PSRAM_ETH]
|
||||
[env:max_ESP32s3_16M8M_OPI_PSRAM]
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_opi-16M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
|
||||
+24
-19
@@ -27,6 +27,9 @@ bool CPlugin_001(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.usesExtCreds = true;
|
||||
proto.defaultPort = 8080;
|
||||
proto.usesID = true;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -50,9 +53,10 @@ bool CPlugin_001(CPlugin::Function function, struct EventStruct *event, String&
|
||||
|
||||
case CPlugin::Function::CPLUGIN_PROTOCOL_SEND:
|
||||
{
|
||||
if (C001_DelayHandler == nullptr || !validTaskIndex(event->TaskIndex)) {
|
||||
if ((C001_DelayHandler == nullptr) || !validTaskIndex(event->TaskIndex)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (C001_DelayHandler->queueFull(event->ControllerIndex)) {
|
||||
break;
|
||||
}
|
||||
@@ -67,8 +71,8 @@ bool CPlugin_001(CPlugin::Function function, struct EventStruct *event, String&
|
||||
if (reserve_special(url, expectedSize)) {
|
||||
url = F("/json.htm?type=command¶m=");
|
||||
|
||||
if (sensorType == Sensor_VType::SENSOR_TYPE_SWITCH ||
|
||||
sensorType == Sensor_VType::SENSOR_TYPE_DIMMER)
|
||||
if ((sensorType == Sensor_VType::SENSOR_TYPE_SWITCH) ||
|
||||
(sensorType == Sensor_VType::SENSOR_TYPE_DIMMER))
|
||||
{
|
||||
url += F("switchlight&idx=");
|
||||
url += event->idx;
|
||||
@@ -102,9 +106,10 @@ bool CPlugin_001(CPlugin::Function function, struct EventStruct *event, String&
|
||||
|
||||
constexpr unsigned size = sizeof(C001_queue_element);
|
||||
void *ptr = special_calloc(1, size);
|
||||
|
||||
|
||||
if (ptr != nullptr) {
|
||||
std::unique_ptr<C001_queue_element> element(new (ptr) C001_queue_element(event->ControllerIndex, event->TaskIndex, std::move(url)));
|
||||
std::unique_ptr<C001_queue_element> element(new (ptr) C001_queue_element(event->ControllerIndex, event->TaskIndex,
|
||||
std::move(url)));
|
||||
|
||||
success = C001_DelayHandler->addToQueue(std::move(element));
|
||||
}
|
||||
@@ -140,22 +145,22 @@ bool do_process_c001_delay_queue(cpluginID_t cpluginID, const Queue_element_base
|
||||
// *INDENT-ON*
|
||||
# ifndef BUILD_NO_DEBUG
|
||||
|
||||
if (loglevelActiveFor(LOG_LEVEL_DEBUG)) {
|
||||
addLog(LOG_LEVEL_DEBUG, element.txt);
|
||||
}
|
||||
if (loglevelActiveFor(LOG_LEVEL_DEBUG)) {
|
||||
addLog(LOG_LEVEL_DEBUG, element.txt);
|
||||
}
|
||||
# endif // ifndef BUILD_NO_DEBUG
|
||||
|
||||
int httpCode = -1;
|
||||
send_via_http(
|
||||
cpluginID,
|
||||
ControllerSettings,
|
||||
element._controller_idx,
|
||||
element.txt,
|
||||
F("GET"),
|
||||
EMPTY_STRING,
|
||||
EMPTY_STRING,
|
||||
httpCode);
|
||||
return (httpCode >= 100) && (httpCode < 300);
|
||||
int httpCode = -1;
|
||||
send_via_http(
|
||||
cpluginID,
|
||||
ControllerSettings,
|
||||
element._controller_idx,
|
||||
element.txt,
|
||||
F("GET"),
|
||||
EMPTY_STRING,
|
||||
EMPTY_STRING,
|
||||
httpCode);
|
||||
return (httpCode >= 100) && (httpCode < 300);
|
||||
}
|
||||
|
||||
#endif // ifdef USES_C001
|
||||
|
||||
@@ -23,6 +23,9 @@ bool CPlugin_004(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.usesPassword = true;
|
||||
proto.defaultPort = 80;
|
||||
proto.usesID = true;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ bool CPlugin_007(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.defaultPort = 80;
|
||||
proto.usesID = true;
|
||||
proto.usesTemplate = true;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ bool CPlugin_008(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.usesExtCreds = true;
|
||||
proto.defaultPort = 80;
|
||||
proto.usesID = true;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@ bool CPlugin_009(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.usesExtCreds = true;
|
||||
proto.usesID = false;
|
||||
proto.defaultPort = 8383;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -19,7 +19,6 @@ bool C011_sendBinary = false;
|
||||
|
||||
struct C011_ConfigStruct
|
||||
{
|
||||
|
||||
void zero_last() {
|
||||
HttpMethod[C011_HTTP_METHOD_MAX_LEN - 1] = 0;
|
||||
HttpUri[C011_HTTP_URI_MAX_LEN - 1] = 0;
|
||||
@@ -31,7 +30,6 @@ struct C011_ConfigStruct
|
||||
char HttpUri[C011_HTTP_URI_MAX_LEN] = { 0 };
|
||||
char HttpHeader[C011_HTTP_HEADER_MAX_LEN] = { 0 };
|
||||
char HttpBody[C011_HTTP_BODY_MAX_LEN] = { 0 };
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -63,6 +61,9 @@ bool CPlugin_011(CPlugin::Function function, struct EventStruct *event, String&
|
||||
proto.usesExtCreds = true;
|
||||
proto.defaultPort = 80;
|
||||
proto.usesID = false;
|
||||
# if FEATURE_HTTP_TLS
|
||||
proto.usesTLS = true;
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+96
-148
@@ -8,19 +8,24 @@
|
||||
// Original intention to control a level by opening a valve or switching a pump
|
||||
// Extended by timer based state control to support pumps with additional requirements (floor heating ciculation pump)
|
||||
|
||||
// Changelog:
|
||||
// 2025-05-21, tonhuisman: Add support for MQTT Discovery and MQTT Device Class user-configuration
|
||||
// 2024-12-14, tonhuisman: Move most defines to .h file to avoid compiler warnings, as Arduino doesn't support #ifdef in .ino files
|
||||
// Format source using Uncrustify
|
||||
// Remove unneeded includes
|
||||
// 2024-07-07, flashmark: Reworked to support floor heating pump (added state machine control)
|
||||
// 2023-03-13, tonhuisman: Add setting to invert the Output state
|
||||
// 2022-08-22, tonhuisman: Add setting to auto-save a changed setting after x minutes, size optimizations, add PCONFIG defines
|
||||
// 2021-12-29, tonhuisman: Add setting to enable/disable saving the settings when the Set Level value is changed using the config
|
||||
// command
|
||||
// 2021-12-28, tonhuisman: Avoid saving settings if no change on config command https://github.com/letscontrolit/ESPEasy/issues/3477,
|
||||
// cleanup source, prevent crashing when hysteresis is 0.0, run Uncrustify source formatter,
|
||||
// apply float/double math compare functions instead of regular comparisons
|
||||
/** Changelog:
|
||||
* 2025-11-03 tonhuisman: Unify changelog format
|
||||
* Use enum class instead of regular enum for compile-time validations
|
||||
* Replace switch by if where possible/useful for code-size reduction
|
||||
* Minor code cleanup
|
||||
* 2025-05-21 tonhuisman: Add support for MQTT Discovery and MQTT Device Class user-configuration
|
||||
* 2024-12-14 tonhuisman: Move most defines to .h file to avoid compiler warnings, as Arduino doesn't support #ifdef in .ino files
|
||||
* Format source using Uncrustify
|
||||
* Remove unneeded includes
|
||||
* 2024-07-07 flashmark: Reworked to support floor heating pump (added state machine control)
|
||||
* 2023-03-13 tonhuisman: Add setting to invert the Output state
|
||||
* 2022-08-22 tonhuisman: Add setting to auto-save a changed setting after x minutes, size optimizations, add PCONFIG defines
|
||||
* 2021-12-29 tonhuisman: Add setting to enable/disable saving the settings when the Set Level value is changed using the config
|
||||
* command
|
||||
* 2021-12-28 tonhuisman: Avoid saving settings if no change on config command https://github.com/letscontrolit/ESPEasy/issues/3477,
|
||||
* cleanup source, prevent crashing when hysteresis is 0.0, run Uncrustify source formatter,
|
||||
* apply float/double math compare functions instead of regular comparisons
|
||||
*/
|
||||
|
||||
// NOTE: Due to lack of flash memory for most ESP8266 builds the extensions are only available on a limited set of builds.
|
||||
// Code size and functionality is controlled by several build flags:
|
||||
@@ -73,26 +78,6 @@ int seconds2hours(int x) {
|
||||
|
||||
# endif // ifndef P021_MIN_BUILD_SIZE
|
||||
|
||||
// Operation modes for the control algorithm
|
||||
enum P021_opmode
|
||||
{
|
||||
P021_OPMODE_CLASSIC, // Original, stateless control
|
||||
P021_OPMODE_OFF, // Output is fully shut down, no forced curculation
|
||||
P021_OPMODE_STANDBY, // Output is only switched on for forced maintenance runs
|
||||
P021_OPMODE_ON, // Output is always switched on
|
||||
P021_OPMODE_TEMP, // Control algorithm based on temperature only
|
||||
P021_OPMODE_REMOTE // Both temperature and remote command can switch on Output
|
||||
};
|
||||
|
||||
// Control state for the control algorithm
|
||||
enum P021_control_state
|
||||
{
|
||||
P021_STATE_IDLE, // Output is inactive
|
||||
P021_STATE_ACTIVE, // Output is active due to level control (based on input value)
|
||||
P021_STATE_EXTEND, // Output is active due to minimum duration
|
||||
P021_STATE_FORCE // Output is forced active due to maximum inactive duration is exceeded
|
||||
};
|
||||
|
||||
// Static storage for global state info. Track per ESPeasy plugin instance
|
||||
static bool P021_remote[TASKS_MAX]; // Static storage for remote control.
|
||||
// Static storage for last change timestamp. Not required with extended features disabled
|
||||
@@ -149,19 +134,18 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
|
||||
case PLUGIN_SET_DEFAULTS:
|
||||
{
|
||||
P021_DONT_ALWAYS_SAVE = 1; // Do not save
|
||||
P021_GPIO_RELAY = -1; // GPIO for relay output not assigned
|
||||
P021_CHECK_TASK = -1; // No input source assigned
|
||||
P021_CHECK_VALUE = -1; // No input source assigned
|
||||
P021_SETPOINT = 25.0f; // Switch output active above 25 [deg C]
|
||||
P021_HYSTERESIS = 5.0f; // Switch off hysteresis 5 [deg C] below switch on value
|
||||
P021_MIN_TIME = 30 * 60; // Once switched on output should be active at least 30 [min]
|
||||
P021_INTERVAL_TIME = 24 * 60 * 60; // Output shall run after 24 [hour] stand still
|
||||
P021_FORCE_TIME = 5 * 30; // Forced circulation for 5 [min]
|
||||
P021_OPMODE = P021_OPMODE_OFF; // Don't touch output unless selected by operator
|
||||
P021_FLAGS = 0; // Reset all flags
|
||||
// UserVar.setFloat(event->TaskIndex, P021_VALUE_STATE, (float)P021_STATE_IDLE);
|
||||
// P021_remote[event->TaskIndex] = 0; // Remote control state is "off"
|
||||
P021_DONT_ALWAYS_SAVE = 1; // Do not save
|
||||
P021_GPIO_RELAY = -1; // GPIO for relay output not assigned
|
||||
P021_CHECK_TASK = -1; // No input source assigned
|
||||
P021_CHECK_VALUE = -1; // No input source assigned
|
||||
P021_SETPOINT = 25.0f; // Switch output active above 25 [deg C]
|
||||
P021_HYSTERESIS = 5.0f; // Switch off hysteresis 5 [deg C] below switch on value
|
||||
P021_MIN_TIME = 30 * 60; // Once switched on output should be active at least 30 [min]
|
||||
P021_INTERVAL_TIME = 24 * 60 * 60; // Output shall run after 24 [hour] stand still
|
||||
P021_FORCE_TIME = 5 * 30; // Forced circulation for 5 [min]
|
||||
// Don't touch output unless selected by operator
|
||||
P021_OPMODE = static_cast<int>(P021_opmode::P021_OPMODE_OFF);
|
||||
P021_FLAGS = 0; // Reset all flags
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -187,19 +171,19 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
# endif // if FEATURE_P021_EXTRAS >= 1
|
||||
|
||||
// For debugging purposes the webform provides some internal data
|
||||
# ifdef PLUGIN_021_DEBUG
|
||||
# if (FEATURE_P021_EXTRAS >= 1) && defined(PLUGIN_021_DEBUG)
|
||||
{
|
||||
const P021_control_state control_state = (P021_control_state)UserVar.getFloat(event->TaskIndex, P021_VALUE_STATE);
|
||||
|
||||
// Add some debug information
|
||||
const String outpstring = essentiallyZero(UserVar.getFloat(event->TaskIndex, P021_VALUE_OUTPUT)) ? F("off") : F("on");
|
||||
addFormNote(strformat(F("State= %s, Output= %s, Remote= %d, Timer= %d sec"),
|
||||
P021_printControlState(control_state),
|
||||
FsP(P021_printControlState(static_cast<int>(control_state))),
|
||||
outpstring.c_str(),
|
||||
P021_remote[event->TaskIndex],
|
||||
millis2seconds(timePassedSince(P021_timestamp[event->TaskIndex]))));
|
||||
}
|
||||
# endif // ifdef PLUGIN_021_DEBUG
|
||||
# endif // if (FEATURE_P021_EXTRAS >= 1) && defined(PLUGIN_021_DEBUG)
|
||||
|
||||
const taskIndex_t check_task = P021_CHECK_TASK; // Optimze reference
|
||||
addRowLabel(F("Input Task"));
|
||||
@@ -250,10 +234,6 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
// FormSelector with all operation mode options
|
||||
const __FlashStringHelper *options[] = { F("Classic"), F("Off"), F("Standby"), F("On"), F("Local"), F("Remote") };
|
||||
|
||||
/*
|
||||
const int optionValues[] =
|
||||
{ P021_OPMODE_CLASSIC, P021_OPMODE_OFF, P021_OPMODE_STANDBY, P021_OPMODE_ON, P021_OPMODE_TEMP, P021_OPMODE_REMOTE };
|
||||
*/
|
||||
constexpr size_t optionCount = NR_ELEMENTS(options);
|
||||
const FormSelectorOptions selector(optionCount, options /*, optionValues*/);
|
||||
selector.addFormSelector(F("Control mode"), F(P021_GUID_OPMODE), P021_OPMODE);
|
||||
@@ -388,12 +368,12 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
// Set extended parameters to backwards compatible values when extension is disabled
|
||||
if (!newExtFunct)
|
||||
{
|
||||
P021_OPMODE = P021_OPMODE_CLASSIC; // Switch to classic control algorithm
|
||||
bitWrite(flags, P021_INV_INPUT, false); // Standard input direction
|
||||
bitWrite(flags, P021_SYM_HYSTERESIS, true); // Symetrical hysteresis
|
||||
bitWrite(flags, P021_SLOW_EVAL, false); // 10Hz evaluation
|
||||
bitWrite(flags, P021_STATE_OUTP, false); // Don't provide state as value
|
||||
// Keep al other extra settings, thay should not affect CLASSIC mode
|
||||
P021_OPMODE = static_cast<int>(P021_opmode::P021_OPMODE_CLASSIC); // Switch to classic control algorithm
|
||||
bitWrite(flags, P021_INV_INPUT, false); // Standard input direction
|
||||
bitWrite(flags, P021_SYM_HYSTERESIS, true); // Symetrical hysteresis
|
||||
bitWrite(flags, P021_SLOW_EVAL, false); // 10Hz evaluation
|
||||
bitWrite(flags, P021_STATE_OUTP, false); // Don't provide state as value
|
||||
// Keep al other extra settings, they should not affect CLASSIC mode
|
||||
}
|
||||
|
||||
bitWrite(flags, P021_EXT_FUNCT, newExtFunct);
|
||||
@@ -421,7 +401,7 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
const bool isRemote = equals(command, F("remote"));
|
||||
|
||||
if (isRemote) {
|
||||
P021_remote[event->TaskIndex] = !essentiallyZero(result);
|
||||
P021_remote[event->TaskIndex] = !essentiallyZero(result); // FIXME result is always 0.0 here!?
|
||||
}
|
||||
# endif // ifndef P021_MIN_BUILD_SIZE
|
||||
|
||||
@@ -490,7 +470,7 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
|
||||
// I am not sure we want to reset the state at every init.
|
||||
// UserVar seems to be persistent
|
||||
UserVar.setFloat(event->TaskIndex, P021_VALUE_STATE, (float)P021_STATE_IDLE);
|
||||
UserVar.setFloat(event->TaskIndex, P021_VALUE_STATE, (float)P021_control_state::P021_STATE_IDLE);
|
||||
P021_remote[event->TaskIndex] = false; // Remote control state is "off"
|
||||
# if FEATURE_P021_EXTRAS >= 1
|
||||
P021_timestamp[event->TaskIndex] = millis(); // Initialize last switching time
|
||||
@@ -506,9 +486,9 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
// this case defines code to be executed when the plugin executes an action (command).
|
||||
// Commands can be accessed via rules or via http.
|
||||
// As an example, http://192.168.1.12//control?cmd=dothis
|
||||
// implies that there exists the comamnd "dothis"
|
||||
// implies that there exists the command "dothis"
|
||||
// Expected commands:
|
||||
// * levelcontrol,remote, [on|off]
|
||||
// * levelcontrol,remote, [1|0] (1=on, 0=off)
|
||||
|
||||
# if FEATURE_P021_EXTRAS >= 1
|
||||
|
||||
@@ -571,14 +551,14 @@ boolean Plugin_021(uint8_t function, struct EventStruct *event, String& string)
|
||||
# ifdef PLUGIN_021_DEBUG
|
||||
const __FlashStringHelper* P021_printControlState(int state)
|
||||
{
|
||||
switch (state)
|
||||
switch (static_cast<P021_control_state>(state))
|
||||
{
|
||||
case P021_STATE_IDLE: return F("Idle");
|
||||
case P021_STATE_ACTIVE: return F("Active");
|
||||
case P021_STATE_EXTEND: return F("Extend");
|
||||
case P021_STATE_FORCE: return F("Force");
|
||||
default: return F("***ERROR***");
|
||||
case P021_control_state::P021_STATE_IDLE: return F("Idle");
|
||||
case P021_control_state::P021_STATE_ACTIVE: return F("Active");
|
||||
case P021_control_state::P021_STATE_EXTEND: return F("Extend");
|
||||
case P021_control_state::P021_STATE_FORCE: return F("Force");
|
||||
}
|
||||
return F("");
|
||||
}
|
||||
|
||||
# endif // ifdef PLUGIN_021_DEBUG
|
||||
@@ -589,16 +569,16 @@ const __FlashStringHelper* P021_printControlState(int state)
|
||||
# ifdef PLUGIN_021_DEBUG
|
||||
const __FlashStringHelper* P021_printControlMode(int mode)
|
||||
{
|
||||
switch (mode)
|
||||
switch (static_cast<P021_opmode>(mode))
|
||||
{
|
||||
case P021_OPMODE_CLASSIC: return F("Classic");
|
||||
case P021_OPMODE_OFF: return F("Off");
|
||||
case P021_OPMODE_STANDBY: return F("Standby");
|
||||
case P021_OPMODE_ON: return F("On");
|
||||
case P021_OPMODE_TEMP: return F("Local");
|
||||
case P021_OPMODE_REMOTE: return F("Remote");
|
||||
default: return F("***ERROR***");
|
||||
case P021_opmode::P021_OPMODE_CLASSIC: return F("Classic");
|
||||
case P021_opmode::P021_OPMODE_OFF: return F("Off");
|
||||
case P021_opmode::P021_OPMODE_STANDBY: return F("Standby");
|
||||
case P021_opmode::P021_OPMODE_ON: return F("On");
|
||||
case P021_opmode::P021_OPMODE_TEMP: return F("Local");
|
||||
case P021_opmode::P021_OPMODE_REMOTE: return F("Remote");
|
||||
}
|
||||
return F("");
|
||||
}
|
||||
|
||||
# endif // ifdef PLUGIN_021_DEBUG
|
||||
@@ -666,50 +646,50 @@ void P021_evaluate(struct EventStruct *event)
|
||||
value = UserVar.getFloat(TaskIndex, P021_CHECK_VALUE);
|
||||
}
|
||||
|
||||
switch ((P021_opmode)(P021_OPMODE))
|
||||
switch (static_cast<P021_opmode>(P021_OPMODE))
|
||||
{
|
||||
// Classic (original P021) stateless control using hysteresis only
|
||||
case P021_OPMODE_CLASSIC:
|
||||
case P021_opmode::P021_OPMODE_CLASSIC:
|
||||
|
||||
if (P021_check_on(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
}
|
||||
else if (P021_check_off(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
|
||||
// Control is switched off completely
|
||||
case P021_OPMODE_OFF:
|
||||
case P021_opmode::P021_OPMODE_OFF:
|
||||
|
||||
if (old_control_state != P021_STATE_IDLE)
|
||||
if (old_control_state != P021_control_state::P021_STATE_IDLE)
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
|
||||
// Control is always on
|
||||
case P021_OPMODE_ON:
|
||||
case P021_opmode::P021_OPMODE_ON:
|
||||
|
||||
if (old_control_state == P021_STATE_IDLE)
|
||||
if (old_control_state == P021_control_state::P021_STATE_IDLE)
|
||||
{
|
||||
timestamp = millis();
|
||||
}
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
break;
|
||||
|
||||
// Control is switched off with maintnenance interval enabled
|
||||
case P021_OPMODE_STANDBY:
|
||||
case P021_opmode::P021_OPMODE_STANDBY:
|
||||
|
||||
if (old_control_state == P021_STATE_IDLE) // Output was idling
|
||||
if (old_control_state == P021_control_state::P021_STATE_IDLE) // Output was idling
|
||||
{
|
||||
if ((beyond_interval) && (P021_FORCE_TIME > 1))
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_FORCE;
|
||||
new_control_state = P021_control_state::P021_STATE_FORCE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -717,50 +697,50 @@ void P021_evaluate(struct EventStruct *event)
|
||||
else if (!beyond_force)
|
||||
{
|
||||
// Output was active shorter than the forced on time
|
||||
new_control_state = P021_STATE_FORCE; // Keep running in state FORCE
|
||||
new_control_state = P021_control_state::P021_STATE_FORCE; // Keep running in state FORCE
|
||||
}
|
||||
else
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_IDLE; // Switch off
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE; // Switch off
|
||||
}
|
||||
break;
|
||||
|
||||
// Control based on temperature and optional remote control
|
||||
case P021_OPMODE_TEMP:
|
||||
case P021_opmode::P021_OPMODE_TEMP:
|
||||
remote_state = false; // Don't look at requests from remote systems
|
||||
// Continue with shared handling, break deliberately not used
|
||||
// ----------------------------------------------------------
|
||||
case P021_OPMODE_REMOTE:
|
||||
case P021_opmode::P021_OPMODE_REMOTE:
|
||||
|
||||
switch (old_control_state)
|
||||
{
|
||||
// Output is inactive
|
||||
case P021_STATE_IDLE:
|
||||
case P021_control_state::P021_STATE_IDLE:
|
||||
|
||||
if (P021_check_on(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
// Setpoint comparator or remote request to activate the output
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
}
|
||||
else if (beyond_interval)
|
||||
{
|
||||
// Inactive for a long period, forced maintenance run
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_FORCE;
|
||||
new_control_state = P021_control_state::P021_STATE_FORCE;
|
||||
}
|
||||
break;
|
||||
|
||||
// Output is active due to setpoint comparator request
|
||||
case P021_STATE_ACTIVE:
|
||||
case P021_control_state::P021_STATE_ACTIVE:
|
||||
|
||||
if (P021_check_off(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
if ((beyond_min_time) && (!extend_at_end))
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -769,67 +749,47 @@ void P021_evaluate(struct EventStruct *event)
|
||||
{
|
||||
timestamp = millis();
|
||||
}
|
||||
new_control_state = P021_STATE_EXTEND;
|
||||
new_control_state = P021_control_state::P021_STATE_EXTEND;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// Output is active to extend a started cycle untill minimum time exceeded
|
||||
case P021_STATE_EXTEND:
|
||||
case P021_control_state::P021_STATE_EXTEND:
|
||||
|
||||
if (P021_check_on(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
}
|
||||
else if (beyond_min_time)
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
|
||||
// Output was forced active when operation mode switched to temperature control
|
||||
case P021_STATE_FORCE:
|
||||
case P021_control_state::P021_STATE_FORCE:
|
||||
|
||||
if (P021_check_on(value, setpoint, hysteresis, invert_input, symetric_hyst, remote_state))
|
||||
{
|
||||
// Keep timestamp from moment pump was swiched on
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
}
|
||||
else if (beyond_force)
|
||||
{
|
||||
timestamp = millis();
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break; // switch(opmode) case P021_OPMODE_TEMP, P021_OPMODE_REMOTE
|
||||
|
||||
// Unexpected opmode, force to OPMODE_OFF
|
||||
default:
|
||||
P021_OPMODE = P021_OPMODE_OFF;
|
||||
break;
|
||||
} // switch P021_OPMODE
|
||||
|
||||
// Calculate output state from the newly calculated control state
|
||||
switch (new_control_state)
|
||||
{
|
||||
case P021_STATE_IDLE:
|
||||
relay_output = false; // Relay output state
|
||||
break;
|
||||
case P021_STATE_ACTIVE:
|
||||
relay_output = true; // Relay output state
|
||||
break;
|
||||
case P021_STATE_EXTEND:
|
||||
relay_output = true; // Relay output state
|
||||
break;
|
||||
case P021_STATE_FORCE:
|
||||
relay_output = true; // Relay output state
|
||||
break;
|
||||
default: // unexpected state, switch pump off
|
||||
relay_output = false; // Relay output state
|
||||
break;
|
||||
}
|
||||
relay_output = (P021_control_state::P021_STATE_ACTIVE == new_control_state ||
|
||||
P021_control_state::P021_STATE_EXTEND == new_control_state ||
|
||||
P021_control_state::P021_STATE_FORCE == new_control_state);
|
||||
|
||||
relay_output ^= bitRead(P021_FLAGS, P021_INV_OUTPUT); // Invert when selected
|
||||
|
||||
@@ -845,10 +805,10 @@ void P021_evaluate(struct EventStruct *event)
|
||||
{
|
||||
addLogMove(LOG_LEVEL_DEBUG,
|
||||
strformat(F("P021: Calculated State= %s; GPIO= %d; timer= %d sec; mode= %s; value= %f; remote= %d"),
|
||||
P021_printControlState(new_control_state),
|
||||
FsP(P021_printControlState(static_cast<int>(new_control_state))),
|
||||
relay_output,
|
||||
millis2seconds(timePassedSince(timestamp)),
|
||||
P021_printControlMode((P021_opmode)P021_OPMODE),
|
||||
P021_printControlMode(P021_OPMODE),
|
||||
value,
|
||||
remote_state));
|
||||
}
|
||||
@@ -859,7 +819,6 @@ void P021_evaluate(struct EventStruct *event)
|
||||
// - The state of the internal state machine
|
||||
// - Timestamp for last change of the output signal
|
||||
// Note: the actual state of the output is not stored, it can be calculated from the control_state
|
||||
// UserVar.setFloat(event->TaskIndex, P021_VALUE_OUTPUT, (float)(((P021_control_state)new_control_state == P021_STATE_IDLE) ? 0 : 1));
|
||||
UserVar.setFloat(event->TaskIndex, P021_VALUE_OUTPUT, relay_output ? 1.0f : 0.0f);
|
||||
UserVar.setFloat(event->TaskIndex, P021_VALUE_STATE, (float)new_control_state);
|
||||
P021_timestamp[event->TaskIndex] = timestamp;
|
||||
@@ -900,29 +859,18 @@ void P021_evaluate(struct EventStruct *event)
|
||||
// All new goodies to default (backwards compatible with previous versions)
|
||||
if (P021_check_on(value, setpoint, hysteresis, false, true, false))
|
||||
{
|
||||
new_control_state = P021_STATE_ACTIVE;
|
||||
new_control_state = P021_control_state::P021_STATE_ACTIVE;
|
||||
}
|
||||
else if (P021_check_off(value, setpoint, hysteresis, false, true, false))
|
||||
{
|
||||
new_control_state = P021_STATE_IDLE;
|
||||
new_control_state = P021_control_state::P021_STATE_IDLE;
|
||||
}
|
||||
|
||||
// Calculate output state from the newly calculated control state
|
||||
switch (new_control_state)
|
||||
{
|
||||
case P021_STATE_IDLE:
|
||||
relay_output = false; // Relay output state
|
||||
break;
|
||||
case P021_STATE_ACTIVE:
|
||||
relay_output = true; // Relay output state
|
||||
break;
|
||||
default: // unexpected state, switch pump off
|
||||
relay_output = false; // Relay output state
|
||||
break;
|
||||
}
|
||||
relay_output = P021_control_state::P021_STATE_ACTIVE == new_control_state; // Simplified
|
||||
|
||||
// Actuate the output pin taking output invert flag into account
|
||||
relay_output ^= bitRead(P021_FLAGS, P021_INV_OUTPUT); // Invert when selected
|
||||
relay_output ^= bitRead(P021_FLAGS, P021_INV_OUTPUT); // Invert when selected
|
||||
|
||||
if (validGpio(P021_GPIO_RELAY))
|
||||
{
|
||||
@@ -935,7 +883,7 @@ void P021_evaluate(struct EventStruct *event)
|
||||
{
|
||||
addLogMove(LOG_LEVEL_DEBUG,
|
||||
strformat(F("P021: Calculated State= %s; GPIO= %d; value= %f"),
|
||||
P021_printControlState(new_control_state),
|
||||
FsP(P021_printControlState(static_cast<int>(new_control_state))),
|
||||
relay_output,
|
||||
value));
|
||||
}
|
||||
|
||||
+69
-19
@@ -25,7 +25,8 @@ const __FlashStringHelper* httpEmitToHTTP(struct EventStruct *event,
|
||||
const int timeout,
|
||||
const bool waitForAck,
|
||||
const bool useHeader,
|
||||
const bool useBody)
|
||||
const bool useBody,
|
||||
const bool useHttps)
|
||||
{
|
||||
if (NetworkConnected()) {
|
||||
String user, pass, host, file, path, header, postBody;
|
||||
@@ -60,12 +61,8 @@ const __FlashStringHelper* httpEmitToHTTP(struct EventStruct *event,
|
||||
port = port_arg;
|
||||
} else {
|
||||
if (loglevelActiveFor(LOG_LEVEL_ERROR)) {
|
||||
String log = logIdentifier;
|
||||
log += F(": Invalid port argument: ");
|
||||
log += port_arg;
|
||||
log += F(" will use: ");
|
||||
log += port;
|
||||
addLogMove(LOG_LEVEL_ERROR, log);
|
||||
addLogMove(LOG_LEVEL_ERROR, strformat(F("%s: Invalid port argument: %d will use: %d"),
|
||||
FsP(logIdentifier), port_arg, port));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,17 +85,19 @@ const __FlashStringHelper* httpEmitToHTTP(struct EventStruct *event,
|
||||
# ifndef BUILD_NO_DEBUG
|
||||
|
||||
if (loglevelActiveFor(LOG_LEVEL_DEBUG)) {
|
||||
String log = logIdentifier;
|
||||
log += F(": Host: ");
|
||||
log += host;
|
||||
log += F(" port: ");
|
||||
log += port;
|
||||
log += F(" path: ");
|
||||
log += path;
|
||||
addLogMove(LOG_LEVEL_DEBUG, log);
|
||||
addLogMove(LOG_LEVEL_DEBUG, strformat(F("%s: Host: %s port: %d path: %s"),
|
||||
FsP(logIdentifier), host.c_str(), port, path.c_str()));
|
||||
}
|
||||
# endif // ifndef BUILD_NO_DEBUG
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
TLS_types tlsType = TLS_types::NoTLS;
|
||||
if (useHttps) {
|
||||
tlsType = TLS_types::TLS_insecure;
|
||||
// TODO: ?Parse Line for type of TLS to use?
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
int httpCode = -1;
|
||||
send_via_http(
|
||||
logIdentifier,
|
||||
@@ -112,7 +111,11 @@ const __FlashStringHelper* httpEmitToHTTP(struct EventStruct *event,
|
||||
header,
|
||||
postBody,
|
||||
httpCode,
|
||||
waitForAck);
|
||||
waitForAck
|
||||
#if FEATURE_HTTP_TLS
|
||||
, tlsType
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
);
|
||||
|
||||
if ((httpCode >= 100) && (httpCode < 300)) {
|
||||
return return_command_success_flashstr();
|
||||
@@ -138,9 +141,26 @@ const __FlashStringHelper* Command_HTTP_SendToHTTP(struct EventStruct *event, co
|
||||
const int timeout = Settings.SendToHttp_ack()
|
||||
? CONTROLLER_CLIENTTIMEOUT_MAX : 1000;
|
||||
|
||||
return httpEmitToHTTP(event, F("SendToHTTP"), F("GET"), Line, timeout, Settings.SendToHttp_ack(), false, false);
|
||||
return httpEmitToHTTP(event, F("SendToHTTP"), F("GET"), Line, timeout, Settings.SendToHttp_ack(), false, false, false);
|
||||
}
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
|
||||
// syntax 1: SendToHttpS,<[<user>:<password>@]<host>,<port>,<path>
|
||||
// syntax 2: SendToHttpS,http://<[<user>:<password>@]<host>[:<port>]/<path>
|
||||
const __FlashStringHelper* Command_HTTP_SendToHTTPS(struct EventStruct *event, const char *Line)
|
||||
{
|
||||
// Some servers don't give an ack.
|
||||
// For these it is adviced to uncheck to wait for an acknowledgement.
|
||||
// However the default timeout of 4000 msec is then way too long
|
||||
// FIXME TD-er: Make sendToHttp timeout a setting.
|
||||
const int timeout = Settings.SendToHttp_ack()
|
||||
? CONTROLLER_CLIENTTIMEOUT_MAX : 1000;
|
||||
|
||||
return httpEmitToHTTP(event, F("SendToHTTPS"), F("GET"), Line, timeout, Settings.SendToHttp_ack(), false, false, true);
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
#endif // FEATURE_SEND_TO_HTTP
|
||||
|
||||
#if FEATURE_POST_TO_HTTP
|
||||
@@ -154,9 +174,24 @@ const __FlashStringHelper* Command_HTTP_PostToHTTP(struct EventStruct *event, co
|
||||
|
||||
// FIXME tonhuisman: make PostToHttp_ack a setting, using SendToHttp_ack for now...
|
||||
|
||||
return httpEmitToHTTP(event, F("PostToHTTP"), F("POST"), Line, timeout, Settings.SendToHttp_ack(), true, true);
|
||||
return httpEmitToHTTP(event, F("PostToHTTP"), F("POST"), Line, timeout, Settings.SendToHttp_ack(), true, true, false);
|
||||
}
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
|
||||
// syntax 1: PostToHttpS,<[<user>:<password>@]<host>,<port>,<path>,<header>,<body>
|
||||
// syntax 2: PostToHttpS,http://<[<user>:<password>@]<host>[:<port>]/<path>,<header>,<body>
|
||||
const __FlashStringHelper* Command_HTTP_PostToHTTPS(struct EventStruct *event, const char *Line)
|
||||
{
|
||||
// FIXME tonhuisman: Make postToHttp timeout a setting, now using a somewhat sensible default
|
||||
const int timeout = CONTROLLER_CLIENTTIMEOUT_MAX;
|
||||
|
||||
// FIXME tonhuisman: make PostToHttp_ack a setting, using SendToHttp_ack for now...
|
||||
|
||||
return httpEmitToHTTP(event, F("PostToHTTPS"), F("POST"), Line, timeout, Settings.SendToHttp_ack(), true, true, true);
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
#endif // if FEATURE_POST_TO_HTTP
|
||||
|
||||
#if FEATURE_PUT_TO_HTTP
|
||||
@@ -170,7 +205,22 @@ const __FlashStringHelper* Command_HTTP_PutToHTTP(struct EventStruct *event, con
|
||||
|
||||
// FIXME tonhuisman: make PutToHttp_ack a setting, using SendToHttp_ack for now...
|
||||
|
||||
return httpEmitToHTTP(event, F("PutToHTTP"), F("PUT"), Line, timeout, Settings.SendToHttp_ack(), true, true);
|
||||
return httpEmitToHTTP(event, F("PutToHTTP"), F("PUT"), Line, timeout, Settings.SendToHttp_ack(), true, true, false);
|
||||
}
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
|
||||
// syntax 1: PutToHttpS,<[<user>:<password>@]<host>,<port>,<path>,<header>,<body>
|
||||
// syntax 2: PutToHttpS,http://<[<user>:<password>@]<host>[:<port>]/<path>,<header>,<body>
|
||||
const __FlashStringHelper* Command_HTTP_PutToHTTPS(struct EventStruct *event, const char *Line)
|
||||
{
|
||||
// FIXME tonhuisman: Make putToHttp timeout a setting, now using a somewhat sensible default
|
||||
const int timeout = CONTROLLER_CLIENTTIMEOUT_MAX;
|
||||
|
||||
// FIXME tonhuisman: make PutToHttp_ack a setting, using SendToHttp_ack for now...
|
||||
|
||||
return httpEmitToHTTP(event, F("PutToHTTPS"), F("PUT"), Line, timeout, Settings.SendToHttp_ack(), true, true, true);
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
#endif // if FEATURE_PUT_TO_HTTP
|
||||
|
||||
+14
-1
@@ -11,19 +11,32 @@ const __FlashStringHelper* httpEmitToHTTP(struct EventStruct *event,
|
||||
const int timeout,
|
||||
const bool waitForAck,
|
||||
const bool useHeader,
|
||||
const bool useBody);
|
||||
const bool useBody,
|
||||
const bool useHttps);
|
||||
#endif // if FEATURE_SEND_TO_HTTP || FEATURE_POST_TO_HTTP || FEATURE_PUT_TO_HTTP
|
||||
#if FEATURE_SEND_TO_HTTP
|
||||
const __FlashStringHelper* Command_HTTP_SendToHTTP(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#if FEATURE_HTTP_TLS
|
||||
const __FlashStringHelper* Command_HTTP_SendToHTTPS(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // FEATURE_SEND_TO_HTTP
|
||||
#if FEATURE_POST_TO_HTTP
|
||||
const __FlashStringHelper* Command_HTTP_PostToHTTP(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#if FEATURE_HTTP_TLS
|
||||
const __FlashStringHelper* Command_HTTP_PostToHTTPS(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // if FEATURE_POST_TO_HTTP
|
||||
#if FEATURE_PUT_TO_HTTP
|
||||
const __FlashStringHelper* Command_HTTP_PutToHTTP(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#if FEATURE_HTTP_TLS
|
||||
const __FlashStringHelper* Command_HTTP_PutToHTTPS(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // if FEATURE_PUT_TO_HTTP
|
||||
|
||||
#endif // COMMAND_HTTP_H
|
||||
|
||||
@@ -376,6 +376,9 @@ bool InternalCommands::executeInternalCommand()
|
||||
case ESPEasy_cmd_e::password: COMMAND_CASE_R(Command_Settings_Password, 1); // Settings.h
|
||||
#if FEATURE_POST_TO_HTTP
|
||||
case ESPEasy_cmd_e::posttohttp: COMMAND_CASE_A(Command_HTTP_PostToHTTP, -1); // HTTP.h
|
||||
#if FEATURE_HTTP_TLS
|
||||
case ESPEasy_cmd_e::posttohttps: COMMAND_CASE_A(Command_HTTP_PostToHTTPS, -1); // HTTP.h
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // if FEATURE_POST_TO_HTTP
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
case ESPEasy_cmd_e::provision: COMMAND_CASE_A(Command_Provisioning_Dispatcher, -1); // Provisioning.h
|
||||
@@ -399,6 +402,9 @@ bool InternalCommands::executeInternalCommand()
|
||||
#endif // if FEATURE_MQTT
|
||||
#if FEATURE_PUT_TO_HTTP
|
||||
case ESPEasy_cmd_e::puttohttp: COMMAND_CASE_A(Command_HTTP_PutToHTTP, -1); // HTTP.h
|
||||
#if FEATURE_HTTP_TLS
|
||||
case ESPEasy_cmd_e::puttohttps: COMMAND_CASE_A(Command_HTTP_PutToHTTPS, -1); // HTTP.h
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // if FEATURE_PUT_TO_HTTP
|
||||
case ESPEasy_cmd_e::pwm: COMMAND_CASE_A(Command_GPIO_PWM, 4); // GPIO.h
|
||||
case ESPEasy_cmd_e::reboot: COMMAND_CASE_A(Command_System_Reboot, 0); // System.h
|
||||
@@ -421,6 +427,9 @@ bool InternalCommands::executeInternalCommand()
|
||||
#endif // if FEATURE_ESPEASY_P2P
|
||||
#if FEATURE_SEND_TO_HTTP
|
||||
case ESPEasy_cmd_e::sendtohttp: COMMAND_CASE_A(Command_HTTP_SendToHTTP, 3); // HTTP.h
|
||||
#if FEATURE_HTTP_TLS
|
||||
case ESPEasy_cmd_e::sendtohttps: COMMAND_CASE_A(Command_HTTP_SendToHTTPS, 3); // HTTP.h
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // FEATURE_SEND_TO_HTTP
|
||||
case ESPEasy_cmd_e::sendtoudp: COMMAND_CASE_A(Command_UDP_SendToUPD, 3); // UDP.h
|
||||
case ESPEasy_cmd_e::sendtoudpmix: COMMAND_CASE_A(Command_UDP_SendToUPDMix, 3); // UDP.h
|
||||
|
||||
@@ -167,6 +167,9 @@ const char Internal_commands_p[] PROGMEM =
|
||||
#endif // #ifdef USES_P019
|
||||
#if FEATURE_POST_TO_HTTP
|
||||
"posttohttp|"
|
||||
#if FEATURE_HTTP_TLS
|
||||
"posttohttps|"
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // #if FEATURE_POST_TO_HTTP
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
"provision|"
|
||||
@@ -188,6 +191,9 @@ const char Internal_commands_p[] PROGMEM =
|
||||
#endif // #if FEATURE_MQTT
|
||||
#if FEATURE_PUT_TO_HTTP
|
||||
"puttohttp|"
|
||||
#if FEATURE_HTTP_TLS
|
||||
"puttohttps|"
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // #if FEATURE_PUT_TO_HTTP
|
||||
"pwm|"
|
||||
;
|
||||
@@ -214,6 +220,9 @@ const char Internal_commands_s[] PROGMEM =
|
||||
#endif // #if FEATURE_ESPEASY_P2P
|
||||
#if FEATURE_SEND_TO_HTTP
|
||||
"sendtohttp|"
|
||||
#if FEATURE_HTTP_TLS
|
||||
"sendtohttps|"
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // FEATURE_SEND_TO_HTTP
|
||||
"sendtoudp|"
|
||||
"sendtoudpmix|"
|
||||
|
||||
@@ -137,6 +137,9 @@ enum class ESPEasy_cmd_e : uint8_t {
|
||||
#endif // #ifdef USES_P019
|
||||
#if FEATURE_POST_TO_HTTP
|
||||
posttohttp,
|
||||
#if FEATURE_HTTP_TLS
|
||||
posttohttps,
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // #if FEATURE_POST_TO_HTTP
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
provision,
|
||||
@@ -158,6 +161,9 @@ enum class ESPEasy_cmd_e : uint8_t {
|
||||
#endif // #if FEATURE_MQTT
|
||||
#if FEATURE_PUT_TO_HTTP
|
||||
puttohttp,
|
||||
#if FEATURE_HTTP_TLS
|
||||
puttohttps,
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // #if FEATURE_PUT_TO_HTTP
|
||||
pwm,
|
||||
|
||||
@@ -178,6 +184,9 @@ enum class ESPEasy_cmd_e : uint8_t {
|
||||
#endif // #if FEATURE_ESPEASY_P2P
|
||||
#if FEATURE_SEND_TO_HTTP
|
||||
sendtohttp,
|
||||
#if FEATURE_HTTP_TLS
|
||||
sendtohttps,
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
#endif // FEATURE_SEND_TO_HTTP
|
||||
sendtoudp,
|
||||
sendtoudpmix,
|
||||
|
||||
@@ -1221,6 +1221,7 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
#define FEATURE_MQTT_TLS 1
|
||||
#define FEATURE_EMAIL_TLS 1
|
||||
#define FEATURE_HTTP_TLS 1
|
||||
|
||||
#ifdef FEATURE_CUSTOM_PROVISIONING
|
||||
#undef FEATURE_CUSTOM_PROVISIONING
|
||||
@@ -2602,6 +2603,9 @@ To create/register a plugin, you have to :
|
||||
#ifndef FEATURE_EMAIL_TLS
|
||||
#define FEATURE_EMAIL_TLS 1
|
||||
#endif
|
||||
#ifndef FEATURE_HTTP_TLS
|
||||
#define FEATURE_HTTP_TLS 1
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_NO_DEBUG
|
||||
#undef BUILD_NO_DEBUG
|
||||
@@ -3411,7 +3415,6 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ESP8266
|
||||
// It just doesn't work on ESP8266, too slow, too high memory requirements
|
||||
//#if defined(LIMIT_BUILD_SIZE) || defined(ESP8266_1M)
|
||||
@@ -3423,9 +3426,13 @@ To create/register a plugin, you have to :
|
||||
#undef FEATURE_EMAIL_TLS
|
||||
#define FEATURE_EMAIL_TLS 0
|
||||
#endif
|
||||
#if FEATURE_HTTP_TLS
|
||||
#undef FEATURE_HTTP_TLS
|
||||
#define FEATURE_HTTP_TLS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if FEATURE_MQTT_TLS
|
||||
#if FEATURE_MQTT_TLS || FEATURE_EMAIL_TLS || FEATURE_HTTP_TLS
|
||||
#if defined(FEATURE_TLS) && !FEATURE_TLS
|
||||
#undef FEATURE_TLS
|
||||
#endif
|
||||
@@ -3435,16 +3442,6 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
|
||||
|
||||
#if FEATURE_EMAIL_TLS
|
||||
#if defined(FEATURE_TLS) && !FEATURE_TLS
|
||||
#undef FEATURE_TLS
|
||||
#endif
|
||||
#ifndef FEATURE_TLS
|
||||
#define FEATURE_TLS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(FEATURE_MQTT_DISCOVER) && FEATURE_MQTT
|
||||
#if defined(LIMIT_BUILD_SIZE) || defined(ESP8266) // Must enable this explicitly for ESP8266 Custom build
|
||||
#define FEATURE_MQTT_DISCOVER 0
|
||||
@@ -3764,6 +3761,14 @@ To create/register a plugin, you have to :
|
||||
#define FEATURE_HTTP_CLIENT 1 // Enable because required for these controllers/features
|
||||
#endif
|
||||
|
||||
#ifndef FEATURE_HTTP_TLS
|
||||
#if defined(ESP32) && (FEATURE_SEND_TO_HTTP || FEATURE_POST_TO_HTTP || FEATURE_PUT_TO_HTTP)
|
||||
#define FEATURE_HTTP_TLS 1
|
||||
#else
|
||||
#define FEATURE_HTTP_TLS 0
|
||||
#endif
|
||||
#endif // ifndef FEATURE_HTTP_TLS
|
||||
|
||||
#ifndef FEATURE_AUTO_DARK_MODE
|
||||
#ifdef LIMIT_BUILD_SIZE
|
||||
#define FEATURE_AUTO_DARK_MODE 0
|
||||
@@ -4119,6 +4124,15 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
#endif // if FEATURE_TASKVALUE_ATTRIBUTES
|
||||
|
||||
#ifndef FEATURE_PLUGIN_LIST
|
||||
#ifdef ESP32
|
||||
#define FEATURE_PLUGIN_LIST 1
|
||||
#endif
|
||||
#ifdef ESP8266
|
||||
#define FEATURE_PLUGIN_LIST 0 // Disabled by default on ESP8266
|
||||
#endif
|
||||
#endif // ifndef FEATURE_PLUGIN_LIST
|
||||
|
||||
#ifndef FEATURE_MQTT_CONNECT_BACKGROUND
|
||||
#ifdef ESP32
|
||||
#define FEATURE_MQTT_CONNECT_BACKGROUND 1
|
||||
|
||||
@@ -326,7 +326,7 @@ bool ControllerSettingsStruct::mqtt_cleanSession() const
|
||||
}
|
||||
*/
|
||||
|
||||
#if FEATURE_MQTT_TLS
|
||||
#if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
String ControllerSettingsStruct::getCertificateFilename() const
|
||||
{
|
||||
return getCertificateFilename(TLStype());
|
||||
@@ -368,4 +368,4 @@ String ControllerSettingsStruct::getCertificateFilename(TLS_types tls_type) cons
|
||||
|
||||
return certFile;
|
||||
}
|
||||
#endif
|
||||
#endif // #if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
|
||||
@@ -193,13 +193,13 @@ struct ControllerSettingsStruct
|
||||
void mqtt_retainDiscovery(bool value) { VariousBits1.mqttRetainDiscovery = value; }
|
||||
#endif
|
||||
|
||||
#if FEATURE_MQTT_TLS
|
||||
#if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
TLS_types TLStype() const { return static_cast<TLS_types>(VariousBits1.TLStype); }
|
||||
void TLStype(TLS_types tls_type) { VariousBits1.TLStype = static_cast<uint8_t>(tls_type); }
|
||||
|
||||
String getCertificateFilename() const;
|
||||
String getCertificateFilename(TLS_types tls_type) const;
|
||||
#endif
|
||||
#endif // #if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
|
||||
|
||||
bool UseDNS;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../Globals/ESPEasyEthEvent.h"
|
||||
#include "../Globals/ESPEasyWiFiEvent.h"
|
||||
#include "../Globals/ESPEasy_Scheduler.h"
|
||||
#include "../Globals/ESPEasy_time.h"
|
||||
|
||||
#ifdef USES_ESPEASY_NOW
|
||||
#include "../Globals/ESPEasy_now_handler.h"
|
||||
@@ -1353,6 +1354,17 @@ String splitURL(const String& fullURL, String& user, String& pass, String& host,
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
if ((starthost > 3) && (port == 80)) { // 'Upgrade' from port 80 to port 443 for HTTPS url
|
||||
String proto = fullURL.substring(0, starthost - 3);
|
||||
proto.toLowerCase();
|
||||
|
||||
if (equals(proto, F("https"))) {
|
||||
port = 443;
|
||||
}
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
int startfile = fullURL.lastIndexOf('/');
|
||||
|
||||
if (startfile >= 0) {
|
||||
@@ -1677,6 +1689,11 @@ int http_authenticate(const String& logIdentifier,
|
||||
return httpCode;
|
||||
}
|
||||
|
||||
# if FEATURE_HTTP_TLS
|
||||
# include <WiFiClientSecureLightBearSSL.h>
|
||||
# include "../CustomBuild/Certificate_CA.h"
|
||||
# endif // if FEATURE_HTTP_TLS
|
||||
|
||||
String send_via_http(const String& logIdentifier,
|
||||
uint16_t timeout,
|
||||
const String& user,
|
||||
@@ -1688,13 +1705,60 @@ String send_via_http(const String& logIdentifier,
|
||||
const String& header,
|
||||
const String& postStr,
|
||||
int & httpCode,
|
||||
bool must_check_reply) {
|
||||
bool must_check_reply
|
||||
#if FEATURE_HTTP_TLS
|
||||
, TLS_types tlsType
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
) {
|
||||
WiFiClient client;
|
||||
#if FEATURE_HTTP_TLS
|
||||
BearSSL::WiFiClientSecure_light *client_secure = nullptr;
|
||||
if (tlsType != TLS_types::NoTLS) {
|
||||
client_secure = new (std::nothrow) BearSSL::WiFiClientSecure_light(2048, 2048);
|
||||
if (nullptr == client_secure) {
|
||||
return F("HTTPS: Could not create TLS client, out of memory");
|
||||
}
|
||||
client_secure->setUtcTime_fcn(getUnixTime);
|
||||
client_secure->setCfgTime_fcn(get_build_unixtime);
|
||||
switch (tlsType) {
|
||||
case TLS_types::NoTLS:
|
||||
break;
|
||||
// TODO: Implement?
|
||||
// case TLS_types::TLS_PSK:
|
||||
// case TLS_types::TLS_CA_CLI_CERT:
|
||||
// break;
|
||||
case TLS_types::TLS_FINGERPRINT:
|
||||
// TODO: Implement
|
||||
addLog(LOG_LEVEL_ERROR, F("HTTPS: TLS_FINGERPRINT Not implemented yet."));
|
||||
client_secure->setInsecure();
|
||||
break;
|
||||
case TLS_types::TLS_CA_CERT:
|
||||
// TODO: Read from filesystem?
|
||||
client_secure->setTrustAnchor(Tasmota_TA, Tasmota_TA_size);
|
||||
break;
|
||||
case TLS_types::TLS_insecure:
|
||||
client_secure->setInsecure();
|
||||
break;
|
||||
}
|
||||
# ifdef MUSTFIX_CLIENT_TIMEOUT_IN_SECONDS
|
||||
|
||||
// See: https://github.com/espressif/arduino-esp32/pull/6676
|
||||
client_secure->setTimeout((timeout + 500) / 1000); // in seconds!!!!
|
||||
Client *pClient = client_secure;
|
||||
pClient->setTimeout(timeout);
|
||||
# else // ifdef MUSTFIX_CLIENT_TIMEOUT_IN_SECONDS
|
||||
client_secure->setTimeout(timeout); // in msec as it should be!
|
||||
# endif // ifdef MUSTFIX_CLIENT_TIMEOUT_IN_SECONDS
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
HTTPClient http;
|
||||
http.setReuse(false);
|
||||
|
||||
httpCode = http_authenticate(
|
||||
logIdentifier,
|
||||
#if FEATURE_HTTP_TLS
|
||||
tlsType != TLS_types::NoTLS ? *client_secure :
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
client,
|
||||
http,
|
||||
timeout,
|
||||
@@ -1718,11 +1782,19 @@ String send_via_http(const String& logIdentifier,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
http.end();
|
||||
// http.end() does not call client.stop() if it is no longer connected.
|
||||
// However the client may still keep its internal state which may prevent
|
||||
// future connections to the same host until there has been a connection to another host inbetween.
|
||||
client.stop();
|
||||
client.stop();
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
if (nullptr != client_secure) {
|
||||
client_secure->stop();
|
||||
}
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
return response;
|
||||
}
|
||||
#endif // FEATURE_HTTP_CLIENT
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
#endif // ifdef ESP32
|
||||
#endif
|
||||
|
||||
#if FEATURE_HTTP_TLS
|
||||
#include "../DataTypes/TLS_types.h"
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
|
||||
|
||||
/*********************************************************************************************\
|
||||
Syslog client
|
||||
@@ -248,7 +252,11 @@ String send_via_http(const String& logIdentifier,
|
||||
const String& header,
|
||||
const String& postStr,
|
||||
int & httpCode,
|
||||
bool must_check_reply);
|
||||
bool must_check_reply
|
||||
#if FEATURE_HTTP_TLS
|
||||
, TLS_types tlsType = TLS_types::NoTLS
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
);
|
||||
#endif // FEATURE_HTTP_CLIENT
|
||||
|
||||
#if FEATURE_DOWNLOAD
|
||||
|
||||
@@ -256,7 +256,11 @@ String send_via_http(int cpluginID,
|
||||
header,
|
||||
postStr,
|
||||
httpCode,
|
||||
ControllerSettings.MustCheckReply);
|
||||
ControllerSettings.MustCheckReply
|
||||
#if FEATURE_HTTP_TLS
|
||||
, ControllerSettings.TLStype()
|
||||
#endif // if FEATURE_HTTP_TLS
|
||||
);
|
||||
|
||||
// FIXME TD-er: Shouldn't this be: success = (httpCode >= 100) && (httpCode < 300)
|
||||
// or is reachability of the host the important factor here?
|
||||
|
||||
@@ -200,7 +200,7 @@ void addControllerParameterForm(const ControllerSettingsStruct & ControllerSett
|
||||
addFormNumericBox(displayName, internalName, ControllerSettings.Port, 1, 65535);
|
||||
break;
|
||||
}
|
||||
#if FEATURE_MQTT_TLS
|
||||
#if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
case ControllerSettingsStruct::CONTROLLER_MQTT_TLS_TYPE:
|
||||
{
|
||||
const int choice = static_cast<int>(ControllerSettings.TLStype());
|
||||
@@ -265,7 +265,7 @@ void addControllerParameterForm(const ControllerSettingsStruct & ControllerSett
|
||||
*/
|
||||
break;
|
||||
}
|
||||
#endif // if FEATURE_MQTT_TLS
|
||||
#endif // if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
case ControllerSettingsStruct::CONTROLLER_USER:
|
||||
{
|
||||
const size_t fieldMaxLength =
|
||||
@@ -454,7 +454,7 @@ void saveControllerParameterForm(ControllerSettingsStruct & ControllerSet
|
||||
case ControllerSettingsStruct::CONTROLLER_PORT:
|
||||
ControllerSettings.Port = getFormItemInt(internalName, ControllerSettings.Port);
|
||||
break;
|
||||
#if FEATURE_MQTT_TLS
|
||||
#if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
case ControllerSettingsStruct::CONTROLLER_MQTT_TLS_TYPE:
|
||||
{
|
||||
const int current = static_cast<int>(ControllerSettings.TLStype());
|
||||
@@ -492,7 +492,7 @@ void saveControllerParameterForm(ControllerSettingsStruct & ControllerSet
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif // if FEATURE_MQTT_TLS
|
||||
#endif // if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
case ControllerSettingsStruct::CONTROLLER_USER:
|
||||
setControllerUser(controllerindex, ControllerSettings, webArg(internalName));
|
||||
break;
|
||||
|
||||
@@ -87,6 +87,26 @@
|
||||
# define P021_FORCE_TIME PCONFIG_ULONG(3)
|
||||
# define P021_GUID_FORCE_TIME "f11"
|
||||
|
||||
// Operation modes for the control algorithm
|
||||
enum class P021_opmode : uint8_t
|
||||
{
|
||||
P021_OPMODE_CLASSIC, // Original, stateless control
|
||||
P021_OPMODE_OFF, // Output is fully shut down, no forced curculation
|
||||
P021_OPMODE_STANDBY, // Output is only switched on for forced maintenance runs
|
||||
P021_OPMODE_ON, // Output is always switched on
|
||||
P021_OPMODE_TEMP, // Control algorithm based on temperature only
|
||||
P021_OPMODE_REMOTE // Both temperature and remote command can switch on Output
|
||||
};
|
||||
|
||||
// Control state for the control algorithm
|
||||
enum class P021_control_state : uint8_t
|
||||
{
|
||||
P021_STATE_IDLE, // Output is inactive
|
||||
P021_STATE_ACTIVE, // Output is active due to level control (based on input value)
|
||||
P021_STATE_EXTEND, // Output is active due to minimum duration
|
||||
P021_STATE_FORCE // Output is forced active due to maximum inactive duration is exceeded
|
||||
};
|
||||
|
||||
// Positions in userVar array for the output values of this plugin
|
||||
// For now we only advertise output & state. Autosave bookkeeping is hidden and used as static storage
|
||||
# define P021_VALUE_OUTPUT 0 // Switch output, logical state [inactive/active]
|
||||
|
||||
@@ -374,13 +374,17 @@ void handle_controllers_ControllerSettingsPage(controllerIndex_t controllerindex
|
||||
if (proto.usesPort) {
|
||||
addControllerParameterForm(*ControllerSettings, controllerindex, ControllerSettingsStruct::CONTROLLER_PORT);
|
||||
}
|
||||
# if FEATURE_MQTT_TLS
|
||||
# if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
|
||||
if (proto.usesMQTT && proto.usesTLS) {
|
||||
if (proto.usesTLS) {
|
||||
addControllerParameterForm(*ControllerSettings, controllerindex, ControllerSettingsStruct::CONTROLLER_MQTT_TLS_TYPE);
|
||||
addFormNote(F("Default ports: MQTT: 1883 / MQTT TLS: 8883"));
|
||||
if (proto.usesMQTT) {
|
||||
addFormNote(F("Default ports: MQTT: 1883 / MQTT TLS: 8883"));
|
||||
} else {
|
||||
addFormNote(F("Default ports: HTTP: 80 / HTTPS: 443"));
|
||||
}
|
||||
}
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
# endif // if FEATURE_MQTT_TLS || FEATURE_HTTP_TLS
|
||||
# ifdef USES_ESPEASY_NOW
|
||||
|
||||
if (proto.usesMQTT) {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "../WebServer/Markup_Buttons.h"
|
||||
#include "../WebServer/Markup_Forms.h"
|
||||
#include "../WebServer/NotificationPage.h"
|
||||
#include "../WebServer/PluginListPage.h"
|
||||
#include "../WebServer/PinStates.h"
|
||||
#include "../WebServer/RootPage.h"
|
||||
#include "../WebServer/Rules.h"
|
||||
@@ -299,6 +300,9 @@ void WebServerInit()
|
||||
#ifdef WEBSERVER_SYSVARS
|
||||
web_server.on(F("/sysvars"), handle_sysvars);
|
||||
#endif // WEBSERVER_SYSVARS
|
||||
#if FEATURE_PLUGIN_LIST
|
||||
web_server.on(F("/pluginlist"), handle_pluginlist);
|
||||
#endif // if FEATURE_PLUGIN_LIST
|
||||
#ifdef WEBSERVER_TIMINGSTATS
|
||||
web_server.on(F("/timingstats"), handle_timingstats);
|
||||
#endif // WEBSERVER_TIMINGSTATS
|
||||
@@ -678,54 +682,34 @@ void json_prop(LabelType::Enum label) {
|
||||
// Add a task select dropdown list
|
||||
// This allows to select a task index based on the existing tasks.
|
||||
// ********************************************************************************
|
||||
void addTaskSelect(const String& name, taskIndex_t choice, const String& cssclass)
|
||||
void addTaskSelect(const String& name, taskIndex_t choice, const __FlashStringHelper* cssclass)
|
||||
{
|
||||
String deviceName;
|
||||
|
||||
addHtml(F("<select "));
|
||||
addHtmlAttribute(F("id"), F("selectwidth"));
|
||||
addHtmlAttribute(F("name"), name);
|
||||
|
||||
if (!cssclass.isEmpty()) {
|
||||
addHtmlAttribute(F("class"), cssclass);
|
||||
}
|
||||
addHtmlAttribute(F("onchange"), F("return task_select_onchange(frmselect)"));
|
||||
addHtml('>');
|
||||
String deviceNr;
|
||||
String options[TASKS_MAX + 1];
|
||||
String attrs[TASKS_MAX + 1];
|
||||
|
||||
for (taskIndex_t x = 0; x <= TASKS_MAX; x++)
|
||||
{
|
||||
deviceNr.clear();
|
||||
if (validTaskIndex(x)) {
|
||||
const deviceIndex_t DeviceIndex = getDeviceIndex_from_TaskIndex(x);
|
||||
deviceName = getPluginNameFromDeviceIndex(DeviceIndex);
|
||||
deviceNr += (x + 1);
|
||||
} else {
|
||||
deviceName = F("Not Set");
|
||||
}
|
||||
{
|
||||
addHtml(F("<option value='"));
|
||||
addHtmlInt(x);
|
||||
addHtml('\'');
|
||||
|
||||
if (choice == x) {
|
||||
addHtml(F(" selected"));
|
||||
}
|
||||
}
|
||||
|
||||
if (validTaskIndex(x) && !validPluginID_fullcheck(Settings.getPluginID_for_task(x))) {
|
||||
addDisabled();
|
||||
}
|
||||
{
|
||||
addHtml('>');
|
||||
|
||||
if (validTaskIndex(x)) {
|
||||
addHtmlInt(x + 1);
|
||||
}
|
||||
addHtml(F(" - "));
|
||||
addHtml(deviceName);
|
||||
addHtml(F(" - "));
|
||||
addHtml(getTaskDeviceName(x));
|
||||
addHtml(F("</option>"));
|
||||
attrs[x] = F("disabled");
|
||||
}
|
||||
options[x] = strformat(F("%s - %s - %s"), deviceNr.c_str(), deviceName.c_str(), getTaskDeviceName(x).c_str());
|
||||
}
|
||||
|
||||
FormSelectorOptions selector(TASKS_MAX + 1, options, nullptr, attrs);
|
||||
selector.reloadonchange = true;
|
||||
selector.classname = cssclass;
|
||||
selector.addSelector(name, choice);
|
||||
}
|
||||
|
||||
// ********************************************************************************
|
||||
|
||||
@@ -110,7 +110,7 @@ void json_prop(LabelType::Enum label);
|
||||
// ********************************************************************************
|
||||
void addTaskSelect(const String& name,
|
||||
taskIndex_t choice,
|
||||
const String& cssclass = "wide");
|
||||
const __FlashStringHelper* cssclass = F("wide"));
|
||||
|
||||
// ********************************************************************************
|
||||
// Add a Value select dropdown list, based on TaskIndex
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
#include "../WebServer/PluginListPage.h"
|
||||
|
||||
|
||||
#if FEATURE_PLUGIN_LIST
|
||||
|
||||
# include "../WebServer/ESPEasy_WebServer.h"
|
||||
# include "../WebServer/HTML_wrappers.h"
|
||||
|
||||
# include "../_Plugin_Helper.h"
|
||||
# if FEATURE_NOTIFIER
|
||||
# include "../Globals/NPlugins.h"
|
||||
# include "../DataTypes/NPluginID.h"
|
||||
# endif // if FEATURE_NOTIFIER
|
||||
# ifdef WEBSERVER_NETWORK
|
||||
# include "../ESPEasy/net/DataTypes/NetworkDriverIndex.h"
|
||||
# endif
|
||||
|
||||
void handle_pluginlist() {
|
||||
# ifndef BUILD_NO_RAM_TRACKER
|
||||
checkRAM(F("handle_pluginlist"));
|
||||
# endif // ifndef BUILD_NO_RAM_TRACKER
|
||||
|
||||
# if FEATURE_MQTT_TLS // TODO Add check for FEATURE_HTTP_TLS when https://github.com/letscontrolit/ESPEasy/pull/5402 is merged
|
||||
const int colspan = 6;
|
||||
# else // if FEATURE_MQTT_TLS
|
||||
const int colspan = 5;
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
|
||||
TXBuffer.startStream();
|
||||
sendHeadandTail_stdtemplate(_HEAD);
|
||||
|
||||
// the table header
|
||||
html_table_class_normal();
|
||||
|
||||
for (uint8_t p = 0; p < 2; ++p) { // Sorted by Description and by PluginID
|
||||
addTableSeparator(concat(F("Plugins sorted by "), 0 == p ? F("Description") : F("Plugin ID")), colspan, 3);
|
||||
html_TR();
|
||||
html_table_header(F("Plugin"), 80);
|
||||
html_table_header(F(""), 25);
|
||||
html_table_header(F("Description"), 800);
|
||||
html_table_header(F(""), 50);
|
||||
# if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""), 50);
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""));
|
||||
|
||||
deviceIndex_t x;
|
||||
bool done = false;
|
||||
|
||||
while (!done) {
|
||||
const deviceIndex_t deviceIndex = (0 == p) ? getDeviceIndex_sorted(x) : x;
|
||||
|
||||
if (!validDeviceIndex(deviceIndex)) {
|
||||
done = true;
|
||||
} else {
|
||||
const pluginID_t pluginID = getPluginID_from_DeviceIndex(deviceIndex);
|
||||
|
||||
if (validPluginID(pluginID)) {
|
||||
html_TR_TD();
|
||||
addHtml(get_formatted_Plugin_number(pluginID));
|
||||
html_TD();
|
||||
addRTDPluginButton(pluginID);
|
||||
html_TD();
|
||||
addHtml(getPluginNameFromDeviceIndex(deviceIndex));
|
||||
html_TD();
|
||||
}
|
||||
}
|
||||
++x;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
addTableSeparator(F("Controllers"), colspan, 3);
|
||||
html_TR();
|
||||
html_table_header(F("Controller"), 80);
|
||||
html_table_header(F(""), 25);
|
||||
html_table_header(F("Description"), 800);
|
||||
html_table_header(F("MQTT"), 50);
|
||||
# if FEATURE_MQTT_TLS
|
||||
html_table_header(F("TLS"), 50);
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""));
|
||||
protocolIndex_t x;
|
||||
bool done = false;
|
||||
|
||||
while (!done) {
|
||||
if (!validProtocolIndex(x)) {
|
||||
done = true;
|
||||
} else {
|
||||
const cpluginID_t cpluginID = getCPluginID_from_ProtocolIndex(x);
|
||||
const ProtocolStruct& proto = getProtocolStruct(x);
|
||||
|
||||
if (validCPluginID(cpluginID)) {
|
||||
html_TR_TD();
|
||||
addHtml(get_formatted_Controller_number(cpluginID));
|
||||
html_TD();
|
||||
# ifndef LIMIT_BUILD_SIZE
|
||||
addRTDControllerButton(cpluginID);
|
||||
# endif // ifndef LIMIT_BUILD_SIZE
|
||||
html_TD();
|
||||
addHtml(getCPluginNameFromProtocolIndex(x));
|
||||
|
||||
html_TD();
|
||||
|
||||
if (proto.usesMQTT) {
|
||||
addEnabled(true);
|
||||
}
|
||||
# if FEATURE_MQTT_TLS
|
||||
|
||||
html_TD();
|
||||
|
||||
if (proto.usesTLS) {
|
||||
addEnabled(true);
|
||||
}
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
html_TD();
|
||||
}
|
||||
}
|
||||
++x;
|
||||
}
|
||||
}
|
||||
|
||||
# if FEATURE_NOTIFIER
|
||||
{
|
||||
addTableSeparator(F("Notifications"), colspan, 3);
|
||||
html_TR();
|
||||
html_table_header(F("Notifier"), 80);
|
||||
html_table_header(F(""), 25);
|
||||
html_table_header(F("Description"), 800);
|
||||
html_table_header(F(""), 50);
|
||||
# if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""), 50);
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""));
|
||||
|
||||
for (uint8_t x = 0; x <= notificationCount; x++)
|
||||
{
|
||||
html_TR_TD();
|
||||
const npluginID_t plugin(Notification[x].Number);
|
||||
addHtml(plugin.toDisplayString());
|
||||
html_TD();
|
||||
addRTDHelpButton(strformat(F("Notify/%s.html"), plugin.toDisplayString().c_str()));
|
||||
html_TD();
|
||||
String NotificationName;
|
||||
NPlugin_ptr[x](NPlugin::Function::NPLUGIN_GET_DEVICENAME, 0, NotificationName);
|
||||
addHtml(NotificationName);
|
||||
html_TD();
|
||||
}
|
||||
}
|
||||
# endif // if FEATURE_NOTIFIER
|
||||
|
||||
# ifdef WEBSERVER_NETWORK
|
||||
{
|
||||
addTableSeparator(F("Networks"), colspan, 3);
|
||||
html_TR();
|
||||
html_table_header(F("Network"), 80);
|
||||
html_table_header(F(""), 25);
|
||||
html_table_header(F("Description"), 800);
|
||||
html_table_header(F(""), 50);
|
||||
# if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""), 50);
|
||||
# endif // if FEATURE_MQTT_TLS
|
||||
html_table_header(F(""));
|
||||
|
||||
ESPEasy::net::networkDriverIndex_t tmpNetworkDriverIndex{};
|
||||
|
||||
while (validNetworkDriverIndex(tmpNetworkDriverIndex))
|
||||
{
|
||||
html_TR_TD();
|
||||
const ESPEasy::net::nwpluginID_t number = getNWPluginID_from_NetworkDriverIndex(tmpNetworkDriverIndex);
|
||||
addHtml(number.toDisplayString());
|
||||
html_TD();
|
||||
# ifndef LIMIT_BUILD_SIZE
|
||||
addRTDNetworkDriverButton(number);
|
||||
# endif // ifndef LIMIT_BUILD_SIZE
|
||||
html_TD();
|
||||
addHtml(getNWPluginNameFromNetworkDriverIndex(tmpNetworkDriverIndex));
|
||||
html_TD();
|
||||
++tmpNetworkDriverIndex;
|
||||
}
|
||||
|
||||
}
|
||||
# endif // ifdef WEBSERVER_NETWORK
|
||||
|
||||
html_end_table();
|
||||
html_end_form();
|
||||
sendHeadandTail_stdtemplate(_TAIL);
|
||||
TXBuffer.endStream();
|
||||
}
|
||||
|
||||
#endif // if FEATURE_PLUGIN_LIST
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "../WebServer/common.h"
|
||||
|
||||
#if FEATURE_PLUGIN_LIST
|
||||
|
||||
|
||||
// ********************************************************************************
|
||||
// Web Interface List all included plugins.
|
||||
// ********************************************************************************
|
||||
void handle_pluginlist();
|
||||
|
||||
#endif // if FEATURE_PLUGIN_LIST
|
||||
@@ -94,6 +94,10 @@ void handle_tools() {
|
||||
addWideButtonPlusDescription(F("sysvars"), F("System Variables"), F("Show all system variables and conversions"));
|
||||
# endif // ifdef WEBSERVER_SYSVARS
|
||||
|
||||
#if FEATURE_PLUGIN_LIST
|
||||
addWideButtonPlusDescription(F("pluginlist"), F("Included Plugins"), F("Show all plugins that are included in this build"));
|
||||
#endif // if FEATURE_PLUGIN_LIST
|
||||
|
||||
addFormSubHeader(F("Wifi"));
|
||||
|
||||
addWideButtonPlusDescription(F("/?cmd=wificonnect"), F("Connect"), F("Connects to known Wifi network"));
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ var commonAtoms = ["And", "Or"];
|
||||
var commonKeywords = ["If", "Else", "Elseif", "Endif"];
|
||||
var commonCommands = ["AccessInfo", "Background", "Build", "ClearAccessBlock", "ClearRTCam", "Config", "ControllerDisable",
|
||||
"ControllerEnable", "DateTime", "Debug", "Dec", "DeepSleep", "DisablePriorityTask", "DNS", "DST", "EraseSDKWiFi", "ExecuteRules", "FactoryReset", "Gateway", "I2Cscanner", "Inc",
|
||||
"IP", "Let", "LetStr", "Load", "LogEntry", "LogPortStatus", "LoopTimerSet", "LoopTimerSet_ms", "LoopTimerSetAndRun", "LoopTimerSetAndRun_ms", "MemInfo", "MemInfoDetail", "Name", "Password", "PostToHTTP", "Publish", "PublishR",
|
||||
"Reboot", "Save", "SendTo", "SendToHTTP", "SendToUDP", "SendToUDPMix", "Settings", "Subnet", "Subscribe", "TaskClear", "TaskClearAll",
|
||||
"IP", "Let", "LetStr", "Load", "LogEntry", "LogPortStatus", "LoopTimerSet", "LoopTimerSet_ms", "LoopTimerSetAndRun", "LoopTimerSetAndRun_ms", "MemInfo", "MemInfoDetail", "Name", "Password", "PostToHTTP", "PostToHTTPS", "Publish", "PublishR",
|
||||
"PutToHTTP", "PutToHTTPS", "Reboot", "Save", "SendTo", "SendToHTTP", "SendToHTTPS", "SendToUDP", "SendToUDPMix", "Settings", "Subnet", "Subscribe", "TaskClear", "TaskClearAll",
|
||||
"TaskDisable", "TaskEnable", "TaskRun", "TaskValueSet", "TaskValueSetAndRun", "TaskValueSetDerived", "TaskValueSetPresentation", "TimerPause", "TimerResume", "TimerSet", "TimerSet_ms", "TimeZone",
|
||||
"UdpPort", "UdpTest", "Unit", "UseNTP", "WdConfig", "WdRead", "WiFi", "WiFiAllowAP", "WiFiAPMode", "WiFiConnect", "WiFiDisconnect", "WiFiKey",
|
||||
"WiFiKey2", "WiFiMode", "WiFiScan", "WiFiSSID", "WiFiSSID2", "WiFiSTAMode",
|
||||
|
||||
Vendored
+8
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user