mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-20 12:57:17 +00:00
Compare commits
192 Commits
developmen
...
v12.1.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e71235ea3a | ||
![]() |
930e659915 | ||
![]() |
8d52722941 | ||
![]() |
ca10e7b909 | ||
![]() |
806c5762bc | ||
![]() |
f5b2216361 | ||
![]() |
dfa2c25c03 | ||
![]() |
eed11319ac | ||
![]() |
e5310ad6e5 | ||
![]() |
9eb42b41d0 | ||
![]() |
4074d82ac7 | ||
![]() |
dc1605f96a | ||
![]() |
4ff60deafc | ||
![]() |
24757be59e | ||
![]() |
b44a87a3d8 | ||
![]() |
7bc7be56ee | ||
![]() |
fa03edbeb4 | ||
![]() |
c9cd367e53 | ||
![]() |
1cdd2be008 | ||
![]() |
d157b1c5e0 | ||
![]() |
ffc2352cd6 | ||
![]() |
41f7580210 | ||
![]() |
6e2592fe02 | ||
![]() |
0b25206f90 | ||
![]() |
4f2a59d27d | ||
![]() |
0cbc1681d2 | ||
![]() |
00227a45c6 | ||
![]() |
e8988e4b31 | ||
![]() |
64ea803ef1 | ||
![]() |
078fb0ea3a | ||
![]() |
efc2f54610 | ||
![]() |
942ebe1cf4 | ||
![]() |
c22d936f8c | ||
![]() |
a955827db9 | ||
![]() |
f09d6b5452 | ||
![]() |
9dd05501a8 | ||
![]() |
5254a26145 | ||
![]() |
02659ff1a5 | ||
![]() |
50f0101e59 | ||
![]() |
1ee598cefd | ||
![]() |
0c22b69bd0 | ||
![]() |
5057314977 | ||
![]() |
71c146ab35 | ||
![]() |
e5d576b507 | ||
![]() |
329d76346f | ||
![]() |
6d5227ba75 | ||
![]() |
0ccf7de945 | ||
![]() |
8c4ab12e9a | ||
![]() |
6decedbb31 | ||
![]() |
8d61740a9f | ||
![]() |
388db0e795 | ||
![]() |
d696c00d3f | ||
![]() |
1e3bc9f8be | ||
![]() |
b3a1fa99f2 | ||
![]() |
d7847061b9 | ||
![]() |
e2a8e39646 | ||
![]() |
9482079573 | ||
![]() |
f100430125 | ||
![]() |
c1d61c9eb0 | ||
![]() |
e96ce2f637 | ||
![]() |
838ab4f553 | ||
![]() |
cbc74ab873 | ||
![]() |
92994455c4 | ||
![]() |
1fe0160ef6 | ||
![]() |
15b75422b5 | ||
![]() |
1b40bfb336 | ||
![]() |
aacb37ecfc | ||
![]() |
9ac9e0460a | ||
![]() |
6f03368c85 | ||
![]() |
330a12efe4 | ||
![]() |
fab0cd88c2 | ||
![]() |
ed23cd8d95 | ||
![]() |
7defc325f1 | ||
![]() |
30cbc1b1e5 | ||
![]() |
61adb53da6 | ||
![]() |
9e008008c3 | ||
![]() |
f5d1594a6b | ||
![]() |
80d72ecbf5 | ||
![]() |
0150c9e809 | ||
![]() |
7e532a87f9 | ||
![]() |
4052903810 | ||
![]() |
04c1262bc2 | ||
![]() |
851c839c53 | ||
![]() |
c88152c14e | ||
![]() |
08fa219a88 | ||
![]() |
adbb5f8d53 | ||
![]() |
71268e5aae | ||
![]() |
9f21938c2c | ||
![]() |
ebb998ea06 | ||
![]() |
e6e00c80cc | ||
![]() |
7e3b7ddc69 | ||
![]() |
31c6075a84 | ||
![]() |
92c0eb000f | ||
![]() |
3f7071c6b9 | ||
![]() |
cabe894933 | ||
![]() |
b6f283d8d8 | ||
![]() |
5e3c1b6415 | ||
![]() |
96d4e60680 | ||
![]() |
488edab49c | ||
![]() |
45cd73940d | ||
![]() |
25033908cd | ||
![]() |
b75520cde9 | ||
![]() |
3374990115 | ||
![]() |
2b34c6843a | ||
![]() |
e7a27893b3 | ||
![]() |
d37b9db08d | ||
![]() |
c74c0d9d10 | ||
![]() |
4cc0f05cb1 | ||
![]() |
ec14623169 | ||
![]() |
dc73b67a61 | ||
![]() |
fa0e8867af | ||
![]() |
6afb2767f7 | ||
![]() |
6cb9b3ce80 | ||
![]() |
39f31d8cdf | ||
![]() |
e1d44b9dfa | ||
![]() |
0c36bcb25c | ||
![]() |
0489d3fc9a | ||
![]() |
3ba19e1552 | ||
![]() |
08ec5cecda | ||
![]() |
0d505baa0e | ||
![]() |
fd6a9fdc90 | ||
![]() |
386dbbd878 | ||
![]() |
797f82dc27 | ||
![]() |
c09f966f41 | ||
![]() |
829397f4ed | ||
![]() |
198ec55473 | ||
![]() |
1c24df6df8 | ||
![]() |
83f76e2432 | ||
![]() |
fa8a6bc0e5 | ||
![]() |
603f08291a | ||
![]() |
ae793c8f2d | ||
![]() |
556156f73f | ||
![]() |
e035bdb71f | ||
![]() |
16ffdb6f49 | ||
![]() |
76decfaa43 | ||
![]() |
b369e87385 | ||
![]() |
4f92d4984f | ||
![]() |
68f8ea6f39 | ||
![]() |
1838c582b3 | ||
![]() |
8255468f9c | ||
![]() |
e217ab49d9 | ||
![]() |
a73b2d1e09 | ||
![]() |
584ae41cb7 | ||
![]() |
e076b50dfc | ||
![]() |
e1df24be17 | ||
![]() |
b1782f32ca | ||
![]() |
61d6a1240b | ||
![]() |
c987f4357e | ||
![]() |
ed50401812 | ||
![]() |
ec4bc1fb98 | ||
![]() |
4c906a794a | ||
![]() |
20d545e873 | ||
![]() |
e84bbe9e64 | ||
![]() |
43b0831cb2 | ||
![]() |
92766df1a5 | ||
![]() |
8bac4981ea | ||
![]() |
a89f208da0 | ||
![]() |
3041f9dccb | ||
![]() |
fe3f705448 | ||
![]() |
33a44f7a39 | ||
![]() |
efd4a6b542 | ||
![]() |
69765f5706 | ||
![]() |
3195ce7b14 | ||
![]() |
b59a8a7966 | ||
![]() |
da704f4ecb | ||
![]() |
f14f1d7798 | ||
![]() |
99feefba84 | ||
![]() |
9a3307a73f | ||
![]() |
5b3d673dea | ||
![]() |
fddc15db70 | ||
![]() |
04263f3969 | ||
![]() |
e66f17c6bb | ||
![]() |
f10257fd29 | ||
![]() |
ae2c50cbe4 | ||
![]() |
c6b02fb1e1 | ||
![]() |
b5fb079228 | ||
![]() |
7e5f3aa006 | ||
![]() |
0fa559d143 | ||
![]() |
f2f8b5efa9 | ||
![]() |
11d37cc15b | ||
![]() |
99b15fe056 | ||
![]() |
19836d1136 | ||
![]() |
3e4975831a | ||
![]() |
cc8ae7c7a7 | ||
![]() |
10f2d17a5a | ||
![]() |
1198246572 | ||
![]() |
7138ddd80a | ||
![]() |
27bcc29421 | ||
![]() |
4c7283c292 | ||
![]() |
257f3d2808 | ||
![]() |
5e4c5f67e6 | ||
![]() |
4dab991d09 |
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -15,9 +15,3 @@
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
|
||||
# No changes for zip files
|
||||
*.zip binary
|
||||
*.autoconf binary
|
||||
*.bin binary
|
||||
*.tapp binary
|
||||
|
1
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
1
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@ -32,7 +32,6 @@ _Make sure your have performed every step and checked the applicable boxes befor
|
||||
- [ ] Searched the problem in [discussions](https://github.com/arendst/Tasmota/discussions)
|
||||
- [ ] Searched the problem in the [docs](https://tasmota.github.io/docs/FAQ)
|
||||
- [ ] Searched the problem in the [chat](https://discord.gg/Ks2Kzd4)
|
||||
- [ ] Problem is not scripter related, in this case open a discussion and tag gemu2015
|
||||
- [ ] Device used (e.g., Sonoff Basic): _____
|
||||
- [ ] Tasmota binary firmware version number used: _____
|
||||
- [ ] Pre-compiled
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -6,8 +6,8 @@
|
||||
- [ ] The pull request is done against the latest development branch
|
||||
- [ ] Only relevant files were touched
|
||||
- [ ] Only one feature/fix was added per PR and the code change compiles without warnings
|
||||
- [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.8
|
||||
- [ ] The code change is tested and works with Tasmota core ESP32 V.3.1.3.250411
|
||||
- [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
|
||||
- [ ] The code change is tested and works with Tasmota core ESP32 V.2.0.4.1
|
||||
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).
|
||||
|
||||
_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_
|
||||
|
305
.github/workflows/Tasmota_build_devel.yml
vendored
305
.github/workflows/Tasmota_build_devel.yml
vendored
@ -1,13 +1,12 @@
|
||||
|
||||
name: Build_development
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Start a workflow
|
||||
workflow_dispatch: # Manually start a workflow
|
||||
push:
|
||||
branches: development
|
||||
paths-ignore:
|
||||
- '.github/**' # Ignore changes towards the .github directory
|
||||
- '**.md' # Do no build if *.md files changes
|
||||
- '.github/**' # Ignore changes towards the .github directory
|
||||
- '**.md' # Do no build if *.md files changes
|
||||
|
||||
# Ensures that only one deploy task per branch/environment will run at a time.
|
||||
concurrency:
|
||||
@ -15,120 +14,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
be_solidify:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota' && github.ref_name == 'development'
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Make Berry and Solidify code
|
||||
run: |
|
||||
cd lib/libesp32/berry
|
||||
make
|
||||
cd ../berry_tasmota
|
||||
../berry/berry -s -g solidify_all.be
|
||||
cd ../berry_matter
|
||||
../berry/berry -s -g solidify_all.be
|
||||
cd ../berry_animate
|
||||
../berry/berry -s -g solidify_all.be
|
||||
cd ../../libesp32_lvgl/lv_binding_berry
|
||||
../../libesp32/berry/berry -s -g solidify_all.be
|
||||
cd ../lv_haspmota
|
||||
../../libesp32/berry/berry -s -g solidify_all.be
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: berry
|
||||
path: |
|
||||
./lib/libesp32/berry_tasmota/src/solidify
|
||||
./lib/libesp32/berry_matter/src/solidify
|
||||
./lib/libesp32/berry_animate/src/solidify
|
||||
./lib/libesp32_lvgl/lv_binding_berry/src/solidify
|
||||
./lib/libesp32_lvgl/lv_haspmota/src/solidify
|
||||
./lib/libesp32/berry/generate
|
||||
|
||||
push_solidified:
|
||||
needs: be_solidify
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota' && github.ref_name == 'development'
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: berry
|
||||
path: berry
|
||||
- name: Move solidified Berry files back
|
||||
run: |
|
||||
ls -R ./berry
|
||||
mv berry/berry/libesp32/berry_tasmota/src/solidify/* ./lib/libesp32/berry_tasmota/src/solidify
|
||||
mv berry/berry/libesp32/berry_matter/src/solidify/* ./lib/libesp32/berry_matter/src/solidify
|
||||
mv berry/berry/libesp32/berry_animate/src/solidify/* ./lib/libesp32/berry_animate/src/solidify
|
||||
mv berry/berry/libesp32_lvgl/lv_binding_berry/src/solidify/* ./lib/libesp32_lvgl/lv_binding_berry/src/solidify
|
||||
mv berry/berry/libesp32_lvgl/lv_haspmota/src/solidify/* ./lib/libesp32_lvgl/lv_haspmota/src/solidify
|
||||
mv berry/berry/libesp32/berry/generate/* ./lib/libesp32/berry/generate
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Solidified Code updated
|
||||
|
||||
safeboot-images:
|
||||
needs: push_solidified
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32-safeboot
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32c2-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3ser-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3ser-safeboot
|
||||
- tasmota32c6-safeboot
|
||||
- tasmota32c6ser-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Add SHA to footer
|
||||
run: |
|
||||
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
|
||||
SHA=${COMMIT_SHA_LONG::7}
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
#- name: Use esp32-solo1 safeboot for esp32 too
|
||||
#run: |
|
||||
#cp ./build_output/firmware/tasmota32solo1-safeboot.bin ./build_output/firmware/tasmota32-safeboot.bin
|
||||
- name: Upload safeboot firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
base-images:
|
||||
needs: push_solidified
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
@ -136,7 +22,7 @@ jobs:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota
|
||||
- tasmota-4M
|
||||
- tasmota4M
|
||||
- tasmota-minimal
|
||||
- tasmota-display
|
||||
- tasmota-ir
|
||||
@ -145,39 +31,6 @@ jobs:
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota-zigbee
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Add SHA to footer
|
||||
run: |
|
||||
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
|
||||
SHA=${COMMIT_SHA_LONG::7}
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
base32-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32
|
||||
- tasmota32-zbbrdgpro
|
||||
- tasmota32-webcam
|
||||
@ -186,99 +39,137 @@ jobs:
|
||||
- tasmota32-display
|
||||
- tasmota32-ir
|
||||
- tasmota32-lvgl
|
||||
- tasmota32c2
|
||||
- tasmota32c3
|
||||
- tasmota32c6
|
||||
- tasmota32c3cdc
|
||||
- tasmota32s2
|
||||
- tasmota32s2cdc
|
||||
- tasmota32s3
|
||||
- tasmota32s3cdc
|
||||
- tasmota32solo1
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3cdc-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3cdc-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: tasmota32*
|
||||
path: ./temp
|
||||
- name: Move safeboot files
|
||||
run: |
|
||||
mkdir -p ./firmware/firmware
|
||||
find ./temp -type f -exec cp -t ./firmware/firmware {} +
|
||||
- name: Add SHA to footer
|
||||
run: |
|
||||
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
|
||||
SHA=${COMMIT_SHA_LONG::7}
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant: [ tasmota, tasmota32 ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, LT, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: tasmota32*
|
||||
path: ./temp
|
||||
- name: Move safeboot files
|
||||
run: |
|
||||
mkdir -p ./firmware/firmware
|
||||
find ./temp -type f -exec cp -t ./firmware/firmware {} +
|
||||
- name: Add SHA to footer
|
||||
run: |
|
||||
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
|
||||
SHA=${COMMIT_SHA_LONG::7}
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- name: Upload language firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.variant }}-${{ matrix.language }}
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
Upload:
|
||||
needs: [base-images, language-images]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: firmware
|
||||
path: ./mv_firmware
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
working-directory: ./mv_firmware
|
||||
- name: Move firmware files in sub-folders
|
||||
run: |
|
||||
mkdir -p ./firmware/tasmota/languages
|
||||
mkdir -p ./firmware/tasmota32/languages
|
||||
mkdir -p ./firmware/map
|
||||
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./firmware/map/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ] || mv ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-nspanel.* ] || mv ./mv_firmware/firmware/tasmota32-nspanel.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32s2*.* ] || mv ./mv_firmware/firmware/tasmota32s2*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32s3*.* ] || mv ./mv_firmware/firmware/tasmota32s3*.* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-safeboot* ] || mv ./mv_firmware/firmware/tasmota32-safeboot* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-* ] || mv ./mv_firmware/firmware/tasmota32-* ./firmware/tasmota32/languages/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin ] || rm -rf ./mv_firmware/firmware/tasmota-minimal.bin
|
||||
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./firmware/tasmota/languages/
|
||||
- name: Display files to transfer
|
||||
run: ls -R ./*
|
||||
- name: Push Firmware files to tmp_copy repo
|
||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source_file: 'firmware'
|
||||
destination_repo: 'arendst/tmp_copy'
|
||||
destination_branch: 'firmware'
|
||||
user_email: 'github-actions@github.com'
|
||||
user_name: 'github-actions'
|
||||
|
||||
Start_final_copy:
|
||||
needs: [base-images, base32-images, language-images]
|
||||
needs: Upload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch workflow in arendst/Tasmota-firmware
|
||||
- uses: actions/checkout@v3
|
||||
- name: Creat trigger.txt
|
||||
run: |
|
||||
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
|
||||
-H 'Accept: application/vnd.github.everest-preview+json' \
|
||||
-u ${{ secrets.API_TOKEN_GITHUB }} \
|
||||
--data '{"ref": "gh_actions"}'
|
||||
echo ${GITHUB_SHA} &> trigger.txt
|
||||
echo "$(<trigger.txt)"
|
||||
- name: Push trigger.txt to start workflow copy in tmp repo
|
||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source_file: 'trigger.txt'
|
||||
destination_repo: 'arendst/tmp_copy'
|
||||
destination_branch: 'action-development'
|
||||
user_email: 'github-actions@github.com'
|
||||
user_name: 'github-actions'
|
||||
|
417
.github/workflows/Tasmota_build_master.yml
vendored
417
.github/workflows/Tasmota_build_master.yml
vendored
@ -1,234 +1,183 @@
|
||||
name: Build_firmware_master
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Start a workflow
|
||||
push:
|
||||
branches: master
|
||||
paths-ignore:
|
||||
- '.github/**' # Ignore changes towards the .github directory
|
||||
- '**.md' # Do no build if *.md files changes
|
||||
|
||||
# Ensures that only one deploy task per branch/environment will run at a time.
|
||||
concurrency:
|
||||
group: environment-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
safeboot-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32-safeboot
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32c2-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3ser-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3ser-safeboot
|
||||
- tasmota32c6-safeboot
|
||||
- tasmota32c6ser-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Add "release" to footer
|
||||
run: |
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload safeboot firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
base-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota
|
||||
- tasmota-4M
|
||||
- tasmota-minimal
|
||||
- tasmota-display
|
||||
- tasmota-ir
|
||||
- tasmota-knx
|
||||
- tasmota-lite
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota-zigbee
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Add "release" to footer
|
||||
run: |
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
base32-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32
|
||||
- tasmota32-zbbrdgpro
|
||||
- tasmota32-webcam
|
||||
- tasmota32-bluetooth
|
||||
- tasmota32-nspanel
|
||||
- tasmota32-display
|
||||
- tasmota32-ir
|
||||
- tasmota32-lvgl
|
||||
- tasmota32c2
|
||||
- tasmota32c3
|
||||
- tasmota32c6
|
||||
- tasmota32s2
|
||||
- tasmota32s2cdc
|
||||
- tasmota32s3
|
||||
- tasmota32solo1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: tasmota32*
|
||||
path: ./temp
|
||||
- name: Move safeboot files
|
||||
run: |
|
||||
mkdir -p ./firmware/firmware
|
||||
find ./temp -type f -exec cp -t ./firmware/firmware {} +
|
||||
- name: Add "release" to footer
|
||||
run: |
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant: [ tasmota, tasmota32 ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, LT, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: tasmota32*
|
||||
path: ./temp
|
||||
- name: Move safeboot files
|
||||
run: |
|
||||
mkdir -p ./firmware/firmware
|
||||
find ./temp -type f -exec cp -t ./firmware/firmware {} +
|
||||
- name: Add "release" to footer
|
||||
run: |
|
||||
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- name: Upload language firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}-${{ matrix.language }}
|
||||
path: ./build_output
|
||||
|
||||
Release:
|
||||
needs: [base-images, base32-images, language-images]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download all Tasmota artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: tasmota*
|
||||
path: ./temp
|
||||
- name: Move files
|
||||
run: |
|
||||
mkdir -p ./release
|
||||
find ./temp -type f -exec cp -t ./release {} +
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R ./release/
|
||||
- name: Release
|
||||
uses: jason2866/action-gh-release@v1.2
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
tag_name: ${{ github.run_number }}
|
||||
files: |
|
||||
./release/tasmota*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Start_final_copy:
|
||||
needs: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch workflow in arendst/Tasmota-firmware
|
||||
run: |
|
||||
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
|
||||
-H 'Accept: application/vnd.github.everest-preview+json' \
|
||||
-u ${{ secrets.API_TOKEN_GITHUB }} \
|
||||
--data '{"ref": "gh_actions"}'
|
||||
name: Build_firmware_master
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths-ignore:
|
||||
- '.github/**' # Ignore changes towards the .github directory
|
||||
- '**.md' # Do no build if *.md files changes
|
||||
|
||||
# Ensures that only one deploy task per branch/environment will run at a time.
|
||||
concurrency:
|
||||
group: environment-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
base-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota
|
||||
- tasmota4M
|
||||
- tasmota-minimal
|
||||
- tasmota-display
|
||||
- tasmota-ir
|
||||
- tasmota-knx
|
||||
- tasmota-lite
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota-zigbee
|
||||
- tasmota32
|
||||
- tasmota32-zbbrdgpro
|
||||
- tasmota32-webcam
|
||||
- tasmota32-bluetooth
|
||||
- tasmota32-nspanel
|
||||
- tasmota32-display
|
||||
- tasmota32-ir
|
||||
- tasmota32-lvgl
|
||||
- tasmota32c3
|
||||
- tasmota32c3cdc
|
||||
- tasmota32s2
|
||||
- tasmota32s2cdc
|
||||
- tasmota32s3
|
||||
- tasmota32s3cdc
|
||||
- tasmota32solo1
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3cdc-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3cdc-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant: [ tasmota, tasmota32 ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
Upload:
|
||||
needs: [base-images, language-images]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: firmware
|
||||
path: ./mv_firmware
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R ./mv_firmware/
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
tag_name: ${{ github.run_number }}
|
||||
files: ./mv_firmware/firmware/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Move firmware files in sub-folders
|
||||
run: |
|
||||
mkdir -p ./release-firmware/tasmota/languages
|
||||
mkdir -p ./release-firmware/tasmota32/languages
|
||||
mkdir -p ./release-firmware/map
|
||||
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./release-firmware/map/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./release-firmware/tasmota/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ] || mv ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-nspanel.* ] || mv ./mv_firmware/firmware/tasmota32-nspanel.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32s2*.* ] || mv ./mv_firmware/firmware/tasmota32s2*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32s3*.* ] || mv ./mv_firmware/firmware/tasmota32s3*.* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-safeboot* ] || mv ./mv_firmware/firmware/tasmota32-safeboot* ./release-firmware/tasmota32/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32-* ] || mv ./mv_firmware/firmware/tasmota32-* ./release-firmware/tasmota32/languages/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./release-firmware/tasmota32/languages/
|
||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin ] || rm -rf ./mv_firmware/firmware/tasmota-minimal.bin
|
||||
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./release-firmware/tasmota/languages/
|
||||
- name: Display files to transfer
|
||||
run: ls -R ./*
|
||||
- name: Push Firmware files to tmp_copy repo
|
||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source_file: 'release-firmware'
|
||||
destination_repo: 'arendst/tmp_copy'
|
||||
destination_branch: 'firmware'
|
||||
user_email: 'github-actions@github.com'
|
||||
user_name: 'github-actions'
|
||||
|
||||
Start_final_copy:
|
||||
needs: Upload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Creat trigger.txt
|
||||
run: |
|
||||
echo ${GITHUB_SHA} &> trigger.txt
|
||||
echo "$(<trigger.txt)"
|
||||
- name: Push trigger.txt to start workflow copy in tmp repo
|
||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source_file: 'trigger.txt'
|
||||
destination_repo: 'arendst/tmp_copy'
|
||||
destination_branch: 'action-master'
|
||||
user_email: 'github-actions@github.com'
|
||||
user_name: 'github-actions'
|
||||
|
111
.github/workflows/build_all_the_things.yml
vendored
111
.github/workflows/build_all_the_things.yml
vendored
@ -7,7 +7,6 @@ on:
|
||||
paths:
|
||||
- '**.c'
|
||||
- '**.cpp'
|
||||
- '**.be'
|
||||
- '**.h'
|
||||
- '**.hpp'
|
||||
- '**.ino'
|
||||
@ -18,71 +17,14 @@ on:
|
||||
- '.github/workflows/build_all_the_things.yml'
|
||||
|
||||
jobs:
|
||||
os-check-win:
|
||||
runs-on: windows-2019
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32-webcam
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
#python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
#platformio upgrade --dev
|
||||
#platformio update
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
os-check-mac:
|
||||
runs-on: macos-14
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32solo1-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
#python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
#platformio upgrade --dev
|
||||
#platformio update
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
path: ./build_output
|
||||
|
||||
base-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota
|
||||
- tasmota-4M
|
||||
- tasmota4M
|
||||
- tasmota-display
|
||||
- tasmota-ir
|
||||
- tasmota-knx
|
||||
@ -90,73 +32,68 @@ jobs:
|
||||
- tasmota-minimal
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota32
|
||||
- tasmota32solo1
|
||||
- tasmota32c2
|
||||
- tasmota32c3
|
||||
- tasmota32c6
|
||||
- tasmota32s2
|
||||
- tasmota32s2cdc
|
||||
- tasmota32s3
|
||||
- tasmota32-zbbrdgpro
|
||||
- tasmota-zigbee
|
||||
- tasmota32
|
||||
- tasmota32-webcam
|
||||
- tasmota32-bluetooth
|
||||
- tasmota32-core2
|
||||
- tasmota32-nspanel
|
||||
- tasmota32-display
|
||||
- tasmota32-ir
|
||||
- tasmota32-lvgl
|
||||
- tasmota32c3
|
||||
- tasmota32c3cdc
|
||||
- tasmota32s2
|
||||
- tasmota32s2cdc
|
||||
- tasmota32s3
|
||||
- tasmota32s3cdc
|
||||
- tasmota32solo1
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3cdc-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32c2-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c6-safeboot
|
||||
- tasmota32s3cdc-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
uses: actions/setup-python@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
#python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
#platformio upgrade --dev
|
||||
#platformio update
|
||||
cp ./platformio_override_sample.ini ./platformio_override.ini
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.variant }}
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
variant: [ tasmota ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, LT, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
uses: actions/setup-python@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
#python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
#platformio upgrade --dev
|
||||
#platformio update
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.variant }}-${{ matrix.language }}
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
2
.github/workflows/copy_change.yml
vendored
2
.github/workflows/copy_change.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Push I2CDevices.md to https://github.com/Tasmota/docs
|
||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
|
61
.github/workflows/pr_comment.yml.off
vendored
61
.github/workflows/pr_comment.yml.off
vendored
@ -1,61 +0,0 @@
|
||||
name: Comment on pull request
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Tasmota CI]
|
||||
types: [completed]
|
||||
jobs:
|
||||
pr_comment:
|
||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
# This snippet is public-domain, taken from
|
||||
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
|
||||
script: |
|
||||
async function upsertComment(owner, repo, issue_number, purpose, body) {
|
||||
const {data: comments} = await github.rest.issues.listComments(
|
||||
{owner, repo, issue_number});
|
||||
|
||||
const marker = `<!-- bot: ${purpose} -->`;
|
||||
body = marker + "\n" + body;
|
||||
|
||||
const existing = comments.filter((c) => c.body.includes(marker));
|
||||
if (existing.length > 0) {
|
||||
const last = existing[existing.length - 1];
|
||||
core.info(`Updating comment ${last.id}`);
|
||||
await github.rest.issues.updateComment({
|
||||
owner, repo,
|
||||
body,
|
||||
comment_id: last.id,
|
||||
});
|
||||
} else {
|
||||
core.info(`Creating a comment in issue / PR #${issue_number}`);
|
||||
await github.rest.issues.createComment({issue_number, body, owner, repo});
|
||||
}
|
||||
}
|
||||
|
||||
const {owner, repo} = context.repo;
|
||||
const run_id = ${{github.event.workflow_run.id}};
|
||||
|
||||
const pull_requests = ${{ toJSON(github.event.workflow_run.pull_requests) }};
|
||||
if (!pull_requests.length) {
|
||||
return core.error("This workflow doesn't match any pull requests!");
|
||||
}
|
||||
|
||||
const artifacts = await github.paginate(
|
||||
github.rest.actions.listWorkflowRunArtifacts, {owner, repo, run_id});
|
||||
if (!artifacts.length) {
|
||||
return core.error(`No artifacts found`);
|
||||
}
|
||||
let body = `Download the artifacts for this pull request:\n`;
|
||||
for (const art of artifacts) {
|
||||
body += `\n* [${art.name}.zip](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
|
||||
}
|
||||
|
||||
core.info("Review thread message body:", body);
|
||||
|
||||
for (const pr of pull_requests) {
|
||||
await upsertComment(owner, repo, pr.number,
|
||||
"nightly-link", body);
|
||||
}
|
2
.github/workflows/stale-actions.yml
vendored
2
.github/workflows/stale-actions.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v3.0.15
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 25
|
||||
|
22
.gitignore
vendored
22
.gitignore
vendored
@ -8,25 +8,16 @@
|
||||
*.o
|
||||
*.gcno
|
||||
*.gcda
|
||||
dependencies.lock
|
||||
|
||||
## Project files ######
|
||||
managed_components
|
||||
.platformio
|
||||
.pio
|
||||
.clang_complete
|
||||
.gcc-flags.json
|
||||
.cache
|
||||
.dummy
|
||||
sdkconfig.*
|
||||
data
|
||||
unpacked_fs
|
||||
unpacked_boards
|
||||
tasmota/user_config_override.h
|
||||
tasmota/include/local_ca_data.h
|
||||
tasmota/include/local_ca_descriptor.h
|
||||
variants
|
||||
variants3
|
||||
build
|
||||
build_output/*
|
||||
firmware.map
|
||||
@ -34,24 +25,11 @@ firmware.asm
|
||||
tasmota/tasmota.ino.cpp
|
||||
platformio_override.ini
|
||||
platformio_tasmota_cenv.ini
|
||||
platformio_tasmota_user_env.ini
|
||||
platformio_tasmota_core3_env.ini
|
||||
lib/libesp32/berry/generate/*
|
||||
lib/libesp32/berry/berry
|
||||
|
||||
## Visual Studio Code specific ######
|
||||
.vscode
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/settings.json
|
||||
.vscode/extensions.json
|
||||
*.bak
|
||||
*.code-workspace
|
||||
|
||||
## IntelliJ ######
|
||||
.idea
|
||||
|
||||
## Python virtual environments for Platformio ##
|
||||
venv
|
||||
.venv
|
||||
|
4
.gitpod.Dockerfile
vendored
4
.gitpod.Dockerfile
vendored
@ -1,3 +1,3 @@
|
||||
FROM gitpod/workspace-python-3.11
|
||||
|
||||
FROM gitpod/workspace-full
|
||||
|
||||
USER gitpod
|
||||
|
@ -1,9 +1,11 @@
|
||||
tasks:
|
||||
- command: pip install -U platformio && pip install --upgrade pip && platformio run -t clean -e tasmota
|
||||
- command: pip3 install -U platformio && platformio run -e tasmota
|
||||
|
||||
image:
|
||||
file: .gitpod.Dockerfile
|
||||
|
||||
vscode:
|
||||
extensions:
|
||||
- Atishay-Jain.All-Autocomplete
|
||||
- esbenp.prettier-vscode
|
||||
- shardulm94.trailing-spaces
|
||||
|
10
.vscode/extensions.json
vendored
10
.vscode/extensions.json
vendored
@ -1,10 +0,0 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
74
.vscode/settings.json
vendored
74
.vscode/settings.json
vendored
@ -1,74 +0,0 @@
|
||||
{
|
||||
"platformio-ide.toolbar": [
|
||||
{
|
||||
"text": "$(home)",
|
||||
"tooltip": "PlatformIO: Home",
|
||||
"commands": "platformio-ide.showHome"
|
||||
},
|
||||
{
|
||||
"text": "$(trash)",
|
||||
"tooltip": "PlatformIO: Clean",
|
||||
"commands": "platformio-ide.clean"
|
||||
},
|
||||
{
|
||||
"text": "$(check)",
|
||||
"tooltip": "PlatformIO: Build",
|
||||
"commands": "platformio-ide.build"
|
||||
},
|
||||
{
|
||||
"text": "Upload",
|
||||
"tooltip": "PlatformIO: Flash firmware (NO build run)",
|
||||
"commands": [
|
||||
{
|
||||
"id": "platformio-ide.runPIOCoreCommand",
|
||||
"args": "pio run -t nobuild -t factory_flash -e ${command:platformio-ide.activeEnvironment}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "$(zap)",
|
||||
"tooltip": "PlatformIO: Build and Upload",
|
||||
"commands": "platformio-ide.upload"
|
||||
},
|
||||
{
|
||||
"text": "$(flame)",
|
||||
"tooltip": "PlatformIO: Build, Erase and Upload",
|
||||
"commands": [
|
||||
{
|
||||
"id": "platformio-ide.runPIOCoreCommand",
|
||||
"args": "pio run -t erase_upload -e ${command:platformio-ide.activeEnvironment}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "$(error)",
|
||||
"tooltip": "PlatformIO: Erase Flash",
|
||||
"commands": [
|
||||
{
|
||||
"id": "platformio-ide.runPIOCoreCommand",
|
||||
"args": "pio run -t nobuild -t erase -e ${command:platformio-ide.activeEnvironment}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "$(arrow-right)",
|
||||
"tooltip": "PlatformIO: Build, Upload and Monitor",
|
||||
"commands": "platformio-ide.uploadAndMonitor"
|
||||
},
|
||||
{
|
||||
"text": "$(device-desktop)",
|
||||
"tooltip": "PlatformIO: Serial Monitor",
|
||||
"commands": "platformio-ide.serialMonitor"
|
||||
},
|
||||
{
|
||||
"text": "$(terminal)",
|
||||
"tooltip": "PlatformIO: New Terminal",
|
||||
"commands": "platformio-ide.newTerminal"
|
||||
},
|
||||
{
|
||||
"text": "$(refresh)",
|
||||
"tooltip": "PlatformIO: Rebuild IntelliSense Index",
|
||||
"commands": "platformio-ide.rebuildProjectIndex"
|
||||
}
|
||||
]
|
||||
}
|
28
API.md
28
API.md
@ -1,7 +1,4 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./tools/logo/TASMOTA_FullLogo_Vector_White.svg">
|
||||
<img alt="Logo" src="./tools/logo/TASMOTA_FullLogo_Vector.svg" align="right" height="76">
|
||||
</picture>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Basic API information
|
||||
|
||||
@ -17,24 +14,20 @@ Callback Id | Bool | xdrv | xsns | xnrg | xlgt | Description
|
||||
----------------------------|------|------|------|------|------|----------------------------------
|
||||
FUNC_SETTINGS_OVERRIDE | | x | | | | Override start-up settings
|
||||
FUNC_PIN_STATE | x | 1 | 2 | | | At GPIO configuration
|
||||
FUNC_I2C_INIT | | x | | | | Immediately after I2C init
|
||||
FUNC_MODULE_INIT | x | 3 | 1 | | 2 | Init module specific parameters
|
||||
FUNC_PRE_INIT | | 1 | 3 | 2 | | Once GPIO have been established
|
||||
FUNC_INIT | | 1 | 3 | 2 | | At end of initialisation
|
||||
FUNC_LOOP | | 1 | 2 | | | In main loop
|
||||
FUNC_SLEEP_LOOP | | 1 | 2 | | | In main loop during sleep
|
||||
FUNC_EVERY_50_MSECOND | | 1 | 2 | | | In main loop
|
||||
FUNC_EVERY_100_MSECOND | | 1 | 2 | | | In main loop
|
||||
FUNC_EVERY_200_MSECOND | | | | x | | In main loop
|
||||
FUNC_EVERY_250_MSECOND | | 1 | 3 | 2 | | In main loop
|
||||
FUNC_EVERY_SECOND | | 1 | 2 | | | In main loop
|
||||
FUNC_SAVE_SETTINGS | | 2 | 1 | | | Just before saving settings
|
||||
FUNC_EVERY_50_MSECOND | | 1 | 2 | | |
|
||||
FUNC_EVERY_100_MSECOND | | 1 | 2 | | |
|
||||
FUNC_EVERY_200_MSECOND | | | | x | |
|
||||
FUNC_EVERY_250_MSECOND | | 1 | 3 | 2 | |
|
||||
FUNC_EVERY_SECOND | | 1 | 2 | | |
|
||||
FUNC_SAVE_AT_MIDNIGHT | | | x | | | At midnight
|
||||
FUNC_SAVE_BEFORE_RESTART | | 2 | 1 | | | Just before a planned restart
|
||||
FUNC_AFTER_TELEPERIOD | | 2 | 1 | | | At end of teleperiod
|
||||
FUNC_JSON_APPEND | | 2 | 1 | 3 | | Extend teleperiod JSON text
|
||||
FUNC_WEB_SENSOR | | 2 | 1 | 3 | | Add sensor data to web GUI
|
||||
FUNC_WEB_COL_SENSOR | | 2 | 1 | 3 | | Add sensor data to web GUI using columns
|
||||
FUNC_COMMAND | x | 1 | 2 | 3 | 4 | When a command is not recognized
|
||||
FUNC_COMMAND_DRIVER | x | x | | | | When command Driver\<id\> is executed
|
||||
FUNC_COMMAND_SENSOR | x | | x | | | When command Sensor\<id\> is executed
|
||||
@ -45,28 +38,19 @@ FUNC_SET_POWER | | 1 | 2 | | | Before setting
|
||||
FUNC_SET_DEVICE_POWER | x | x | | | | Set relay
|
||||
FUNC_SHOW_SENSOR | | x | | | | When FUNC_JSON_APPEND completes
|
||||
FUNC_ANY_KEY | | x | | | |
|
||||
FUNC_LED_LINK | | x | | | | SetLedLink (On ESP32 only). XdrvMailbox.index holds state
|
||||
FUNC_ENERGY_EVERY_SECOND | | | | x | |
|
||||
FUNC_ENERGY_RESET | | | | x | |
|
||||
FUNC_RULES_PROCESS | x | x | | | | Process specific rule
|
||||
FUNC_TELEPERIOD_RULES_PROCESS | x | x | | | | Process specific rule as teleperiod
|
||||
FUNC_SERIAL | x | 1 | | 2 | 3 | Process serial data
|
||||
FUNC_FREE_MEM | | x | | | | Show free memory for debugging
|
||||
FUNC_BUTTON_PRESSED | x | x | | | | When a button is pressed
|
||||
FUNC_BUTTON_MULTI_PRESSED | x | x | | | | When a button is pressed multiple times
|
||||
FUNC_WEB_ADD_BUTTON | | 1 | 2 | | | Add a Configuration Button to GUI
|
||||
FUNC_WEB_ADD_MAIN_BUTTON | | 1 | 2 | | | Add a main button to GUI
|
||||
FUNC_WEB_ADD_CONSOLE_BUTTON | | 1 | 2 | | | Add a Consoles Button to GUI
|
||||
FUNC_WEB_ADD_MANAGEMENT_BUTTON | | x | | | | Add a Management Button to GUI
|
||||
FUNC_WEB_ADD_HANDLER | | 1 | 2 | | | Add a webserver handler
|
||||
FUNC_WEB_GET_ARG | | 2 | 1 | | 3 | Get webserver setting arguments
|
||||
FUNC_SET_CHANNELS | | 2 | | | 1 |
|
||||
FUNC_SET_SCHEME | | | | | x |
|
||||
FUNC_HOTPLUG_SCAN | | | x | | |
|
||||
FUNC_TIME_SYNCED | | x | | | | Report time is synced
|
||||
FUNC_DEVICE_GROUP_ITEM | | x | | | |
|
||||
FUNC_NETWORK_UP | | 1 | 2 | 3 | 4 | Wifi or ETH network just went up (received even if webserver is not enabled)
|
||||
FUNC_NETWORK_DOWN | | 1 | 2 | 3 | 4 | Wifi or ETH network just went down (received even if webserver is not enabled)
|
||||
|
||||
The numbers represent the sequence of execution
|
||||
|
||||
|
546
BUILDS.md
546
BUILDS.md
@ -1,303 +1,255 @@
|
||||
## Available Features and Sensors
|
||||
|
||||
l = lite, t = tasmota (ESP8266 / ESP32), k = knx, s = sensors, i = ir, d = display
|
||||
ESP8266 / ESP32
|
||||
|
||||
Note: the `minimal` variant is not listed as it shouldn't be used outside of the [upgrading](https://tasmota.github.io/docs/Upgrading/) process.
|
||||
l = lite, t = tasmota, k = knx, s = sensors, i = ir, d = display
|
||||
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| ------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | --------------------------- |
|
||||
| MY_LANGUAGE en_GB | x | x / x | x | x | x | x |
|
||||
| USE_IMPROV | x | x / x | x | x | x | x |
|
||||
| USE_UFILESYS | - | - / x | - | - | - | - | Every ESP8266 > 1MB |
|
||||
| USE_ARDUINO_OTA | - | - / - | - | - | - | - |
|
||||
| USE_DOMOTICZ | - | x / x | x | x | x | - |
|
||||
| USE_HOME_ASSISTANT | - | - / - | - | - | - | - |
|
||||
| USE_TASMOTA_DISCOVERY | x | x / x | x | x | x | x |
|
||||
| USE_MQTT_TLS\* | - | - / x | - | - | - | - |
|
||||
| USE_MQTT_CLIENT_CERT | - | - / - | - | - | - | - |
|
||||
| USE_MQTT_AWS_IOT | - | - / - | - | - | - | - |
|
||||
| USE_4K_RSA | - | - / - | - | - | - | - |
|
||||
| USE_TELEGRAM | - | - / - | - | - | - | - |
|
||||
| USE_KNX | - | - / x | x | - | - | - |
|
||||
| USE_TELNET | - | - / - | - | - | - | - |
|
||||
| USE_XYZMODEM | - | - / - | - | - | - | - |
|
||||
| USE_WEBSERVER | x | x / x | x | x | x | x |
|
||||
| USE_WEBSEND_RESPONSE | - | - / - | - | - | - | - |
|
||||
| USE_EMULATION_HUE | x | x / x | - | x | - | - |
|
||||
| USE_EMULATION_WEMO | x | x / x | - | x | - | - |
|
||||
| USE_DISCOVERY | - | - / - | - | - | - | - |
|
||||
| WEBSERVER_ADVERTISE | - | x / - | x | - | - | x |
|
||||
| MQTT_HOST_DISCOVERY | - | - / - | - | - | - | - |
|
||||
| USE_TIMERS | x | x / x | x | x | x | x |
|
||||
| USE_TIMERS_WEB | x | x / x | x | x | x | x |
|
||||
| USE_SUNRISE | x | x / x | x | x | x | x |
|
||||
| USE_RULES | x | x / x | x | x | x | x |
|
||||
| USE_SCRIPT | - | - / - | - | - | - | - |
|
||||
| USE_EXPRESSION | - | x / x | - | - | - | - |
|
||||
| SUPPORT_IF_STATEMENT | - | x / x | - | - | - | - |
|
||||
| USE_HOTPLUG | - | - / - | - | - | - | - |
|
||||
| USE_PROMETHEUS | - | - / - | - | - | - | - |
|
||||
| USE_PING | - | - / - | - | - | - | - |
|
||||
| USE_HDMI_CEC | - | - / - | - | - | - | - |
|
||||
| USE_MAGIC_SWITCH | - | - / x | - | - | - | - |
|
||||
| USE_GPIO_VIEWER | - | - / x | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| ROTARY_V1 | - | x / x | - | x | - | - |
|
||||
| USE_SONOFF_RF | - | x / - | x | x | - | - |
|
||||
| USE_RF_FLASH | - | x / - | x | x | - | - |
|
||||
| USE_SONOFF_SC | - | x / - | x | x | - | - |
|
||||
| USE_TUYA_MCU | x | x / - | x | x | - | x |
|
||||
| USE_ARMTRONIX_DIMMERS | - | x / - | x | - | - | - |
|
||||
| USE_PS_16_DZ | - | x / - | x | - | - | - |
|
||||
| USE_SONOFF_IFAN | - | x / - | x | - | - | - |
|
||||
| USE_BUZZER | - | x / x | x | x | - | - |
|
||||
| USE_ARILUX_RF | - | x / - | x | - | - | - |
|
||||
| USE_SHUTTER | - | x / x | x | - | - | - |
|
||||
| USE_DEEPSLEEP | - | x / x | - | x | - | - |
|
||||
| USE_EXS_DIMMER | - | x / - | x | - | - | - |
|
||||
| USE_DEVICE_GROUPS | - | x / x | - | - | - | - |
|
||||
| USE_PWM_DIMMER | - | x / - | x | - | - | - |
|
||||
| USE_KEELOQ | - | - / - | - | - | - | - |
|
||||
| USE_SONOFF_D1 | - | x / - | x | - | - | - |
|
||||
| USE_SHELLY_DIMMER | - | x / - | - | - | - | - |
|
||||
| USE_AC_ZERO_CROSS_DIMMER | - | x / x | x | x | x | x |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_LIGHT | x | x / x | x | x | x | x |
|
||||
| USE_WS2812 | - | x / x | x | x | - | x |
|
||||
| USE_WS2812_DMA | - | - / - | - | - | - | - |
|
||||
| USE_MY92X1 | - | x / - | x | x | - | x |
|
||||
| USE_SM16716 | - | x / - | x | x | - | x |
|
||||
| USE_SM2135 | - | x / - | x | x | - | x |
|
||||
| USE_SM2335 | - | x / - | x | x | - | x |
|
||||
| USE_BP5758D | - | x / - | x | x | - | x |
|
||||
| USE_BP1658CJ | - | x / - | x | x | - | x |
|
||||
| USE_SONOFF_L1 | - | x / - | x | x | - | x |
|
||||
| USE_ELECTRIQ_MOODL | - | x / - | x | x | - | x |
|
||||
| | | | | | | |
|
||||
| USE_ENERGY_SENSOR | - | x / x | x | x | - | - |
|
||||
| USE_ENERGY_DUMMY | - | x / x | x | x | - | - |
|
||||
| USE_PZEM004T | - | x / x | x | x | - | - |
|
||||
| USE_PZEM_AC | - | x / x | x | x | - | - |
|
||||
| USE_PZEM_DC | - | x / x | x | x | - | - |
|
||||
| USE_MCP39F501 | - | x / - | x | x | - | - |
|
||||
| USE_SDM72 | - | - / x | - | x | - | - |
|
||||
| USE_SDM120 | - | - / x | - | x | - | - |
|
||||
| USE_SDM230 | - | - / x | - | - | - | - |
|
||||
| USE_SDM630 | - | - / x | - | x | - | - |
|
||||
| USE_DDS2382 | - | - / x | - | x | - | - |
|
||||
| USE_DDSU666 | - | - / x | - | x | - | - |
|
||||
| USE_SOLAX_X1 | - | - / - | - | - | - | - |
|
||||
| USE_LE01MR | - | - / - | - | - | - | - |
|
||||
| USE_BL09XX | - | x / x | x | x | - | - |
|
||||
| USE_TELEINFO | - | - / - | - | - | - | - |
|
||||
| USE_IEM3000 | - | - / - | - | - | - | - |
|
||||
| USE_WE517 | - | - / x | - | - | - | - |
|
||||
| USE_MODBUS_ENERGY | - | - / x | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_ADC_VCC | x | - / - | - | - | x | - |
|
||||
| USE_COUNTER | - | x / x | x | x | - | x |
|
||||
| USE_DS18x20 | - | x / x | x | x | - | x |
|
||||
| USE_DHT | - | x / x | x | x | - | x |
|
||||
| USE_MAX31855 | - | - / x | - | x | - | - |
|
||||
| USE_MAX31865 | - | - / - | - | - | - | - |
|
||||
| USE_THERMOSTAT | - | - / - | - | - | - | - |
|
||||
| USE_LMT01 | - | - / x | - | x | - | - |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_I2C | - | x / x | x | x | - | x |
|
||||
| USE_RTC_CHIPS | - | - / x | - | - | - | - |
|
||||
| -USE_BM8563 | - | - / x | - | - | - | - |
|
||||
| -USE_DS3231 | - | - / - | - | - | - | - |
|
||||
| -USE_PCF85063 | - | - / - | - | - | - | - |
|
||||
| -USE_PCF85363 | - | - / - | - | - | - | - |
|
||||
| -USE_RX8010 | - | - / - | - | - | - | - |
|
||||
| USE_SHT | - | - / x | - | x | - | - |
|
||||
| USE_HTU | - | - / x | - | x | - | - |
|
||||
| USE_BMP | - | - / x | - | x | - | - |
|
||||
| -USE_BME68X | - | - / x | - | x | - | - |
|
||||
| USE_AMSX915 | - | - / - | - | - | - | - |
|
||||
| USE_SPL06_007 | - | - / - | - | - | - | - |
|
||||
| USE_QMP6988 | - | - / - | - | - | - | - |
|
||||
| USE_BH1750 | - | - / x | - | x | - | - |
|
||||
| USE_VEML6070 | - | - / x | - | x | - | - |
|
||||
| USE_ADS1115 | - | - / x | - | x | - | - |
|
||||
| USE_INA219 | - | - / x | - | x | - | - |
|
||||
| USE_INA226 | - | - / - | - | - | - | - |
|
||||
| USE_INA3221 | - | - / - | - | - | - | - |
|
||||
| USE_SHT3X | - | - / x | - | x | - | - |
|
||||
| USE_TSL2561 | - | - / - | - | - | - | - |
|
||||
| USE_TSL2591 | - | - / - | - | - | - | - |
|
||||
| USE_MGS | - | - / x | - | x | - | - |
|
||||
| USE_SGP30 | - | - / x | - | x | - | - |
|
||||
| USE_SGP40 | - | - / x | - | x | - | - |
|
||||
| USE_SGP4X | - | - / x | - | - | - | - |
|
||||
| USE_SEN5X | - | - / x | - | x | - | - |
|
||||
| USE_SI1145 | - | - / - | - | - | - | - |
|
||||
| USE_LM75AD | - | - / x | - | x | - | - |
|
||||
| USE_APDS9960 | - | - / - | - | - | - | - |
|
||||
| USE_MCP230xx | - | - / - | - | - | - | - |
|
||||
| USE_MCP23XXX_DRV | - | - / - | - | - | - | - |
|
||||
| USE_PCA9632 | - | - / - | - | - | - | - |
|
||||
| USE_PCA9685 | - | - / - | - | - | - | - |
|
||||
| USE_PCA9685_V2 | - | - / - | - | - | - | - |
|
||||
| USE_MPR121 | - | - / - | - | - | - | - |
|
||||
| USE_CCS811 | - | - / - | - | x | - | - |
|
||||
| USE_CCS811_V2 | - | - / x | - | - | - | - |
|
||||
| USE_ENS16x | - | - / - | - | - | - | - |
|
||||
| USE_ENS210 | - | - / - | - | - | - | - |
|
||||
| USE_MPU6050 | - | - / - | - | - | - | - |
|
||||
| USE_MGC3130 | - | - / - | - | - | - | - |
|
||||
| USE_MAX44009 | - | - / - | - | - | - | - |
|
||||
| USE_SCD30 | - | - / x | - | x | - | - |
|
||||
| USE_SCD40 | - | - / x | - | - | - | - |
|
||||
| USE_SPS30 | - | - / - | - | - | - | - |
|
||||
| USE_ADE7880 | - | - / - | - | - | - | - |
|
||||
| USE_ADE7953 | - | x / x | x | x | - | x |
|
||||
| USE_VL53L0X | - | - / x | - | x | - | - |
|
||||
| USE_VL53L1X | - | - / - | - | - | - | - |
|
||||
| USE_MLX90614 | - | - / - | - | - | - | - |
|
||||
| USE_CHIRP | - | - / - | - | - | - | - |
|
||||
| USE_PAJ7620 | - | - / - | - | - | - | - |
|
||||
| USE_PCF8574 | - | - / - | - | - | - | - |
|
||||
| USE_PMSA003I | - | - / - | - | - | - | - |
|
||||
| USE_LOX_O2 | - | - / x | - | x | - | - |
|
||||
| USE_GDK101 | - | - / - | - | - | - | - |
|
||||
| USE_TC74 | - | - / - | - | - | - | - |
|
||||
| USE_PCA9557 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_HIH6 | - | - / x | - | x | - | - |
|
||||
| USE_DHT12 | - | - / x | - | x | - | - |
|
||||
| USE_DS1624 | - | - / x | - | x | - | - |
|
||||
| USE_AHT1x | - | - / - | - | - | - | - |
|
||||
| USE_HDC1080 | - | - / - | - | - | - | - |
|
||||
| USE_WEMOS_MOTOR_V1 | - | - / x | - | x | - | - |
|
||||
| USE_IAQ | - | - / x | - | x | - | - |
|
||||
| USE_AS3935 | - | - / x | - | x | - | - |
|
||||
| USE_VEML6075 | - | - / - | - | - | - | - |
|
||||
| USE_VEML7700 | - | - / - | - | - | - | - |
|
||||
| USE_MCP9808 | - | - / - | - | - | - | - |
|
||||
| USE_MLX90640 | - | - / - | - | - | - | - |
|
||||
| USE_HP303B | - | - / - | - | - | - | - |
|
||||
| USE_EZOCO2 | - | - / - | - | - | - | - |
|
||||
| USE_EZODO | - | - / - | - | - | - | - |
|
||||
| USE_EZOEC | - | - / - | - | - | - | - |
|
||||
| USE_EZOFLO | - | - / - | - | - | - | - |
|
||||
| USE_EZOHUM | - | - / - | - | - | - | - |
|
||||
| USE_EZOO2 | - | - / - | - | - | - | - |
|
||||
| USE_EZOORP | - | - / - | - | - | - | - |
|
||||
| USE_EZOPH | - | - / - | - | - | - | - |
|
||||
| USE_EZOPMP | - | - / - | - | - | - | - |
|
||||
| USE_EZOPRS | - | - / - | - | - | - | - |
|
||||
| USE_EZORGB | - | - / - | - | - | - | - |
|
||||
| USE_EZORTD | - | - / - | - | - | - | - |
|
||||
| USE_SEESAW_SOIL | - | - / - | - | - | - | - |
|
||||
| USE_TOF10120 | - | - / - | - | - | - | - |
|
||||
| USE_AM2320 | - | - / - | - | - | - | - |
|
||||
| USE_T67XX | - | - / - | - | - | - | - |
|
||||
| USE_HM330X | - | - / - | - | - | - | - |
|
||||
| USE_HDC2010 | - | - / - | - | - | - | - |
|
||||
| USE_DS3502 | - | - / - | - | - | - | - |
|
||||
| USE_HYT | - | - / - | - | - | - | - |
|
||||
| USE_LUXV30B | - | - / - | - | - | - | - |
|
||||
| USE_HMC5883L | - | - / - | - | - | - | - |
|
||||
| USE_QMC5883L | - | - / - | - | - | - | - |
|
||||
| USE_MAX17043 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_SPI | - | - / x | - | - | - | x |
|
||||
| USE_RC522 | - | - / - | - | - | - | - |
|
||||
| USE_CANSNIFFER | - | - / - | - | - | - | - |
|
||||
| USE_SPI_LORA | - | - / x | - | - | - | - |
|
||||
| USE_MHZ19 | - | - / x | - | x | - | - |
|
||||
| USE_SENSEAIR | - | - / x | - | x | - | - |
|
||||
| USE_PMS5003 | - | - / x | - | x | - | - |
|
||||
| USE_NOVA_SDS | - | - / x | - | x | - | - |
|
||||
| USE_HPMA | - | - / x | - | x | - | - |
|
||||
| USE_SERIAL_BRIDGE | - | x / x | x | x | - | x |
|
||||
| USE_MODBUS_BRIDGE | - | - / x | - | - | - | - |
|
||||
| USE_MP3_PLAYER | - | - / x | - | x | - | - |
|
||||
| USE_AZ7798 | - | - / - | - | - | - | - |
|
||||
| USE_PN532_HSU | - | - / x | - | x | - | - |
|
||||
| USE_RDM6300 | - | - / x | - | x | - | - |
|
||||
| USE_IBEACON | - | - / x | - | x | - | - |
|
||||
| USE_GPS | - | - / - | - | - | - | - |
|
||||
| USE_HM10 | - | - / - | - | x | - | - |
|
||||
| USE_HRXL | - | - / x | - | x | - | - |
|
||||
| USE_TASMOTA_CLIENT | - | - / - | - | - | - | - |
|
||||
| USE_OPENTHERM | - | - / - | - | - | - | - |
|
||||
| USE_MIEL_HVAC | - | - / - | - | - | - | - |
|
||||
| USE_PROJECTOR_CTRL | - | - / - | - | - | - | - |
|
||||
| USE_AS608 | - | - / - | - | - | - | - |
|
||||
| USE_LD2402 | - | - / - | - | - | - | - |
|
||||
| USE_LD2410 | - | - / - | - | - | - | - |
|
||||
| USE_LD2410S | - | - / - | - | - | - | - |
|
||||
| USE_GM861 | - | - / - | - | - | - | - |
|
||||
| USE_TCP_BRIDGE | - | - / - | - | - | - | - | zbbridge / zbbrdgpro |
|
||||
| USE_HC8 | - | - / - | - | - | - | - |
|
||||
| USE_PIPSOLAR | - | - / - | - | - | - | - |
|
||||
| USE_WOOLIIS | - | - / - | - | - | - | - |
|
||||
| USE_C8_CO2_5K | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_NRF24 | - | - / - | - | - | - | - |
|
||||
| USE_MIBLE | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE_ZNP | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE_EZSP | - | - / - | - | - | - | - | Sonoff ZbBridge |
|
||||
| | | | | | | |
|
||||
| USE_IR_REMOTE | - | x / - | x | x | x | x |
|
||||
| USE_IR_RECEIVE | - | x / - | x | x | x | x |
|
||||
| USE_IR_REMOTE_FULL | - | - / - | - | - | x | - | Enable ALL protocols |
|
||||
| | | | | | | |
|
||||
| USE_WIZMOTE | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_SR04 | - | - / - | - | x | - | - |
|
||||
| USE_ME007 | - | - / - | - | - | - | - |
|
||||
| USE_DYP | - | - / - | - | - | - | - |
|
||||
| USE_TM1638 | - | - / x | - | x | - | - |
|
||||
| USE_HX711 | - | - / x | - | x | - | - |
|
||||
| -USE_HX711_M5SCALES | - | - / - | - | - | - | - |
|
||||
| USE_TX2x_WIND_SENSOR | - | - / - | - | - | - | - |
|
||||
| USE_WINDMETER | - | - / - | - | - | - | - |
|
||||
| USE_RC_SWITCH | - | - / x | - | x | - | - |
|
||||
| USE_RF_SENSOR | - | - / x | - | x | - | - | AlectoV2 only |
|
||||
| USE_HRE | - | - / x | - | x | - | - |
|
||||
| USE_A4988_STEPPER | - | - / - | - | - | - | - |
|
||||
| USE_NEOPOOL | - | - / - | - | - | - | - |
|
||||
| USE_FLOWRATEMETER | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_DISPLAY | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_LCD | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_MATRIX | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_29 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_42 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_RA8876 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_TM1637 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_TM1621_SONOFF | - | - / x | - | - | - | - |
|
||||
| USE_DISPLAY_TM1650 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_FT5206 | - | - / - | - | - | - | - |
|
||||
| USE_FTC532 | - | - / - | - | - | - | - |
|
||||
| USE_BS814A2 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| **ESP32 Feature** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
|
||||
| USE_HALLEFFECT | | / x | | | | |
|
||||
| USE_MI_ESP32 | | / x | | | | | See SetOption115 |
|
||||
| USE_IBEACON_ESP32 | | / - | | | | |
|
||||
| USE_WEBCAM | | / - | | | | |
|
||||
| USE_ETHERNET | | / x | | | | |
|
||||
| USE_I2S_AUDIO | | / - | | | | |
|
||||
| USE_SONOFF_SPM | | / x | | | | |
|
||||
| USE_DISPLAY_TM1621_SONOFF | | / x | | | | |
|
||||
| USE_SHELLY_PRO | | / x | | | | |
|
||||
| USE_ESP32_TWAI | | / x | | | | |
|
||||
| USE_DALI | | / x | | | | |
|
||||
| USE_DINGTIAN_RELAY | | / - | | | | |
|
||||
| USE_MATTER_DEVICE | | / x | | | | | See SetOption151 |
|
||||
Note: `minimal` variant is not listed as it shouldn't be used outside of the [upgrading](https://tasmota.github.io/docs/Upgrading/) process.
|
||||
|
||||
The following specific display drivers are replaced with uDisplay, see [uDisplay/uTouch documentation](https://tasmota.github.io/docs/Universal-Display-Driver/#migrating-to-udisplay): `USE_DISPLAY_ILI9341`, `USE_DISPLAY_SSD1306`, `USE_DISPLAY_SH1106`, `USE_DISPLAY_SSD1351`, `USE_DISPLAY_ST7789`
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
|-----------------------|---|-------|---|---|---|---|--------
|
||||
| MY_LANGUAGE en_GB | x | x / x | x | x | x | x |
|
||||
| USE_IMPROV | x | x / x | x | x | x | x |
|
||||
| USE_UFILESYS | - | - / x | - | - | - | - |
|
||||
| USE_ARDUINO_OTA | - | - / - | - | - | - | - |
|
||||
| USE_DOMOTICZ | - | x / x | x | x | x | - |
|
||||
| USE_HOME_ASSISTANT | - | - / - | - | - | - | - |
|
||||
| USE_TASMOTA_DISCOVERY | x | x / x | x | x | x | x |
|
||||
| USE_MQTT_TLS* | - | - / x | - | - | - | - |
|
||||
| USE_MQTT_AWS_IOT | - | - / - | - | - | - | - |
|
||||
| USE_4K_RSA | - | - / - | - | - | - | - |
|
||||
| USE_TELEGRAM | - | - / - | - | - | - | - |
|
||||
| USE_KNX | - | - / x | x | - | - | - |
|
||||
| USE_WEBSERVER | x | x / x | x | x | x | x |
|
||||
| USE_WEBSEND_RESPONSE | - | - / - | - | - | - | - |
|
||||
| USE_EMULATION_HUE | x | x / x | - | x | - | - |
|
||||
| USE_EMULATION_WEMO | x | x / x | - | x | - | - |
|
||||
| USE_DISCOVERY | - | - / - | - | - | - | - |
|
||||
| WEBSERVER_ADVERTISE | - | x / - | x | - | - | x |
|
||||
| MQTT_HOST_DISCOVERY | - | - / - | - | - | - | - |
|
||||
| USE_TIMERS | x | x / x | x | x | x | x |
|
||||
| USE_TIMERS_WEB | x | x / x | x | x | x | x |
|
||||
| USE_SUNRISE | x | x / x | x | x | x | x |
|
||||
| USE_RULES | x | x / x | x | x | x | x |
|
||||
| USE_SCRIPT | - | - / - | - | - | - | - |
|
||||
| USE_EXPRESSION | - | - / - | - | - | - | - |
|
||||
| SUPPORT_IF_STATEMENT | - | - / - | - | - | - | - |
|
||||
| USE_HOTPLUG | - | - / - | - | - | - | - |
|
||||
| USE_PROMETHEUS | - | - / - | - | - | - | - |
|
||||
| USE_PING | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| ROTARY_V1 | - | x / x | - | x | - | - |
|
||||
| USE_SONOFF_RF | - | x / - | x | x | - | - |
|
||||
| USE_RF_FLASH | - | x / - | x | x | - | - |
|
||||
| USE_SONOFF_SC | - | x / - | x | x | - | - |
|
||||
| USE_TUYA_MCU | x | x / - | x | x | - | x |
|
||||
| USE_ARMTRONIX_DIMMERS | - | x / - | x | - | - | - |
|
||||
| USE_PS_16_DZ | - | x / - | x | - | - | - |
|
||||
| USE_SONOFF_IFAN | - | x / - | x | - | - | - |
|
||||
| USE_BUZZER | - | x / x | x | x | - | - |
|
||||
| USE_ARILUX_RF | - | x / - | x | - | - | - |
|
||||
| USE_SHUTTER | - | x / x | x | - | - | - |
|
||||
| USE_DEEPSLEEP | - | x / x | - | x | - | - |
|
||||
| USE_EXS_DIMMER | - | x / - | x | - | - | - |
|
||||
| USE_DEVICE_GROUPS | - | x / x | - | - | - | - |
|
||||
| USE_PWM_DIMMER | - | x / - | x | - | - | - |
|
||||
| USE_KEELOQ | - | - / - | - | - | - | - |
|
||||
| USE_SONOFF_D1 | - | x / - | x | - | - | - |
|
||||
| USE_SHELLY_DIMMER | - | x / - | - | - | - | - |
|
||||
| USE_AC_ZERO_CROSS_DIMMER | - | x / x | x | x | x | x |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_LIGHT | x | x / x | x | x | x | x |
|
||||
| USE_WS2812 | - | x / x | x | x | - | x |
|
||||
| USE_WS2812_DMA | - | - / - | - | - | - | - |
|
||||
| USE_MY92X1 | - | x / - | x | x | - | x |
|
||||
| USE_SM16716 | - | x / - | x | x | - | x |
|
||||
| USE_SM2135 | - | x / - | x | x | - | x |
|
||||
| USE_SM2335 | - | x / - | x | x | - | x |
|
||||
| USE_BP5758D | - | x / - | x | x | - | x |
|
||||
| USE_SONOFF_L1 | - | x / - | x | x | - | x |
|
||||
| USE_ELECTRIQ_MOODL | - | x / - | x | x | - | x |
|
||||
| | | | | | | |
|
||||
| USE_ENERGY_SENSOR | x | x / x | x | x | - | - |
|
||||
| USE_ENERGY_DUMMY | x | x / x | x | x | - | - |
|
||||
| USE_PZEM004T | - | x / x | x | x | - | - |
|
||||
| USE_PZEM_AC | - | x / x | x | x | - | - |
|
||||
| USE_PZEM_DC | - | x / x | x | x | - | - |
|
||||
| USE_MCP39F501 | x | x / - | x | x | - | - |
|
||||
| USE_SDM72 | - | - / x | - | x | - | - |
|
||||
| USE_SDM120 | - | - / x | - | x | - | - |
|
||||
| USE_SDM230 | - | - / x | - | - | - | - |
|
||||
| USE_SDM630 | - | - / x | - | x | - | - |
|
||||
| USE_DDS2382 | - | - / x | - | x | - | - |
|
||||
| USE_DDSU666 | - | - / x | - | x | - | - |
|
||||
| USE_SOLAX_X1 | - | - / - | - | - | - | - |
|
||||
| USE_LE01MR | - | - / - | - | - | - | - |
|
||||
| USE_BL09XX | x | x / x | x | x | - | - |
|
||||
| USE_TELEINFO | - | - / - | - | - | - | - |
|
||||
| USE_IEM3000 | - | - / - | - | - | - | - |
|
||||
| USE_WE517 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_ADC_VCC | x | - / - | - | - | x | - |
|
||||
| USE_COUNTER | - | x / x | x | x | - | x |
|
||||
| USE_DS18x20 | - | x / x | x | x | - | x |
|
||||
| USE_DHT | - | x / x | x | x | - | x |
|
||||
| USE_MAX31855 | - | - / x | - | x | - | - |
|
||||
| USE_MAX31865 | - | - / - | - | - | - | - |
|
||||
| USE_THERMOSTAT | - | - / - | - | - | - | - |
|
||||
| USE_LMT01 | - | - / x | - | x | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_I2C | - | x / x | x | x | - | x |
|
||||
| USE_SHT | - | - / x | - | x | - | - |
|
||||
| USE_HTU | - | - / x | - | x | - | - |
|
||||
| USE_BMP | - | - / x | - | x | - | - |
|
||||
| USE_BME68X | - | - / x | - | x | - | - |
|
||||
| USE_BH1750 | - | - / x | - | x | - | - |
|
||||
| USE_VEML6070 | - | - / x | - | x | - | - |
|
||||
| USE_ADS1115 | - | - / x | - | x | - | - |
|
||||
| USE_INA219 | - | - / x | - | x | - | - |
|
||||
| USE_INA226 | - | - / - | - | - | - | - |
|
||||
| USE_SHT3X | - | - / x | - | x | - | - |
|
||||
| USE_TSL2561 | - | - / - | - | - | - | - |
|
||||
| USE_TSL2591 | - | - / - | - | - | - | - |
|
||||
| USE_MGS | - | - / x | - | x | - | - |
|
||||
| USE_SGP30 | - | - / x | - | x | - | - |
|
||||
| USE_SI1145 | - | - / - | - | - | - | - |
|
||||
| USE_LM75AD | - | - / x | - | x | - | - |
|
||||
| USE_APDS9960 | - | - / - | - | - | - | - |
|
||||
| USE_MCP230xx | - | - / - | - | - | - | - |
|
||||
| USE_PCA9685 | - | - / - | - | - | - | - |
|
||||
| USE_MPR121 | - | - / - | - | - | - | - |
|
||||
| USE_CCS811 | - | - / - | - | x | - | - |
|
||||
| USE_CCS811_V2 | - | - / x | - | - | - | - |
|
||||
| USE_MPU6050 | - | - / - | - | - | - | - |
|
||||
| USE_DS3231 | - | - / - | - | - | - | - |
|
||||
| USE_MGC3130 | - | - / - | - | - | - | - |
|
||||
| USE_MAX44009 | - | - / - | - | - | - | - |
|
||||
| USE_SCD30 | - | - / x | - | x | - | - |
|
||||
| USE_SCD40 | - | - / x | - | - | - | - |
|
||||
| USE_SPS30 | - | - / - | - | - | - | - |
|
||||
| USE_ADE7880 | - | - / - | - | - | - | - |
|
||||
| USE_ADE7953 | - | x / x | x | x | - | x |
|
||||
| USE_VL53L0X | - | - / x | - | x | - | - |
|
||||
| USE_VL53L1X | - | - / - | - | - | - | - |
|
||||
| USE_MLX90614 | - | - / - | - | - | - | - |
|
||||
| USE_CHIRP | - | - / - | - | - | - | - |
|
||||
| USE_PAJ7620 | - | - / - | - | - | - | - |
|
||||
| USE_PCF8574 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_HIH6 | - | - / x | - | x | - | - |
|
||||
| USE_DHT12 | - | - / x | - | x | - | - |
|
||||
| USE_DS1624 | - | - / x | - | x | - | - |
|
||||
| USE_AHT1x | - | - / - | - | - | - | - |
|
||||
| USE_HDC1080 | - | - / - | - | - | - | - |
|
||||
| USE_WEMOS_MOTOR_V1 | - | - / x | - | x | - | - |
|
||||
| USE_IAQ | - | - / x | - | x | - | - |
|
||||
| USE_AS3935 | - | - / x | - | x | - | - |
|
||||
| USE_VEML6075 | - | - / - | - | - | - | - |
|
||||
| USE_VEML7700 | - | - / - | - | - | - | - |
|
||||
| USE_MCP9808 | - | - / - | - | - | - | - |
|
||||
| USE_HP303B | - | - / - | - | - | - | - |
|
||||
| USE_EZOCO2 | - | - / - | - | - | - | - |
|
||||
| USE_EZODO | - | - / - | - | - | - | - |
|
||||
| USE_EZOEC | - | - / - | - | - | - | - |
|
||||
| USE_EZOFLO | - | - / - | - | - | - | - |
|
||||
| USE_EZOHUM | - | - / - | - | - | - | - |
|
||||
| USE_EZOO2 | - | - / - | - | - | - | - |
|
||||
| USE_EZOORP | - | - / - | - | - | - | - |
|
||||
| USE_EZOPH | - | - / - | - | - | - | - |
|
||||
| USE_EZOPMP | - | - / - | - | - | - | - |
|
||||
| USE_EZOPRS | - | - / - | - | - | - | - |
|
||||
| USE_EZORGB | - | - / - | - | - | - | - |
|
||||
| USE_EZORTD | - | - / - | - | - | - | - |
|
||||
| USE_SEESAW_SOIL | - | - / - | - | - | - | - |
|
||||
| USE_TOF10120 | - | - / - | - | - | - | - |
|
||||
| USE_BM8563 | - | - / - | - | - | - | - |
|
||||
| USE_AM2320 | - | - / - | - | - | - | - |
|
||||
| USE_T67XX | - | - / - | - | - | - | - |
|
||||
| USE_HM330X | - | - / - | - | - | - | - |
|
||||
| USE_HDC2010 | - | - / - | - | - | - | - |
|
||||
| USE_PCF85363 | - | - / - | - | - | - | - |
|
||||
| USE_DS3502 | - | - / - | - | - | - | - |
|
||||
| USE_HYT | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_SPI | - | - / - | - | - | - | x |
|
||||
| USE_RC522 | - | - / - | - | - | - | - |
|
||||
| USE_MHZ19 | - | - / x | - | x | - | - |
|
||||
| USE_SENSEAIR | - | - / x | - | x | - | - |
|
||||
| USE_PMS5003 | - | - / x | - | x | - | - |
|
||||
| USE_NOVA_SDS | - | - / x | - | x | - | - |
|
||||
| USE_HPMA | - | - / x | - | x | - | - |
|
||||
| USE_SERIAL_BRIDGE | - | x / x | x | x | - | x |
|
||||
| USE_MODBUS_BRIDGE | - | - / x | - | - | - | - |
|
||||
| USE_MP3_PLAYER | - | - / x | - | x | - | - |
|
||||
| USE_AZ7798 | - | - / - | - | - | - | - |
|
||||
| USE_PN532_HSU | - | - / x | - | x | - | - |
|
||||
| USE_RDM6300 | - | - / x | - | x | - | - |
|
||||
| USE_IBEACON | - | - / x | - | x | - | - |
|
||||
| USE_GPS | - | - / - | - | - | - | - |
|
||||
| USE_HM10 | - | - / - | - | x | - | - |
|
||||
| USE_HRXL | - | - / x | - | x | - | - |
|
||||
| USE_TASMOTA_CLIENT | - | - / - | - | - | - | - |
|
||||
| USE_OPENTHERM | - | - / - | - | - | - | - |
|
||||
| USE_MIEL_HVAC | - | - / - | - | - | - | - |
|
||||
| USE_PROJECTOR_CTRL | - | - / - | - | - | - | - |
|
||||
| USE_AS608 | - | - / - | - | - | - | - |
|
||||
| USE_TCP_BRIDGE | - | - / - | - | - | - | - | zbbridge
|
||||
| | | | | | | |
|
||||
| USE_NRF24 | - | - / - | - | - | - | - |
|
||||
| USE_MIBLE | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE_ZNP | - | - / - | - | - | - | - |
|
||||
| USE_ZIGBEE_EZSP | - | - / - | - | - | - | - | Sonoff ZbBridge
|
||||
| | | | | | | |
|
||||
| USE_IR_REMOTE | - | x / - | x | x | x | x |
|
||||
| USE_IR_RECEIVE | - | x / - | x | x | x | x |
|
||||
| USE_IR_REMOTE_FULL | - | - / - | - | - | x | - | Enable ALL protocols
|
||||
| | | | | | | |
|
||||
| USE_SR04 | - | - / - | - | x | - | - |
|
||||
| USE_DYP | - | - / - | - | - | - | - |
|
||||
| USE_TM1638 | - | - / x | - | x | - | - |
|
||||
| USE_HX711 | - | - / x | - | x | - | - |
|
||||
| USE_TX2x_WIND_SENSOR | - | - / - | - | - | - | - |
|
||||
| USE_WINDMETER | - | - / - | - | - | - | - |
|
||||
| USE_RC_SWITCH | - | - / x | - | x | - | - |
|
||||
| USE_RF_SENSOR | - | - / x | - | x | - | - | AlectoV2 only
|
||||
| USE_HRE | - | - / x | - | x | - | - |
|
||||
| USE_A4988_STEPPER | - | - / - | - | - | - | - |
|
||||
| USE_NEOPOOL | - | - / - | - | - | - | - |
|
||||
| USE_FLOWRATEMETER | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_DISPLAY | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_LCD | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_SSD1306 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_MATRIX | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_SH1106 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_ILI9341 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_29 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_42 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_SSD1351 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_RA8876 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_ST7789 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_TM1637 | - | - / - | - | - | - | x |
|
||||
| USE_DISPLAY_TM1621_SONOFF | - | - / x | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| USE_FT5206 | - | - / - | - | - | - | - |
|
||||
| USE_FTC532 | - | - / - | - | - | - | - |
|
||||
| USE_BS814A2 | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| ESP32 Feature | l | t | k | s | i | d | Remarks
|
||||
| USE_HALLEFFECT | | / x | | | | |
|
||||
| USE_MI_ESP32 | | / x | | | | | See SetOption115
|
||||
| USE_IBEACON_ESP32 | | / - | | | | |
|
||||
| USE_WEBCAM | | / - | | | | |
|
||||
| USE_ETHERNET | | / x | | | | |
|
||||
| USE_I2S_AUDIO | | / - | | | | |
|
||||
| USE_TTGO_WATCH | | / - | | | | |
|
||||
| USE_SONOFF_SPM | | / x | | | | |
|
||||
|
||||
- USE_MQTT_TLS is enabled by default in every ESP32 variants
|
||||
* USE_MQTT_TLS is enabled by default in every ESP32 variants
|
1911
CHANGELOG.md
1911
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
project(tasmota)
|
||||
|
||||
if(CONFIG_IDF_TARGET_ESP32C2)
|
||||
include(relinker)
|
||||
endif()
|
336
CODE_OWNERS.md
336
CODE_OWNERS.md
@ -1,251 +1,97 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./tools/logo/TASMOTA_FullLogo_Vector_White.svg">
|
||||
<img alt="Logo" src="./tools/logo/TASMOTA_FullLogo_Vector.svg" align="right" height="76">
|
||||
</picture>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Code Owners
|
||||
|
||||
In addition to @arendst the following code is mainly owned by:
|
||||
|
||||
| Code | Owner
|
||||
|------------------------------|---------------------------
|
||||
| Tasmota Drivers |
|
||||
| |
|
||||
| xdrv_01_webserver | @arendst
|
||||
| xdrv_02_mqtt | @arendst
|
||||
| xdrv_03_energy | @arendst
|
||||
| xdrv_04_light | @s-hadinger
|
||||
| xdrv_05_irremote | @s-hadinger
|
||||
| xdrv_06_snfbridge | @arendst
|
||||
| xdrv_07_domoticz | @arendst
|
||||
| xdrv_08_serial_bridge | Dániel Zoltán Tolnai
|
||||
| xdrv_09_timers | @arendst
|
||||
| xdrv_10_rules | @arendst, @barbudor
|
||||
| xdrv_10_scripter | @gemu
|
||||
| xdrv_11_knx | @adrian
|
||||
| xdrv_12_discovery | @arendst, @effelle, @emontnemery
|
||||
| xdrv_13_display | @gemu, @s-hadinger
|
||||
| xdrv_14_mp3 | @gemu, @mike2nl
|
||||
| xdrv_15_pca9685 | Andre Thomas
|
||||
| xdrv_16_tuyamcu | @btsimonh
|
||||
| xdrv_17_rcswitch |
|
||||
| xdrv_18_armtronix_dimmers | @wvdv2002
|
||||
| xdrv_19_pz16dz_dimmer | Joel Stein
|
||||
| xdrv_20_hue | @s-hadinger
|
||||
| xdrv_21_wemo | @s-hadinger
|
||||
| xdrv_22_sonoff_ifan | @arendst
|
||||
| xdrv_23_zigbee | @s-hadinger
|
||||
| xdrv_24_buzzer | @arendst
|
||||
| xdrv_25_stepper | Tim Leuscher
|
||||
| xdrv_26_ariluxrf | @arendst
|
||||
| xdrv_27_shutter | @stefanbode
|
||||
| xdrv_28_pcf8574 | @stefanbode
|
||||
| xdrv_29_deepsleep | @stefanbode
|
||||
| xdrv_30_exs_dimmer | Andreas Schultz
|
||||
| xdrv_31_tasmota_client | Andre Thomas
|
||||
| xdrv_32_hotplug | @BASM
|
||||
| xdrv_33_nrf24l01 | @staars
|
||||
| xdrv_34_wemos_motor | Peter Franck
|
||||
| xdrv_35_pwm_dimmer | Paul C Diem
|
||||
| xdrv_36_keeloq | he-so
|
||||
| xdrv_37_sonoff_d1 | @arendst
|
||||
| xdrv_38_ping | @s-hadinger
|
||||
| xdrv_39_thermostat | Javier Argita
|
||||
| xdrv_40_telegram | @arendst
|
||||
| xdrv_41_tcp_bridge | @s-hadinger
|
||||
| xdrv_42_i2s_audio | @gemu
|
||||
| xdrv_43_mlx90640 | @staars
|
||||
| xdrv_44_miel_hvac | David GWynne
|
||||
| xdrv_45_shelly_dimmer | James Turton
|
||||
| xdrv_46_ccloader | @staars
|
||||
| xdrv_47_ftc532 | Peter Franck
|
||||
| xdrv_48_timeprop | Colin Law, Thomas Herrmann
|
||||
| xdrv_49_pid | Colin Law, Thomas Herrmann
|
||||
| xdrv_50_filesystem | @gemu, @barbudor
|
||||
| xdrv_51_bs814a2 | Peter Franck
|
||||
| xdrv_52_berry | @s-hadinger, @staars (ULP)
|
||||
| xdrv_53_projector_ctrl | Jan Bubík
|
||||
| xdrv_54_lvgl | @s-hadinger
|
||||
| xdrv_55_touch | @gemu, @s-hadinger
|
||||
| xdrv_56_rtc_chips | @arendst, @s-hadinger
|
||||
| xdrv_57_tasmesh | @staars
|
||||
| xdrv_58_range_extender | @sillyfrog
|
||||
| xdrv_59_influxdb | @arendst
|
||||
| xdrv_60_shift595 | Jacek Ziółkowski
|
||||
| xdrv_61_ds3502 | f-reiling
|
||||
| xdrv_62_improv | @arendst
|
||||
| xdrv_63_modbus_bridge | @jeroenst
|
||||
| xdrv_64_pca9632 | Pascal Heinrich
|
||||
| xdrv_65_tuyamcubr | David Gwynne
|
||||
| xdrv_66_tm1638 | @arendst
|
||||
| xdrv_67_mcp23xxx | @arendst
|
||||
| xdrv_68_zerocrossDimmer | @stefanbode
|
||||
| xdrv_69_pca9557 | @cctweaker
|
||||
| xdrv_70_1_hdmi_cec | @s-hadinger
|
||||
| xdrv_71_magic_switch | @barbudor
|
||||
| xdrv_72_pipsolar | @chefpro
|
||||
| xdrv_73_lora | @arendst
|
||||
| xdrv_74_lorawan | @arendst
|
||||
| xdrv_75_dali | @eeak, @arendst
|
||||
| xdrv_76_serial_i2c | @s-hadinger
|
||||
| xdrv_77_wizmote | @arendst
|
||||
| xdrv_78_telnet | @arendst
|
||||
| xdrv_79_esp32_ble | @staars, @btsimonh
|
||||
| xdrv_80 |
|
||||
| xdrv_81_esp32_webcam | @gemu, @philrich
|
||||
| xdrv_82_esp32_ethernet | @arendst
|
||||
| xdrv_83_esp32_watch | @gemu
|
||||
| xdrv_85_esp32_ble_eq3_trv | @btsimonh
|
||||
| xdrv_86_esp32_sonoff_spm | @arendst
|
||||
| xdrv_87_esp32_sonoff_tm1621 | @arendst
|
||||
| xdrv_88_esp32_shelly_pro | @arendst
|
||||
| xdrv_89_ |
|
||||
| xdrv_90_esp32_dingtian_relay | @barbudor
|
||||
| xdrv_91_ |
|
||||
| xdrv_92_ |
|
||||
| xdrv_93_ |
|
||||
| xdrv_94_ |
|
||||
| |
|
||||
| xdrv_120_xyzmodem | @arendst
|
||||
| xdrv_121_gpioviewer | @arendst
|
||||
| xdrv_122_file_settings_demo | @arendst
|
||||
| xdrv_122_file_json_settings_demo | @arendst
|
||||
| xdrv_127_debug | @arendst
|
||||
| |
|
||||
| Tasmota Sensors |
|
||||
| |
|
||||
| xsns_01_counter | @arendst, @stefanbode
|
||||
| xsns_02_analog | @arendst, @barbudor
|
||||
| xsns_03_energy | @arendst
|
||||
| xsns_04_snfsc | @arendst
|
||||
| xsns_05_ds18x20 | @arendst
|
||||
| xsns_06_dht | @arendst
|
||||
| xsns_07_sht1x | @arendst
|
||||
| xsns_08_htu | Heiko Krupp
|
||||
| xsns_09_bmp | @arendst
|
||||
| xsns_10_bh1750 | @arendst
|
||||
| xsns_11_veml6070 | @mike2nl
|
||||
| xsns_12_ads1115 | @syssi, @stefanbode
|
||||
| xsns_13_ina219 | @stefanbode
|
||||
| xsns_14_sht3x | Stefan Tibus
|
||||
| xsns_15_mhz19 | @arendst
|
||||
| xsns_16_tsl2561 | Joachim Banzhaf
|
||||
| xsns_17_senseair | @arendst
|
||||
| xsns_18_pms5003 | @arendst
|
||||
| xsns_19_mgs | @palich2000
|
||||
| xsns_20_novasds | Norbert Richter
|
||||
| xsns_21_sgp30 | Gerhard Mutz
|
||||
| xsns_22_sr04 | Nuno Ferreira, @arendst
|
||||
| xsns_23_me007 | Mathias Buder
|
||||
| xsns_24_si1145 |
|
||||
| xsns_25_spl06-007_sensor | @rai68
|
||||
| xsns_26_lm75ad | Andre Thomas
|
||||
| xsns_27_apds9960 | Shawn Hymel
|
||||
| xsns_28_qmp6988 | @arendst
|
||||
| xsns_29_mcp230xx | Andre Thomas
|
||||
| xsns_30_mpr121 | Rene 'Renne' Bartsch
|
||||
| xsns_31_ccs811 | Gerhard Mutz
|
||||
| xsns_32_mpu6050 | Oliver Welter
|
||||
| xsns_33_qmc5883l | Helge Scheunemann
|
||||
| xsns_34_hx711 | @arendst
|
||||
| xsns_35_tx20 | Thomas Eckerstorfer, Norbert Richter
|
||||
| xsns_36_mgc3130 | Christian Baars
|
||||
| xsns_37_rfsensor | @arendst
|
||||
| xsns_38_az7798 | @adebeun
|
||||
| xsns_39_max31855 | Markus Past
|
||||
| xsns_40_pn532 | Andre Thomas, @md5sum-as
|
||||
| xsns_41_max44009 | @llagendijk
|
||||
| xsns_42_scd30 | @frogmore42
|
||||
| xsns_43_hre | Jon Little
|
||||
| xsns_44_sps30 | Gerhard Mutz
|
||||
| xsns_45_vl53l0x | Gerhard Mutz, Adrian Scillato
|
||||
| xsns_46_mlx90614 | Gerhard Mutz
|
||||
| xsns_47_max31865 | Alberto Lopez Siemens
|
||||
| xsns_48_chirp | Christian Baars
|
||||
| xsns_49 |
|
||||
| xsns_50_paj7620 | Christian Baars
|
||||
| xsns_51_rdm6300 | Gerhard Mutz
|
||||
| xsns_52_esp32_ibeacon | Gerhard Mutz, @btsimonh
|
||||
| xsns_52_ibeacon | Gerhard Mutz
|
||||
| xsns_53_sml | Gerhard Mutz
|
||||
| xsns_54_ina226 | Stephen Rodgers
|
||||
| xsns_55_hih_series |
|
||||
| xsns_56_hpma | David Hunt
|
||||
| xsns_57_tsl2591 | Markus Bösling
|
||||
| xsns_58_dht12 | Stefan Oskam
|
||||
| xsns_59_ds1624 | Leonid Myravje
|
||||
| xsns_60_gps | Christian Baars, Adrian Scillato
|
||||
| xsns_61_mi_nrf24 | Christian Baars
|
||||
| xsns_62_mi_hm10 | Christian Baars
|
||||
| xsns_62_esp32_mi | Christian Baars
|
||||
| xsns_63_aht1x | Martin Wagner
|
||||
| xsns_64_hrxl | Jon Little
|
||||
| xsns_65_hdc1080 | Luis Teixeira
|
||||
| xsns_66_iaq | Christian Baars
|
||||
| xsns_67_as3935 | Martin Wagner
|
||||
| xsns_68_windmeter | Matteo Albinola
|
||||
| xsns_69_opentherm | Yuriy Sannikov
|
||||
| xsns_70_veml6075 | Martin Wagner
|
||||
| xsns_71_veml7700 | Martin Wagner
|
||||
| xsns_72_mcp9808 | Martin Wagner
|
||||
| xsns_73_hp303b | @rjaakke
|
||||
| xsns_74_lmt01 | @justifiably
|
||||
| xsns_75_prometheus | @marius, @mhansen, @hansmi
|
||||
| xsns_76_dyp | Janusz Kostorz
|
||||
| xsns_77_vl53l1x | Rui Marinho, @Jason2866
|
||||
| xsns_78_ezo | Christopher Tremblay
|
||||
| xsns_79_as608 | @boaschti
|
||||
| xsns_80_mfrc522 | @arendst
|
||||
| xsns_81_seesaw_soil | Wayne Ross, Peter Franck
|
||||
| xsns_82_wiegand | Sigurd Leuther
|
||||
| xsns_83_neopool | Norbert Richter
|
||||
| xsns_84_tof10120 | Cyril Pawelko
|
||||
| xsns_85_mpu6886 | @s-hadinger
|
||||
| xsns_86_tfminiplus | Raphael Breiting
|
||||
| xsns_87_can_sniffer | @kwiatek6324, Marius Bezuidenhout
|
||||
| xsns_87_mcp2515 | Marius Bezuidenhout
|
||||
| xsns_88_am2320 | Lars Wessels
|
||||
| xsns_89_t67xx | Alexander Savchenko
|
||||
| xsns_90_hrg15 | Wouter Breukink
|
||||
| xsns_91_vindriktning | Marcel Ritter
|
||||
| xsns_92_scd40 | @frogmore42, @arnold-n
|
||||
| xsns_93_hm330x | @barbudor
|
||||
| xsns_94_hdc2010 | Luc Boudreau
|
||||
| xsns_95_cm1107 | @maksim
|
||||
| xsns_96_flowratemeter | Norbert Richter
|
||||
| xsns_97_hyt | Thomas Schnittcher, Adjan Kretz
|
||||
| xsns_98_sgp40 | Jean-Pierre Deschamps
|
||||
| xsns_99_luxv30b | Marius Bezuidenhout
|
||||
| xsns_100_ina3221 | @barbudor
|
||||
| xsns_101_hmc5883l | Andreas Achtzehn
|
||||
| xsns_102_ld2410 | @arendst
|
||||
| xsns_103_sen5x | @tyeth
|
||||
| xsns_104_pmsa003i | Jean-Pierre Deschamps
|
||||
| xsns_105_lox_o2 | @ACE1046
|
||||
| xsns_106_gdk101 | @Szewcson
|
||||
| xsns_107_gm861 | @arendst
|
||||
| xsns_108_tc74 | Michael Loftis
|
||||
| xsns_109_sgp4x | Andrew Klaus
|
||||
| xsns_110_max17043 | Vincent de Groot
|
||||
| xsns_111_ens16x | Christoph Friese
|
||||
| xsns_112_ens210 | Christoph Friese
|
||||
| xsns_113_hc8 | Daniel Maier
|
||||
| xsns_114_amsx915 | Bastian Urschel
|
||||
| xsns_115_wooliis | Luca Melette
|
||||
| xsns_117_c8_co2_5k | @jeroenvermeulen
|
||||
| |
|
||||
| xsns_127_esp32_sensors | @arendst
|
||||
| |
|
||||
| Libraries |
|
||||
| |
|
||||
| berry | @s-hadinger
|
||||
| ext-printf | @s-hadinger
|
||||
| jsmn | @s-hadinger
|
||||
| unishox | @s-hadinger
|
||||
| matter | @s-hadinger
|
||||
| |
|
||||
| PlatformIO |
|
||||
| |
|
||||
| all | @Jason2866
|
||||
| |
|
||||
| Code | Owner
|
||||
|----------------------------|---------------------------
|
||||
| Tasmota Drivers |
|
||||
| |
|
||||
| xdrv_01_webserver | @arendst
|
||||
| xdrv_02_mqtt | @arendst
|
||||
| xdrv_03_energy | @arendst
|
||||
| xdrv_04_light | @s-hadinger
|
||||
| xdrv_05_irremote | @s-hadinger
|
||||
| xdrv_06_snfbridge | @arendst
|
||||
| xdrv_07_domoticz | @arendst
|
||||
| xdrv_08_serial_bridge | Dániel Zoltán Tolnai
|
||||
| xdrv_09_timers | @arendst
|
||||
| xdrv_10_rules | @arendst, @barbudor
|
||||
| xdrv_10_scripter | @gemu
|
||||
| xdrv_11_knx | @adrian
|
||||
| xdrv_12_discovery | @arendst, @effelle, @emontnemery
|
||||
| xdrv_13_display | @gemu, @s-hadinger
|
||||
| xdrv_14_mp3 | @gemu, @mike2nl
|
||||
| xdrv_15_pca9685 | Andre Thomas
|
||||
| xdrv_16_tuyamcu | @btsimonh
|
||||
| xdrv_17_rcswitch |
|
||||
| xdrv_18_armtronix_dimmers | @wvdv2002
|
||||
| xdrv_19_pz16dz_dimmer | Joel Stein
|
||||
| xdrv_20_hue | @s-hadinger
|
||||
| xdrv_21_wemo | @s-hadinger
|
||||
| xdrv_22_sonoff_ifan | @arendst
|
||||
| xdrv_23_zigbee | @s-hadinger
|
||||
| xdrv_24_buzzer | @arendst
|
||||
| xdrv_25_stepper | Tim Leuscher
|
||||
| xdrv_26_ariluxrf | @arendst
|
||||
| xdrv_27_shutter | @stefanbode
|
||||
| xdrv_28_pcf8574 | @stefanbode
|
||||
| xdrv_29_deepsleep | @stefanbode
|
||||
| xdrv_30_exs_dimmer | Andreas Schultz
|
||||
| xdrv_31_tasmota_client | Andre Thomas
|
||||
| xdrv_32_hotplug | @BASM
|
||||
| xdrv_33_nrf24l01 | @staars
|
||||
| xdrv_34_wemos_motor | Peter Franck
|
||||
| xdrv_35_pwm_dimmer | Paul C Diem
|
||||
| xdrv_36_keeloq | he-so
|
||||
| xdrv_37_sonoff_d1 | @arendst
|
||||
| xdrv_38_ping | @s-hadinger
|
||||
| xdrv_39_thermostat | Javier Argita
|
||||
| xdrv_40_telegram | @arendst
|
||||
| xdrv_41_tcp_bridge | @s-hadinger
|
||||
| xdrv_42_i2s_audio | @gemu
|
||||
| xdrv_43_mlx90640 | @staars
|
||||
| xdrv_44_miel_hvac | David GWynne
|
||||
| xdrv_45_shelly_dimmer | James Turton
|
||||
| xdrv_46_ccloader | @staars
|
||||
| xdrv_47_ftc532 | Peter Franck
|
||||
| xdrv_48_timeprop | Colin Law, Thomas Herrmann
|
||||
| xdrv_49_pid | Colin Law, Thomas Herrmann
|
||||
| xdrv_50_filesystem | @gemu, @barbudor
|
||||
| xdrv_51_bs814a2 | Peter Franck
|
||||
| xdrv_52_berry | @s-hadinger, @staars (ULP)
|
||||
| xdrv_53_projector_ctrl | Jan Bubík
|
||||
| xdrv_54_lvgl | @s-hadinger
|
||||
| xdrv_55_touch | @gemu, @s-hadinger
|
||||
| xdrv_56_rtc_chips | @arendst, @s-hadinger
|
||||
| xdrv_57_tasmesh | @staars
|
||||
| xdrv_58_range_extender | @sillyfrog
|
||||
| xdrv_59_influxdb | @arendst
|
||||
| xdrv_60_shift595 | Jacek Ziółkowski
|
||||
| xdrv_61_ds3502 | f-reiling
|
||||
| xdrv_62_improv | @arendst
|
||||
| xdrv_79_esp32_ble | @staars, @btsimonh
|
||||
| xdrv_81_esp32_webcam | @gemu, @philrich
|
||||
| xdrv_82_esp32_ethernet | @arendst
|
||||
| xdrv_83_esp32_watch | @gemu
|
||||
| xdrv_85_esp32_ble_eq3_trv | @btsimonh
|
||||
| xdrv_86_esp32_sonoff_spm | @arendst
|
||||
| |
|
||||
| Tasmota Sensors |
|
||||
| |
|
||||
| xsns_01_counter | @arendst, @stefanbode
|
||||
| xsns_78_ezo | Christopher Tremblay
|
||||
| |
|
||||
| Libraries |
|
||||
| |
|
||||
| berry | @s-hadinger
|
||||
| ext-printf | @s-hadinger
|
||||
| jsmn | @s-hadinger
|
||||
| unishox | @s-hadinger
|
||||
| |
|
||||
| PlatformIO |
|
||||
| |
|
||||
| all | @Jason2866
|
||||
| |
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./tools/logo/TASMOTA_FullLogo_Vector_White.svg">
|
||||
<img alt="Logo" src="./tools/logo/TASMOTA_FullLogo_Vector.svg" align="right" height="76">
|
||||
</picture>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Contributing
|
||||
|
||||
@ -99,7 +96,7 @@ To accept the CLA it is required to put a x between [ ] on `[ ] I accept the CLA
|
||||
|
||||
**Why a CLA ?**
|
||||
|
||||
_"A Contributor License Agreement (CLA) is strongly recommended when accepting third party contributions to an open development project, such as an open source software project. In order to redistribute contributions, it is necessary to ensure that the project has the necessary rights to do so. A Contributor License Agreement is a lightweight agreement, signed by the copyright holder, that grants the necessary rights for the contribution to be redistributed as part of the project."_ [OSS Watch](http://oss-watch.ac.uk/resources/cla)
|
||||
_"A Contributor Licence Agreement (CLA) is strongly recommended when accepting third party contributions to an open development project, such as an open source software project. In order to redistribute contributions, it is necessary to ensure that the project has the necessary rights to do so. A Contributor Licence Agreement is a lightweight agreement, signed by the copyright holder, that grants the necessary rights for the contribution to be redistributed as part of the project."_ [OSS Watch](http://oss-watch.ac.uk/resources/cla)
|
||||
|
||||
A CLA is a legal document in which you state _you are entitled to contribute the code/documentation/translation to the project_ you’re contributing to and that _you are willing to have it used in distributions and derivative works_. This means that should there be any kind of legal issue in the future as to the origins and ownership of any particular piece of code, then that project has the necessary forms on file from the contributor(s) saying they were permitted to make this contribution.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
Alternative firmware for [ESP8266](https://en.wikipedia.org/wiki/ESP8266) based devices with **easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX**.
|
||||
_Written for PlatformIO with limited support for Arduino IDE._
|
||||
@ -14,11 +14,11 @@ If you like **Tasmota**, give it a star, or fork it and contribute!
|
||||
[](https://github.com/arendst/Tasmota/network)
|
||||
[](https://paypal.me/tasmota)
|
||||
|
||||
See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/CHANGELOG.md) for changes since last release.
|
||||
See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/CHANGELOG.md) for changes since last release.
|
||||
|
||||
## Development
|
||||
|
||||
[](https://github.com/arendst/Tasmota)
|
||||
[](https://github.com/arendst/Tasmota)
|
||||
[](http://ota.tasmota.com/tasmota/)
|
||||
[](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22)
|
||||
[](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22)
|
||||
@ -27,7 +27,7 @@ See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/CHANGELOG
|
||||
|
||||
Unless your Tasmota powered device exhibits a problem or you need to make use of a feature that is not available in the Tasmota version currently installed on your device, leave your device alone - it works so don't make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved.
|
||||
|
||||
If new commits have been merged and they compile successfully, new binary files for every variant will be placed here https://github.com/arendst/Tasmota-firmware/tree/main/firmware (this URL address can NOT be used for OTA updates) It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
|
||||
If new commits have been merged and they compile successfuly, new binary files for every variant will be placed here https://github.com/arendst/Tasmota-firmware/tree/main/firmware (this URL address can NOT be used for OTA updates) It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
|
||||
|
||||
Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update.
|
||||
|
||||
|
223
I2CDEVICES.md
223
I2CDEVICES.md
@ -6,129 +6,100 @@ Using command ``I2cDriver`` individual drivers can be enabled or disabled at run
|
||||
## Supported I2C devices
|
||||
The following table lists the supported I2C devices
|
||||
|
||||
Index | Define | Driver | Device | Address(es) | Bus2 | Description
|
||||
------|---------------------|----------|----------|-------------|------|-----------------------------------------------
|
||||
1 | USE_PCA9685 | xdrv_15 | PCA9685 | 0x40 - 0x47 | | 16-channel 12-bit pwm driver
|
||||
1 | USE_PCA9685_V2 | xdrv_15 | PCA9685 | 0x40 - 0x47 | | 16-channel 12-bit pwm driver
|
||||
2 | USE_PCF8574 | xdrv_28 | PCF8574 | 0x20 - 0x26 | | 8-bit I/O expander (address range overridable)
|
||||
2 | USE_PCF8574 | xdrv_28 | PCF8574A | 0x39 - 0x3F | | 8-bit I/O expander (address range overridable)
|
||||
3 | USE_DISPLAY_LCD | xdsp_01 | | 0x27, 0x3F | | LCD display
|
||||
4 | REMOVED | | | | | USE_DISPLAY_SSD1306 - REMOVED
|
||||
5 | USE_DISPLAY_MATRIX | xdsp_03 | HT16K33 | 0x70 - 0x77 | | 8x8 led matrix
|
||||
6 | REMOVED | | SH1106 | 0x3C - 0x3D | | USE_DISPLAY_SH1106 - REMOVED
|
||||
7 | USE_ADE7953 | xnrg_07 | ADE7953 | 0x38 | | Energy monitor
|
||||
8 | USE_SHT | xsns_07 | SHT1X | Any | | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | HTU21 | 0x40 | Yes | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7013 | 0x40 | Yes | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7020 | 0x40 | Yes | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7021 | 0x40 | Yes | Temperature and Humidity sensor
|
||||
10 | USE_BMP | xsns_09 | BMP085 | 0x76 - 0x77 | Yes | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BMP180 | 0x76 - 0x77 | Yes | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BMP280 | 0x76 - 0x77 | Yes | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BME280 | 0x76 - 0x77 | Yes | Pressure, temperature and humidity sensor
|
||||
10 | USE_BMP | xsns_09 | BME680 | 0x76 - 0x77 | Yes | Pressure, temperature, humidity and gas sensor
|
||||
11 | USE_BH1750 | xsns_10 | BH1750 | 0x23, 0x5C | Yes | Ambient light intensity sensor
|
||||
12 | USE_VEML6070 | xsns_11 | VEML6070 | 0x38 - 0x39 | | Ultra violet light intensity sensor
|
||||
13 | USE_ADS1115 | xsns_12 | ADS1115 | 0x48 - 0x4B | Yes | 4-channel 16-bit A/D converter
|
||||
14 | USE_INA219 | xsns_13 | INA219 | 0x40 - 0x41, 0x44 - 0x45 | | Low voltage current sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHT3X | 0x44 - 0x45 | Yes | Temperature and Humidity sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHT4X | 0x44 - 0x46 | Yes | Temperature and Humidity sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHTCX | 0x70 | Yes | Temperature and Humidity sensor
|
||||
16 | USE_TSL2561 | xsns_16 | TSL2561 | 0x29, 0x39, 0x49 | | Light intensity sensor
|
||||
17 | USE_MGS | xsns_19 | Grove | 0x04 | | Multichannel gas sensor
|
||||
18 | USE_SGP30 | xsns_21 | SGP30 | 0x58 | | Gas (TVOC) and air quality sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1145 | 0x60 | Yes | Ultra violet index and light sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1146 | 0x60 | Yes | Ultra violet index and light sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1147 | 0x60 | Yes | Ultra violet index and light sensor
|
||||
20 | USE_LM75AD | xsns_26 | LM75AD | 0x48 - 0x4F | Yes | Temperature sensor
|
||||
21 | USE_APDS9960 | xsns_27 | APDS9960 | 0x39 | | Proximity ambient light RGB and gesture sensor
|
||||
22 | USE_MCP230xx | xsns_29 | MCP23008 | 0x20 - 0x26 | | 8-bit I/O expander
|
||||
22 | USE_MCP230xx | xsns_29 | MCP23017 | 0x20 - 0x26 | | 16-bit I/O expander
|
||||
23 | USE_MPR121 | xsns_30 | MPR121 | 0x5A - 0x5D | | Proximity capacitive touch sensor
|
||||
24 | USE_CCS811 | xsns_31 | CCS811 | 0x5A | | Gas (TVOC) and air quality sensor
|
||||
24' | USE_CCS811_V2 | xsns_31 | CCS811 | 0x5A - 0x5B | | Gas (TVOC) and air quality sensor
|
||||
25 | USE_MPU6050 | xsns_32 | MPU6050 | 0x68 - 0x69 | | 3-axis gyroscope and temperature sensor
|
||||
26 | USE_DS3231 | xsns_33 | DS1307 | 0x68 | | Real time clock
|
||||
26 | USE_DS3231 | xsns_33 | DS3231 | 0x68 | | Real time clock
|
||||
27 | USE_MGC3130 | xsns_36 | MGC3130 | 0x42 | | Electric field sensor
|
||||
28 | USE_MAX44009 | xsns_41 | MAX44009 | 0x4A - 0x4B | | Ambient light intensity sensor
|
||||
29 | USE_SCD30 | xsns_42 | SCD30 | 0x61 | | CO2 sensor
|
||||
30 | USE_SPS30 | xsns_44 | SPS30 | 0x69 | | Particle sensor
|
||||
31 | USE_VL53L0X | xsns_45 | VL53L0X | 0x29 | | Time-of-flight (ToF) distance sensor
|
||||
32 | USE_MLX90614 | xsns_46 | MLX90614 | 0x5A | | Infra red temperature sensor
|
||||
33 | USE_CHIRP | xsns_48 | CHIRP | 0x20 | | Soil moisture sensor
|
||||
34 | USE_PAJ7620 | xsns_50 | PAJ7620 | 0x73 | | Gesture sensor
|
||||
35 | USE_INA226 | xsns_54 | INA226 | 0x40 - 0x41, 0x44 - 0x45 | | Low voltage current sensor
|
||||
36 | USE_HIH6 | xsns_55 | HIH6130 | 0x27 | | Temperature and Humidity sensor
|
||||
37 | USE_24C256 | xdrv_10 | 24C256 | 0x50 | | Scripter EEPROM storage
|
||||
38 | USE_DISPLAY_ILI9488 | xdsp_08 | FT6236 | 0x38 | | Touch panel controller
|
||||
39 | USE_DISPLAY_RA8876 | xdsp_10 | FT5316 | 0x38 | | Touch panel controller
|
||||
40 | USE_TSL2591 | xsns_57 | TSL2591 | 0x29 | | Light intensity sensor
|
||||
41 | USE_DHT12 | xsns_58 | DHT12 | 0x5C | | Temperature and humidity sensor
|
||||
42 | USE_DS1624 | xsns_59 | DS1621 | 0x48 - 0x4F | | Temperature sensor
|
||||
42 | USE_DS1624 | xsns_59 | DS1624 | 0x48 - 0x4F | | Temperature sensor
|
||||
43 | USE_AHT1x | xsns_63 | AHT10/15 | 0x38 - 0x39 | | Temperature and humidity sensor
|
||||
43 | USE_AHT2x | xsns_63 | AHT20 | 0x38 | | Temperature and humidity sensor
|
||||
43 | USE_AHT2x | xsns_63 | AM2301B | 0x38 | | Temperature and humidity sensor
|
||||
44 | USE_WEMOS_MOTOR_V1 | xdrv_34 | | 0x2D - 0x30 | | WEMOS motor shield v1.0.0 (6612FNG)
|
||||
45 | USE_HDC1080 | xsns_65 | HDC1080 | 0x40 | | Temperature and Humidity sensor
|
||||
46 | USE_IAQ | xsns_66 | IAQ | 0x5a | Yes | Air quality sensor
|
||||
47 | USE_DISPLAY_SEVENSEG| xdsp_11 | HT16K33 | 0x70 - 0x77 | | Seven segment LED
|
||||
48 | USE_AS3935 | xsns_67 | AS3935 | 0x03 | | Franklin Lightning Sensor
|
||||
49 | USE_VEML6075 | xsns_70 | VEML6075 | 0x10 | | UVA/UVB/UVINDEX Sensor
|
||||
50 | USE_VEML7700 | xsns_71 | VEML7700 | 0x10 | | Ambient light intensity sensor
|
||||
51 | USE_MCP9808 | xsns_72 | MCP9808 | 0x18 - 0x1F | | Temperature sensor
|
||||
52 | USE_HP303B | xsns_73 | HP303B | 0x76 - 0x77 | | Pressure and temperature sensor
|
||||
53 | USE_MLX90640 | xdrv_43 | MLX90640 | 0x33 | | IR array temperature sensor
|
||||
54 | USE_VL53L1X | xsns_77 | VL53L1X | 0x29 | | Time-of-flight (ToF) distance sensor
|
||||
55 | USE_EZOPH | xsns_78 | EZOPH | 0x61 - 0x70 | | pH sensor
|
||||
55 | USE_EZOORP | xsns_78 | EZOORP | 0x61 - 0x70 | | ORP sensor
|
||||
55 | USE_EZORTD | xsns_78 | EZORTD | 0x61 - 0x70 | | Temperature sensor
|
||||
55 | USE_EZOHUM | xsns_78 | EZOHUM | 0x61 - 0x70 | | Humidity sensor
|
||||
55 | USE_EZOEC | xsns_78 | EZOEC | 0x61 - 0x70 | | Electric conductivity sensor
|
||||
55 | USE_EZOCO2 | xsns_78 | EZOCO2 | 0x61 - 0x70 | | CO2 sensor
|
||||
55 | USE_EZOO2 | xsns_78 | EZOO2 | 0x61 - 0x70 | | O2 sensor
|
||||
55 | USE_EZOPRS | xsns_78 | EZOPRS | 0x61 - 0x70 | | Pressure sensor
|
||||
55 | USE_EZOFLO | xsns_78 | EZOFLO | 0x61 - 0x70 | | Flow meter sensor
|
||||
55 | USE_EZODO | xsns_78 | EZODO | 0x61 - 0x70 | | Disolved Oxygen sensor
|
||||
55 | USE_EZORGB | xsns_78 | EZORGB | 0x61 - 0x70 | | Color sensor
|
||||
55 | USE_EZOPMP | xsns_78 | EZOPMP | 0x61 - 0x70 | | Peristaltic Pump
|
||||
56 | USE_SEESAW_SOIL | xsns_81 | SEESOIL | 0x36 - 0x39 | | Adafruit seesaw soil moisture sensor
|
||||
57 | USE_TOF10120 | xsns_84 | TOF10120 | 0x52 | | Time-of-flight (ToF) distance sensor
|
||||
58 | USE_MPU_ACCEL | xsns_85 | MPU_ACCEL| 0x68 | Yes | MPU6886/MPU9250 6-axis MotionTracking sensor from M5Stack
|
||||
59 | USE_BM8563 | xdrv_56 | BM8563 | 0x51 | Yes | BM8563 RTC from M5Stack
|
||||
60 | USE_AM2320 | xsns_88 | AM2320 | 0x5C | | Temperature and Humidity sensor
|
||||
61 | USE_T67XX | xsns_89 | T67XX | 0x15 | | CO2 sensor
|
||||
62 | USE_SCD40 | xsns_92 | SCD40 | 0x62 | | CO2 sensor Sensirion SCD40/SCD41
|
||||
63 | USE_HM330X | xsns_93 | HM330X | 0x40 | | Particule sensor
|
||||
64 | USE_HDC2010 | xsns_94 | HDC2010 | 0x40 | | Temperature and Humidity sensor
|
||||
65 | USE_ADE7880 | xnrg_23 | ADE7880 | 0x38 | | Energy monitor
|
||||
66 | USE_PCF85363 | xsns_99 | PCF85363 | 0x51 | | Real time clock
|
||||
67 | USE_DS3502 | xdrv_61 | DS3502 | 0x28 - 0x2B | | Digital potentiometer
|
||||
68 | USE_HYT | xsns_97 | HYTxxx | 0x28 | Yes | Temperature and Humidity sensor
|
||||
69 | USE_SGP40 | xsns_98 | SGP40 | 0x59 | | Gas (TVOC) and air quality
|
||||
70 | USE_LUXV30B | xsns_99 | LUXV30B | 0x4A | | DFRobot SEN0390 V30B lux sensor
|
||||
71 | USE_QMC5883L | xsns_33 | QMC5883L | 0x0D | | Magnetic Field Sensor
|
||||
72 | USE_INA3221 | xsns_100 | INA3221 | 0x40-0x43 | | 3-channels Voltage and Current sensor
|
||||
73 | USE_HMC5883L | xsns_101 | HMC5883L | 0x1E | | 3-channels Magnetic Field Sensor
|
||||
74 | USE_DISPLAY_TM1650 | xdsp_20 | TM1650 | 0x24 - 0x27, 0x34 - 0x37 | | Four-digit seven-segment LED controller
|
||||
75 | USE_PCA9632 | xdrv_64 | PCA9632 | 0x60 | | 4-channel 4-bit pwm driver
|
||||
76 | USE_SEN5X | xsns_103 | SEN5X | 0x69 | Yes | Gas (VOC/NOx index) and air quality (PPM <1,<2.5,<4,<10)
|
||||
77 | USE_MCP23XXX_DRV | xdrv_67 | MCP23x17 | 0x20 - 0x26 | | 16-bit I/O expander as virtual button/switch/relay
|
||||
78 | USE_PMSA003I | xsns_104 | PMSA003I | 0x12 | | PM2.5 Air Quality Sensor with I2C Interface
|
||||
79 | USE_GDK101 | xsns_106 | GDK101 | 0x18 - 0x1B | | Gamma Radiation Sensor
|
||||
80 | USE_TC74 | xsns_108 | TC74 | 0x48 - 0x4F | | Temperature sensor
|
||||
81 | USE_PCA9557 | xdrv_69 | PCA95xx | 0x18 - 0x1F | | 8-bit I/O expander as virtual button/switch/relay
|
||||
82 | USE_SGP4X | xsns_109 | SGP4X | 0x59 | | Gas (TVOC/NOx index)
|
||||
83 | USE_MAX17043 | xsns_110 | MAX17043 | 0x36 | | Fuel-gauge for 3.7 Volt Lipo battery
|
||||
84 | USE_ENS16x | xsns_111 | ENS16x | 0x52 - 0x53 | | Gas (TVOC, eCO2) and air quality sensor
|
||||
85 | USE_ENS210 | xsns_112 | ENS210 | 0x43 - 0x44 | | Temperature and humidity sensor
|
||||
86 | USE_AMSX915 | xsns_114 | AMS6915 | 0x28 | | Pressure (absolute/differential) and temperature sensor
|
||||
87 | USE_SPL06_007 | xsns_25 | SPL06-007 | 0x76 | | Pressure and temperature sensor
|
||||
88 | USE_QMP6988 | xsns_28 | QMP6988 | 0x56, 0x70 | Yes | Pressure and temperature sensor
|
||||
89 | USE_HX711_M5SCALES | xsns_34 | M5SCALES | 0x26 | Yes | M5Unit (Mini)Scales(HX711 STM32) U177
|
||||
90 | USE_RX8010 | xdrv_56 | RX8010 | 0x32 | Yes | RX8010 RTC from IOTTIMER
|
||||
91 | USE_MS5837 | xsns_116 | MS5837 | 0x76 | | Pressure and temperature sensor
|
||||
92 | USE_PCF85063 | xdrv_56 | PCF85063 | 0x51 | | PCF85063 Real time clock
|
||||
|
||||
NOTE: Bus2 supported on ESP32 only.
|
||||
Index | Define | Driver | Device | Address(es) | Description
|
||||
------|---------------------|---------|----------|-------------|-----------------------------------------------
|
||||
1 | USE_PCA9685 | xdrv_15 | PCA9685 | 0x40 - 0x47 | 16-channel 12-bit pwm driver
|
||||
2 | USE_PCF8574 | xdrv_28 | PCF8574 | 0x20 - 0x26 | 8-bit I/O expander
|
||||
2 | USE_PCF8574 | xdrv_28 | PCF8574A | 0x39 - 0x3F | 8-bit I/O expander
|
||||
3 | USE_DISPLAY_LCD | xdsp_01 | | 0x27, 0x3F | LCD display
|
||||
4 | USE_DISPLAY_SSD1306 | xdsp_02 | SSD1306 | 0x3C - 0x3D | Oled display
|
||||
5 | USE_DISPLAY_MATRIX | xdsp_03 | HT16K33 | 0x70 - 0x77 | 8x8 led matrix
|
||||
6 | USE_DISPLAY_SH1106 | xdsp_07 | SH1106 | 0x3C - 0x3D | Oled display
|
||||
7 | USE_ADE7953 | xnrg_07 | ADE7953 | 0x38 | Energy monitor
|
||||
8 | USE_SHT | xsns_07 | SHT1X | Any | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | HTU21 | 0x40 | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7013 | 0x40 | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7020 | 0x40 | Temperature and Humidity sensor
|
||||
9 | USE_HTU | xsns_08 | SI7021 | 0x40 | Temperature and Humidity sensor
|
||||
10 | USE_BMP | xsns_09 | BMP085 | 0x76 - 0x77 | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BMP180 | 0x76 - 0x77 | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BMP280 | 0x76 - 0x77 | Pressure and temperature sensor
|
||||
10 | USE_BMP | xsns_09 | BME280 | 0x76 - 0x77 | Pressure, temperature and humidity sensor
|
||||
10 | USE_BMP | xsns_09 | BME680 | 0x76 - 0x77 | Pressure, temperature, humidity and gas sensor
|
||||
11 | USE_BH1750 | xsns_10 | BH1750 | 0x23, 0x5C | Ambient light intensity sensor
|
||||
12 | USE_VEML6070 | xsns_11 | VEML6070 | 0x38 - 0x39 | Ultra violet light intensity sensor
|
||||
13 | USE_ADS1115 | xsns_12 | ADS1115 | 0x48 - 0x4B | 4-channel 16-bit A/D converter
|
||||
14 | USE_INA219 | xsns_13 | INA219 | 0x40 - 0x41, 0x44 - 0x45 | Low voltage current sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHT3X | 0x44 - 0x45 | Temperature and Humidity sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHT4X | 0x44 - 0x45 | Temperature and Humidity sensor
|
||||
15 | USE_SHT3X | xsns_14 | SHTCX | 0x70 | Temperature and Humidity sensor
|
||||
16 | USE_TSL2561 | xsns_16 | TSL2561 | 0x29, 0x39, 0x49 | Light intensity sensor
|
||||
17 | USE_MGS | xsns_19 | Grove | 0x04 | Multichannel gas sensor
|
||||
18 | USE_SGP30 | xsns_21 | SGP30 | 0x58 | Gas (TVOC) and air quality sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1145 | 0x60 | Ultra violet index and light sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1146 | 0x60 | Ultra violet index and light sensor
|
||||
19 | USE_SI1145 | xsns_24 | SI1147 | 0x60 | Ultra violet index and light sensor
|
||||
20 | USE_LM75AD | xsns_26 | LM75AD | 0x48 - 0x4F | Temperature sensor
|
||||
21 | USE_APDS9960 | xsns_27 | APDS9960 | 0x39 | Proximity ambient light RGB and gesture sensor
|
||||
22 | USE_MCP230xx | xsns_29 | MCP23008 | 0x20 - 0x26 | 8-bit I/O expander
|
||||
22 | USE_MCP230xx | xsns_29 | MCP23017 | 0x20 - 0x26 | 16-bit I/O expander
|
||||
23 | USE_MPR121 | xsns_30 | MPR121 | 0x5A - 0x5D | Proximity capacitive touch sensor
|
||||
24 | USE_CCS811 | xsns_31 | CCS811 | 0x5A | Gas (TVOC) and air quality sensor
|
||||
25 | USE_MPU6050 | xsns_32 | MPU6050 | 0x68 - 0x69 | 3-axis gyroscope and temperature sensor
|
||||
26 | USE_DS3231 | xsns_33 | DS3231 | 0x68 | Real time clock
|
||||
27 | USE_MGC3130 | xsns_36 | MGC3130 | 0x42 | Electric field sensor
|
||||
28 | USE_MAX44009 | xsns_41 | MAX44009 | 0x4A - 0x4B | Ambient light intensity sensor
|
||||
29 | USE_SCD30 | xsns_42 | SCD30 | 0x61 | CO2 sensor
|
||||
30 | USE_SPS30 | xsns_44 | SPS30 | 0x69 | Particle sensor
|
||||
31 | USE_VL53L0X | xsns_45 | VL53L0X | 0x29 | Time-of-flight (ToF) distance sensor
|
||||
32 | USE_MLX90614 | xsns_46 | MLX90614 | 0x5A | Infra red temperature sensor
|
||||
33 | USE_CHIRP | xsns_48 | CHIRP | 0x20 | Soil moisture sensor
|
||||
34 | USE_PAJ7620 | xsns_50 | PAJ7620 | 0x73 | Gesture sensor
|
||||
35 | USE_INA226 | xsns_54 | INA226 | 0x40 - 0x41, 0x44 - 0x45 | Low voltage current sensor
|
||||
36 | USE_HIH6 | xsns_55 | HIH6130 | 0x27 | Temperature and Humidity sensor
|
||||
37 | USE_24C256 | xdrv_10 | 24C256 | 0x50 | Scripter EEPROM storage
|
||||
38 | USE_DISPLAY_ILI9488 | xdsp_08 | FT6236 | 0x38 | Touch panel controller
|
||||
39 | USE_DISPLAY_RA8876 | xdsp_10 | FT5316 | 0x38 | Touch panel controller
|
||||
40 | USE_TSL2591 | xsns_57 | TLS2591 | 0x29 | Light intensity sensor
|
||||
41 | USE_DHT12 | xsns_58 | DHT12 | 0x5C | Temperature and humidity sensor
|
||||
42 | USE_DS1624 | xsns_59 | DS1621 | 0x48 - 0x4F | Temperature sensor
|
||||
42 | USE_DS1624 | xsns_59 | DS1624 | 0x48 - 0x4F | Temperature sensor
|
||||
43 | USE_AHT1x | xsns_63 | AHT10/15 | 0x38 - 0x39 | Temperature and humidity sensor
|
||||
43 | USE_AHT2x | xsns_63 | AHT20 | 0x38 | Temperature and humidity sensor
|
||||
43 | USE_AHT2x | xsns_63 | AM2301B | 0x38 | Temperature and humidity sensor
|
||||
44 | USE_WEMOS_MOTOR_V1 | xdrv_34 | | 0x2D - 0x30 | WEMOS motor shield v1.0.0 (6612FNG)
|
||||
45 | USE_HDC1080 | xsns_65 | HDC1080 | 0x40 | Temperature and Humidity sensor
|
||||
46 | USE_IAQ | xsns_66 | IAQ | 0x5a | Air quality sensor
|
||||
47 | USE_DISPLAY_SEVENSEG| xdsp_11 | HT16K33 | 0x70 - 0x77 | Seven segment LED
|
||||
48 | USE_AS3935 | xsns_67 | AS3935 | 0x03 | Franklin Lightning Sensor
|
||||
49 | USE_VEML6075 | xsns_70 | VEML6075 | 0x10 | UVA/UVB/UVINDEX Sensor
|
||||
50 | USE_VEML7700 | xsns_71 | VEML7700 | 0x10 | Ambient light intensity sensor
|
||||
51 | USE_MCP9808 | xsns_72 | MCP9808 | 0x18 - 0x1F | Temperature sensor
|
||||
52 | USE_HP303B | xsns_73 | HP303B | 0x76 - 0x77 | Pressure and temperature sensor
|
||||
53 | USE_MLX90640 | xdrv_43 | MLX90640 | 0x33 | IR array temperature sensor
|
||||
54 | USE_VL53L1X | xsns_77 | VL53L1X | 0x29 | Time-of-flight (ToF) distance sensor
|
||||
55 | USE_EZOPH | xsns_78 | EZOPH | 0x61 - 0x70 | pH sensor
|
||||
55 | USE_EZOORP | xsns_78 | EZOORP | 0x61 - 0x70 | ORP sensor
|
||||
55 | USE_EZORTD | xsns_78 | EZORTD | 0x61 - 0x70 | Temperature sensor
|
||||
55 | USE_EZOHUM | xsns_78 | EZOHUM | 0x61 - 0x70 | Humidity sensor
|
||||
55 | USE_EZOEC | xsns_78 | EZOEC | 0x61 - 0x70 | Electric conductivity sensor
|
||||
55 | USE_EZOCO2 | xsns_78 | EZOCO2 | 0x61 - 0x70 | CO2 sensor
|
||||
55 | USE_EZOO2 | xsns_78 | EZOO2 | 0x61 - 0x70 | O2 sensor
|
||||
55 | USE_EZOPRS | xsns_78 | EZOPRS | 0x61 - 0x70 | Pressure sensor
|
||||
55 | USE_EZOFLO | xsns_78 | EZOFLO | 0x61 - 0x70 | Flow meter sensor
|
||||
55 | USE_EZODO | xsns_78 | EZODO | 0x61 - 0x70 | Disolved Oxygen sensor
|
||||
55 | USE_EZORGB | xsns_78 | EZORGB | 0x61 - 0x70 | Color sensor
|
||||
55 | USE_EZOPMP | xsns_78 | EZOPMP | 0x61 - 0x70 | Peristaltic Pump
|
||||
56 | USE_SEESAW_SOIL | xsns_81 | SEESOIL | 0x36 - 0x39 | Adafruit seesaw soil moisture sensor
|
||||
57 | USE_TOF10120 | xsns_84 | TOF10120 | 0x52 | Time-of-flight (ToF) distance sensor
|
||||
58 | USE_MPU_ACCEL | xsns_85 | MPU_ACCEL| 0x68 | MPU6886/MPU9250 6-axis MotionTracking sensor from M5Stack
|
||||
59 | USE_BM8563 | xdrv_56 | BM8563 | 0x51 | BM8563 RTC from M5Stack
|
||||
60 | USE_AM2320 | xsns_88 | AM2320 | 0x5C | Temperature and Humidity sensor
|
||||
61 | USE_T67XX | xsns_89 | T67XX | 0x15 | CO2 sensor
|
||||
62 | USE_SCD40 | xsns_92 | SCD40 | 0x62 | CO2 sensor Sensirion SCD40/SCD41
|
||||
63 | USE_HM330X | xsns_93 | HM330X | 0x40 | Particule sensor
|
||||
64 | USE_HDC2010 | xsns_94 | HDC2010 | 0x40 | Temperature and Humidity sensor
|
||||
65 | USE_ADE7880 | xnrg_23 | ADE7880 | 0x38 | Energy monitor
|
||||
66 | USE_PCF85363 | xsns_99 | PCF85363 | 0x51 | Real time clock
|
||||
67 | USE_DS3502 | xdrv_61 | DS3502 | 0x28 - 0x2B | Digital potentiometer
|
||||
68 | USE_HYT | xsns_97 | HYTxxx | 0x28 | Temperature and Humidity sensor
|
||||
|
@ -94,4 +94,4 @@ Module | LCode | Description
|
||||
06 TTGO Watch | x | TTGO Watch
|
||||
07 M5Stack Core2 | x | M5Stack Core2
|
||||
|
||||
Over 2800 additional devices are supported using [templates](TEMPLATES.md).
|
||||
Over 2400 additional devices are supported using [templates](TEMPLATES.md).
|
||||
|
16
README.md
16
README.md
@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
Alternative firmware for [ESP8266](https://en.wikipedia.org/wiki/ESP8266) and [ESP32](https://en.wikipedia.org/wiki/ESP32) based devices with **easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX**.
|
||||
_Written for PlatformIO._
|
||||
@ -6,7 +6,7 @@ _Written for PlatformIO._
|
||||
[](http://ota.tasmota.com/tasmota/release)
|
||||
[](https://github.com/arendst/Tasmota/releases/latest)
|
||||
[](LICENSE.txt)
|
||||
[](https://discord.gg/Ks2Kzd4)
|
||||
[](https://discord.gg/Ks2Kzd4)
|
||||
[](https://gitpod.io/#https://github.com/arendst/Tasmota)
|
||||
|
||||
<hr></hr>
|
||||
@ -31,7 +31,7 @@ Firmware binaries can be downloaded from http://ota.tasmota.com/tasmota/release/
|
||||
|
||||
## Development
|
||||
|
||||
[](https://github.com/arendst/Tasmota)
|
||||
[](https://github.com/arendst/Tasmota)
|
||||
[](http://ota.tasmota.com/tasmota/)
|
||||
[](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml)
|
||||
[](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml)
|
||||
@ -40,13 +40,13 @@ See [CHANGELOG.md](CHANGELOG.md) for detailed change information.
|
||||
|
||||
Unless your Tasmota powered device exhibits a problem or lacks a feature that you need, leave your device alone - it works so don’t make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved.
|
||||
|
||||
Every commit made to the development branch, which is compiling successfully, will post new binary files at http://ota.tasmota.com/tasmota/ (this web address can be used for OTA updates too). It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
|
||||
Every commit made to the development branch, which is compiling successfuly, will post new binary files at http://ota.tasmota.com/tasmota/ (this web address can be used for OTA updates too). It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
|
||||
|
||||
Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update.
|
||||
|
||||
## Disclaimer
|
||||
|
||||
:warning: **DANGER OF ELECTROCUTION** :warning:
|
||||
st:warning: **DANGER OF ELECTROCUTION** :warning:
|
||||
|
||||
If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don't know how to install it, please call an electrician (***Beware:*** certain countries prohibit installation without a licensed electrician present). Remember: _**SAFETY FIRST**_. It is not worth the risk to yourself, your family and your home if you don't know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power).
|
||||
|
||||
@ -129,8 +129,6 @@ You can contribute to Tasmota by
|
||||
## Credits
|
||||
|
||||
People helping to keep the show on the road:
|
||||
- Sfromis providing extensive user support
|
||||
- Barbudor providing user support and code fixes and additions
|
||||
- David Lang providing initial issue resolution and code optimizations
|
||||
- Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers
|
||||
- Wiktor Schmidt for Travis CI implementation
|
||||
@ -156,7 +154,7 @@ People helping to keep the show on the road:
|
||||
- Joel Stein, digiblur and Shantur Rathore for their Tuya research and driver
|
||||
- Frogmore42 for providing many issue answers
|
||||
- Jason2866 for platformio support and providing many issue answers
|
||||
- Blakadder for managing the document site and providing template management
|
||||
- Blakadder for managing the new document site and providing template management
|
||||
- Stephan Hadinger for refactoring light driver, enhancing HueEmulation, LVGL, Zigbee and Berry support
|
||||
- tmo for designing the official Tasmota logo
|
||||
- Stefan Bode for his Shutter and Deep sleep drivers
|
||||
@ -170,4 +168,4 @@ People helping to keep the show on the road:
|
||||
|
||||
## License
|
||||
|
||||
This program is licensed under GPL-3.0-only
|
||||
This program is licensed under GPL-3.0
|
@ -1,7 +1,4 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./tools/logo/TASMOTA_FullLogo_Vector_White.svg">
|
||||
<img alt="Logo" src="./tools/logo/TASMOTA_FullLogo_Vector.svg" align="right" height="76">
|
||||
</picture>
|
||||
<img src="https://github.com/arendst/Tasmota/blob/master/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# RELEASE NOTES
|
||||
|
||||
@ -17,7 +14,7 @@ Pay attention to the following version breaks due to dynamic settings updates:
|
||||
|
||||
1. Migrate to **Sonoff-Tasmota 3.9.x**
|
||||
2. Migrate to **Sonoff-Tasmota 4.x**
|
||||
3. Migrate to **Sonoff-Tasmota 5.14** (http://ota.tasmota.com/tasmota/release_5.14.0/sonoff.bin) - NOTICE underscore as a dash is not supported in older versions
|
||||
3. Migrate to **Sonoff-Tasmota 5.14**
|
||||
4. Migrate to **Sonoff-Tasmota 6.7.1** (http://ota.tasmota.com/tasmota/release_6.7.1/sonoff.bin) - NOTICE underscore as a dash is not supported in older versions
|
||||
5. Migrate to **Tasmota 7.2.0** (http://ota.tasmota.com/tasmota/release-7.2.0/tasmota.bin)
|
||||
|
||||
@ -34,11 +31,11 @@ While fallback or downgrading is common practice it was never supported due to S
|
||||
|
||||
## Supported Core versions
|
||||
|
||||
This release will be supported from ESP8266/Arduino library Core version **2.7.8** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
|
||||
This release will be supported from ESP8266/Arduino library Core version **2.7.4.9** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
|
||||
|
||||
This release will be supported from ESP32/Arduino library Core version **v3.1.3.250411**.
|
||||
This release will be supported from ESP32/Arduino library Core version **2.0.4.1**.
|
||||
|
||||
Support of ESP8266 Core versions before 2.7.8 and ESP32 Core versions before v3.1.3.250411 have been removed.
|
||||
Support of ESP8266 Core versions before 2.7.4.9 and ESP32 Core versions before 2.0.4.1 have been removed.
|
||||
|
||||
## Support of TLS
|
||||
|
||||
@ -55,11 +52,11 @@ Easy initial installation of Tasmota can be performed using the [Tasmota WebInst
|
||||
## Provided Binary Downloads
|
||||
|
||||
### ESP8266 or ESP8285 based
|
||||
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.7.8**.
|
||||
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.7.4.9**.
|
||||
|
||||
- **tasmota.bin** = The Tasmota version with most drivers for 1M+ flash. **RECOMMENDED RELEASE BINARY**
|
||||
- **tasmota-4M.bin** = The Tasmota version with most drivers and filesystem for 4M+ flash.
|
||||
- **tasmota-AD.bin** to **tasmota-VN.bin** = The Tasmota version in different languages for 1M+ flash.
|
||||
- **tasmota4M.bin** = The Tasmota version with most drivers and filesystem for 4M+ flash.
|
||||
- **tasmota-AF.bin** to **tasmota-VN.bin** = The Tasmota version in different languages for 1M+ flash.
|
||||
- **tasmota-lite.bin** = The Lite version without most drivers and sensors for 1M+ flash.
|
||||
- **tasmota-knx.bin** = The Knx version without some features but adds KNX support for 1M+ flash.
|
||||
- **tasmota-sensors.bin** = The Sensors version adds more useful sensors for 1M+ flash.
|
||||
@ -71,26 +68,22 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
||||
Above binaries are also available as gzipped version allowing faster uploads.
|
||||
|
||||
Latest released binaries can be downloaded from
|
||||
- https://github.com/arendst/Tasmota-firmware/tree/firmware/release-firmware
|
||||
- https://github.com/arendst/Tasmota-firmware/tree/main/release-firmware
|
||||
- http://ota.tasmota.com/tasmota/release
|
||||
|
||||
Historical binaries can be downloaded from
|
||||
- http://ota.tasmota.com/tasmota/release-14.6.0
|
||||
- http://ota.tasmota.com/tasmota/release-12.1.1
|
||||
|
||||
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
|
||||
|
||||
### ESP32, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-S2 and ESP32-S3 based
|
||||
The following binary downloads have been compiled with ESP32/Arduino library core version **v3.1.3.250411**.
|
||||
### ESP32, ESP32-C3, ESP32-S2 and ESP32-S3 based
|
||||
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.4.1**.
|
||||
|
||||
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
|
||||
- **tasmota32xy.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3/S2/S3 and 4M+ flash.
|
||||
- **tasmota32xycdc.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3/S2/S3 with serial over embedded USB CDC only and 4M+ flash.
|
||||
- **tasmota32solo1.bin** = The Tasmota version with most drivers including additional sensors and KNX for single core ESP32 and 4M+ flash.
|
||||
- **tasmota32s2.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-S2 with serial and 4M+ flash.
|
||||
- **tasmota32s2cdc.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-S2 with serial over embedded USB CDC only and 4M+ flash.
|
||||
- **tasmota32s3.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-S3 with USB HWCDC and fallback to serial and 4M+ flash.
|
||||
- **tasmota32c2.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C2 with serial and 4M+ flash.
|
||||
- **tasmota32c3.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3 with USB HWCDC and fallback to serial and 4M+ flash.
|
||||
- **tasmota32c6.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C6 with USB HWCDC and fallback to serial and 4M+ flash.
|
||||
- **tasmota32-AD.bin** to **tasmota32-VN.bin** = The Tasmota version in different languages for 4M+ flash.
|
||||
- **tasmota32-AF.bin** to **tasmota32-VN.bin** = The Tasmota version in different languages for 4M+ flash.
|
||||
- **tasmota32-bluetooth.bin** = The Bluetooth version adds BLE support for 4M+ flash.
|
||||
- **tasmota32-display.bin** = The Display version without Energy Monitoring but adds display support for 4M+ flash.
|
||||
- **tasmota32-ir.bin** = The InfraRed Receiver and transmitter version allowing all available protocols provided by library IRremoteESP8266 but without most other features for 4M+ flash.
|
||||
@ -100,13 +93,13 @@ The following binary downloads have been compiled with ESP32/Arduino library cor
|
||||
- **tasmota32-zbbridgepro.bin** - The Sonoff Zigbee Bridge Pro version with CC2652P firmware load support.
|
||||
|
||||
Latest released binaries can be downloaded from
|
||||
- https://github.com/arendst/Tasmota-firmware/tree/firmware/release-firmware
|
||||
- https://ota.tasmota.com/tasmota32/release
|
||||
- https://github.com/arendst/Tasmota-firmware/tree/main/release-firmware
|
||||
- http://ota.tasmota.com/tasmota32/release
|
||||
|
||||
Historical binaries can be downloaded from
|
||||
- https://ota.tasmota.com/tasmota32/release-14.6.0
|
||||
- http://ota.tasmota.com/tasmota32/release-12.1.1
|
||||
|
||||
The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasmota.com/tasmota32/release/tasmota32.bin``
|
||||
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin``
|
||||
|
||||
## Additional information
|
||||
|
||||
@ -114,18 +107,40 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
|
||||
[Complete list](BUILDS.md) of available feature and sensors.
|
||||
|
||||
## Changelog v14.6.0.1
|
||||
## Changelog v12.1.1 Patricia
|
||||
### Added
|
||||
- Command `JsonPP 0..7` to enable (>0) JSON Pretty Print on user interfaces and set number of indents
|
||||
- Command `JsonPP <command>|backlog <command>;...` to enable JSON PP only once
|
||||
- Command ``SetOption45 1..250`` to change default bistable latching relay pulse length of 40 milliseconds
|
||||
- Command ``SetOption144 1`` includes a timestamp in zigbee `ZbReceived` messages
|
||||
- Command ``GlobalTemp2 1..250`` to select Global Temperature source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834)
|
||||
- Command ``GlobalHum2 1..250`` to select Global Humidity source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834)
|
||||
- Command ``GlobalPress2 1..250`` to select Global Pressure source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834)
|
||||
- Command ``Sleep2 !`` to cancel pending one-shot speed setting [#15954](https://github.com/arendst/Tasmota/issues/15954)
|
||||
- Commands ``WifiScan`` and ``WifiTest`` [#16141](https://github.com/arendst/Tasmota/issues/16141)
|
||||
- Support for 5-channel light dimmer driver SM2335 used in SwitchBot Color Bulbs [#15839](https://github.com/arendst/Tasmota/issues/15839)
|
||||
- Support for Sonoff POWR3xxD and THR3xxD [#15856](https://github.com/arendst/Tasmota/issues/15856)
|
||||
- Support for bistable (latching) relays mixed with monostable relays using GPIO Relay_b or Relay_bi as used by Sonoff POWR320D and THR320D
|
||||
- Support for Modbus bridge adding commands ``ModbusSend``, ``ModbusBaudrate`` and ``ModbusSerialConfig`` [#16013](https://github.com/arendst/Tasmota/issues/16013)
|
||||
- Support for multiple ``IRsend`` GPIOs [#16138](https://github.com/arendst/Tasmota/issues/16138)
|
||||
- Support for Catalan language translations by Albert Gonzalez [#16145](https://github.com/arendst/Tasmota/issues/16145)
|
||||
- Zigbee added recording of when the battery was last reported [#16146](https://github.com/arendst/Tasmota/issues/16146)
|
||||
- Zigbee add Battery auto-probe (can be disabled with ``SetOption143 1``) [#16148](https://github.com/arendst/Tasmota/issues/16148)
|
||||
- ESP32 Support for Ultra Low Power (ULP) coprocessor via Berry by Christian Staars [#15916](https://github.com/arendst/Tasmota/issues/15916)
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
### Changed
|
||||
- Allow command `WebRefresh` minimum from 1000 to 400 mSec
|
||||
- TasmotaModbus library from v3.4.0 to v3.5.0 [#16245](https://github.com/arendst/Tasmota/issues/16245)
|
||||
- ESP32 Arduino core from v2.0.3 to v2.0.4.1 [#15940](https://github.com/arendst/Tasmota/issues/15940)
|
||||
- ESP32 LVGL library from v8.2.0 to v8.3.0 [#16019](https://github.com/arendst/Tasmota/issues/16019)
|
||||
- Driver DHT v6 consolidation for both ESP8266 and ESP32 to support SI7021, THS01 and MS01 on ESP32 [#15856](https://github.com/arendst/Tasmota/issues/15856)
|
||||
|
||||
### Fixed
|
||||
- Berry `bytes().asstring()` now truncates a string if buffer contains NULL [#23311](https://github.com/arendst/Tasmota/issues/23311)
|
||||
- Berry string literals containing NULL are truncated [#23312](https://github.com/arendst/Tasmota/issues/23312)
|
||||
- Restore EnergyToday after using command ``restart 2`` and power cycle [#16118](https://github.com/arendst/Tasmota/issues/16118)
|
||||
- ESP32 SendMail not working over ethernet [#15794](https://github.com/arendst/Tasmota/issues/15794)
|
||||
- RTC not detected when lights are present [#16242](https://github.com/arendst/Tasmota/issues/16242)
|
||||
- DNS lookup for .local domains [#16273](https://github.com/arendst/Tasmota/issues/16273)
|
||||
- Button response delay regression from v12.0.2.4 [#16319](https://github.com/arendst/Tasmota/issues/16319)
|
||||
- Lost module name in GUI regression from v12.0.2.4 - 20220803 [#16324](https://github.com/arendst/Tasmota/issues/16324)
|
||||
|
||||
### Removed
|
||||
- Arduino IDE support
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report security issues to [Tasmota](https://ota.tasmota.com/tasmota/contact/contact.php)
|
||||
Please report security issues to https://sidweb.nl/cms3/en/contact
|
||||
|
@ -1,7 +1,4 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./tools/logo/TASMOTA_FullLogo_Vector_White.svg">
|
||||
<img alt="Logo" src="./tools/logo/TASMOTA_FullLogo_Vector.svg" align="right" height="76">
|
||||
</picture>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Templates
|
||||
|
||||
|
676
TEMPLATES.md
676
TEMPLATES.md
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
// mkdir and chmod arduino folder to 777
|
||||
//
|
||||
//var_dump($_FILES);
|
||||
|
||||
/**
|
||||
* GZIPs a file on disk (appending .gz to the name)
|
||||
*
|
||||
* From http://stackoverflow.com/questions/6073397/how-do-you-create-a-gz-file-using-php
|
||||
* Based on function by Kioob at:
|
||||
* http://www.php.net/manual/en/function.gzwrite.php#34955
|
||||
*
|
||||
* @param string $source Path to file that should be compressed
|
||||
* @param integer $level GZIP compression level (default: 9)
|
||||
* @return string New filename (with .gz appended) if success, or false if operation fails
|
||||
*/
|
||||
function gzCompressFile($source, $level = 9){
|
||||
$dest = $source . '.gz';
|
||||
$mode = 'wb' . $level;
|
||||
$error = false;
|
||||
if ($fp_out = gzopen($dest, $mode)) {
|
||||
if ($fp_in = fopen($source,'rb')) {
|
||||
while (!feof($fp_in))
|
||||
gzwrite($fp_out, fread($fp_in, 1024 * 512));
|
||||
fclose($fp_in);
|
||||
} else {
|
||||
$error = true;
|
||||
}
|
||||
gzclose($fp_out);
|
||||
} else {
|
||||
$error = true;
|
||||
}
|
||||
if ($error)
|
||||
return false;
|
||||
else
|
||||
return $dest;
|
||||
}
|
||||
|
||||
$image = basename($_FILES["file"]["name"]);
|
||||
//$image = $_FILES["file"]["name"]; // Solves an issue where basename returns Array
|
||||
$target_file = "tasmota/".$image;
|
||||
$hostname = $_SERVER['SERVER_NAME'];
|
||||
|
||||
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
|
||||
if (strpos($target_file, "tasmota32") | strpos($target_file, ".gz")) {
|
||||
echo "The file $image has been uploaded to OTA server $hostname. \n";
|
||||
} else {
|
||||
gzCompressFile($target_file);
|
||||
echo "The files $image and $image.gz have been uploaded to OTA server $hostname. \n";
|
||||
}
|
||||
} else {
|
||||
echo "Sorry, there was an error uploading your file $image to OTA server $hostname. \n";
|
||||
}
|
||||
?>
|
46
boards/esp32-cam.json
Normal file
46
boards/esp32-cam.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DHAS_PSRAM_FIX -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "AI Thinker ESP32-CAM, 4M Flash 4MB PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://wiki.ai-thinker.com/esp32-cam",
|
||||
"vendor": "AI Thinker"
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DHAS_PSRAM_FIX -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DESP32_4M",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 >= 4M Flash, PSRAM with fix, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
38
boards/esp32-m5core2.json
Normal file
38
boards/esp32-m5core2.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_M5STACK_Core2 -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_16M",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "m5stack_core2",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "M5Stack Core2 16M Flash, 4MB PSRAM, Tasmota 2944k Code/OTA, 10M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "http://www.m5stack.com",
|
||||
"vendor": "M5Stack"
|
||||
}
|
38
boards/esp32-odroid.json
Normal file
38
boards/esp32-odroid.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ODROID_ESP32 -DBOARD_HAS_PSRAM -DHAS_PSRAM_FIX -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_16M",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "odroid_esp32",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "ESP32 ODROID-GO 16M Flash, 4MB PSRAM, Tasmota 2944k Code/OTA, 10M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://www.hardkernel.com/main/products/prdt_info.php?g_code=G152875062626",
|
||||
"vendor": "Hardkernel"
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP32_4M -DCORE32SOLO1",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32-solo-1.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-solo1 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32solo1-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://www.espressif.com/sites/default/files/documentation/esp32-solo-1_datasheet_en.pdf",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
38
boards/esp32_16M.json
Normal file
38
boards/esp32_16M.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_16M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 16M Flash, Tasmota 2944k Code/OTA, 10M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
46
boards/esp32_4M.json
Normal file
46
boards/esp32_4M.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
46
boards/esp32_4M_FS.json
Normal file
46
boards/esp32_4M_FS.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app1856k_fs1344k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
38
boards/esp32_4M_Legacy.json
Normal file
38
boards/esp32_4M_Legacy.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app1856k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
38
boards/esp32_8M.json
Normal file
38
boards/esp32_8M.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_8M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs2M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 8M Flash, Tasmota 2944k Code/OTA, 2112k FS",
|
||||
"upload": {
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 8388608,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
46
boards/esp32_solo1_4M.json
Normal file
46
boards/esp32_solo1_4M.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DCORE32SOLO1",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32-solo-1.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32solo1-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP32_4M -DESP32C2",
|
||||
"f_cpu": "120000000L",
|
||||
"f_flash": "60000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32c2",
|
||||
"variant": "esp32c2",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C2 = 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c2-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 278528,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP32_2M -DESP32C2",
|
||||
"f_cpu": "120000000L",
|
||||
"f_flash": "60000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32c2",
|
||||
"variant": "esp32c2",
|
||||
"partitions": "partitions/esp32_partition_app1245k_fs64k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C2 = 2M Flash, Tasmota 1245kB Code/OTA, 64k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c2-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "2MB",
|
||||
"maximum_ram_size": 278528,
|
||||
"maximum_size": 2097152,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,17 +1,19 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32c3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DARDUINO_USB_MODE=1 -DESP32_4M -DESP32C3 -DUSE_USB_CDC_CONSOLE",
|
||||
"extra_flags": "-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DESP32C3",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32c3",
|
||||
"variant": "esp32c3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c3.cfg"
|
||||
@ -20,13 +22,13 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C3 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-C3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c3-safeboot.bin"
|
||||
"variants/tasmota/tasmota32c3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -34,10 +36,7 @@
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html",
|
||||
"vendor": "Espressif"
|
||||
|
44
boards/esp32c3cdc.json
Normal file
44
boards/esp32c3cdc.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32c3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DESP32C3 -DUSE_USB_CDC_CONSOLE",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32c3",
|
||||
"variant": "esp32c3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32c3cdc-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"before_reset": "usb_reset",
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP32_4M -DESP32C3",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32c3",
|
||||
"variant": "esp32c3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C3 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DARDUINO_USB_MODE=1 -DESP32_4M -DESP32C6 -DUSE_USB_CDC_CONSOLE",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32c6",
|
||||
"variant": "esp32c6",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c6.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C6 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c6-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP32_4M -DESP32C6",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32c6",
|
||||
"variant": "esp32c6",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c6.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C6 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32c6ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,10 +1,13 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s2_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S2",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DESP32_4M -DESP32S2",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s2",
|
||||
"variant": "esp32s2",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
@ -16,16 +19,16 @@
|
||||
"openocd_target": "esp32s2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s2-safeboot.bin"
|
||||
"variants/tasmota/tasmota32s2-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -35,9 +38,6 @@
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
||||
|
@ -1,10 +1,13 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s2_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S2",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S2",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s2",
|
||||
"variant": "esp32s2",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
@ -16,16 +19,16 @@
|
||||
"openocd_target": "esp32s2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s2cdc-safeboot.bin"
|
||||
"variants/tasmota/tasmota32s2cdc-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -34,10 +37,7 @@
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"before_reset": "usb_reset",
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html",
|
||||
"vendor": "Espressif"
|
||||
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "opi_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M OPI Flash + PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "opi_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_boot": "120000000L",
|
||||
"boot": "opi",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M OPI Flash + PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash OPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_boot": "120000000L",
|
||||
"boot": "qio",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M QIO Flash + OPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_qspi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash QSPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_qspi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_boot": "120000000L",
|
||||
"boot": "qio",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M QIO Flash + QSPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 2000000
|
||||
},
|
||||
"download": {
|
||||
"speed": 2000000
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
45
boards/esp32s3.json
Normal file
45
boards/esp32s3.json
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
37
boards/esp32s3_8M.json
Normal file
37
boards/esp32s3_8M.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DESP32_8M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs2M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 8M Flash, Tasmota 2944k Code/OTA, 2112k FS",
|
||||
"upload": {
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 8388608,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
40
boards/esp32s3cdc-box.json
Normal file
40
boards/esp32s3cdc-box.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DUSE_USB_CDC_CONSOLE -DESP32_16M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 16M Flash, Tasmota 2880k Code/OTA, 10M FS",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"before_reset": "usb_reset",
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
||||
|
46
boards/esp32s3cdc.json
Normal file
46
boards/esp32s3cdc.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32s3cdc-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"before_reset": "usb_reset",
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "opi_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M OPI Flash + PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "opi_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_boot": "120000000L",
|
||||
"boot": "opi",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M OPI Flash + PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash OPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_boot": "120000000L",
|
||||
"boot": "qio",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M QIO Flash + OPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"memory_type": "qio_qspi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DESP32_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash QSPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"tasmota32s3ser-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"download": {
|
||||
"speed": 230400
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "eagle.flash.16m14m.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_16M -DESP8266_16M14M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
"mcu": "esp8266",
|
||||
"variant": "generic"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch 1M OTA 14M FS",
|
||||
"upload": {
|
||||
"maximum_ram_size": 81920,
|
||||
"maximum_size": 995326,
|
||||
"require_upload_port": true,
|
||||
"resetmethod": "ck",
|
||||
"speed": 115200
|
||||
},
|
||||
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.1m.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_1M",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_1M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch NO FS",
|
||||
"upload": {
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.2m1m.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M1M",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M1M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch 1M FS",
|
||||
"upload": {
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.2m256.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M256",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M256",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch 772k OTA 256k FS",
|
||||
"upload": {
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.4m2m.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_4M -DESP8266_4M2M",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_4M -DESP8266_4M2M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch 1M OTA 2M FS",
|
||||
"upload": {
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.4m3m.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_4M -DESP8266_4M3M",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_4M -DESP8266_4M3M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Espressif Generic ESP8266 Tasmota 1M sketch 3M FS",
|
||||
"upload": {
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "eagle.flash.2m256.ld"
|
||||
},
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_TASMOTA -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M256",
|
||||
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DESP8266_2M -DESP8266_2M256",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dout",
|
||||
@ -15,7 +15,9 @@
|
||||
"wifi"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
"arduino",
|
||||
"esp8266-rtos-sdk",
|
||||
"esp8266-nonos-sdk"
|
||||
],
|
||||
"name": "Sonoff ZbBridge Tasmota 1M sketch 772k OTA 256k FS",
|
||||
"upload": {
|
||||
|
@ -58,22 +58,20 @@
|
||||
#define FSPI_HOST SPI2_HOST
|
||||
#define HSPI_HOST SPI3_HOST
|
||||
#define VSPI_HOST SPI3_HOST
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32s3
|
||||
#ifndef REG_SPI_BASE
|
||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32s3, instead use SPI_MS_DLEN_REG
|
||||
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
|
||||
#endif // REG_SPI_BASE
|
||||
|
||||
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#define SPI_HOST SPI1_HOST
|
||||
#define HSPI_HOST SPI2_HOST
|
||||
#define VSPI_HOST SPI2_HOST /* No SPI3_host on C2/C6 */
|
||||
#define VSPI SPI
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore
|
||||
#define VSPI_HOST SPI2_HOST /* No SPI3_host on C3 */
|
||||
// fix a bug in esp-idf 4.4 for esp32c3
|
||||
#ifndef REG_SPI_BASE
|
||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32c3, instead use SPI_MS_DLEN_REG
|
||||
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
|
||||
|
||||
#endif // REG_SPI_BASE
|
||||
#endif // TARGET
|
||||
|
||||
// This trick makes sure that 'lto' optimizer does not inline `delay()
|
||||
// so we can override it with `-Wl,--wrap=delay` linker directive
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif // _cplusplus
|
||||
void delay(__UINT32_TYPE__ ms) __attribute__((noinline)) __attribute__ ((noclone));
|
||||
|
@ -8,7 +8,7 @@ Automatic payload encryption is applied using the WiFi-password1 as the key. A m
|
||||
As ACK/NACK messages seem to be not reliable on both ESP-platforms, the method "send-and-pray" is used.
|
||||
|
||||
|
||||
## Working principle
|
||||
## Working priciple
|
||||
|
||||
An ESP32 is needed as gateway/broker to connect the nodes (typically an ESP8266) to the WLAN. The ESP32 will receive the MQTT-topic of every node and subscribe to it as a proxy.
|
||||
If a MQTT-message in the form of 'cmnd/node_topic/...' is received, the broker will automatically send this to the referring node via ESP-NOW.
|
||||
|
7
lib/default/DnsClient/library.properties
Normal file
7
lib/default/DnsClient/library.properties
Normal file
@ -0,0 +1,7 @@
|
||||
name=DnsClient
|
||||
version=1.0
|
||||
author=MCQN Ltd, Theo Arends
|
||||
maintainer=Theo
|
||||
sentence=Dns client allowing timeout selection.
|
||||
paragraph=This class uses WifiUdp.
|
||||
architectures=esp8266,esp32
|
334
lib/default/DnsClient/src/DnsClient.cpp
Normal file
334
lib/default/DnsClient/src/DnsClient.cpp
Normal file
@ -0,0 +1,334 @@
|
||||
/*
|
||||
DnsClient.cpp - DNS client for Arduino
|
||||
|
||||
SPDX-FileCopyrightText: 2009-2010 MCQN Ltd. and Theo Arends
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
// Arduino DNS client for WizNet5100-based Ethernet shield
|
||||
// (c) Copyright 2009-2010 MCQN Ltd.
|
||||
// Released under Apache License, version 2.0
|
||||
|
||||
#include "DnsClient.h"
|
||||
|
||||
// Various flags and header field values for a DNS message
|
||||
#define UDP_HEADER_SIZE 8
|
||||
#define DNS_HEADER_SIZE 12
|
||||
#define TTL_SIZE 4
|
||||
#define QUERY_FLAG (0)
|
||||
#define RESPONSE_FLAG (1<<15)
|
||||
#define QUERY_RESPONSE_MASK (1<<15)
|
||||
#define OPCODE_STANDARD_QUERY (0)
|
||||
#define OPCODE_INVERSE_QUERY (1<<11)
|
||||
#define OPCODE_STATUS_REQUEST (2<<11)
|
||||
#define OPCODE_MASK (15<<11)
|
||||
#define AUTHORITATIVE_FLAG (1<<10)
|
||||
#define TRUNCATION_FLAG (1<<9)
|
||||
#define RECURSION_DESIRED_FLAG (1<<8)
|
||||
#define RECURSION_AVAILABLE_FLAG (1<<7)
|
||||
#define RESP_NO_ERROR (0)
|
||||
#define RESP_FORMAT_ERROR (1)
|
||||
#define RESP_SERVER_FAILURE (2)
|
||||
#define RESP_NAME_ERROR (3)
|
||||
#define RESP_NOT_IMPLEMENTED (4)
|
||||
#define RESP_REFUSED (5)
|
||||
#define RESP_MASK (15)
|
||||
#define TYPE_A (0x0001)
|
||||
#define CLASS_IN (0x0001)
|
||||
#define LABEL_COMPRESSION_MASK (0xC0)
|
||||
// Port number that DNS servers listen on
|
||||
#define DNS_PORT 53
|
||||
|
||||
// Possible return codes from ProcessResponse
|
||||
#define SUCCESS 1
|
||||
#define TIMED_OUT -1
|
||||
#define INVALID_SERVER -2
|
||||
#define TRUNCATED -3
|
||||
#define INVALID_RESPONSE -4
|
||||
|
||||
#ifndef htons
|
||||
#define htons(x) ( ((x)<< 8 & 0xFF00) | ((x)>> 8 & 0x00FF) )
|
||||
#endif
|
||||
|
||||
void DNSClient::begin(const IPAddress& aDNSServer) {
|
||||
iDNSServer = aDNSServer;
|
||||
iRequestId = 0;
|
||||
}
|
||||
|
||||
void DNSClient::setTimeout(uint32_t aTimeout) {
|
||||
iTimeout = aTimeout;
|
||||
}
|
||||
|
||||
int DNSClient::getHostByName(const char* aHostname, IPAddress& aResult) {
|
||||
// See if it's a numeric IP address
|
||||
if (aResult.fromString(aHostname)) {
|
||||
// It is, our work here is done
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// Check we've got a valid DNS server to use
|
||||
if ((0xFFFFFFFF == (uint32_t)iDNSServer) || (0 == (uint32_t)iDNSServer)) {
|
||||
return INVALID_SERVER;
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
// Find a socket to use
|
||||
if (iUdp.begin(1024+(millis() & 0xF)) == 1) {
|
||||
// Try up to three times
|
||||
int retries = 0;
|
||||
// while ((retries < 3) && (ret <= 0)) {
|
||||
// Send DNS request
|
||||
ret = iUdp.beginPacket(iDNSServer, DNS_PORT);
|
||||
if (ret != 0) {
|
||||
// Now output the request data
|
||||
ret = BuildRequest(aHostname);
|
||||
if (ret != 0) {
|
||||
// And finally send the request
|
||||
ret = iUdp.endPacket();
|
||||
if (ret != 0) {
|
||||
// Now wait for a response
|
||||
int wait_retries = 0;
|
||||
ret = TIMED_OUT;
|
||||
while ((wait_retries < 3) && (ret == TIMED_OUT)) {
|
||||
ret = ProcessResponse(iTimeout, aResult);
|
||||
wait_retries++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
retries++;
|
||||
// }
|
||||
// We're done with the socket now
|
||||
iUdp.stop();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int DNSClient::BuildRequest(const char* aName) {
|
||||
// Build header
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// | ID |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// |QR| Opcode |AA|TC|RD|RA| Z | RCODE |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// | QDCOUNT |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// | ANCOUNT |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// | NSCOUNT |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// | ARCOUNT |
|
||||
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
// As we only support one request at a time at present, we can simplify
|
||||
// some of this header
|
||||
iRequestId = millis(); // generate a random ID
|
||||
uint16_t twoByteBuffer;
|
||||
|
||||
// FIXME We should also check that there's enough space available to write to, rather
|
||||
// FIXME than assume there's enough space (as the code does at present)
|
||||
iUdp.write((uint8_t*)&iRequestId, sizeof(iRequestId));
|
||||
|
||||
twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
|
||||
twoByteBuffer = htons(1); // One question record
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
|
||||
twoByteBuffer = 0; // Zero answer records
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
// and zero additional records
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
|
||||
// Build question
|
||||
const char* start =aName;
|
||||
const char* end =start;
|
||||
uint8_t len;
|
||||
// Run through the name being requested
|
||||
while (*end) {
|
||||
// Find out how long this section of the name is
|
||||
end = start;
|
||||
while (*end && (*end != '.') ) {
|
||||
end++;
|
||||
}
|
||||
|
||||
if (end-start > 0) {
|
||||
// Write out the size of this section
|
||||
len = end-start;
|
||||
iUdp.write(&len, sizeof(len));
|
||||
// And then write out the section
|
||||
iUdp.write((uint8_t*)start, end-start);
|
||||
}
|
||||
start = end+1;
|
||||
}
|
||||
|
||||
// We've got to the end of the question name, so terminate it with a zero-length section
|
||||
len = 0;
|
||||
iUdp.write(&len, sizeof(len));
|
||||
// Finally the type and class of question
|
||||
twoByteBuffer = htons(TYPE_A);
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
|
||||
twoByteBuffer = htons(CLASS_IN); // Internet class of question
|
||||
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer));
|
||||
// Success! Everything buffered okay
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
int DNSClient::ProcessResponse(uint32_t aTimeout, IPAddress& aAddress) {
|
||||
uint32_t startTime = millis();
|
||||
|
||||
// Wait for a response packet
|
||||
while(iUdp.parsePacket() <= 0) {
|
||||
if ((millis() - startTime) > aTimeout) {
|
||||
return TIMED_OUT;
|
||||
}
|
||||
delay(20);
|
||||
}
|
||||
|
||||
// We've had a reply!
|
||||
// Read the UDP header
|
||||
uint8_t header[DNS_HEADER_SIZE]; // Enough space to reuse for the DNS header
|
||||
// Check that it's a response from the right server and the right port
|
||||
if ( (iDNSServer != iUdp.remoteIP()) || (iUdp.remotePort() != DNS_PORT) ) {
|
||||
// It's not from who we expected
|
||||
return INVALID_SERVER;
|
||||
}
|
||||
|
||||
// Read through the rest of the response
|
||||
if (iUdp.available() < DNS_HEADER_SIZE) {
|
||||
return TRUNCATED;
|
||||
}
|
||||
iUdp.read(header, DNS_HEADER_SIZE);
|
||||
|
||||
uint16_t staging; // Staging used to avoid type-punning warnings
|
||||
memcpy(&staging, &header[2], sizeof(uint16_t));
|
||||
uint16_t header_flags = htons(staging);
|
||||
memcpy(&staging, &header[0], sizeof(uint16_t));
|
||||
// Check that it's a response to this request
|
||||
if ( (iRequestId != staging) || ((header_flags & QUERY_RESPONSE_MASK) != (uint16_t)RESPONSE_FLAG) ) {
|
||||
// Mark the entire packet as read
|
||||
iUdp.flush();
|
||||
return INVALID_RESPONSE;
|
||||
}
|
||||
// Check for any errors in the response (or in our request)
|
||||
// although we don't do anything to get round these
|
||||
if ( (header_flags & TRUNCATION_FLAG) || (header_flags & RESP_MASK) ) {
|
||||
// Mark the entire packet as read
|
||||
iUdp.flush();
|
||||
return -5; // INVALID_RESPONSE;
|
||||
}
|
||||
|
||||
// And make sure we've got (at least) one answer
|
||||
memcpy(&staging, &header[6], sizeof(uint16_t));
|
||||
uint16_t answerCount = htons(staging);
|
||||
if (answerCount == 0 ) {
|
||||
// Mark the entire packet as read
|
||||
iUdp.flush();
|
||||
return -6; // INVALID_RESPONSE;
|
||||
}
|
||||
|
||||
// Skip over any questions
|
||||
memcpy(&staging, &header[4], sizeof(uint16_t));
|
||||
for (uint32_t i = 0; i < htons(staging); i++) {
|
||||
// Skip over the name
|
||||
uint8_t len;
|
||||
do {
|
||||
iUdp.read(&len, sizeof(len));
|
||||
if (len > 0) {
|
||||
// Don't need to actually read the data out for the string, just
|
||||
// advance ptr to beyond it
|
||||
while(len--) {
|
||||
iUdp.read(); // we don't care about the returned byte
|
||||
}
|
||||
}
|
||||
} while (len != 0);
|
||||
|
||||
// Now jump over the type and class
|
||||
for (uint32_t i = 0; i < 4; i++) {
|
||||
iUdp.read(); // we don't care about the returned byte
|
||||
}
|
||||
}
|
||||
|
||||
// Now we're up to the bit we're interested in, the answer
|
||||
// There might be more than one answer (although we'll just use the first
|
||||
// type A answer) and some authority and additional resource records but
|
||||
// we're going to ignore all of them.
|
||||
|
||||
for (uint32_t i = 0; i < answerCount; i++) {
|
||||
// Skip the name
|
||||
uint8_t len;
|
||||
do {
|
||||
iUdp.read(&len, sizeof(len));
|
||||
if ((len & LABEL_COMPRESSION_MASK) == 0) {
|
||||
// It's just a normal label
|
||||
if (len > 0) {
|
||||
// And it's got a length
|
||||
// Don't need to actually read the data out for the string,
|
||||
// just advance ptr to beyond it
|
||||
while(len--) {
|
||||
iUdp.read(); // we don't care about the returned byte
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// This is a pointer to a somewhere else in the message for the
|
||||
// rest of the name. We don't care about the name, and RFC1035
|
||||
// says that a name is either a sequence of labels ended with a
|
||||
// 0 length octet or a pointer or a sequence of labels ending in
|
||||
// a pointer. Either way, when we get here we're at the end of
|
||||
// the name
|
||||
// Skip over the pointer
|
||||
iUdp.read(); // we don't care about the returned byte
|
||||
// And set len so that we drop out of the name loop
|
||||
len = 0;
|
||||
}
|
||||
} while (len != 0);
|
||||
|
||||
// Check the type and class
|
||||
uint16_t answerType;
|
||||
uint16_t answerClass;
|
||||
iUdp.read((uint8_t*)&answerType, sizeof(answerType));
|
||||
iUdp.read((uint8_t*)&answerClass, sizeof(answerClass));
|
||||
|
||||
// Ignore the Time-To-Live as we don't do any caching
|
||||
for (uint32_t i = 0; i < TTL_SIZE; i++) {
|
||||
iUdp.read(); // We don't care about the returned byte
|
||||
}
|
||||
|
||||
// And read out the length of this answer
|
||||
// Don't need header_flags anymore, so we can reuse it here
|
||||
iUdp.read((uint8_t*)&header_flags, sizeof(header_flags));
|
||||
|
||||
if ( (htons(answerType) == TYPE_A) && (htons(answerClass) == CLASS_IN) ) {
|
||||
if (htons(header_flags) != 4) {
|
||||
// It's a weird size
|
||||
// Mark the entire packet as read
|
||||
iUdp.flush();
|
||||
return -9; // INVALID_RESPONSE;
|
||||
}
|
||||
iUdp.read(aAddress.raw_address(), 4);
|
||||
// uint32_t address;
|
||||
// iUdp.read((uint8_t*)&address, sizeof(address));
|
||||
// aAddress = (IPAddress)address;
|
||||
|
||||
// Check we've got a valid address
|
||||
if ((0xFFFFFFFF != (uint32_t)aAddress) && (0 != (uint32_t)aAddress)) {
|
||||
return SUCCESS;
|
||||
}
|
||||
} else {
|
||||
// This isn't an answer type we're after, move onto the next one
|
||||
for (uint32_t i = 0; i < htons(header_flags); i++) {
|
||||
iUdp.read(); // we don't care about the returned byte
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mark the entire packet as read
|
||||
iUdp.flush();
|
||||
|
||||
// If we get here then we haven't found an answer
|
||||
return -10; // INVALID_RESPONSE;
|
||||
}
|
42
lib/default/DnsClient/src/DnsClient.h
Normal file
42
lib/default/DnsClient/src/DnsClient.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
DnsClient.h - DNS client for Arduino
|
||||
|
||||
SPDX-FileCopyrightText: 2009-2010 MCQN Ltd. and Theo Arends
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
// Arduino DNS client for WizNet5100-based Ethernet shield
|
||||
// (c) Copyright 2009-2010 MCQN Ltd.
|
||||
// Released under Apache License, version 2.0
|
||||
|
||||
#ifndef DNSClient_h
|
||||
#define DNSClient_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <IPAddress.h>
|
||||
#include <WiFiUdp.h>
|
||||
|
||||
class DNSClient {
|
||||
public:
|
||||
void begin(const IPAddress& aDNSServer);
|
||||
void setTimeout(uint32_t aTimeout = 1000);
|
||||
|
||||
/* Resolve the given hostname to an IP address.
|
||||
@param aHostname Name to be resolved
|
||||
@param aResult IPAddress structure to store the returned IP address
|
||||
@result 1 if aIPAddrString was successfully converted to an IP address, else error code
|
||||
*/
|
||||
int getHostByName(const char* aHostname, IPAddress& aResult);
|
||||
|
||||
protected:
|
||||
int BuildRequest(const char* aName);
|
||||
int ProcessResponse(uint32_t aTimeout, IPAddress& aAddress);
|
||||
|
||||
IPAddress iDNSServer;
|
||||
uint16_t iRequestId;
|
||||
uint16_t iTimeout = 1000;
|
||||
WiFiUDP iUdp;
|
||||
};
|
||||
|
||||
#endif
|
@ -79,12 +79,6 @@ public:
|
||||
_buf->buf[offset] = data;
|
||||
}
|
||||
}
|
||||
void set16(const size_t offset, const uint16_t data) {
|
||||
if (offset + 1 < _buf->len) {
|
||||
_buf->buf[offset] = data & 0xFF;
|
||||
_buf->buf[offset+1] = (data >> 8) & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
size_t add8(const uint8_t data) { // append 8 bits value
|
||||
if (_buf->len < _buf->size) { // do we have room for 1 byte
|
||||
|
@ -157,42 +157,6 @@ char * U64toHex(uint64_t value, char *str) {
|
||||
}
|
||||
*/
|
||||
|
||||
char * ToBinary(uint32_t value, char *str, int32_t digits) {
|
||||
if (digits > 32) { digits = 32; }
|
||||
if (digits < 1) { digits = 1; }
|
||||
int32_t digits_to_one = 1; // how many digits until we find the last `1`
|
||||
str[32] = 0; // end of string
|
||||
for (uint32_t i=0; i<32; i++) { // 32 digits in uint32_t
|
||||
if ((value & 1) && (i+1 > digits_to_one)) {
|
||||
digits_to_one = i+1;
|
||||
}
|
||||
str[31 - i] = (char)(value & 1)+'0';
|
||||
value = value >> 1;
|
||||
}
|
||||
// adjust digits to always show the total value
|
||||
if (digits_to_one > digits) { digits = digits_to_one; }
|
||||
if (digits < 32) {
|
||||
memmove(str, str + 32 - digits, digits + 1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
char * U64toStr(uint64_t value, char *str) {
|
||||
// str must be at least 24 bytes long
|
||||
uint32_t i = 23;
|
||||
str[--i] = 0; // end of string
|
||||
do {
|
||||
uint64_t m = value;
|
||||
value /= 10;
|
||||
char c = m - 10 * value;
|
||||
str[--i] = c < 10 ? c + '0' : c + 'A' - 10;
|
||||
} while (value);
|
||||
if (i) {
|
||||
memmove(str, str +i, 23 -i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
char * U64toHex(uint64_t value, char *str, uint32_t zeroleads) {
|
||||
// str must be at least 17 bytes long
|
||||
str[16] = 0; // end of string
|
||||
@ -244,12 +208,9 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||
|
||||
// get a fresh malloc allocated string based on the current pointer (can be in PROGMEM)
|
||||
// It is the caller's responsibility to free the memory
|
||||
//
|
||||
// Returns nullptr if something went wrong
|
||||
char * copyStr(const char * str) {
|
||||
if (str == nullptr) { return nullptr; }
|
||||
char * cpy = (char*) malloc(strlen_P(str) + 1);
|
||||
if (cpy == nullptr) { return nullptr; } // something went wrong
|
||||
strcpy_P(cpy, str);
|
||||
return cpy;
|
||||
}
|
||||
@ -263,15 +224,13 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
|
||||
// iterate on fmt to extract arguments and patch them in place
|
||||
char * fmt_cpy = copyStr(fmt_P);
|
||||
if (fmt_cpy == nullptr) { return 0; } // we couldn't copy the format, abort
|
||||
if (fmt_cpy == nullptr) { return 0; }
|
||||
char * fmt = fmt_cpy;
|
||||
int32_t ret = 0; // return 0 if unsuccessful
|
||||
bool aborted = true; // did something went wrong?
|
||||
|
||||
const uint32_t ALLOC_SIZE = 12;
|
||||
static const char * allocs[ALLOC_SIZE] = {}; // initialized to zeroes
|
||||
uint32_t alloc_idx = 0;
|
||||
static char hex[34]; // buffer used for 64 bits, favor RAM instead of stack to remove pressure
|
||||
static char hex[20]; // buffer used for 64 bits, favor RAM instead of stack to remove pressure
|
||||
|
||||
for (; *fmt != 0; ++fmt) {
|
||||
int32_t decimals = -2; // default to 2 decimals and remove trailing zeros
|
||||
@ -318,7 +277,6 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
if (cur_val < min_valid_ptr) { new_val_str = ext_invalid_mem; }
|
||||
else if (decimals > 0) {
|
||||
char * hex_char = (char*) malloc(decimals*2 + 2);
|
||||
if (hex_char == nullptr) { goto free_allocs; }
|
||||
ToHex_P((const uint8_t *)cur_val, decimals, hex_char, decimals*2 + 2);
|
||||
new_val_str = hex_char;
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
@ -326,7 +284,6 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'B': // Pointer to SBuffer
|
||||
{
|
||||
if (cur_val < min_valid_ptr) { new_val_str = ext_invalid_mem; }
|
||||
@ -335,7 +292,6 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
size_t buf_len = (&buf != nullptr) ? buf.len() : 0;
|
||||
if (buf_len) {
|
||||
char * hex_char = (char*) malloc(buf_len*2 + 2);
|
||||
if (hex_char == nullptr) { goto free_allocs; }
|
||||
ToHex_P(buf.getBuffer(), buf_len, hex_char, buf_len*2 + 2);
|
||||
new_val_str = hex_char;
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
@ -343,39 +299,6 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// '%_b' outputs a uint32_t to binary
|
||||
// '%8_b' outputs a uint8_t to binary
|
||||
case 'b': // Binary, decimals indicates the zero prefill
|
||||
{
|
||||
ToBinary(cur_val, hex, decimals);
|
||||
new_val_str = copyStr(hex);
|
||||
if (new_val_str == nullptr) { goto free_allocs; }
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case 'V': // 2-byte values, decimals indicates the length, default 2
|
||||
{
|
||||
if (decimals < 0) { decimals = 0; }
|
||||
if (cur_val < min_valid_ptr) { new_val_str = ext_invalid_mem; }
|
||||
else if (decimals > 0) {
|
||||
uint32_t val_size = decimals*6 + 2;
|
||||
char * val_char = (char*) malloc(val_size);
|
||||
if (val_char == nullptr) { goto free_allocs; }
|
||||
val_char[0] = '\0';
|
||||
for (uint32_t count = 0; count < decimals; count++) {
|
||||
uint32_t value = pgm_read_byte((const uint8_t *)cur_val +1) << 8 | pgm_read_byte((const uint8_t *)cur_val);
|
||||
snprintf_P(val_char, val_size, PSTR("%s%s%d"), val_char, (count)?",":"", value);
|
||||
cur_val += 2;
|
||||
}
|
||||
new_val_str = val_char;
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
// Serial.printf("> values=%s\n", hex_char);
|
||||
}
|
||||
}
|
||||
break;
|
||||
*/
|
||||
// case 'D':
|
||||
// decimals = *(int32_t*)cur_val_ptr;
|
||||
// break;
|
||||
@ -384,7 +307,6 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
case 'I': // Input is `uint32_t` 32 bits IP address, output is decimal dotted address
|
||||
{
|
||||
char * ip_str = (char*) malloc(16);
|
||||
if (ip_str == nullptr) { goto free_allocs; }
|
||||
snprintf_P(ip_str, 16, PSTR("%u.%u.%u.%u"), cur_val & 0xFF, (cur_val >> 8) & 0xFF, (cur_val >> 16) & 0xFF, (cur_val >> 24) & 0xFF);
|
||||
new_val_str = ip_str;
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
@ -413,8 +335,7 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
if (isnan(number) || isinf(number)) {
|
||||
new_val_str = "null";
|
||||
} else {
|
||||
uint32_t len = (decimals) ? decimals +2 : 1;
|
||||
dtostrf(*(float*)cur_val, len, decimals, hex);
|
||||
dtostrf(*(float*)cur_val, (decimals + 2), decimals, hex);
|
||||
|
||||
if (truncate) {
|
||||
uint32_t last = strlen(hex) - 1;
|
||||
@ -428,13 +349,11 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
}
|
||||
}
|
||||
new_val_str = copyStr(hex);
|
||||
if (new_val_str == nullptr) { goto free_allocs; }
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// '%_X' outputs a 64 bits unsigned int to uppercase HEX with 16 digits
|
||||
case 'X': // input is `uint64_t*`, printed as 16 hex digits (no prefix 0x)
|
||||
{
|
||||
@ -443,25 +362,24 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
if ((decimals < 0) || (decimals > 16)) { decimals = 16; }
|
||||
U64toHex(*(uint64_t*)cur_val, hex, decimals);
|
||||
new_val_str = copyStr(hex);
|
||||
if (new_val_str == nullptr) { goto free_allocs; }
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// '%_U' outputs a 64 bits unsigned int to decimal
|
||||
case 'U': // input is `uint64_t*`, printed as decimal
|
||||
{
|
||||
if (cur_val < min_valid_ptr) { new_val_str = ext_invalid_mem; }
|
||||
else {
|
||||
U64toStr(*(uint64_t*)cur_val, hex);
|
||||
new_val_str = copyStr(hex);
|
||||
if (new_val_str == nullptr) { goto free_allocs; }
|
||||
allocs[alloc_idx++] = new_val_str;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// Trying to do String allocation alternatives, but not as interesting as I thought in the beginning
|
||||
// case 's':
|
||||
// {
|
||||
// new_val_str = copyStr(((String*)cur_val)->c_str());
|
||||
// allocs[alloc_idx++] = new_val_str;
|
||||
// }
|
||||
// break;
|
||||
// case 'S':
|
||||
// {
|
||||
// funcString_t * func_str = (funcString_t*) cur_val;
|
||||
// new_val_str = copyStr((*func_str)().c_str());
|
||||
// allocs[alloc_idx++] = new_val_str;
|
||||
// }
|
||||
// break;
|
||||
}
|
||||
*cur_val_ptr = new_val_str;
|
||||
*fmt = 's'; // replace `%_X` with `%0s` to display a string instead
|
||||
@ -473,9 +391,9 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
}
|
||||
}
|
||||
// Serial.printf("> format_final=%s\n", fmt_cpy); Serial.flush();
|
||||
int32_t ret = 0; // return 0 if unsuccessful
|
||||
if (out_buf != nullptr) {
|
||||
ret = vsnprintf_P(out_buf, buf_len, fmt_cpy, va_cpy);
|
||||
aborted = false; // we completed without malloc error
|
||||
} else {
|
||||
// if there is no output buffer, we allocate one on the heap
|
||||
// first we do a dry-run to know the target size
|
||||
@ -488,18 +406,12 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
allocated_buf[0] = 0; // default to empty string
|
||||
vsnprintf_P(allocated_buf, target_len + 1, fmt_cpy, va_cpy);
|
||||
ret = (int32_t) allocated_buf;
|
||||
aborted = false; // we completed without malloc error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
va_end(va_cpy);
|
||||
|
||||
free_allocs:
|
||||
if (aborted && out_buf != nullptr) { // if something went wrong, set output string to empty string to avoid corrupt data
|
||||
*out_buf = '\0';
|
||||
}
|
||||
|
||||
// disallocated all temporary strings
|
||||
for (uint32_t i = 0; i < alloc_idx; i++) {
|
||||
free((void*)allocs[i]); // it is ok to call free() on nullptr so we don't test for nullptr first
|
||||
|
@ -66,14 +66,11 @@ void test_ext_snprintf_P(void) {
|
||||
Serial.printf("--> out=%s\n", c);
|
||||
ext_snprintf_P(c, sizeof(c), "Float default=%*_f, int(3)=%*_f, int(3)=%*_f, int(3)=%*_f, 6dec=%*_f", 1, &fpi, 4, &f3, -4, &f3, -4, &f31, -8, &fpi);
|
||||
Serial.printf("--> out=%s\n", c);
|
||||
|
||||
uint64_t u641 = 0x1122334455667788LL; // 1234605616436508552
|
||||
uint64_t u642 = 0x0123456789ABCDEFLL; // 81985529216486895
|
||||
uint64_t u643 = 0xFEDCBA9876543210LL; // 18364758544493064720
|
||||
uint64_t u641 = 0x1122334455667788LL;
|
||||
uint64_t u642 = 0x0123456789ABCDEFLL;
|
||||
uint64_t u643 = 0xFEDCBA9876543210LL;
|
||||
ext_snprintf_P(c, sizeof(c), "Int64 0x%_X 0x%_X 0x%_X", &u641, &u642, &u643);
|
||||
Serial.printf("--> out=%s\n", c);
|
||||
ext_snprintf_P(c, sizeof(c), "Int64 decimal %_U %_U %_U", &u641, &u642, &u643);
|
||||
Serial.printf("--> out=%s\n", c);
|
||||
|
||||
// ext_snprintf_P(c, sizeof(c), "Float default=%*_f, int(3)=%*_f, int(3)=%*_f, int(3)=%*_f, 6dec=%*_f", &fpi, &f3, &f3, &f31, &fpi);
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
Created by Ivan Seidel Gomes, March, 2013.
|
||||
Released into the public domain.
|
||||
|
||||
20240118 - Removed sort functions not used by Tasmota (@arendst)
|
||||
*/
|
||||
|
||||
|
||||
@ -41,6 +39,8 @@ protected:
|
||||
|
||||
ListNode<T>* getNode(int index);
|
||||
|
||||
ListNode<T>* findEndOfSortedString(ListNode<T> *p, int (*cmp)(T &, T &));
|
||||
|
||||
public:
|
||||
LinkedList();
|
||||
LinkedList(int sizeIndex, T _t); //initiate list size and default value
|
||||
@ -96,6 +96,11 @@ public:
|
||||
*/
|
||||
virtual void clear();
|
||||
|
||||
/*
|
||||
Sort the list, given a comparison function
|
||||
*/
|
||||
virtual void sort(int (*cmp)(T &, T &));
|
||||
|
||||
// add support to array brakets [] operator
|
||||
inline T& operator[](int index);
|
||||
inline T& operator[](size_t& i) { return this->get(i); }
|
||||
@ -342,4 +347,73 @@ void LinkedList<T>::clear(){
|
||||
shift();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void LinkedList<T>::sort(int (*cmp)(T &, T &)){
|
||||
if(_size < 2) return; // trivial case;
|
||||
|
||||
for(;;) {
|
||||
|
||||
ListNode<T> **joinPoint = &root;
|
||||
|
||||
while(*joinPoint) {
|
||||
ListNode<T> *a = *joinPoint;
|
||||
ListNode<T> *a_end = findEndOfSortedString(a, cmp);
|
||||
|
||||
if(!a_end->next ) {
|
||||
if(joinPoint == &root) {
|
||||
last = a_end;
|
||||
isCached = false;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ListNode<T> *b = a_end->next;
|
||||
ListNode<T> *b_end = findEndOfSortedString(b, cmp);
|
||||
|
||||
ListNode<T> *tail = b_end->next;
|
||||
|
||||
a_end->next = NULL;
|
||||
b_end->next = NULL;
|
||||
|
||||
while(a && b) {
|
||||
if(cmp(a->data, b->data) <= 0) {
|
||||
*joinPoint = a;
|
||||
joinPoint = &a->next;
|
||||
a = a->next;
|
||||
}
|
||||
else {
|
||||
*joinPoint = b;
|
||||
joinPoint = &b->next;
|
||||
b = b->next;
|
||||
}
|
||||
}
|
||||
|
||||
if(a) {
|
||||
*joinPoint = a;
|
||||
while(a->next) a = a->next;
|
||||
a->next = tail;
|
||||
joinPoint = &a->next;
|
||||
}
|
||||
else {
|
||||
*joinPoint = b;
|
||||
while(b->next) b = b->next;
|
||||
b->next = tail;
|
||||
joinPoint = &b->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ListNode<T>* LinkedList<T>::findEndOfSortedString(ListNode<T> *p, int (*cmp)(T &, T &)) {
|
||||
while(p->next && cmp(p->data, p->next->data) <= 0) {
|
||||
p = p->next;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,419 +0,0 @@
|
||||
/*
|
||||
LinkedList.h - V1.1 - Generic LinkedList implementation
|
||||
Works better with FIFO, because LIFO will need to
|
||||
search the entire List to find the last one;
|
||||
|
||||
For instructions, go to https://github.com/ivanseidel/LinkedList
|
||||
|
||||
Created by Ivan Seidel Gomes, March, 2013.
|
||||
Released into the public domain.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LinkedList_h
|
||||
#define LinkedList_h
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
template<class T>
|
||||
struct ListNode
|
||||
{
|
||||
T data;
|
||||
ListNode<T> *next;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class LinkedList{
|
||||
|
||||
protected:
|
||||
int _size;
|
||||
ListNode<T> *root;
|
||||
ListNode<T> *last;
|
||||
|
||||
// Helps "get" method, by saving last position
|
||||
ListNode<T> *lastNodeGot;
|
||||
int lastIndexGot;
|
||||
// isCached should be set to FALSE
|
||||
// everytime the list suffer changes
|
||||
bool isCached;
|
||||
|
||||
ListNode<T>* getNode(int index);
|
||||
|
||||
ListNode<T>* findEndOfSortedString(ListNode<T> *p, int (*cmp)(T &, T &));
|
||||
|
||||
public:
|
||||
LinkedList();
|
||||
LinkedList(int sizeIndex, T _t); //initiate list size and default value
|
||||
~LinkedList();
|
||||
|
||||
/*
|
||||
Returns current size of LinkedList
|
||||
*/
|
||||
virtual int size();
|
||||
/*
|
||||
Adds a T object in the specified index;
|
||||
Unlink and link the LinkedList correcly;
|
||||
Increment _size
|
||||
*/
|
||||
virtual bool add(int index, T);
|
||||
/*
|
||||
Adds a T object in the end of the LinkedList;
|
||||
Increment _size;
|
||||
*/
|
||||
virtual bool add(T);
|
||||
/*
|
||||
Adds a T object in the start of the LinkedList;
|
||||
Increment _size;
|
||||
*/
|
||||
virtual bool unshift(T);
|
||||
/*
|
||||
Set the object at index, with T;
|
||||
*/
|
||||
virtual bool set(int index, T);
|
||||
/*
|
||||
Remove object at index;
|
||||
If index is not reachable, returns false;
|
||||
else, decrement _size
|
||||
*/
|
||||
virtual T remove(int index);
|
||||
/*
|
||||
Remove last object;
|
||||
*/
|
||||
virtual T pop();
|
||||
/*
|
||||
Remove first object;
|
||||
*/
|
||||
virtual T shift();
|
||||
/*
|
||||
Get the index'th element on the list;
|
||||
Return Element if accessible,
|
||||
else, return false;
|
||||
*/
|
||||
virtual T get(int index);
|
||||
|
||||
/*
|
||||
Clear the entire array
|
||||
*/
|
||||
virtual void clear();
|
||||
|
||||
/*
|
||||
Sort the list, given a comparison function
|
||||
*/
|
||||
virtual void sort(int (*cmp)(T &, T &));
|
||||
|
||||
// add support to array brakets [] operator
|
||||
inline T& operator[](int index);
|
||||
inline T& operator[](size_t& i) { return this->get(i); }
|
||||
inline const T& operator[](const size_t& i) const { return this->get(i); }
|
||||
|
||||
};
|
||||
|
||||
// Initialize LinkedList with false values
|
||||
template<typename T>
|
||||
LinkedList<T>::LinkedList()
|
||||
{
|
||||
root=NULL;
|
||||
last=NULL;
|
||||
_size=0;
|
||||
|
||||
lastNodeGot = root;
|
||||
lastIndexGot = 0;
|
||||
isCached = false;
|
||||
}
|
||||
|
||||
// Clear Nodes and free Memory
|
||||
template<typename T>
|
||||
LinkedList<T>::~LinkedList()
|
||||
{
|
||||
ListNode<T>* tmp;
|
||||
while(root!=NULL)
|
||||
{
|
||||
tmp=root;
|
||||
root=root->next;
|
||||
delete tmp;
|
||||
}
|
||||
last = NULL;
|
||||
_size=0;
|
||||
isCached = false;
|
||||
}
|
||||
|
||||
/*
|
||||
Actualy "logic" coding
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ListNode<T>* LinkedList<T>::getNode(int index){
|
||||
|
||||
int _pos = 0;
|
||||
ListNode<T>* current = root;
|
||||
|
||||
// Check if the node trying to get is
|
||||
// immediatly AFTER the previous got one
|
||||
if(isCached && lastIndexGot <= index){
|
||||
_pos = lastIndexGot;
|
||||
current = lastNodeGot;
|
||||
}
|
||||
|
||||
while(_pos < index && current){
|
||||
current = current->next;
|
||||
|
||||
_pos++;
|
||||
}
|
||||
|
||||
// Check if the object index got is the same as the required
|
||||
if(_pos == index){
|
||||
isCached = true;
|
||||
lastIndexGot = index;
|
||||
lastNodeGot = current;
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
int LinkedList<T>::size(){
|
||||
return _size;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
LinkedList<T>::LinkedList(int sizeIndex, T _t){
|
||||
for (int i = 0; i < sizeIndex; i++){
|
||||
add(_t);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool LinkedList<T>::add(int index, T _t){
|
||||
|
||||
if(index >= _size)
|
||||
return add(_t);
|
||||
|
||||
if(index == 0)
|
||||
return unshift(_t);
|
||||
|
||||
ListNode<T> *tmp = new ListNode<T>(),
|
||||
*_prev = getNode(index-1);
|
||||
tmp->data = _t;
|
||||
tmp->next = _prev->next;
|
||||
_prev->next = tmp;
|
||||
|
||||
_size++;
|
||||
isCached = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool LinkedList<T>::add(T _t){
|
||||
|
||||
ListNode<T> *tmp = new ListNode<T>();
|
||||
tmp->data = _t;
|
||||
tmp->next = NULL;
|
||||
|
||||
if(root){
|
||||
// Already have elements inserted
|
||||
last->next = tmp;
|
||||
last = tmp;
|
||||
}else{
|
||||
// First element being inserted
|
||||
root = tmp;
|
||||
last = tmp;
|
||||
}
|
||||
|
||||
_size++;
|
||||
isCached = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool LinkedList<T>::unshift(T _t){
|
||||
|
||||
if(_size == 0)
|
||||
return add(_t);
|
||||
|
||||
ListNode<T> *tmp = new ListNode<T>();
|
||||
tmp->next = root;
|
||||
tmp->data = _t;
|
||||
root = tmp;
|
||||
|
||||
_size++;
|
||||
isCached = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
T& LinkedList<T>::operator[](int index) {
|
||||
return getNode(index)->data;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool LinkedList<T>::set(int index, T _t){
|
||||
// Check if index position is in bounds
|
||||
if(index < 0 || index >= _size)
|
||||
return false;
|
||||
|
||||
getNode(index)->data = _t;
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T LinkedList<T>::pop(){
|
||||
if(_size <= 0)
|
||||
return T();
|
||||
|
||||
isCached = false;
|
||||
|
||||
if(_size >= 2){
|
||||
ListNode<T> *tmp = getNode(_size - 2);
|
||||
T ret = tmp->next->data;
|
||||
delete(tmp->next);
|
||||
tmp->next = NULL;
|
||||
last = tmp;
|
||||
_size--;
|
||||
return ret;
|
||||
}else{
|
||||
// Only one element left on the list
|
||||
T ret = root->data;
|
||||
delete(root);
|
||||
root = NULL;
|
||||
last = NULL;
|
||||
_size = 0;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T LinkedList<T>::shift(){
|
||||
if(_size <= 0)
|
||||
return T();
|
||||
|
||||
if(_size > 1){
|
||||
ListNode<T> *_next = root->next;
|
||||
T ret = root->data;
|
||||
delete(root);
|
||||
root = _next;
|
||||
_size --;
|
||||
isCached = false;
|
||||
|
||||
return ret;
|
||||
}else{
|
||||
// Only one left, then pop()
|
||||
return pop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T LinkedList<T>::remove(int index){
|
||||
if (index < 0 || index >= _size)
|
||||
{
|
||||
return T();
|
||||
}
|
||||
|
||||
if(index == 0)
|
||||
return shift();
|
||||
|
||||
if (index == _size-1)
|
||||
{
|
||||
return pop();
|
||||
}
|
||||
|
||||
ListNode<T> *tmp = getNode(index - 1);
|
||||
ListNode<T> *toDelete = tmp->next;
|
||||
T ret = toDelete->data;
|
||||
tmp->next = tmp->next->next;
|
||||
delete(toDelete);
|
||||
_size--;
|
||||
isCached = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
T LinkedList<T>::get(int index){
|
||||
ListNode<T> *tmp = getNode(index);
|
||||
|
||||
return (tmp ? tmp->data : T());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void LinkedList<T>::clear(){
|
||||
while(size() > 0)
|
||||
shift();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void LinkedList<T>::sort(int (*cmp)(T &, T &)){
|
||||
if(_size < 2) return; // trivial case;
|
||||
|
||||
for(;;) {
|
||||
|
||||
ListNode<T> **joinPoint = &root;
|
||||
|
||||
while(*joinPoint) {
|
||||
ListNode<T> *a = *joinPoint;
|
||||
ListNode<T> *a_end = findEndOfSortedString(a, cmp);
|
||||
|
||||
if(!a_end->next ) {
|
||||
if(joinPoint == &root) {
|
||||
last = a_end;
|
||||
isCached = false;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ListNode<T> *b = a_end->next;
|
||||
ListNode<T> *b_end = findEndOfSortedString(b, cmp);
|
||||
|
||||
ListNode<T> *tail = b_end->next;
|
||||
|
||||
a_end->next = NULL;
|
||||
b_end->next = NULL;
|
||||
|
||||
while(a && b) {
|
||||
if(cmp(a->data, b->data) <= 0) {
|
||||
*joinPoint = a;
|
||||
joinPoint = &a->next;
|
||||
a = a->next;
|
||||
}
|
||||
else {
|
||||
*joinPoint = b;
|
||||
joinPoint = &b->next;
|
||||
b = b->next;
|
||||
}
|
||||
}
|
||||
|
||||
if(a) {
|
||||
*joinPoint = a;
|
||||
while(a->next) a = a->next;
|
||||
a->next = tail;
|
||||
joinPoint = &a->next;
|
||||
}
|
||||
else {
|
||||
*joinPoint = b;
|
||||
while(b->next) b = b->next;
|
||||
b->next = tail;
|
||||
joinPoint = &b->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ListNode<T>* LinkedList<T>::findEndOfSortedString(ListNode<T> *p, int (*cmp)(T &, T &)) {
|
||||
while(p->next && cmp(p->data, p->next->data) <= 0) {
|
||||
p = p->next;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif
|
@ -59,9 +59,9 @@ public:
|
||||
~LList() { reset(); }
|
||||
|
||||
// remove elements
|
||||
T * removeHead(void); // remove first element
|
||||
void removeHead(void); // remove first element
|
||||
void reset(void); // remove all elements
|
||||
const T * remove(const T * val);
|
||||
void remove(const T * val);
|
||||
|
||||
// read the list
|
||||
inline bool isEmpty(void) const { return (_head == nullptr) ? true : false; }
|
||||
@ -77,7 +77,6 @@ public:
|
||||
T & addHead(void);
|
||||
T & addHead(const T &val);
|
||||
T & addToLast(void);
|
||||
T & insertAt(size_t index);
|
||||
// add an element allocated externally
|
||||
// memory is free by us now -- don't free it!
|
||||
T & addHead(LList_elt<T> * elt);
|
||||
@ -143,20 +142,17 @@ void LList<T>::reset(void) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T * LList<T>::removeHead(void) {
|
||||
void LList<T>::removeHead(void) {
|
||||
if (_head) {
|
||||
T * orginal_head = &_head->_val;
|
||||
LList_elt<T> * next = _head->next();
|
||||
delete _head;
|
||||
_head = next;
|
||||
return orginal_head;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const T * LList<T>::remove(const T * val) {
|
||||
if (nullptr == val) { return val; }
|
||||
void LList<T>::remove(const T * val) {
|
||||
if (nullptr == val) { return; }
|
||||
// find element in chain and find pointer before
|
||||
LList_elt<T> **curr_ptr = &_head;
|
||||
while (*curr_ptr) {
|
||||
@ -168,7 +164,6 @@ const T * LList<T>::remove(const T * val) {
|
||||
}
|
||||
curr_ptr = &((*curr_ptr)->_next); // move to next element
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -206,27 +201,6 @@ T & LList<T>::addToLast(void) {
|
||||
return elt->_val;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T & LList<T>::insertAt(size_t index) {
|
||||
if (0 == index) {
|
||||
return addHead(); // insert at the head
|
||||
}
|
||||
index--;
|
||||
LList_elt<T> **curr_ptr = &_head;
|
||||
size_t count = 0;
|
||||
while (*curr_ptr) {
|
||||
if (count == index) {
|
||||
LList_elt<T> * elt = new LList_elt<T>(); // create element
|
||||
elt->next((*curr_ptr)->next());
|
||||
(*curr_ptr)->next(elt);
|
||||
return elt->_val;
|
||||
}
|
||||
curr_ptr = &((*curr_ptr)->_next);
|
||||
count++;
|
||||
}
|
||||
return addToLast();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T & LList<T>::addToLast(LList_elt<T> * elt) {
|
||||
LList_elt<T> **curr_ptr = &_head;
|
||||
|
17
lib/default/TasmotaSerial-3.5.0/library.json
Normal file
17
lib/default/TasmotaSerial-3.5.0/library.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "TasmotaSerial",
|
||||
"version": "3.5.0",
|
||||
"keywords": [
|
||||
"serial", "io", "TasmotaSerial"
|
||||
],
|
||||
"description": "Implementation of software serial with hardware serial fallback for ESP8266 and ESP32.",
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/arendst/Tasmota/lib/TasmotaSerial"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": [
|
||||
"espressif8266", "espressif32"
|
||||
]
|
||||
}
|
9
lib/default/TasmotaSerial-3.5.0/library.properties
Normal file
9
lib/default/TasmotaSerial-3.5.0/library.properties
Normal file
@ -0,0 +1,9 @@
|
||||
name=TasmotaSerial
|
||||
version=3.5.0
|
||||
author=Theo Arends
|
||||
maintainer=Theo Arends <theo@arends.com>
|
||||
sentence=Implementation of software serial with hardware serial fallback for ESP8266 and ESP32.
|
||||
paragraph=
|
||||
category=Signal Input/Output
|
||||
url=
|
||||
architectures=esp8266,esp32
|
476
lib/default/TasmotaSerial-3.5.0/src/TasmotaSerial.cpp
Normal file
476
lib/default/TasmotaSerial-3.5.0/src/TasmotaSerial.cpp
Normal file
@ -0,0 +1,476 @@
|
||||
/*
|
||||
TasmotaSerial.cpp - Implementation of software serial with hardware serial fallback for Tasmota
|
||||
|
||||
Copyright (C) 2021 Theo Arends
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
// The Arduino standard GPIO routines are not enough,
|
||||
// must use some from the Espressif SDK as well
|
||||
extern "C" {
|
||||
#include "gpio.h"
|
||||
}
|
||||
|
||||
#include <TasmotaSerial.h>
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
void IRAM_ATTR callRxRead(void *self) { ((TasmotaSerial*)self)->rxRead(); };
|
||||
|
||||
// As the Arduino attachInterrupt has no parameter, lists of objects
|
||||
// and callbacks corresponding to each possible GPIO pins have to be defined
|
||||
TasmotaSerial *tms_obj_list[16];
|
||||
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
|
||||
#include "driver/uart.h"
|
||||
|
||||
static uint32_t tasmota_serial_uart_bitmap = 0; // Assigned UARTs
|
||||
|
||||
#endif // ESP32
|
||||
|
||||
TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback, int nwmode, int buffer_size) {
|
||||
m_valid = false;
|
||||
m_hardserial = false;
|
||||
m_hardswap = false;
|
||||
m_stop_bits = 1;
|
||||
m_nwmode = nwmode;
|
||||
serial_buffer_size = buffer_size;
|
||||
m_rx_pin = receive_pin;
|
||||
m_tx_pin = transmit_pin;
|
||||
m_in_pos = m_out_pos = 0;
|
||||
#ifdef ESP8266
|
||||
if (!((isValidGPIOpin(receive_pin)) && (isValidGPIOpin(transmit_pin) || transmit_pin == 16))) {
|
||||
return;
|
||||
}
|
||||
if (hardware_fallback && (((3 == m_rx_pin) && (1 == m_tx_pin)) || ((3 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (1 == m_tx_pin)))) {
|
||||
m_hardserial = true;
|
||||
}
|
||||
else if ((2 == hardware_fallback) && (((13 == m_rx_pin) && (15 == m_tx_pin)) || ((13 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (15 == m_tx_pin)))) {
|
||||
m_hardserial = true;
|
||||
m_hardswap = true;
|
||||
}
|
||||
else {
|
||||
if ((m_rx_pin < 0) && (m_tx_pin < 0)) { return; }
|
||||
if (m_rx_pin > -1) {
|
||||
m_buffer = (uint8_t*)malloc(serial_buffer_size);
|
||||
if (m_buffer == NULL) return;
|
||||
// Use getCycleCount() loop to get as exact timing as possible
|
||||
m_bit_time = ESP.getCpuFreqMHz() * 1000000 / TM_SERIAL_BAUDRATE;
|
||||
m_bit_start_time = m_bit_time + m_bit_time/3 - 500; // pre-compute first wait
|
||||
pinMode(m_rx_pin, INPUT);
|
||||
tms_obj_list[m_rx_pin] = this;
|
||||
attachInterruptArg(m_rx_pin, callRxRead, this, (m_nwmode) ? CHANGE : FALLING);
|
||||
}
|
||||
if (m_tx_pin > -1) {
|
||||
pinMode(m_tx_pin, OUTPUT);
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
}
|
||||
}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if ((receive_pin >= 0) && !GPIO_IS_VALID_GPIO(receive_pin)) { return; }
|
||||
if ((transmit_pin >= 0) && !GPIO_IS_VALID_OUTPUT_GPIO(transmit_pin)) { return; }
|
||||
m_hardserial = true;
|
||||
TSerial = nullptr;
|
||||
#endif // ESP32
|
||||
m_valid = true;
|
||||
}
|
||||
|
||||
void TasmotaSerial::end(bool turnOffDebug) {
|
||||
#ifdef ESP8266
|
||||
if (m_hardserial) {
|
||||
Serial.end();
|
||||
} else {
|
||||
if (m_rx_pin > -1) {
|
||||
detachInterrupt(m_rx_pin);
|
||||
tms_obj_list[m_rx_pin] = NULL;
|
||||
if (m_buffer) {
|
||||
free(m_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef ESP32
|
||||
// Serial.printf("TSR: Freeing UART%d\n", m_uart);
|
||||
|
||||
TSerial->end(turnOffDebug);
|
||||
bitClear(tasmota_serial_uart_bitmap, m_uart);
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
TasmotaSerial::~TasmotaSerial(void) {
|
||||
end();
|
||||
}
|
||||
|
||||
bool TasmotaSerial::isValidGPIOpin(int pin) {
|
||||
return (pin >= -1 && pin <= 5) || (pin >= 12 && pin <= 15);
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
bool TasmotaSerial::freeUart(void) {
|
||||
for (uint32_t i = SOC_UART_NUM -1; i >= 0; i--) {
|
||||
if (0 == bitRead(tasmota_serial_uart_bitmap, i)) {
|
||||
m_uart = i;
|
||||
bitSet(tasmota_serial_uart_bitmap, m_uart);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||
if (!m_valid) { return false; }
|
||||
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
Serial.flush();
|
||||
Serial.begin(speed, (SerialConfig)config);
|
||||
if (m_hardswap) {
|
||||
Serial.swap();
|
||||
}
|
||||
if (serial_buffer_size > 256) {
|
||||
Serial.setRxBufferSize(serial_buffer_size);
|
||||
}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if (TSerial == nullptr) { // Allow for dynamic change in baudrate or config
|
||||
if (freeUart()) { // We prefer UART1 and UART2 and keep UART0 for debugging
|
||||
#ifdef ARDUINO_USB_CDC_ON_BOOT
|
||||
TSerial = new HardwareSerial(m_uart);
|
||||
#else
|
||||
if (0 == m_uart) {
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
delay(10); // Allow time to cleanup queues - if not used hangs ESP32
|
||||
TSerial = &Serial;
|
||||
} else {
|
||||
TSerial = new HardwareSerial(m_uart);
|
||||
}
|
||||
#endif // ARDUINO_USB_CDC_ON_BOOT
|
||||
if (serial_buffer_size > 256) { // RX Buffer can't be resized when Serial is already running (HardwareSerial.cpp)
|
||||
TSerial->setRxBufferSize(serial_buffer_size);
|
||||
}
|
||||
} else {
|
||||
m_valid = false;
|
||||
return m_valid; // As we currently only support hardware serial on ESP32 it's safe to exit here
|
||||
}
|
||||
}
|
||||
TSerial->begin(speed, config, m_rx_pin, m_tx_pin);
|
||||
// For low bit rate, below 9600, set the Full RX threshold at 10 bytes instead of the default 120
|
||||
if (speed <= 9600) {
|
||||
// At 9600, 10 chars are ~10ms
|
||||
uart_set_rx_full_threshold(m_uart, 10);
|
||||
} else if (speed < 115200) {
|
||||
// At 19200, 120 chars are ~60ms
|
||||
// At 76800, 120 chars are ~15ms
|
||||
uart_set_rx_full_threshold(m_uart, 120);
|
||||
} else {
|
||||
// At 115200, 256 chars are ~20ms
|
||||
// Zigbee requires to keep frames together, i.e. 256 bytes max
|
||||
uart_set_rx_full_threshold(m_uart, 256);
|
||||
}
|
||||
// For bitrate below 115200, set the Rx time out to 6 chars instead of the default 10
|
||||
if (speed < 115200) {
|
||||
// At 76800 the timeout is ~1ms
|
||||
uart_set_rx_timeout(m_uart, 6);
|
||||
}
|
||||
// Serial.printf("TSR: Using UART%d\n", m_uart);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
// Software serial fakes two stop bits if either stop bits is 2 or parity is not None
|
||||
// #define UART_NB_STOP_BIT_0 0B00000000
|
||||
// #define UART_NB_STOP_BIT_1 0B00010000
|
||||
// #define UART_NB_STOP_BIT_15 0B00100000
|
||||
// #define UART_NB_STOP_BIT_2 0B00110000
|
||||
m_stop_bits = ((config &0x30) >> 5) +1;
|
||||
// #define UART_PARITY_NONE 0B00000000
|
||||
// #define UART_PARITY_EVEN 0B00000010
|
||||
// #define UART_PARITY_ODD 0B00000011
|
||||
if ((1 == m_stop_bits) && (config &0x03)) {
|
||||
m_stop_bits++;
|
||||
}
|
||||
// Use getCycleCount() loop to get as exact timing as possible
|
||||
m_bit_time = ESP.getCpuFreqMHz() * 1000000 / speed;
|
||||
m_bit_start_time = m_bit_time + m_bit_time/3 - (ESP.getCpuFreqMHz() > 120 ? 700 : 500); // pre-compute first wait
|
||||
m_high_speed = (speed >= 9600);
|
||||
m_very_high_speed = (speed >= 50000);
|
||||
}
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
bool TasmotaSerial::hardwareSerial(void) {
|
||||
#ifdef ESP8266
|
||||
return m_hardserial;
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return (0 == m_uart); // We prefer UART1 and UART2 and keep UART0 for debugging
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
void TasmotaSerial::flush(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
Serial.flush();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
TSerial->flush(); // Flushes Tx only https://github.com/espressif/arduino-esp32/pull/4263
|
||||
while (TSerial->available()) { TSerial->read(); }
|
||||
#endif // ESP32
|
||||
} else {
|
||||
m_in_pos = m_out_pos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::peek(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.peek();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->peek();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) return -1;
|
||||
return m_buffer[m_out_pos];
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::read(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.read();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->read();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) return -1;
|
||||
uint32_t ch = m_buffer[m_out_pos];
|
||||
m_out_pos = (m_out_pos +1) % serial_buffer_size;
|
||||
return ch;
|
||||
}
|
||||
}
|
||||
|
||||
size_t TasmotaSerial::read(char* buffer, size_t size) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.read(buffer, size);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->read(buffer, size);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) { return 0; }
|
||||
size_t count = 0;
|
||||
for( ; size && (m_in_pos == m_out_pos) ; --size, ++count) {
|
||||
*buffer++ = m_buffer[m_out_pos];
|
||||
m_out_pos = (m_out_pos +1) % serial_buffer_size;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::available(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.available();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->available();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
int avail = m_in_pos - m_out_pos;
|
||||
if (avail < 0) avail += serial_buffer_size;
|
||||
return avail;
|
||||
}
|
||||
}
|
||||
|
||||
#define TM_SERIAL_WAIT_SND { while (ESP.getCycleCount() < (wait + start)) if (!m_high_speed) optimistic_yield(1); wait += m_bit_time; } // Watchdog timeouts
|
||||
#define TM_SERIAL_WAIT_SND_FAST { while (ESP.getCycleCount() < (wait + start)); wait += m_bit_time; }
|
||||
#define TM_SERIAL_WAIT_RCV { while (ESP.getCycleCount() < (wait + start)); wait += m_bit_time; }
|
||||
#define TM_SERIAL_WAIT_RCV_LOOP { while (ESP.getCycleCount() < (wait + start)); }
|
||||
|
||||
void IRAM_ATTR TasmotaSerial::_fast_write(uint8_t b) {
|
||||
uint32_t wait = m_bit_time;
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
for (uint32_t i = 0; i < 8; i++) {
|
||||
digitalWrite(m_tx_pin, (b & 1) ? HIGH : LOW);
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
b >>= 1;
|
||||
}
|
||||
// Stop bit(s)
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
for (uint32_t i = 0; i < m_stop_bits; i++) {
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
}
|
||||
}
|
||||
|
||||
size_t TasmotaSerial::write(uint8_t b) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.write(b);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->write(b);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if (-1 == m_tx_pin) return 0;
|
||||
if (m_high_speed) {
|
||||
cli(); // Disable interrupts in order to get a clean transmit
|
||||
_fast_write(b);
|
||||
sei();
|
||||
} else {
|
||||
uint32_t wait = m_bit_time;
|
||||
//digitalWrite(m_tx_pin, HIGH); // already in HIGH mode
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
for (uint32_t i = 0; i < 8; i++) {
|
||||
digitalWrite(m_tx_pin, (b & 1) ? HIGH : LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
b >>= 1;
|
||||
}
|
||||
// Stop bit(s)
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
// re-enable interrupts during stop bits, it's not an issue if they are longer than expected
|
||||
for (uint32_t i = 0; i < m_stop_bits; i++) {
|
||||
TM_SERIAL_WAIT_SND;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
if (!m_nwmode) {
|
||||
int32_t loop_read = m_very_high_speed ? serial_buffer_size : 1;
|
||||
// Advance the starting point for the samples but compensate for the
|
||||
// initial delay which occurs before the interrupt is delivered
|
||||
uint32_t wait = m_bit_start_time;
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
while (loop_read-- > 0) { // try to receveive all consecutive bytes in a raw
|
||||
uint32_t rec = 0;
|
||||
for (uint32_t i = 0; i < 8; i++) {
|
||||
TM_SERIAL_WAIT_RCV;
|
||||
rec >>= 1;
|
||||
if (digitalRead(m_rx_pin)) rec |= 0x80;
|
||||
}
|
||||
// Store the received value in the buffer unless we have an overflow
|
||||
uint32_t next = (m_in_pos+1) % serial_buffer_size;
|
||||
if (next != (int)m_out_pos) {
|
||||
m_buffer[m_in_pos] = rec;
|
||||
m_in_pos = next;
|
||||
}
|
||||
|
||||
TM_SERIAL_WAIT_RCV_LOOP; // wait for stop bit
|
||||
if (2 == m_stop_bits) {
|
||||
wait += m_bit_time;
|
||||
TM_SERIAL_WAIT_RCV_LOOP;
|
||||
}
|
||||
wait += m_bit_time / 4;
|
||||
|
||||
if (loop_read <= 0) { break; } // exit now if not very high speed or buffer full
|
||||
|
||||
bool start_of_next_byte = false;
|
||||
for (uint32_t i = 0; i < 12; i++) {
|
||||
TM_SERIAL_WAIT_RCV_LOOP; // wait for 1/4 bits
|
||||
wait += m_bit_time / 4;
|
||||
if (!digitalRead(m_rx_pin)) {
|
||||
// this is the start bit of the next byte
|
||||
wait += m_bit_time; // we have advanced in the first 1/4 of bit, and already added 1/4 of bit so we're roughly centered. Just skip start bit.
|
||||
start_of_next_byte = true;
|
||||
m_bit_follow_metric++;
|
||||
break; // exit loop
|
||||
}
|
||||
}
|
||||
|
||||
if (!start_of_next_byte) {
|
||||
break; // exit now if no sign of next byte
|
||||
}
|
||||
}
|
||||
// Must clear this bit in the interrupt register,
|
||||
// it gets set even when interrupts are disabled
|
||||
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, 1 << m_rx_pin);
|
||||
} else {
|
||||
uint32_t diff;
|
||||
uint32_t level;
|
||||
|
||||
#define LASTBIT 9
|
||||
|
||||
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, 1 << m_rx_pin);
|
||||
|
||||
level = digitalRead(m_rx_pin);
|
||||
|
||||
if (!level && !ss_index) {
|
||||
// start condition
|
||||
ss_bstart = ESP.getCycleCount() - (m_bit_time / 4);
|
||||
ss_byte = 0;
|
||||
ss_index++;
|
||||
//digitalWrite(1, LOW);
|
||||
} else {
|
||||
// now any bit changes go here
|
||||
// calc bit number
|
||||
diff = (ESP.getCycleCount() - ss_bstart) / m_bit_time;
|
||||
//digitalWrite(1, level);
|
||||
|
||||
if (!level && diff > LASTBIT) {
|
||||
// start bit of next byte, store and restart
|
||||
// leave irq at change
|
||||
for (uint32_t i = ss_index; i <= LASTBIT; i++) {
|
||||
ss_byte |= (1 << i);
|
||||
}
|
||||
//stobyte(0,ssp->ss_byte>>1);
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != (uint32_t)m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
||||
|
||||
ss_bstart = ESP.getCycleCount() - (m_bit_time / 4);
|
||||
ss_byte = 0;
|
||||
ss_index = 1;
|
||||
return;
|
||||
}
|
||||
if (diff >= LASTBIT) {
|
||||
// bit zero was 0,
|
||||
//stobyte(0,ssp->ss_byte>>1);
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != (uint32_t)m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
||||
ss_byte = 0;
|
||||
ss_index = 0;
|
||||
} else {
|
||||
// shift in
|
||||
for (uint32_t i = ss_index; i < diff; i++) {
|
||||
if (!level) ss_byte |= (1 << i);
|
||||
}
|
||||
ss_index = diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
101
lib/default/TasmotaSerial-3.5.0/src/TasmotaSerial.h
Normal file
101
lib/default/TasmotaSerial-3.5.0/src/TasmotaSerial.h
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
TasmotaSerial.h - Implementation of software serial with hardware serial fallback for Tasmota
|
||||
|
||||
Copyright (C) 2021 Theo Arends
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TasmotaSerial_h
|
||||
#define TasmotaSerial_h
|
||||
/*********************************************************************************************\
|
||||
* TasmotaSerial supports up to 115200 baud with default buffer size of 64 bytes using optional no iram
|
||||
*
|
||||
* Based on EspSoftwareSerial v3.4.3 by Peter Lerup (https://github.com/plerup/espsoftwareserial)
|
||||
\*********************************************************************************************/
|
||||
|
||||
#define TM_SERIAL_BAUDRATE 9600 // Default baudrate
|
||||
#define TM_SERIAL_BUFFER_SIZE 64 // Receive buffer size
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <Stream.h>
|
||||
|
||||
#ifdef ESP32
|
||||
#include <HardwareSerial.h>
|
||||
#endif
|
||||
|
||||
class TasmotaSerial : public Stream {
|
||||
public:
|
||||
TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback = 0, int nwmode = 0, int buffer_size = TM_SERIAL_BUFFER_SIZE);
|
||||
virtual ~TasmotaSerial();
|
||||
|
||||
bool begin(uint32_t speed = TM_SERIAL_BAUDRATE, uint32_t config = SERIAL_8N1);
|
||||
void end(bool turnOffDebug = true);
|
||||
bool hardwareSerial(void);
|
||||
int peek(void);
|
||||
|
||||
size_t write(uint8_t byte) override;
|
||||
int read(void) override;
|
||||
size_t read(char* buffer, size_t size);
|
||||
int available(void) override;
|
||||
void flush(void) override;
|
||||
|
||||
void rxRead(void);
|
||||
|
||||
uint32_t getLoopReadMetric(void) const { return m_bit_follow_metric; }
|
||||
#ifdef ESP32
|
||||
uint32_t getUart(void) const { return m_uart; }
|
||||
#endif
|
||||
bool isValid() { return m_valid; }
|
||||
|
||||
using Print::write;
|
||||
|
||||
private:
|
||||
bool isValidGPIOpin(int pin);
|
||||
#ifdef ESP32
|
||||
bool freeUart(void);
|
||||
#endif
|
||||
size_t txWrite(uint8_t byte);
|
||||
|
||||
// Member variables
|
||||
int m_rx_pin;
|
||||
int m_tx_pin;
|
||||
uint32_t m_stop_bits;
|
||||
uint32_t ss_byte;
|
||||
uint32_t ss_bstart;
|
||||
uint32_t ss_index;
|
||||
uint32_t m_bit_time;
|
||||
uint32_t m_bit_start_time;
|
||||
uint32_t m_bit_follow_metric = 0;
|
||||
uint32_t m_in_pos;
|
||||
uint32_t m_out_pos;
|
||||
uint32_t serial_buffer_size;
|
||||
bool m_valid;
|
||||
bool m_nwmode;
|
||||
bool m_hardserial;
|
||||
bool m_hardswap;
|
||||
bool m_high_speed = false;
|
||||
bool m_very_high_speed = false; // above 100000 bauds
|
||||
uint8_t *m_buffer;
|
||||
|
||||
void _fast_write(uint8_t b); // IRAM minimized version
|
||||
|
||||
#ifdef ESP32
|
||||
HardwareSerial *TSerial;
|
||||
int m_uart = 0;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif // TasmotaSerial_h
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "TasmotaSerial",
|
||||
"version": "3.6.0",
|
||||
"keywords": [
|
||||
"serial", "io", "TasmotaSerial"
|
||||
],
|
||||
"description": "Implementation of software serial with hardware serial fallback for ESP8266 and ESP32.",
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/arendst/Tasmota/lib/TasmotaSerial"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": [
|
||||
"espressif8266", "espressif32"
|
||||
]
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
name=TasmotaSerial
|
||||
version=3.6.0
|
||||
author=Theo Arends
|
||||
maintainer=Theo Arends <theo@arends.com>
|
||||
sentence=Implementation of software serial with hardware serial fallback for ESP8266 and ESP32.
|
||||
paragraph=
|
||||
category=Signal Input/Output
|
||||
url=
|
||||
architectures=esp8266,esp32
|
@ -1,646 +0,0 @@
|
||||
/*
|
||||
TasmotaSerial.cpp - Implementation of software serial with hardware serial fallback for Tasmota
|
||||
|
||||
Copyright (C) 2021 Theo Arends
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
// The Arduino standard GPIO routines are not enough,
|
||||
// must use some from the Espressif SDK as well
|
||||
extern "C" {
|
||||
#include "gpio.h"
|
||||
}
|
||||
|
||||
#include <TasmotaSerial.h>
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
void IRAM_ATTR callRxRead(void *self) { ((TasmotaSerial*)self)->rxRead(); };
|
||||
|
||||
// As the Arduino attachInterrupt has no parameter, lists of objects
|
||||
// and callbacks corresponding to each possible GPIO pins have to be defined
|
||||
TasmotaSerial *tms_obj_list[16];
|
||||
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
|
||||
#include "driver/uart.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
|
||||
static uint32_t tasmota_serial_uart_bitmap = 0; // Assigned UARTs
|
||||
|
||||
#endif // ESP32
|
||||
|
||||
TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback, int nwmode, int buffer_size, bool invert) {
|
||||
m_valid = false;
|
||||
m_hardserial = false;
|
||||
m_hardswap = false;
|
||||
m_overflow = false;
|
||||
m_invert = invert;
|
||||
m_data_bits = 8;
|
||||
m_stop_bits = 1;
|
||||
m_nwmode = nwmode;
|
||||
serial_buffer_size = buffer_size;
|
||||
m_rx_pin = receive_pin;
|
||||
m_tx_pin = transmit_pin;
|
||||
m_tx_enable_pin = -1;
|
||||
m_in_pos = 0;
|
||||
m_out_pos = 0;
|
||||
#ifdef ESP8266
|
||||
if (!((isValidGPIOpin(receive_pin)) && (isValidGPIOpin(transmit_pin) || transmit_pin == 16))) {
|
||||
return;
|
||||
}
|
||||
if (hardware_fallback && (((3 == m_rx_pin) && (1 == m_tx_pin)) || ((3 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (1 == m_tx_pin)))) {
|
||||
m_hardserial = true;
|
||||
}
|
||||
else if ((2 == hardware_fallback) && (((13 == m_rx_pin) && (15 == m_tx_pin)) || ((13 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (15 == m_tx_pin)))) {
|
||||
m_hardserial = true;
|
||||
m_hardswap = true;
|
||||
}
|
||||
else {
|
||||
if ((m_rx_pin < 0) && (m_tx_pin < 0)) { return; }
|
||||
if (m_rx_pin > -1) {
|
||||
m_buffer = (uint8_t*)malloc(serial_buffer_size);
|
||||
if (m_buffer == NULL) return;
|
||||
// Use getCycleCount() loop to get as exact timing as possible
|
||||
m_bit_time = ESP.getCpuFreqMHz() * 1000000 / TM_SERIAL_BAUDRATE;
|
||||
m_bit_start_time = m_bit_time + m_bit_time/3 - 500; // pre-compute first wait
|
||||
pinMode(m_rx_pin, INPUT);
|
||||
tms_obj_list[m_rx_pin] = this;
|
||||
attachInterruptArg(m_rx_pin, callRxRead, this, (m_nwmode) ? CHANGE : FALLING);
|
||||
}
|
||||
if (m_tx_pin > -1) {
|
||||
pinMode(m_tx_pin, OUTPUT);
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
}
|
||||
}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if ((receive_pin >= 0) && !GPIO_IS_VALID_GPIO(receive_pin)) { return; }
|
||||
if ((transmit_pin >= 0) && !GPIO_IS_VALID_OUTPUT_GPIO(transmit_pin)) { return; }
|
||||
m_hardserial = true;
|
||||
TSerial = nullptr;
|
||||
#endif // ESP32
|
||||
m_valid = true;
|
||||
}
|
||||
|
||||
void TasmotaSerial::end(void) {
|
||||
#ifdef ESP8266
|
||||
if (m_hardserial) {
|
||||
// Serial.end(); // Keep active for logging
|
||||
} else {
|
||||
if (m_rx_pin > -1) {
|
||||
detachInterrupt(m_rx_pin);
|
||||
tms_obj_list[m_rx_pin] = NULL;
|
||||
if (m_buffer) {
|
||||
free(m_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef ESP32
|
||||
// Serial.printf("TSR: Freeing UART%d\n", m_uart);
|
||||
|
||||
TSerial->end();
|
||||
bitClear(tasmota_serial_uart_bitmap, m_uart);
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
TasmotaSerial::~TasmotaSerial(void) {
|
||||
if (m_valid) {
|
||||
end();
|
||||
}
|
||||
}
|
||||
|
||||
bool TasmotaSerial::isValidGPIOpin(int pin) {
|
||||
#ifdef ESP8266
|
||||
return (pin >= -1 && pin <= 5) || (pin >= 12 && pin <= 15);
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
return GPIO_IS_VALID_OUTPUT_GPIO(pin);
|
||||
#endif
|
||||
}
|
||||
|
||||
void TasmotaSerial::setTransmitEnablePin(int tx_enable_pin) {
|
||||
#ifdef ESP8266
|
||||
if ((tx_enable_pin > -1) && (isValidGPIOpin(tx_enable_pin) || (16 == tx_enable_pin))) {
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
if ((tx_enable_pin > -1) && isValidGPIOpin(tx_enable_pin)) {
|
||||
#endif
|
||||
m_tx_enable_pin = tx_enable_pin;
|
||||
pinMode(m_tx_enable_pin, OUTPUT);
|
||||
digitalWrite(m_tx_enable_pin, LOW);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
bool TasmotaSerial::freeUart(void) {
|
||||
for (uint32_t i = SOC_UART_HP_NUM -1; i >= 0; i--) {
|
||||
if (0 == bitRead(tasmota_serial_uart_bitmap, i)) {
|
||||
m_uart = uart_port_t(i);
|
||||
bitSet(tasmota_serial_uart_bitmap, m_uart);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TasmotaSerial::Esp32Begin(void) {
|
||||
TSerial->begin(m_speed, m_config, m_rx_pin, m_tx_pin, m_invert);
|
||||
// For low bit rate, below 9600, set the Full RX threshold at 10 bytes instead of the default 120
|
||||
if (m_speed <= 9600) {
|
||||
// At 9600, 10 chars are ~10ms
|
||||
uart_set_rx_full_threshold(m_uart, 10);
|
||||
} else {
|
||||
// At 19200, 120 chars are ~60ms
|
||||
// At 76800, 120 chars are ~15ms
|
||||
uart_set_rx_full_threshold(m_uart, 120);
|
||||
}
|
||||
/*
|
||||
} else if (m_speed < 115200) {
|
||||
// At 19200, 120 chars are ~60ms
|
||||
// At 76800, 120 chars are ~15ms
|
||||
uart_set_rx_full_threshold(m_uart, 120);
|
||||
} else if (m_speed == 115200) {
|
||||
// At 115200, 256 chars are ~20ms
|
||||
// Zigbee requires to keep frames together, i.e. 256 bytes max
|
||||
uart_set_rx_full_threshold(m_uart, 256);
|
||||
} else {
|
||||
// At even higher speeds set 75% of the buffer
|
||||
uart_set_rx_full_threshold(m_uart, serial_buffer_size * 3 / 4);
|
||||
}
|
||||
*/
|
||||
// For bitrate below 115200, set the Rx time out to 6 chars instead of the default 10
|
||||
if (m_speed < 115200) {
|
||||
// At 76800 the timeout is ~1ms
|
||||
uart_set_rx_timeout(m_uart, 6);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t TasmotaSerial::setRxBufferSize(size_t size) {
|
||||
if (size != serial_buffer_size) {
|
||||
if (m_hardserial) {
|
||||
if (size > 256) { // Default hardware serial Rx buffer size
|
||||
#ifdef ESP8266
|
||||
serial_buffer_size = size;
|
||||
Serial.setRxBufferSize(serial_buffer_size);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if (TSerial) {
|
||||
// RX Buffer can't be resized when Serial is already running
|
||||
serial_buffer_size = size;
|
||||
TSerial->flush();
|
||||
TSerial->end();
|
||||
delay(10); // Allow time to cleanup queues - if not used hangs ESP32
|
||||
TSerial->setRxBufferSize(serial_buffer_size);
|
||||
Esp32Begin();
|
||||
}
|
||||
#endif // ESP32
|
||||
}
|
||||
}
|
||||
else if (m_buffer) {
|
||||
uint8_t *m_buffer_temp = (uint8_t*)malloc(size); // Allocate new buffer
|
||||
if (m_buffer_temp) { // If succesful de-allocate old buffer
|
||||
free(m_buffer);
|
||||
m_buffer = m_buffer_temp;
|
||||
serial_buffer_size = size;
|
||||
}
|
||||
}
|
||||
}
|
||||
return serial_buffer_size;
|
||||
}
|
||||
|
||||
bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||
if (!m_valid) { return false; }
|
||||
|
||||
if (m_hardserial) {
|
||||
if (serial_buffer_size < 256) {
|
||||
serial_buffer_size = 256;
|
||||
}
|
||||
#ifdef ESP8266
|
||||
Serial.flush();
|
||||
Serial.begin(speed, (SerialConfig)config, SERIAL_FULL, m_tx_pin, m_invert);
|
||||
if (m_hardswap) {
|
||||
Serial.swap();
|
||||
}
|
||||
if (serial_buffer_size > 256) {
|
||||
Serial.setRxBufferSize(serial_buffer_size);
|
||||
}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if (TSerial == nullptr) { // Allow for dynamic change in baudrate or config
|
||||
if (freeUart()) { // We prefer UART1 and UART2 and keep UART0 for debugging
|
||||
#if ARDUINO_USB_MODE
|
||||
TSerial = new HardwareSerial(m_uart);
|
||||
#else
|
||||
if (0 == m_uart) {
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
delay(10); // Allow time to cleanup queues - if not used hangs ESP32
|
||||
TSerial = &Serial;
|
||||
} else {
|
||||
TSerial = new HardwareSerial(m_uart);
|
||||
}
|
||||
#endif // ARDUINO_USB_MODE
|
||||
if (serial_buffer_size > 256) { // RX Buffer can't be resized when Serial is already running (HardwareSerial.cpp)
|
||||
TSerial->setRxBufferSize(serial_buffer_size);
|
||||
}
|
||||
} else {
|
||||
m_valid = false;
|
||||
return m_valid; // As we currently only support hardware serial on ESP32 it's safe to exit here
|
||||
}
|
||||
}
|
||||
m_speed = speed;
|
||||
m_config = config;
|
||||
Esp32Begin();
|
||||
// Serial.printf("TSR: Using UART%d\n", m_uart);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
// #define UART_NB_BIT_5 0B00000000
|
||||
// #define UART_NB_BIT_6 0B00000100
|
||||
// #define UART_NB_BIT_7 0B00001000
|
||||
// #define UART_NB_BIT_8 0B00001100
|
||||
m_data_bits = 5 + ((config &0x0C) >> 2);
|
||||
// Software serial fakes two stop bits if either stop bits is 2 or parity is not None
|
||||
// #define UART_NB_STOP_BIT_0 0B00000000
|
||||
// #define UART_NB_STOP_BIT_1 0B00010000
|
||||
// #define UART_NB_STOP_BIT_15 0B00100000
|
||||
// #define UART_NB_STOP_BIT_2 0B00110000
|
||||
m_stop_bits = 1 + ((config &0x30) >> 5);
|
||||
// #define UART_PARITY_NONE 0B00000000
|
||||
// #define UART_PARITY_EVEN 0B00000010
|
||||
// #define UART_PARITY_ODD 0B00000011
|
||||
if ((1 == m_stop_bits) && (config &0x03)) {
|
||||
m_stop_bits++;
|
||||
}
|
||||
// Use getCycleCount() loop to get as exact timing as possible
|
||||
m_bit_time = ESP.getCpuFreqMHz() * 1000000 / speed;
|
||||
m_bit_start_time = m_bit_time + m_bit_time/3 - (ESP.getCpuFreqMHz() > 120 ? 700 : 500); // pre-compute first wait
|
||||
m_high_speed = (speed >= 9600);
|
||||
m_very_high_speed = (speed >= 50000);
|
||||
}
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
void TasmotaSerial::setReadChunkMode(bool mode) {
|
||||
m_very_high_speed = mode;
|
||||
}
|
||||
|
||||
bool TasmotaSerial::hardwareSerial(void) {
|
||||
#ifdef ESP8266
|
||||
return m_hardserial;
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return (0 == m_uart); // We prefer UART1 and UART2 and keep UART0 for debugging
|
||||
#endif // ESP32
|
||||
}
|
||||
|
||||
bool TasmotaSerial::overflow(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.hasOverrun(); // Returns then clear overrun flag
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return false; // Not implemented
|
||||
#endif // ESP32
|
||||
} else {
|
||||
bool res = m_overflow;
|
||||
m_overflow = false;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
void TasmotaSerial::flush(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
Serial.flush();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
TSerial->flush(); // Flushes Tx only https://github.com/espressif/arduino-esp32/pull/4263
|
||||
while (TSerial->available()) { TSerial->read(); }
|
||||
#endif // ESP32
|
||||
} else {
|
||||
m_in_pos = 0;
|
||||
m_out_pos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::peek(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.peek();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->peek();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) return -1;
|
||||
return m_buffer[m_out_pos];
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::read(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.read();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->read();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) {
|
||||
return -1;
|
||||
}
|
||||
uint32_t ch = m_buffer[m_out_pos];
|
||||
m_out_pos = (m_out_pos +1) % serial_buffer_size;
|
||||
return ch;
|
||||
}
|
||||
}
|
||||
|
||||
size_t TasmotaSerial::read(char* buffer, size_t size) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.read(buffer, size);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->read(buffer, size);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) {
|
||||
return 0;
|
||||
}
|
||||
size_t count = 0;
|
||||
for( ; size && (m_in_pos != m_out_pos) ; --size, ++count) {
|
||||
*buffer++ = m_buffer[m_out_pos];
|
||||
m_out_pos = (m_out_pos +1) % serial_buffer_size;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
int TasmotaSerial::available(void) {
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.available();
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->available();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
int avail = m_in_pos - m_out_pos;
|
||||
if (avail < 0) avail += serial_buffer_size;
|
||||
|
||||
// if (!avail) {
|
||||
// optimistic_yield(10000);
|
||||
// }
|
||||
|
||||
return avail;
|
||||
}
|
||||
}
|
||||
|
||||
#define TM_SERIAL_WAIT_SND { while (ESP.getCycleCount() < (wait + start)) if (!m_high_speed) optimistic_yield(1); wait += m_bit_time; } // Watchdog timeouts
|
||||
#define TM_SERIAL_WAIT_SND_FAST { while (ESP.getCycleCount() < (wait + start)); wait += m_bit_time; }
|
||||
#define TM_SERIAL_WAIT_RCV { while (ESP.getCycleCount() < (wait + start)); wait += m_bit_time; }
|
||||
#define TM_SERIAL_WAIT_RCV_LOOP { while (ESP.getCycleCount() < (wait + start)); }
|
||||
|
||||
void IRAM_ATTR TasmotaSerial::_fast_write(uint8_t b) {
|
||||
uint32_t wait = m_bit_time;
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
for (uint32_t i = 0; i < m_data_bits; i++) {
|
||||
digitalWrite(m_tx_pin, (b & 1) ? HIGH : LOW);
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
b >>= 1;
|
||||
}
|
||||
// Stop bit(s)
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
for (uint32_t i = 0; i < m_stop_bits; i++) {
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
}
|
||||
}
|
||||
|
||||
size_t TasmotaSerial::write(uint8_t b) {
|
||||
if (!m_hardserial && (-1 == m_tx_pin)) { return 0; }
|
||||
|
||||
if (m_tx_enable_pin > -1) {
|
||||
digitalWrite(m_tx_enable_pin, HIGH);
|
||||
}
|
||||
size_t size = 0;
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
size = Serial.write(b);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
size = TSerial->write(b);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if (m_high_speed) {
|
||||
cli(); // Disable interrupts in order to get a clean transmit
|
||||
_fast_write(b);
|
||||
sei();
|
||||
} else {
|
||||
uint32_t wait = m_bit_time;
|
||||
//digitalWrite(m_tx_pin, HIGH); // already in HIGH mode
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
for (uint32_t i = 0; i < m_data_bits; i++) {
|
||||
digitalWrite(m_tx_pin, (b & 1) ? HIGH : LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
b >>= 1;
|
||||
}
|
||||
// Stop bit(s)
|
||||
digitalWrite(m_tx_pin, HIGH);
|
||||
// re-enable interrupts during stop bits, it's not an issue if they are longer than expected
|
||||
for (uint32_t i = 0; i < m_stop_bits; i++) {
|
||||
TM_SERIAL_WAIT_SND;
|
||||
}
|
||||
}
|
||||
size = 1;
|
||||
}
|
||||
if (m_tx_enable_pin > -1) {
|
||||
flush(); // Must wait for all data sent
|
||||
digitalWrite(m_tx_enable_pin, LOW);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
// Add ability to change parity on the fly, for RS-485
|
||||
// See https://github.com/arendst/Tasmota/discussions/22272
|
||||
int32_t TasmotaSerial::setConfig(uint32_t config) {
|
||||
|
||||
uint32_t data_bits_before = (m_config & 0xc) >> 2;
|
||||
uint32_t parity_before = m_config & 0x3;
|
||||
uint32_t stop_bits_before = (m_config & 0x30) >> 4;
|
||||
|
||||
uint32_t data_bits = (config & 0xc) >> 2;
|
||||
uint32_t parity = config & 0x3;
|
||||
uint32_t stop_bits = (config & 0x30) >> 4;
|
||||
|
||||
esp_err_t err;
|
||||
|
||||
if (data_bits_before != data_bits) {
|
||||
if (err = uart_set_word_length(m_uart, (uart_word_length_t) data_bits)) {
|
||||
return (int32_t) err;
|
||||
}
|
||||
}
|
||||
if (parity_before != parity) {
|
||||
if (err = uart_set_parity(m_uart, (uart_parity_t) parity)) {
|
||||
return (int32_t) err;
|
||||
}
|
||||
}
|
||||
if (stop_bits_before != stop_bits) {
|
||||
if (err = uart_set_stop_bits(m_uart, (uart_stop_bits_t) stop_bits)) {
|
||||
return (int32_t) err;
|
||||
}
|
||||
}
|
||||
|
||||
m_config = config;
|
||||
return 0; // no error
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
if (!m_nwmode) {
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
// Advance the starting point for the samples but compensate for the
|
||||
// initial delay which occurs before the interrupt is delivered
|
||||
uint32_t wait = m_bit_start_time;
|
||||
// Decide to read as much data as buffer can hold or a single byte
|
||||
// The first option may keep interrupt busy too long resulting in Hardware Watchdog
|
||||
// The second option may receive ocasional invalid data
|
||||
// User control by function setReadChunkMode()
|
||||
int32_t loop_read = m_very_high_speed ? serial_buffer_size : 1;
|
||||
uint32_t bit_mask = 0x01 << (m_data_bits -1);
|
||||
while (loop_read-- > 0) { // try to receive all consecutive bytes in a row
|
||||
uint32_t rec = 0;
|
||||
for (uint32_t i = 0; i < m_data_bits; i++) {
|
||||
TM_SERIAL_WAIT_RCV;
|
||||
rec >>= 1;
|
||||
if (digitalRead(m_rx_pin)) rec |= bit_mask;
|
||||
}
|
||||
// Store the received value in the buffer unless we have an overflow
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != m_out_pos) {
|
||||
m_buffer[m_in_pos] = rec;
|
||||
m_in_pos = next;
|
||||
} else {
|
||||
// Buffer overrun - exit
|
||||
m_overflow = true;
|
||||
loop_read = 0;
|
||||
}
|
||||
|
||||
TM_SERIAL_WAIT_RCV_LOOP; // wait for stop bit
|
||||
if (2 == m_stop_bits) {
|
||||
wait += m_bit_time;
|
||||
TM_SERIAL_WAIT_RCV_LOOP;
|
||||
}
|
||||
wait += m_bit_time / 4;
|
||||
|
||||
if (loop_read <= 0) { break; } // exit now if not very high speed or buffer full
|
||||
|
||||
bool start_of_next_byte = false;
|
||||
for (uint32_t i = 0; i < 12; i++) {
|
||||
TM_SERIAL_WAIT_RCV_LOOP; // wait for 1/4 bits
|
||||
wait += m_bit_time / 4;
|
||||
if (!digitalRead(m_rx_pin)) {
|
||||
// this is the start bit of the next byte
|
||||
wait += m_bit_time; // we have advanced in the first 1/4 of bit, and already added 1/4 of bit so we're roughly centered. Just skip start bit.
|
||||
start_of_next_byte = true;
|
||||
m_bit_follow_metric++;
|
||||
break; // exit loop
|
||||
}
|
||||
}
|
||||
|
||||
if (!start_of_next_byte) {
|
||||
break; // exit now if no sign of next byte
|
||||
}
|
||||
}
|
||||
// Must clear this bit in the interrupt register,
|
||||
// it gets set even when interrupts are disabled
|
||||
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, 1 << m_rx_pin);
|
||||
} else {
|
||||
// Currently supports 8-bit data only
|
||||
uint32_t diff;
|
||||
uint32_t level;
|
||||
|
||||
#define LASTBIT 9
|
||||
|
||||
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, 1 << m_rx_pin);
|
||||
|
||||
level = digitalRead(m_rx_pin);
|
||||
|
||||
if (!level && !ss_index) {
|
||||
// start condition
|
||||
ss_bstart = ESP.getCycleCount() - (m_bit_time / 4);
|
||||
ss_byte = 0;
|
||||
ss_index++;
|
||||
//digitalWrite(1, LOW);
|
||||
} else {
|
||||
// now any bit changes go here
|
||||
// calc bit number
|
||||
diff = (ESP.getCycleCount() - ss_bstart) / m_bit_time;
|
||||
//digitalWrite(1, level);
|
||||
|
||||
if (!level && diff > LASTBIT) {
|
||||
// start bit of next byte, store and restart
|
||||
// leave irq at change
|
||||
for (uint32_t i = ss_index; i <= LASTBIT; i++) {
|
||||
ss_byte |= (1 << i);
|
||||
}
|
||||
//stobyte(0,ssp->ss_byte>>1);
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
||||
|
||||
ss_bstart = ESP.getCycleCount() - (m_bit_time / 4);
|
||||
ss_byte = 0;
|
||||
ss_index = 1;
|
||||
return;
|
||||
}
|
||||
if (diff >= LASTBIT) {
|
||||
// bit zero was 0,
|
||||
//stobyte(0,ssp->ss_byte>>1);
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
||||
ss_byte = 0;
|
||||
ss_index = 0;
|
||||
} else {
|
||||
// shift in
|
||||
for (uint32_t i = ss_index; i < diff; i++) {
|
||||
if (!level) ss_byte |= (1 << i);
|
||||
}
|
||||
ss_index = diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ESP8266
|
@ -1,124 +0,0 @@
|
||||
/*
|
||||
TasmotaSerial.h - Implementation of software serial with hardware serial fallback for Tasmota
|
||||
|
||||
Copyright (C) 2021 Theo Arends
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TasmotaSerial_h
|
||||
#define TasmotaSerial_h
|
||||
/*********************************************************************************************\
|
||||
* TasmotaSerial supports up to 115200 baud with default buffer size of 64 bytes using optional no iram
|
||||
*
|
||||
* Based on EspSoftwareSerial v3.4.3 by Peter Lerup (https://github.com/plerup/espsoftwareserial)
|
||||
\*********************************************************************************************/
|
||||
|
||||
#define TM_SERIAL_BAUDRATE 9600 // Default baudrate
|
||||
#define TM_SERIAL_BUFFER_SIZE 64 // Receive buffer size
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <Stream.h>
|
||||
|
||||
#ifdef ESP32
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
// IDF 5.2 has changed counting UART channels, SOC_UART_NUM includes now LP UARTS too for ESP32-C6 and -P4
|
||||
#ifndef SOC_UART_HP_NUM
|
||||
#define SOC_UART_HP_NUM SOC_UART_NUM // Set new define SOC_UART_HP_NUM in pre IDF 5.2 to SOC_UART_NUM
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
class TasmotaSerial : public Stream {
|
||||
public:
|
||||
TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback = 0, int nwmode = 0, int buffer_size = TM_SERIAL_BUFFER_SIZE, bool invert = false);
|
||||
virtual ~TasmotaSerial();
|
||||
void setTransmitEnablePin(int tx_enable_pin);
|
||||
void clearTransmitEnablePin(void) { m_tx_enable_pin = -1; }
|
||||
|
||||
size_t setRxBufferSize(size_t size);
|
||||
size_t getRxBufferSize() { return serial_buffer_size; }
|
||||
|
||||
bool begin(uint32_t speed = TM_SERIAL_BAUDRATE, uint32_t config = SERIAL_8N1);
|
||||
void end(void);
|
||||
bool hardwareSerial(void);
|
||||
int peek(void);
|
||||
|
||||
size_t write(uint8_t byte) override;
|
||||
int read(void) override;
|
||||
size_t read(char* buffer, size_t size);
|
||||
size_t read(uint8_t* buffer, size_t size) {
|
||||
return read(reinterpret_cast<char*>(buffer), size);
|
||||
}
|
||||
void setReadChunkMode(bool mode);
|
||||
int available(void) override;
|
||||
void flush(void) override;
|
||||
|
||||
void rxRead(void);
|
||||
|
||||
uint32_t getLoopReadMetric(void) const { return m_bit_follow_metric; }
|
||||
#ifdef ESP32
|
||||
uint32_t getUart(void) const { return m_uart; }
|
||||
HardwareSerial *getesp32hws(void) { return TSerial; }
|
||||
int32_t setConfig(uint32_t config);
|
||||
#endif
|
||||
bool isValid(void) { return m_valid; }
|
||||
bool overflow(void);
|
||||
|
||||
using Print::write;
|
||||
|
||||
private:
|
||||
bool isValidGPIOpin(int pin);
|
||||
size_t txWrite(uint8_t byte);
|
||||
void _fast_write(uint8_t b); // IRAM minimized version
|
||||
#ifdef ESP32
|
||||
bool freeUart(void);
|
||||
void Esp32Begin(void);
|
||||
#endif
|
||||
|
||||
// Member variables
|
||||
int m_rx_pin;
|
||||
int m_tx_pin;
|
||||
int m_tx_enable_pin;
|
||||
uint32_t m_data_bits;
|
||||
uint32_t m_stop_bits;
|
||||
uint32_t ss_byte;
|
||||
uint32_t ss_bstart;
|
||||
uint32_t ss_index;
|
||||
uint32_t m_bit_time;
|
||||
uint32_t m_bit_start_time;
|
||||
uint32_t m_bit_follow_metric = 0;
|
||||
uint32_t m_in_pos;
|
||||
uint32_t m_out_pos;
|
||||
uint32_t serial_buffer_size = TM_SERIAL_BUFFER_SIZE;
|
||||
bool m_valid;
|
||||
bool m_nwmode;
|
||||
bool m_hardserial;
|
||||
bool m_hardswap;
|
||||
bool m_overflow;
|
||||
bool m_high_speed = false;
|
||||
bool m_very_high_speed = false; // above 100000 bauds
|
||||
bool m_invert;
|
||||
uint8_t *m_buffer = nullptr;
|
||||
#ifdef ESP32
|
||||
uint32_t m_speed;
|
||||
uint32_t m_config;
|
||||
HardwareSerial *TSerial;
|
||||
uart_port_t m_uart = uart_port_t(0);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif // TasmotaSerial_h
|
@ -1,19 +0,0 @@
|
||||
Wifi Helper for Tasmota bridging differences between ESP8266 and ESP32
|
||||
|
||||
This Class is for compatibility with esp8266 code
|
||||
|
||||
== License ==
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "WiFiHelper",
|
||||
"keywords": "esp32, esp8266",
|
||||
"description": "Bridges differences in Arduino WiFi between ESP32 and ESP8266",
|
||||
"version": "1.0.0",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
/*
|
||||
WiFiHelper.h - provide a wrapper for differences between ESP8266 and ESP32 WiFi
|
||||
|
||||
Copyright (C) 2024 Theo Arends / Stephan Hadinger
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef WIFIHELPER_H
|
||||
#define WIFIHELPER_H
|
||||
|
||||
|
||||
// ======================================================
|
||||
// ESP8266 specific section
|
||||
// ======================================================
|
||||
#ifdef ESP8266
|
||||
#include "ESP8266WiFi.h"
|
||||
#endif
|
||||
|
||||
|
||||
// ======================================================
|
||||
// ESP32 specific section
|
||||
// ======================================================
|
||||
#ifdef ESP32
|
||||
#include <WiFi.h>
|
||||
|
||||
#define ENC_TYPE_NONE WIFI_AUTH_OPEN
|
||||
#define ENC_TYPE_WEP WIFI_AUTH_WEP
|
||||
#define ENC_TYPE_CCMP WIFI_AUTH_WPA2_PSK
|
||||
#define ENC_TYPE_TKIP WIFI_AUTH_WPA_WPA2_PSK
|
||||
#define ENC_TYPE_AUTO WIFI_AUTH_MAX + 1
|
||||
|
||||
#define WIFI_NONE_SLEEP 0
|
||||
#define WIFI_LIGHT_SLEEP 1
|
||||
#define WIFI_MODEM_SLEEP 2
|
||||
|
||||
// ESP8266
|
||||
typedef enum WiFiPhyMode
|
||||
{
|
||||
TAS_WIFI_PHY_MODE_LR = 0, TAS_WIFI_PHY_MODE_11B = 1, TAS_WIFI_PHY_MODE_11G = 2, TAS_WIFI_PHY_MODE_11N = 3
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
, TAS_WIFI_PHY_MODE_11AX = 4
|
||||
#endif
|
||||
} WiFiPhyMode_t;
|
||||
|
||||
#endif // ESP32
|
||||
|
||||
// This is an abstract class containing wrappers to call WiFi
|
||||
class WiFiHelper {
|
||||
public:
|
||||
#ifdef ESP32
|
||||
static wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int ttls_phase2_type=-1, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
|
||||
#endif
|
||||
static wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||
static wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||
static wl_status_t begin();
|
||||
|
||||
static void hostname(const char* aHostname);
|
||||
static void setSleepMode(int iSleepMode);
|
||||
static int getPhyMode();
|
||||
static bool setPhyMode(WiFiPhyMode_t mode);
|
||||
|
||||
static void setOutputPower(int n);
|
||||
static void forceSleepBegin();
|
||||
static void forceSleepWake();
|
||||
static bool getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t* &bssid, int32_t &channel, bool &hidden_scan);
|
||||
|
||||
static int hostByName(const char* aHostname, IPAddress& aResult, int32_t timer_ms);
|
||||
static int hostByName(const char* aHostname, IPAddress& aResult);
|
||||
|
||||
static void scrubDNS(void);
|
||||
|
||||
// With ESP32 Core3, the WiFi mac address is not valid until the wifi is actually started
|
||||
// this helper function always provide a valid mac address
|
||||
static String macAddress(void);
|
||||
|
||||
// Auto-fix zone
|
||||
//
|
||||
// After a reconnect, the zone id may not be valid anymore
|
||||
// In such case we detect any "%st<n>" or "%en<n>" zone identifier
|
||||
// and replace with the current zone id
|
||||
static void IPv6ZoneAutoFix(IPAddress &addr, const char* aHostname);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // WIFIHELPER_H
|
@ -1,356 +0,0 @@
|
||||
/*
|
||||
WiFi compat with ESP32
|
||||
|
||||
Copyright (C) 2021 Theo Arends / Jörg Schüler-Maroldt
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef ESP32
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "WiFiHelper.h"
|
||||
#include <esp_wifi.h>
|
||||
|
||||
extern void AddLog(uint32_t loglevel, PGM_P formatP, ...);
|
||||
enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE};
|
||||
|
||||
|
||||
#ifdef USE_IPV6
|
||||
ip_addr_t dns_save4[DNS_MAX_SERVERS] = {}; // IPv4 DNS servers
|
||||
ip_addr_t dns_save6[DNS_MAX_SERVERS] = {}; // IPv6 DNS servers
|
||||
#endif // USE_IPV6
|
||||
|
||||
#include "tasmota_options.h"
|
||||
#include "lwip/dns.h"
|
||||
|
||||
#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
wl_status_t WiFiHelper::begin(const char *wpa2_ssid, wpa2_auth_method_t method, const char *wpa2_identity, const char *wpa2_username, const char *wpa2_password, const char *ca_pem, const char *client_crt, const char *client_key, int ttls_phase2_type, int32_t channel, const uint8_t *bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, ttls_phase2_type, channel, bssid, connect);
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
#endif // CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
|
||||
wl_status_t WiFiHelper::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin(ssid, passphrase, channel, bssid, connect);
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
|
||||
wl_status_t WiFiHelper::begin(char* ssid, char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin(ssid, passphrase, channel, bssid, connect);
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
wl_status_t WiFiHelper::begin() {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin();
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// scrubDNS
|
||||
//
|
||||
// LWIP has a single DNS table for all interfaces and for v4/v6
|
||||
// Unfortunately when trying to connect to Wifi, the dns server table is erased.
|
||||
//
|
||||
// We restore DNS previous values if they are empty
|
||||
// We restore or erase DNS entries if they are unsupported (v4 vs v6)
|
||||
extern bool WifiHasIPv4(void);
|
||||
extern bool EthernetHasIPv4(void);
|
||||
extern bool WifiHasIPv6(void);
|
||||
extern bool EthernetHasIPv6(void);
|
||||
|
||||
void WiFiHelper::scrubDNS(void) {
|
||||
// String dns_entry0 = IPAddress(dns_getserver(0)).toString();
|
||||
// String dns_entry1 = IPAddress(dns_getserver(1)).toString();
|
||||
// scan DNS entries
|
||||
bool has_v4 = WifiHasIPv4() || EthernetHasIPv4();
|
||||
bool has_v6 = false;
|
||||
#ifdef USE_IPV6
|
||||
has_v6 = WifiHasIPv6() || EthernetHasIPv6();
|
||||
#endif
|
||||
|
||||
// First pass, save values
|
||||
for (uint32_t i=0; i<DNS_MAX_SERVERS; i++) {
|
||||
#ifdef USE_IPV6
|
||||
const IPAddress ip_dns = IPAddress(dns_getserver(i));
|
||||
// Step 1. save valid values from DNS
|
||||
if (!ip_addr_isany_val((const ip_addr_t &)ip_dns)) {
|
||||
if (ip_dns.type() == IPv4 && has_v4) {
|
||||
ip_dns.to_ip_addr_t(&dns_save4[i]);
|
||||
// dns_save4[i] = (ip_addr_t) ip_dns; // dns entry is populated, save it in v4 slot
|
||||
} else if (has_v6) {
|
||||
ip_dns.to_ip_addr_t(&dns_save6[i]);
|
||||
// dns_save6[i] = (ip_addr_t) ip_dns; // dns entry is populated, save it in v6 slot
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2. scrub addresses not supported
|
||||
if (!has_v4) { dns_save4[i] = *IP4_ADDR_ANY; }
|
||||
if (!has_v6) { dns_save6[i] = *IP_ADDR_ANY; }
|
||||
|
||||
// Step 3. restore saved value
|
||||
if (has_v4 && has_v6) { // if both IPv4 and IPv6 are active, prefer IPv4
|
||||
if (!ip_addr_isany_val(dns_save4[i])) { dns_setserver(i, &dns_save4[i]); }
|
||||
else { dns_setserver(i, &dns_save6[i]); }
|
||||
} else if (has_v4) {
|
||||
dns_setserver(i, &dns_save4[i]);
|
||||
} else if (has_v6) {
|
||||
dns_setserver(i, &dns_save6[i]);
|
||||
} else {
|
||||
dns_setserver(i, IP4_ADDR_ANY);
|
||||
}
|
||||
#endif // USE_IPV6
|
||||
}
|
||||
// AddLog(LOG_LEVEL_DEBUG, "IP>: DNS: from(%s %s) to (%s %s) has4/6:%i-%i", dns_entry0.c_str(), dns_entry1.c_str(), IPAddress(dns_getserver(0)).toString().c_str(), IPAddress(dns_getserver(1)).toString().c_str(), has_v4, has_v6);
|
||||
}
|
||||
|
||||
|
||||
void WiFiHelper::hostname(const char* aHostname) {
|
||||
WiFi.setHostname(aHostname);
|
||||
}
|
||||
|
||||
void WiFiHelper::setSleepMode(int iSleepMode) {
|
||||
// WIFI_LIGHT_SLEEP and WIFI_MODEM_SLEEP
|
||||
WiFi.setSleep(iSleepMode != WIFI_NONE_SLEEP);
|
||||
}
|
||||
|
||||
int WiFiHelper::getPhyMode() {
|
||||
/*
|
||||
typedef enum
|
||||
{
|
||||
WIFI_PHY_MODE_LR, // PHY mode for Low Rate
|
||||
WIFI_PHY_MODE_11B, // PHY mode for 11b
|
||||
WIFI_PHY_MODE_11G, // PHY mode for 11g
|
||||
WIFI_PHY_MODE_HT20, // PHY mode for Bandwidth HT20 (11n)
|
||||
WIFI_PHY_MODE_HT40, // PHY mode for Bandwidth HT40 (11n)
|
||||
WIFI_PHY_MODE_HE20, // PHY mode for Bandwidth HE20 (11ax)
|
||||
} wifi_phy_mode_t;
|
||||
*/
|
||||
int phy_mode = 0; // "low rate|11b|11g|HT20|HT40|HE20"
|
||||
wifi_phy_mode_t WiFiMode;
|
||||
if (esp_wifi_sta_get_negotiated_phymode(&WiFiMode) == ESP_OK) {
|
||||
phy_mode = (int)WiFiMode;
|
||||
if (phy_mode > 5) {
|
||||
phy_mode = 5;
|
||||
}
|
||||
}
|
||||
return phy_mode;
|
||||
}
|
||||
|
||||
bool WiFiHelper::setPhyMode(WiFiPhyMode_t mode) {
|
||||
uint8_t protocol_bitmap = WIFI_PROTOCOL_11B; // 1
|
||||
switch (mode) {
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
case 4: protocol_bitmap |= WIFI_PROTOCOL_11AX; // 16
|
||||
#endif
|
||||
case 3: protocol_bitmap |= WIFI_PROTOCOL_11N; // 4
|
||||
case 2: protocol_bitmap |= WIFI_PROTOCOL_11G; // 2
|
||||
}
|
||||
return (ESP_OK == esp_wifi_set_protocol(WIFI_IF_STA, protocol_bitmap));
|
||||
}
|
||||
|
||||
void WiFiHelper::setOutputPower(int n) {
|
||||
wifi_power_t p = WIFI_POWER_2dBm;
|
||||
if (n > 19)
|
||||
p = WIFI_POWER_19_5dBm;
|
||||
else if (n > 18)
|
||||
p = WIFI_POWER_18_5dBm;
|
||||
else if (n >= 17)
|
||||
p = WIFI_POWER_17dBm;
|
||||
else if (n >= 15)
|
||||
p = WIFI_POWER_15dBm;
|
||||
else if (n >= 13)
|
||||
p = WIFI_POWER_13dBm;
|
||||
else if (n >= 11)
|
||||
p = WIFI_POWER_11dBm;
|
||||
else if (n >= 8)
|
||||
p = WIFI_POWER_8_5dBm;
|
||||
else if (n >= 7)
|
||||
p = WIFI_POWER_7dBm;
|
||||
else if (n >= 5)
|
||||
p = WIFI_POWER_5dBm;
|
||||
WiFi.setTxPower(p);
|
||||
}
|
||||
|
||||
void WiFiHelper::forceSleepBegin() {
|
||||
}
|
||||
|
||||
void WiFiHelper::forceSleepWake() {
|
||||
}
|
||||
|
||||
bool WiFiHelper::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t *&bssid, int32_t &channel, bool &hidden_scan) {
|
||||
hidden_scan = false;
|
||||
return WiFi.getNetworkInfo(i, ssid, encType, rssi, bssid, channel);
|
||||
}
|
||||
|
||||
//
|
||||
// Manage dns callbacks from lwip DNS resolver.
|
||||
// We need a trick here, because the callback may be called after we timed-out and
|
||||
// launched a new request. We need to discard outdated responses.
|
||||
//
|
||||
// We use a static ip_addr_t (anyways we don't support multi-threading)
|
||||
// and use a counter so the callback can check if it's responding to the current
|
||||
// request or to an old one (hence discard)
|
||||
//
|
||||
// It's not an issue to have old requests in flight. LWIP has a default limit of 4
|
||||
// DNS requests in flight.
|
||||
// If the buffer for in-flight requests is full, LWIP removes the oldest from the list.
|
||||
// (it does not block new DNS resolutions)
|
||||
static ip_addr_t dns_ipaddr;
|
||||
static volatile uint32_t ip_addr_counter = 0; // counter for requests
|
||||
extern int32_t WifiDNSGetTimeout(void);
|
||||
extern bool WifiDNSGetIPv6Priority(void);
|
||||
|
||||
static volatile bool dns_found = false;
|
||||
|
||||
bool DNS_TimeReached(uint32_t timer)
|
||||
{
|
||||
// Check if a certain timeout has been reached.
|
||||
int32_t passed = ((int32_t) (millis() - timer));
|
||||
return (passed >= 0);
|
||||
}
|
||||
|
||||
|
||||
static void wifi32_dns_found_callback(const char *name, const ip_addr_t *ipaddr, void *callback_arg)
|
||||
{
|
||||
// Serial.printf("DNS: cb name=%s ipaddr=%s arg=%i counter=%i\n", name ? name : "<null>", IPAddress(ipaddr).toString().c_str(), (int) callback_arg, ip_addr_counter);
|
||||
uint32_t cb_counter = (uint32_t) callback_arg;
|
||||
if (cb_counter != ip_addr_counter) { return; } // the response is from a previous request, ignore
|
||||
|
||||
if (ipaddr != nullptr) {
|
||||
dns_ipaddr = *ipaddr;
|
||||
} else {
|
||||
dns_ipaddr = *IP4_ADDR_ANY; // set to IPv4 0.0.0.0
|
||||
}
|
||||
dns_found = true;
|
||||
// AddLog(LOG_LEVEL_DEBUG, "WIF: dns_found=%s", ipaddr ? IPAddress(*ipaddr).toString().c_str() : "<null>");
|
||||
}
|
||||
|
||||
// Auto-fix zone
|
||||
//
|
||||
// After a reconnect, the zone id may not be valid anymore
|
||||
// In such case we detect any "%st<n>" or "%en<n>" zone identifier
|
||||
// and replace with the current zone id
|
||||
extern bool WifiGetIPv6LinkLocal(IPAddress *ip);
|
||||
extern bool EthernetGetIPv6LinkLocal(IPAddress *ip);
|
||||
void WiFiHelper::IPv6ZoneAutoFix(IPAddress &addr, const char* aHostname) {
|
||||
#ifdef USE_IPV6
|
||||
if ((addr.type() == IPv6) && (addr.zone() == 0)) {
|
||||
// check if hostname contains '%'
|
||||
const char *zone_identifier = strchr(aHostname, '%');
|
||||
if (zone_identifier != nullptr) {
|
||||
uint8_t zone_id = 0;
|
||||
// check if zone id is valid
|
||||
if (strncmp(zone_identifier, "%st", 3) == 0) {
|
||||
IPAddress wifi_link_local;
|
||||
if (WifiGetIPv6LinkLocal(&wifi_link_local)) {
|
||||
zone_id = wifi_link_local.zone();
|
||||
}
|
||||
} else if (strncmp(zone_identifier, "%en", 3) == 0) {
|
||||
IPAddress eth_link_local;
|
||||
if (EthernetGetIPv6LinkLocal(ð_link_local)) {
|
||||
zone_id = eth_link_local.zone();
|
||||
}
|
||||
}
|
||||
if (zone_id) {
|
||||
// convert to ip_addr_t which is currently the only way to change the zone_id
|
||||
ip_addr_t ip_addr;
|
||||
addr.to_ip_addr_t(&ip_addr);
|
||||
ip_addr.u_addr.ip6.zone = zone_id;
|
||||
addr = IPAddress(&ip_addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the given hostname to an IP address.
|
||||
* @param aHostname Name to be resolved
|
||||
* @param aResult IPAddress structure to store the returned IP address
|
||||
* @return 1 if aIPAddrString was successfully converted to an IP address,
|
||||
* else error code
|
||||
*/
|
||||
int WiFiHelper::hostByName(const char* aHostname, IPAddress& aResult, int32_t timer_ms)
|
||||
{
|
||||
// return WiFi.hostByName(aHostname, aResult);
|
||||
// #if 0
|
||||
ip_addr_t addr;
|
||||
aResult = (uint32_t) 0; // by default set to IPv4 0.0.0.0
|
||||
dns_ipaddr = *IP4_ADDR_ANY; // by default set to IPv4 0.0.0.0
|
||||
|
||||
WiFiHelper::scrubDNS(); // internal calls to reconnect can zero the DNS servers, save DNS for future use
|
||||
ip_addr_counter++; // increase counter, from now ignore previous responses
|
||||
// clearStatusBits(NET_DNS_IDLE_BIT | NET_DNS_DONE_BIT);
|
||||
uint8_t v4v6priority = LWIP_DNS_ADDRTYPE_IPV4;
|
||||
#ifdef USE_IPV6
|
||||
v4v6priority = WifiDNSGetIPv6Priority() ? LWIP_DNS_ADDRTYPE_IPV6_IPV4 : LWIP_DNS_ADDRTYPE_IPV4_IPV6;
|
||||
#endif // USE_IPV6
|
||||
dns_found = false;
|
||||
err_t err = dns_gethostbyname_addrtype(aHostname, &dns_ipaddr, &wifi32_dns_found_callback, (void*) ip_addr_counter, v4v6priority);
|
||||
// Serial.printf("DNS: dns_gethostbyname_addrtype errg=%i counter=%i\n", err, ip_addr_counter);
|
||||
if(err == ERR_OK && !ip_addr_isany_val(dns_ipaddr)) {
|
||||
#ifdef USE_IPV6
|
||||
aResult.from_ip_addr_t(&dns_ipaddr);
|
||||
#else // USE_IPV6
|
||||
aResult = ip_addr_get_ip4_u32(&dns_ipaddr);
|
||||
#endif // USE_IPV6
|
||||
} else if(err == ERR_INPROGRESS) {
|
||||
uint32_t deadline = millis() + timer_ms;
|
||||
while ((!DNS_TimeReached(deadline)) && !dns_found) {
|
||||
delay(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ip_addr_isany_val(dns_ipaddr)) {
|
||||
#ifdef USE_IPV6
|
||||
aResult.from_ip_addr_t(&dns_ipaddr);
|
||||
WiFiHelper::IPv6ZoneAutoFix(aResult, aHostname);
|
||||
#else // USE_IPV6
|
||||
aResult = ip_addr_get_ip4_u32(&dns_ipaddr);
|
||||
#endif // USE_IPV6
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
// #endif
|
||||
}
|
||||
|
||||
int WiFiHelper::hostByName(const char* aHostname, IPAddress& aResult)
|
||||
{
|
||||
return WiFiHelper::hostByName(aHostname, aResult, WifiDNSGetTimeout());
|
||||
}
|
||||
|
||||
#if (ESP_IDF_VERSION_MAJOR >= 5)
|
||||
#include "esp_mac.h"
|
||||
#endif
|
||||
|
||||
String WiFiHelper::macAddress(void) {
|
||||
#if (ESP_IDF_VERSION_MAJOR < 5)
|
||||
return WiFi.macAddress();
|
||||
#else
|
||||
uint8_t mac[6] = {0,0,0,0,0,0};
|
||||
char macStr[18] = { 0 };
|
||||
|
||||
esp_read_mac(mac, ESP_MAC_WIFI_STA);
|
||||
snprintf(macStr, sizeof(macStr), "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
return String(macStr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ESP32
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
WiFi compat with ESP32
|
||||
|
||||
Copyright (C) 2021 Theo Arends / Jörg Schüler-Maroldt
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
//
|
||||
#ifdef ESP8266
|
||||
#include "Arduino.h"
|
||||
#include "WiFiHelper.h"
|
||||
|
||||
wl_status_t WiFiHelper::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
return WiFi.begin(ssid, passphrase, channel, bssid, connect);
|
||||
}
|
||||
|
||||
wl_status_t WiFiHelper::begin(char* ssid, char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
return WiFi.begin(ssid, passphrase, channel, bssid, connect);
|
||||
}
|
||||
|
||||
wl_status_t WiFiHelper::begin() {
|
||||
return WiFi.begin();
|
||||
}
|
||||
|
||||
void WiFiHelper::scrubDNS(void) {
|
||||
}
|
||||
|
||||
|
||||
void WiFiHelper::hostname(const char* aHostname) {
|
||||
WiFi.hostname(aHostname);
|
||||
}
|
||||
|
||||
void WiFiHelper::setSleepMode(int iSleepMode) {
|
||||
WiFi.setSleepMode((WiFiSleepType_t)iSleepMode);
|
||||
}
|
||||
|
||||
int WiFiHelper::getPhyMode() {
|
||||
return WiFi.getPhyMode();
|
||||
}
|
||||
|
||||
bool WiFiHelper::setPhyMode(WiFiPhyMode_t mode) {
|
||||
return WiFi.setPhyMode(mode);
|
||||
}
|
||||
|
||||
void WiFiHelper::setOutputPower(int n) {
|
||||
WiFi.setOutputPower(n);
|
||||
}
|
||||
void WiFiHelper::forceSleepBegin() {
|
||||
WiFi.forceSleepBegin();
|
||||
}
|
||||
void WiFiHelper::forceSleepWake() {
|
||||
WiFi.forceSleepWake();
|
||||
}
|
||||
bool WiFiHelper::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t* &bssid, int32_t &channel, bool &hidden_scan) {
|
||||
return WiFi.getNetworkInfo(i, ssid, encType, rssi, bssid, channel, hidden_scan);
|
||||
}
|
||||
|
||||
int WiFiHelper::hostByName(const char* aHostname, IPAddress& aResult, int32_t timer_ms) {
|
||||
return WiFi.hostByName(aHostname, aResult, timer_ms);
|
||||
}
|
||||
int WiFiHelper::hostByName(const char* aHostname, IPAddress& aResult) {
|
||||
return WiFi.hostByName(aHostname, aResult);
|
||||
}
|
||||
|
||||
String WiFiHelper::macAddress(void) {
|
||||
return WiFi.macAddress();
|
||||
}
|
||||
|
||||
void WiFiHelper::IPv6ZoneAutoFix(IPAddress &addr, const char* aHostname) {
|
||||
}
|
||||
#endif // ESP8266
|
@ -1,128 +0,0 @@
|
||||
/**
|
||||
* Base64 encoding and decoding of strings. Uses '+' for 62, '/' for 63, '=' for padding
|
||||
*/
|
||||
|
||||
#include "base64.hpp"
|
||||
|
||||
unsigned char binary_to_base64(unsigned char v) {
|
||||
// Capital letters - 'A' is ascii 65 and base64 0
|
||||
if(v < 26) return v + 'A';
|
||||
|
||||
// Lowercase letters - 'a' is ascii 97 and base64 26
|
||||
if(v < 52) return v + 71;
|
||||
|
||||
// Digits - '0' is ascii 48 and base64 52
|
||||
if(v < 62) return v - 4;
|
||||
|
||||
// '+' is ascii 43 and base64 62
|
||||
if(v == 62) return '+';
|
||||
|
||||
// '/' is ascii 47 and base64 63
|
||||
if(v == 63) return '/';
|
||||
|
||||
return 64;
|
||||
}
|
||||
|
||||
unsigned char base64_to_binary(unsigned char c) {
|
||||
// Capital letters - 'A' is ascii 65 and base64 0
|
||||
if('A' <= c && c <= 'Z') return c - 'A';
|
||||
|
||||
// Lowercase letters - 'a' is ascii 97 and base64 26
|
||||
if('a' <= c && c <= 'z') return c - 71;
|
||||
|
||||
// Digits - '0' is ascii 48 and base64 52
|
||||
if('0' <= c && c <= '9') return c + 4;
|
||||
|
||||
// '+' is ascii 43 and base64 62
|
||||
if(c == '+') return 62;
|
||||
|
||||
// '/' is ascii 47 and base64 63
|
||||
if(c == '/') return 63;
|
||||
|
||||
return 255;
|
||||
}
|
||||
|
||||
unsigned int encode_base64_length(unsigned int input_length) {
|
||||
return (input_length + 2)/3*4;
|
||||
}
|
||||
|
||||
unsigned int decode_base64_length(unsigned char input[]) {
|
||||
unsigned char *start = input;
|
||||
|
||||
while(base64_to_binary(input[0]) < 64) {
|
||||
++input;
|
||||
}
|
||||
|
||||
unsigned int input_length = input - start;
|
||||
|
||||
unsigned int output_length = input_length/4*3;
|
||||
|
||||
switch(input_length % 4) {
|
||||
default: return output_length;
|
||||
case 2: return output_length + 1;
|
||||
case 3: return output_length + 2;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int encode_base64(unsigned char input[], unsigned int input_length, unsigned char output[]) {
|
||||
unsigned int full_sets = input_length/3;
|
||||
|
||||
// While there are still full sets of 24 bits...
|
||||
for(unsigned int i = 0; i < full_sets; ++i) {
|
||||
output[0] = binary_to_base64( input[0] >> 2);
|
||||
output[1] = binary_to_base64((input[0] & 0x03) << 4 | input[1] >> 4);
|
||||
output[2] = binary_to_base64((input[1] & 0x0F) << 2 | input[2] >> 6);
|
||||
output[3] = binary_to_base64( input[2] & 0x3F);
|
||||
|
||||
input += 3;
|
||||
output += 4;
|
||||
}
|
||||
|
||||
switch(input_length % 3) {
|
||||
case 0:
|
||||
output[0] = '\0';
|
||||
break;
|
||||
case 1:
|
||||
output[0] = binary_to_base64( input[0] >> 2);
|
||||
output[1] = binary_to_base64((input[0] & 0x03) << 4);
|
||||
output[2] = '=';
|
||||
output[3] = '=';
|
||||
output[4] = '\0';
|
||||
break;
|
||||
case 2:
|
||||
output[0] = binary_to_base64( input[0] >> 2);
|
||||
output[1] = binary_to_base64((input[0] & 0x03) << 4 | input[1] >> 4);
|
||||
output[2] = binary_to_base64((input[1] & 0x0F) << 2);
|
||||
output[3] = '=';
|
||||
output[4] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
return encode_base64_length(input_length);
|
||||
}
|
||||
|
||||
unsigned int decode_base64(unsigned char input[], unsigned char output[]) {
|
||||
unsigned int output_length = decode_base64_length(input);
|
||||
|
||||
// While there are still full sets of 24 bits...
|
||||
for(unsigned int i = 2; i < output_length; i += 3) {
|
||||
output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
|
||||
output[1] = base64_to_binary(input[1]) << 4 | base64_to_binary(input[2]) >> 2;
|
||||
output[2] = base64_to_binary(input[2]) << 6 | base64_to_binary(input[3]);
|
||||
|
||||
input += 4;
|
||||
output += 3;
|
||||
}
|
||||
|
||||
switch(output_length % 3) {
|
||||
case 1:
|
||||
output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
|
||||
break;
|
||||
case 2:
|
||||
output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
|
||||
output[1] = base64_to_binary(input[1]) << 4 | base64_to_binary(input[2]) >> 2;
|
||||
break;
|
||||
}
|
||||
|
||||
return output_length;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user