mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Merge branch 'development' into pre-release-12.3
This commit is contained in:
commit
b07f6994c7
120
.github/workflows/Tasmota_build_devel.yml
vendored
120
.github/workflows/Tasmota_build_devel.yml
vendored
@ -1,12 +1,13 @@
|
||||
|
||||
name: Build_development
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Manually 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:
|
||||
@ -14,6 +15,41 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
safeboot-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- tasmota32solo1-safeboot
|
||||
- tasmota32-safeboot
|
||||
- tasmota32c3-safeboot
|
||||
- tasmota32c3cdc-safeboot
|
||||
- tasmota32s2-safeboot
|
||||
- tasmota32s2cdc-safeboot
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3cdc-safeboot
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload safeboot firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./build_output
|
||||
|
||||
base-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
@ -31,6 +67,34 @@ jobs:
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota-zigbee
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
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
|
||||
@ -46,32 +110,36 @@ jobs:
|
||||
- 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: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./firmware
|
||||
- name: Display downloaded files
|
||||
run: |
|
||||
ls -R ./firmware/
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
@ -84,27 +152,44 @@ jobs:
|
||||
with:
|
||||
ref: development
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./firmware
|
||||
- name: Display downloaded files
|
||||
run: |
|
||||
ls -R ./firmware/
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload language firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
Upload:
|
||||
needs: [base-images, language-images]
|
||||
needs: [base-images, base32-images, language-images]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- name: Download firmware
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
path: ./mv_firmware
|
||||
- name: Downlaod safeboot firmware
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./mv_firmware
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
working-directory: ./mv_firmware
|
||||
@ -155,7 +240,6 @@ jobs:
|
||||
destination_branch: 'firmware'
|
||||
user_email: 'github-actions@github.com'
|
||||
user_name: 'github-actions'
|
||||
|
||||
Start_final_copy:
|
||||
needs: Upload
|
||||
runs-on: ubuntu-latest
|
||||
|
109
.github/workflows/Tasmota_build_master.yml
vendored
109
.github/workflows/Tasmota_build_master.yml
vendored
@ -1,11 +1,12 @@
|
||||
name: Build_firmware_master
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Manually start a workflow
|
||||
push:
|
||||
branches: master
|
||||
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:
|
||||
@ -13,6 +14,41 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
safeboot-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- 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@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload safeboot firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./build_output
|
||||
|
||||
base-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
@ -30,6 +66,34 @@ jobs:
|
||||
- tasmota-sensors
|
||||
- tasmota-zbbridge
|
||||
- tasmota-zigbee
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
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
|
||||
@ -45,32 +109,36 @@ jobs:
|
||||
- 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@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./firmware
|
||||
- name: Display downloaded files
|
||||
run: |
|
||||
ls -R ./firmware/
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
|
||||
language-images:
|
||||
needs: safeboot-images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
continue-on-error: true
|
||||
@ -83,14 +151,25 @@ jobs:
|
||||
with:
|
||||
ref: master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
pip install -U platformio
|
||||
- name: Download safeboot firmwares
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: firmware_safeboot
|
||||
path: ./firmware
|
||||
- name: Display downloaded files
|
||||
run: |
|
||||
ls -R ./firmware/
|
||||
- name: Run PlatformIO
|
||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload language firmware artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware
|
||||
path: ./build_output
|
||||
@ -108,7 +187,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R ./mv_firmware/
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: jason2866/action-gh-release@v1.2
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
tag_name: ${{ github.run_number }}
|
||||
|
22
.github/workflows/build_all_the_things.yml
vendored
22
.github/workflows/build_all_the_things.yml
vendored
@ -28,7 +28,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
@ -44,7 +46,7 @@ jobs:
|
||||
path: ./build_output
|
||||
|
||||
os-check-mac:
|
||||
runs-on: macos-latest
|
||||
runs-on: macOS-12
|
||||
if: github.repository == 'arendst/Tasmota'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
@ -54,7 +56,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
@ -109,9 +113,15 @@ jobs:
|
||||
- tasmota32s3-safeboot
|
||||
- tasmota32s3cdc-safeboot
|
||||
steps:
|
||||
- name: Sleep a while, try to start MacOS / Windows CI env first
|
||||
uses: jakejarvis/wait-action@master
|
||||
with:
|
||||
time: '1m'
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
@ -137,7 +147,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
|
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@v3.0.15
|
||||
- uses: actions/stale@v6.0.1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 25
|
||||
|
23
API.md
23
API.md
@ -14,20 +14,24 @@ 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 | | | | Immediatly 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_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_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_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
|
||||
@ -38,19 +42,28 @@ 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
|
||||
|
||||
|
@ -68,6 +68,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
|
||||
| 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 |
|
||||
| | | | | | | |
|
||||
@ -177,10 +178,13 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
|
||||
| USE_DS3502 | - | - / - | - | - | - | - |
|
||||
| USE_HYT | - | - / - | - | - | - | - |
|
||||
| USE_LUXV30B | - | - / - | - | - | - | - |
|
||||
| USE_HMC5883L | - | - / - | - | - | - | - |
|
||||
| USE_QMC5883L | - | - / - | - | - | - | - |
|
||||
| | | | | | | |
|
||||
| Feature or Sensor | l | t | k | s | i | d | Remarks
|
||||
| USE_SPI | - | - / - | - | - | - | x |
|
||||
| USE_RC522 | - | - / - | - | - | - | - |
|
||||
| USE_CANSNIFFER | - | - / - | - | - | - | - |
|
||||
| USE_MHZ19 | - | - / x | - | x | - | - |
|
||||
| USE_SENSEAIR | - | - / x | - | x | - | - |
|
||||
| USE_PMS5003 | - | - / x | - | x | - | - |
|
||||
@ -201,6 +205,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
|
||||
| USE_MIEL_HVAC | - | - / - | - | - | - | - |
|
||||
| USE_PROJECTOR_CTRL | - | - / - | - | - | - | - |
|
||||
| USE_AS608 | - | - / - | - | - | - | - |
|
||||
| USE_LD2410 | - | - / - | - | - | - | - |
|
||||
| USE_TCP_BRIDGE | - | - / - | - | - | - | - | zbbridge / zbbrdgpro
|
||||
| | | | | | | |
|
||||
| USE_NRF24 | - | - / - | - | - | - | - |
|
||||
@ -254,5 +259,9 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
|
||||
| USE_I2S_AUDIO | | / - | | | | |
|
||||
| USE_TTGO_WATCH | | / - | | | | |
|
||||
| USE_SONOFF_SPM | | / x | | | | |
|
||||
| USE_DISPLAY_TM1621_SONOFF | | / x | | | | |
|
||||
| USE_SHELLY_PRO | | / x | | | | |
|
||||
| USE_DALI | | / - | | | | |
|
||||
| USE_DINGTIAN_RELAY | | / - | | | | |
|
||||
|
||||
* USE_MQTT_TLS is enabled by default in every ESP32 variants
|
||||
|
114
CHANGELOG.md
114
CHANGELOG.md
@ -3,6 +3,120 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Released]
|
||||
|
||||
## [12.3.0] 20221215
|
||||
- Release Percy
|
||||
|
||||
## [12.2.0.6] 20221215
|
||||
### Added
|
||||
- Serial Modbus transmit enable GPIOs to all modbus energy drivers and modbus bridge (#17247)
|
||||
- Berry crypto module, with AES_GCM by default and EC_CC25519 optional
|
||||
- IPv6 support for Ethernet (ESP32)
|
||||
|
||||
### Changed
|
||||
- TasmotaSerial library from v3.5.0 to v3.6.0
|
||||
- Removed leading spaces on commands ``(S)SerialSend1 to 6`` but keep on duplicate commands ``(S)SerialSend11 to 16`` (#16723)
|
||||
|
||||
### Fixed
|
||||
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
||||
- RCSwitch exception 0/6 on some protocols (#17285)
|
||||
|
||||
## [12.2.0.5] 20221129
|
||||
### Added
|
||||
- ESP32 DS18x20 parasitic power usage when defining W1_PARASITE_POWER (#17112)
|
||||
- Optional define ``SERIAL_BRIDGE_BUFFER_SIZE`` to set Serial Bridge internal buffer size (Default ESP8266 = 256, ESP32 = 800)
|
||||
- Command ``SSerialBuffer 256..SERIAL_BRIDGE_BUFFER_SIZE`` to change serial bridge rx buffer size (#17120)
|
||||
- Command ``SetOption35 0..255`` to skip number of received messages in Serial Bridge (default 0) (#17140)
|
||||
- Teleinfo TEMPO (BBR) contract (#17160)
|
||||
- Support for HLK-LD2410 24GHz smart wave motion sensor
|
||||
- Berry ``mdns`` module (#17202)
|
||||
- IPv6 preview for ESP32, also working for ESP8266
|
||||
|
||||
### Changed
|
||||
- Serial Bridge default internal serial rx buffer size from 64 to 256 (#17120)
|
||||
- Accept filename extensions to GUI file upload input fields (#16875)
|
||||
- AC PWM dimmer lineair power distribution (#17177)
|
||||
|
||||
### Fixed
|
||||
- ModbusBridge baudrates over 76500 baud (#17106)
|
||||
|
||||
### Removed
|
||||
- Accept filename extensions to GUI file upload input fields as not functional in some browsers (#16875)
|
||||
|
||||
## [12.2.0.4] 20221117
|
||||
### Added
|
||||
- Support for Plantower PMSx003T AQI models with temperature and humidity (#16971)
|
||||
- Support for Dingtian x595/x165 shift register based relay boards by Barbudor (#17032)
|
||||
- New ``FUNC_NETWORK_UP`` and ``FUNC_NETWORK_DOWN`` events
|
||||
- WS2812 and Light ArtNet DMX control over UDP port 6454 (#17059)
|
||||
- Command ``SwitchMode 16`` sending only MQTT message on inverted switch change (#17028)
|
||||
- Support for HMC5883L 3-Axis Digital Compass sensor by Andreas Achtzehn (#17069)
|
||||
- Berry add ``udp->close()`` method (#17094)
|
||||
- Command ``RgxClients`` for range extender clients list (#17048)
|
||||
- Command ``RgxPort [tcp|udp], gateway_port, client_mac, client_port`` for range extender port forwardings (#17092)
|
||||
|
||||
### Changed
|
||||
- Reverted Flash Mode back from ``DIO`` to ``DOUT`` for ESP8266/ESP8285 (#17019)
|
||||
- ESP32 Framework (Core) from v2.0.5.2 to v2.0.5.3 (#17034)
|
||||
- TuyaMcu rewrite by btsimonh (#17051)
|
||||
- WS2812 sends signal to only ``Pixels`` leds instead of sending to 512 leds (#17055)
|
||||
- Zigbee improved Aqara plug support and completed cluster 0x0702 (#17073)
|
||||
- ESP32 LVGL library from v8.3.2 to v8.3.3 (no functional change)
|
||||
|
||||
### Fixed
|
||||
- SenseAir S8 module detection (#17033)
|
||||
|
||||
## [12.2.0.3] 20221109
|
||||
### Added
|
||||
- Support for BP1658CJ RGBCW led bulbs like Orein OS0100411267 by Cossid (#17011)
|
||||
|
||||
### Breaking Changed
|
||||
- Redesign distance sensors VL53LXX, TOF10120, HRXL and DYP to use cm instead of mm (#17021)
|
||||
|
||||
### Changed
|
||||
- Default Flash Mode changed from ``DOUT`` to ``DIO`` for ESP8266/ESP8285
|
||||
|
||||
## [12.2.0.2] 20221107
|
||||
### Added
|
||||
- Support for Digital Addressable Lighting Interface (DALI) by Andrei Kazmirtsuk (#16938)
|
||||
- Support for two phase power calibration using commands ``PowerSet2``, ``VoltageSet2`` and ``CurrentSet2``
|
||||
- Support for NTAG2xx tags read and write on PN532 NFC reader (#16939)
|
||||
- Berry ``bytes().reverse()`` method (#16977)
|
||||
- ESP32 Support for DMX ArtNet Led matrix animations (#16984)
|
||||
- Command ``SetOption47 1..255`` to delay power on relay state in seconds reducing power surge. ``SO47 1`` delays until network connected. ``SO47 2`` delays until mqtt connected
|
||||
- ESP32 DMX ArtNet optimization to avoid any object allocation and avoid garbage collector pauses
|
||||
- Berry add ``dyn`` class
|
||||
|
||||
### Changed
|
||||
- Move some persistent data (PowerLow)
|
||||
- ESP32 Framework (Core) from v2.0.5 to v2.0.5.2
|
||||
- ADE7953 monitoring from instant power to accumulated energy (#16941)
|
||||
|
||||
### Fixed
|
||||
- Deduplicate code and fix %timer n% rule regression from v12.2.0 (#16914)
|
||||
- Serial initialization for baudrate and config (#16970)
|
||||
- ModbusBridge buffer overflow (#16979)
|
||||
- Default serial bridge configuration from 5N1 to 8N1 regression from v10.1.0.3
|
||||
|
||||
### Removed
|
||||
- Define ``USE_PN532_DATA_RAW`` from NFC reader (#16939)
|
||||
|
||||
## [12.2.0.1] 20221026
|
||||
### Added
|
||||
- DS18x20 support on up to four GPIOs by md5sum-as (#16833)
|
||||
- Berry add `bytes().setbytes()` (#16892)
|
||||
- Support for Shelly Pro 1/1PM and 2/2PM (#16773)
|
||||
- Add Zigbee router firmware for Sonoff ZBBridgePro (#16900)
|
||||
- Prepare for DMX ArtNet support on ESP32
|
||||
|
||||
### Changed
|
||||
- DS18x20 ``DS18Alias`` to ``DS18Sens`` (#16833)
|
||||
- Compiling with reduced boards manifests in favour of Autoconfig (#16848)
|
||||
- Add NeoPool ``NPFiltration 2`` toggle cmnd (#16859)
|
||||
- ESP32 NimBLE library from v1.4.0 to v1.4.1 (#16775)
|
||||
|
||||
### Fixed
|
||||
- BP5758D red channel corruption regression from v12.1.1.6 (#16850)
|
||||
|
||||
## [12.2.0] 20221017
|
||||
- Release Patrick
|
||||
|
||||
|
112
CODE_OWNERS.md
112
CODE_OWNERS.md
@ -71,17 +71,129 @@ In addition to @arendst the following code is mainly owned by:
|
||||
| xdrv_60_shift595 | Jacek Ziółkowski
|
||||
| xdrv_61_ds3502 | f-reiling
|
||||
| xdrv_62_improv | @arendst
|
||||
| xdrv_63_modbus_bridge | @jeroenst
|
||||
| |
|
||||
| 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
|
||||
| xdrv_87_esp32_sonoff_tm1621 | @arendst
|
||||
| xdrv_88_esp32_shelly_pro | @arendst
|
||||
| xdrv_89_esp32_dali | @eeak
|
||||
| xdrv_90_esp32_dingtian_relay | @barbudor
|
||||
| |
|
||||
| xdrv_122_file_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 |
|
||||
| xsns_24_si1145 |
|
||||
| xsns_25 |
|
||||
| xsns_26_lm75ad | Andre Thomas
|
||||
| xsns_27_apds9960 | Shawn Hymel
|
||||
| xsns_28_tm1638 | @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
|
||||
| |
|
||||
| Libraries |
|
||||
| |
|
||||
|
@ -107,3 +107,4 @@ Index | Define | Driver | Device | Address(es) | Description
|
||||
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
|
||||
|
@ -94,4 +94,4 @@ Module | LCode | Description
|
||||
06 TTGO Watch | x | TTGO Watch
|
||||
07 M5Stack Core2 | x | M5Stack Core2
|
||||
|
||||
Over 2400 additional devices are supported using [templates](TEMPLATES.md).
|
||||
Over 2500 additional devices are supported using [templates](TEMPLATES.md).
|
||||
|
117
RELEASENOTES.md
117
RELEASENOTES.md
@ -33,9 +33,9 @@ While fallback or downgrading is common practice it was never supported due to S
|
||||
|
||||
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 **2.0.5**.
|
||||
This release will be supported from ESP32/Arduino library Core version **2.0.5.3**.
|
||||
|
||||
Support of ESP8266 Core versions before 2.7.4.9 and ESP32 Core versions before 2.0.5 have been removed.
|
||||
Support of ESP8266 Core versions before 2.7.4.9 and ESP32 Core versions before 2.0.5.3 have been removed.
|
||||
|
||||
## Support of TLS
|
||||
|
||||
@ -72,12 +72,12 @@ Latest released binaries can be downloaded from
|
||||
- http://ota.tasmota.com/tasmota/release
|
||||
|
||||
Historical binaries can be downloaded from
|
||||
- http://ota.tasmota.com/tasmota/release-12.2.0
|
||||
- http://ota.tasmota.com/tasmota/release-12.3.0
|
||||
|
||||
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
|
||||
|
||||
### ESP32, ESP32-C3, ESP32-S2 and ESP32-S3 based
|
||||
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.5**.
|
||||
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.5.3**.
|
||||
|
||||
- **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.
|
||||
@ -97,7 +97,7 @@ Latest released binaries can be downloaded from
|
||||
- http://ota.tasmota.com/tasmota32/release
|
||||
|
||||
Historical binaries can be downloaded from
|
||||
- http://ota.tasmota.com/tasmota32/release-12.2.0
|
||||
- http://ota.tasmota.com/tasmota32/release-12.3.0
|
||||
|
||||
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin``
|
||||
|
||||
@ -107,58 +107,65 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||
|
||||
[Complete list](BUILDS.md) of available feature and sensors.
|
||||
|
||||
## Changelog v12.2.0 Patrick
|
||||
## Changelog v12.3.0 Percy
|
||||
|
||||
### Added
|
||||
- Command ``SetOption46 0..255`` to add 0..255 * 10 milliseconds power on delay before initializing I/O [#15438](https://github.com/arendst/Tasmota/issues/15438)
|
||||
- Command ``SetOption146 1`` to enable display of ESP32 internal temperature
|
||||
- Command ``DspSpeed 2..127`` to control message rotation speed on display of POWR3xxD and THR3xxD
|
||||
- Command ``DspLine<1|2> <index>,<unit>,<index>,<unit>,...`` to select message(s) on display of POWR3xxD and THR3xxD
|
||||
- Command ``SspmPowerOnState<relay> 0|1|2`` to set Sonoff SPM 4Relay module v1.2.0 power on state overruling tasmota global power on state. 0 = Off, 1 = On, 2 = Saved state [#13447](https://github.com/arendst/Tasmota/issues/13447)
|
||||
- Command ``StatusRetain 0|1`` [#11109](https://github.com/arendst/Tasmota/issues/11109)
|
||||
- Command ``Sunrise 0..3`` to select sunrise dawn angle between Normal, Civil, Nautical or Astronomical [#16795](https://github.com/arendst/Tasmota/issues/16795)
|
||||
- Command ``UrlFetch <url>`` to download a file to filesystem
|
||||
- Command ``WcClock 10..200`` set webcam clock in MHz. Default is 20
|
||||
- Support for Shelly Plus 2PM
|
||||
- Support for SGP40 gas and air quality sensor [#16341](https://github.com/arendst/Tasmota/issues/16341)
|
||||
- Support for Modbus writing using ModbusBridge by JeroenSt [#16351](https://github.com/arendst/Tasmota/issues/16351)
|
||||
- Support for DFRobot SEN0390 V30B ambient light sensor [#16105](https://github.com/arendst/Tasmota/issues/16105)
|
||||
- Support for QMC5883L magnetic induction sensor by Helge Scheunemann [#16714](https://github.com/arendst/Tasmota/issues/16714)
|
||||
- Support for Modbus Energy Monitoring devices using a rule file. See ``xnrg_29_modbus.ino`` for more information
|
||||
- Support for flowrate meter flow amount/duration, show values in table format [#16385](https://github.com/arendst/Tasmota/issues/16385)
|
||||
- Support of optional file calib.dat on ADE7953 based energy monitors like Shelly EM [#16486](https://github.com/arendst/Tasmota/issues/16486)
|
||||
- Zigbee device plugin mechanism with commands ``ZbLoad``, ``ZbUnload`` and ``ZbLoadDump`` [#16252](https://github.com/arendst/Tasmota/issues/16252)
|
||||
- Zigbee basic support for Green Power [#16407](https://github.com/arendst/Tasmota/issues/16407)
|
||||
- Zigbee friendly names per endpoint
|
||||
- Zigbee Alexa/Hue emulation, support multiple switches on separate endpoints [#16718](https://github.com/arendst/Tasmota/issues/16718)
|
||||
- Support for Ethernet in ESP32 safeboot firmware [#16388](https://github.com/arendst/Tasmota/issues/16388)
|
||||
- ESP32-S3 support for internal temperature sensor
|
||||
- ESP32-S2 and ESP32-S3 touch button support
|
||||
- ESP32 Automatically resize FS to max flash size at initial boot [#16838](https://github.com/arendst/Tasmota/issues/16838)
|
||||
- Berry has persistent MQTT subscriptions: auto-subscribe at (re)connection
|
||||
- Berry automated solidification of code
|
||||
- LVGL/HASPmota add tiny "pixel perfect" fonts for small screens [#16758](https://github.com/arendst/Tasmota/issues/16758)
|
||||
- HASPmota support for TTF fonts [#16759](https://github.com/arendst/Tasmota/issues/16759)
|
||||
- Command ``SetOption35 0..255`` to skip number of received messages in Serial Bridge (default 0) [#17140](https://github.com/arendst/Tasmota/issues/17140)
|
||||
- Command ``SetOption47 1..255`` to delay power on relay state in seconds reducing power surge. ``SO47 1`` delays until network connected. ``SO47 2`` delays until mqtt connected
|
||||
- Command ``RgxClients`` for range extender clients list [#17048](https://github.com/arendst/Tasmota/issues/17048)
|
||||
- Command ``RgxPort [tcp|udp], gateway_port, client_mac, client_port`` for range extender port forwardings [#17092](https://github.com/arendst/Tasmota/issues/17092)
|
||||
- Command ``SSerialBuffer 256..SERIAL_BRIDGE_BUFFER_SIZE`` to change serial bridge rx buffer size [#17120](https://github.com/arendst/Tasmota/issues/17120)
|
||||
- Command ``SwitchMode 16`` sending only MQTT message on inverted switch change [#17028](https://github.com/arendst/Tasmota/issues/17028)
|
||||
- Command NeoPool ``NPFiltration 2`` toggle [#16859](https://github.com/arendst/Tasmota/issues/16859)
|
||||
- Optional define ``SERIAL_BRIDGE_BUFFER_SIZE`` to set Serial Bridge internal buffer size (Default ESP8266 = 256, ESP32 = 800)
|
||||
- Support for two phase power calibration using commands ``PowerSet2``, ``VoltageSet2`` and ``CurrentSet2``
|
||||
- Support for HLK-LD2410 24GHz smart wave motion sensor
|
||||
- Support for Shelly Pro 1/1PM and 2/2PM [#16773](https://github.com/arendst/Tasmota/issues/16773)
|
||||
- Support for up to four DS18x20 GPIOs by md5sum-as [#16833](https://github.com/arendst/Tasmota/issues/16833)
|
||||
- Support for Digital Addressable Lighting Interface (DALI) by Andrei Kazmirtsuk [#16938](https://github.com/arendst/Tasmota/issues/16938)
|
||||
- Support for NTAG2xx tags read and write on PN532 NFC reader [#16939](https://github.com/arendst/Tasmota/issues/16939)
|
||||
- Support for Plantower PMSx003T AQI models with temperature and humidity [#16971](https://github.com/arendst/Tasmota/issues/16971)
|
||||
- Support for BP1658CJ RGBCW led bulbs like Orein OS0100411267 by Cossid [#17011](https://github.com/arendst/Tasmota/issues/17011)
|
||||
- Support for Dingtian x595 shift register based relay boards by Barbudor [#17032](https://github.com/arendst/Tasmota/issues/17032)
|
||||
- Support for HMC5883L 3-Axis Digital Compass sensor by Andreas Achtzehn [#17069](https://github.com/arendst/Tasmota/issues/17069)
|
||||
- WS2812 and Light ArtNet DMX control over UDP port 6454 [#17059](https://github.com/arendst/Tasmota/issues/17059)
|
||||
- Teleinfo TEMPO (BBR) contract [#17160](https://github.com/arendst/Tasmota/issues/17160)
|
||||
- Serial Modbus transmit enable GPIOs to all modbus energy drivers and modbus bridge [#17247](https://github.com/arendst/Tasmota/issues/17247)
|
||||
- Berry ``bytes().setbytes()`` method [#16892](https://github.com/arendst/Tasmota/issues/16892)
|
||||
- Berry ``bytes().reverse()`` method [#16977](https://github.com/arendst/Tasmota/issues/16977)
|
||||
- Berry ``mdns`` module [#17202](https://github.com/arendst/Tasmota/issues/17202)
|
||||
- Zigbee router firmware for Sonoff ZBBridgePro [#16900](https://github.com/arendst/Tasmota/issues/16900)
|
||||
- ESP32 Support for DMX ArtNet Led matrix animations [#16984](https://github.com/arendst/Tasmota/issues/16984)
|
||||
- ESP32 DS18x20 parasitic power usage when defining W1_PARASITE_POWER [#17112](https://github.com/arendst/Tasmota/issues/17112)
|
||||
|
||||
### Breaking Changed
|
||||
- Redesign distance sensors VL53LXX, TOF10120, HRXL and DYP to use cm instead of mm [#17021](https://github.com/arendst/Tasmota/issues/17021)
|
||||
|
||||
### Changed
|
||||
- IRremoteESP8266 library from v2.8.2 to v2.8.4
|
||||
- TasmotaModbus library from v3.5.0 to v3.6.0 [#16351](https://github.com/arendst/Tasmota/issues/16351)
|
||||
- ESP32 NimBLE library from v1.3.6 to v1.4.0
|
||||
- ESP32 LVGL library from v8.3.0 to v8.3.2
|
||||
- ESP32 Tasmota Core32 from 2.0.4.1 to 2.0.5
|
||||
- Command ``SerialBuffer`` raise max allowed buffer size to 2048 characters [#16374](https://github.com/arendst/Tasmota/issues/16374)
|
||||
- Increase serial console input buffer size from 520 to 800
|
||||
- Button debouncing V3 by adopting switch debounce code [#16339](https://github.com/arendst/Tasmota/issues/16339)
|
||||
- Thermostat max allowed temperature from 100 to 200C [#16363](https://github.com/arendst/Tasmota/issues/16363)
|
||||
- Shelly EM swap internal channels A and B to match P1 and P2 [#16486](https://github.com/arendst/Tasmota/issues/16486)
|
||||
- Shelly EM phase calibration set to 200 (from 0) [#16486](https://github.com/arendst/Tasmota/issues/16486)
|
||||
- Zigbee report unprocessed attributes
|
||||
- ESP32 Increase number of button GPIOs from 8 to 28 [#16518](https://github.com/arendst/Tasmota/issues/16518)
|
||||
- ESP32 Platformio one Platform for all Tasmota frameworks Core32 2.0.5 [#16644](https://github.com/arendst/Tasmota/issues/16644)
|
||||
- TasmotaSerial library from v3.5.0 to v3.6.0
|
||||
- ESP32 Framework (Core) from v2.0.5 to v2.0.5.3
|
||||
- ESP32 LVGL library from v8.3.2 to v8.3.3 (no functional change)
|
||||
- ESP32 NimBLE library from v1.4.0 to v1.4.1 [#16775](https://github.com/arendst/Tasmota/issues/16775)
|
||||
- Serial Bridge default internal serial rx buffer size from 64 to 256 [#17120](https://github.com/arendst/Tasmota/issues/17120)
|
||||
- DS18x20 ``DS18Alias`` to ``DS18Sens`` [#16833](https://github.com/arendst/Tasmota/issues/16833)
|
||||
- Compiling with reduced boards manifests in favour of Autoconfig [#16848](https://github.com/arendst/Tasmota/issues/16848)
|
||||
- ADE7953 monitoring from instant power to accumulated energy [#16941](https://github.com/arendst/Tasmota/issues/16941)
|
||||
- TuyaMcu rewrite by btsimonh [#17051](https://github.com/arendst/Tasmota/issues/17051)
|
||||
- WS2812 sends signal to only ``Pixels`` leds instead of sending to 512 leds [#17055](https://github.com/arendst/Tasmota/issues/17055)
|
||||
- AC PWM dimmer lineair power distribution [#17177](https://github.com/arendst/Tasmota/issues/17177)
|
||||
- Zigbee improved Aqara plug support and completed cluster 0x0702 [#17073](https://github.com/arendst/Tasmota/issues/17073)
|
||||
- Removed leading spaces on commands ``(S)SerialSend1 to 6`` but keep on duplicate commands ``(S)SerialSend11 to 16`` [#16723](https://github.com/arendst/Tasmota/issues/16723
|
||||
|
||||
### Fixed
|
||||
- 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 whitespace from JSON values with no decimals [#16365](https://github.com/arendst/Tasmota/issues/16365)
|
||||
- ESP32 touch button multi-press and hold detection [#16596](https://github.com/arendst/Tasmota/issues/16596)
|
||||
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
||||
- Serial bridge default serial configuration from 5N1 to 8N1 regression from v10.1.0.3
|
||||
- BP5758D red channel corruption regression from v12.1.1.6 [#16850](https://github.com/arendst/Tasmota/issues/16850)
|
||||
- Deduplicate code and fix %timer n% rule regression from v12.2.0 [#16914](https://github.com/arendst/Tasmota/issues/16914)
|
||||
- Serial initialization for baudrate and config [#16970](https://github.com/arendst/Tasmota/issues/16970)
|
||||
- ModbusBridge buffer overflow [#16979](https://github.com/arendst/Tasmota/issues/16979)
|
||||
- ModbusBridge baudrates over 76500 baud [#17106](https://github.com/arendst/Tasmota/issues/17106)
|
||||
- SenseAir S8 module detection [#17033](https://github.com/arendst/Tasmota/issues/17033)
|
||||
- RCSwitch exception 0/6 on some protocols [#17285](https://github.com/arendst/Tasmota/issues/17285)
|
||||
|
||||
### Removed
|
||||
- Define ``USE_PN532_DATA_RAW`` from NFC reader [#16939](https://github.com/arendst/Tasmota/issues/16939)
|
||||
|
166
TEMPLATES.md
166
TEMPLATES.md
@ -2,17 +2,13 @@
|
||||
|
||||
# Templates
|
||||
|
||||
Find below the available templates as of October 2022. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates)
|
||||
Find below the available templates as of December 2022. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates)
|
||||
|
||||
## Addressable LED
|
||||
## Adapter Board
|
||||
```
|
||||
Athom 2812b {"NAME":"LS2812B-TAS","GPIO":[32,0,1376,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Athom High Power 16A {"NAME":"LS_4PIN_TAS","GPIO":[32,1376,0,0,0,0,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"Rule1 on Power1#State do power2 2 endon|Rule1 1"}
|
||||
BlitzWolf IC Smart RGB Magic {"NAME":"BW-LT31","GPIO":[0,0,32,1376,0,0,0,0,0,1088,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO37 24"}
|
||||
cod.m WLAN Pixel Controller v0.8 {"NAME":"cod.m Pixel Controller V0.8","GPIO":[0,0,0,0,0,544,0,0,0,0,0,32,1376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
ESP01 NeoPixel Ring {"NAME":"ESP-01S-RGB-LED-v1.0","GPIO":[1,1,1376,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
IOTMCU {"NAME":"IOTMCU_ESP-12S-RGB-LED-v1","GPIO":[1,1,1,1,0,1376,0,0,1,1088,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
SP501E WS2812B {"NAME":"SP501E","GPIO":[0,32,0,1376,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
3DStar ESP-OpenTherm v1.1 {"NAME":"3DS_OpenTherm","GPIO":[0,0,0,0,0,0,0,0,4960,0,4928,0,0,0],"FLAG":0,"BASE":18}
|
||||
WifInfo - Teleinfo Server {"NAME":"WifInfo","GPIO":[1376,1,1,5152,640,608,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
ZiGate-Ethernet {"NAME":"ZIGATE-ETH","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0],"FLAG":0,"BASE":18,"CMND":"EthClockMode 3 | EthAddress 1"}
|
||||
```
|
||||
|
||||
## Air Purifier
|
||||
@ -51,7 +47,7 @@ GL.iNet POE Ethernet {"NAME":"GL-S10 v1.0","GPIO":[32,0,0,0,0,0,0,0,321,
|
||||
## CCT
|
||||
```
|
||||
AICase 800lm {"NAME":"AICase Smart L","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
AiYaTo 12W {"NAME":"AiYaTo CW","GPIO":[0,0,0,0,416,0,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
AiYaTo 12W {"NAME":"AiYaTo-CW","GPIO":[0,0,0,0,416,0,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Ajax Online 380lm {"NAME":"AjaxOnline","GPIO":[32,0,0,0,0,416,0,0,417,0,0,0,0,0],"FLAG":0,"BASE":38}
|
||||
Ajax Online 7W Vintage {"NAME":"AjaxOnline-7W","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Anoopsyche 9W 800lm {"NAME":"Anoop-CW-WW","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -59,6 +55,7 @@ Arlec Smart 1350lm PAR38 {"NAME":"Arlec GLD302HA","GPIO":[0,0,0,0,0,0,0,0,41
|
||||
Arlec Smart 9.5W 806lm {"NAME":"Arlec GLD110HA","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":48}
|
||||
Arlec Smart 9.5W 806lm {"NAME":"Arlec CCT","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48}
|
||||
Arlec Smart R80 9.5W 806lm {"NAME":"Arlec R80","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48}
|
||||
AZzardo Led Vintage {"NAME":"Azzardo AZ3210 LightBulb Vintage","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
BlitzWolf A70 9W 900lm {"NAME":"BW-LT29","GPIO":[0,0,0,0,0,0,0,0,0,449,0,416,0,0],"FLAG":0,"BASE":18}
|
||||
BrilliantSmart 20696 9W 900lm {"NAME":"Brilliant20696","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
BrilliantSmart 20697 9W 900lm {"NAME":"Brilliant20696","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -128,6 +125,7 @@ Nedis G125 5.5W 350lm Twisted Filament {"NAME":"WIFILF10GDG125","GPIO":[0,0,0,0
|
||||
Nedis PAR16 330lm {"NAME":"Nedis WIFILW30","GPIO":[0,0,0,0,0,416,0,0,417,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Nedis PAR16 4,5W 380lm {"NAME":"Nedis WIFILW10WTGU10","GPIO":[0,0,0,0,0,416,0,0,417,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Nedis PAR16 4.5W 330lm 110 {"NAME":"WIFILW30","GPIO":[0,0,0,0,0,416,0,0,417,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Nous P2 {"NAME":"NOUS-P2","GPIO":[0,0,0,0,0,416,0,0,417,0,0,0,0,0],"FLAG":0,"BASE":37}
|
||||
Philips Zhirui Candle 250lm {"NAME":"Xiaomi Philips","GPIO":[0,0,0,0,0,0,0,0,417,0,0,416,0,0],"FLAG":0,"BASE":48}
|
||||
Phillips Zhirui 450lm {"NAME":"Xiaomi Philips","GPIO":[0,0,0,0,0,0,0,0,417,0,0,416,0,0],"FLAG":0,"BASE":48}
|
||||
Polux ST64 5.5W 470lm {"NAME":"basic","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -141,7 +139,9 @@ Spectrum Smart 5W 410lm Candle {"NAME":"lightbulb","GPIO":[0,0,0,0,0,0,0,0,417,
|
||||
Status 9W 806lm {"NAME":"Status Smart","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sulion Dante G100 10W 1055lm {"NAME":"Sulion Bombilla G100","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sulion Edisson Filament ST64 8W 600lm {"NAME":"Sulion Bombilla ST64","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sulion Morgan C37 5W 470lm {"NAME":"Sulion Bombilla C37","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Swisstone 806lm {"NAME":"SwisstoneSH330","GPIO":[0,0,0,0,2912,416,0,0,417,2976,2944,0,0,0],"FLAG":0,"BASE":18}
|
||||
Swisstone SH 310 {"NAME":"Swisstone SH 310","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Treatlife A19 9W 800lm {"NAME":"Treatlife SL20","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
V-Tac PAR16 4.5W 300lm 110 {"NAME":"V-TAC VT-5174","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Vestaiot BR30 800lm {"NAME":"Vesta BR30 CCT","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -171,7 +171,10 @@ Fcmila 48W RGBCCT {"NAME":"XDD-48W","GPIO":[0,0,0,0,416,419,0,0,417,4
|
||||
Globe Electric Brushed Nickel 11" Flush Mount {"NAME":"Globe 60839","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18}
|
||||
Hama Glitter Effect, 27cm Square {"NAME":"Hama LED Ceiling Light","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,1],"FLAG":0,"BASE":18}
|
||||
HeyLight Plafoniera 30W CCT {"NAME":"HeyLight Ceiling Light","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Hykolity 13" RGBCCT Flush Mount {"NAME":"Hykolity","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lamptan 3 Lights in 1 36W {"NAME":"Lamptan Smart Wi-Fi Ceiling Lamp LUMINA 36W","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
LE lampUX 15W RGBCCT {"NAME":"LE lampUX 15W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
LightZone MeLiTec {"NAME":"LightZone MeLiTec D114 Light ","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,20 | TuyaMCU 21,22 | TuyaMCU 23,23 | DimmerRange 25,1000"}
|
||||
Lohas ZN026CL10 RGBCCT {"NAME":"Lohas LED Lamp","GPIO":[0,0,0,0,417,416,0,0,419,418,420,0,0,0],"FLAG":0,"BASE":18}
|
||||
LOLAsmart Uranus White 70 cm {"NAME":"lola smart","GPIO":[0,0,0,1088,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
LSC 20W 1400lm White Ambiance {"NAME":"LSC RGBCW LED","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -248,6 +251,10 @@ Hoch Circuit Breaker 1P {"NAME":"HOCH ZJSB9","GPIO":[32,0,0,0,0,0,0,0,224,3
|
||||
Ketotek Single Phase Energy Monitor {"NAME":"Ketotek KTEM06","GPIO":[0,2272,0,2304,0,0,0,0,0,0,320,0,32,0],"FLAG":0,"BASE":54}
|
||||
OpenEnergyMonitor WiFi MQTT Thermostat {"NAME":"MQTT-RELAY","GPIO":[32,0,1,0,0,224,0,0,0,0,0,0,320,0],"FLAG":0,"BASE":18}
|
||||
RocketController ASTRA Controller {"NAME":"ASTRA R4A4","GPIO":[1,1,1,1,576,1,1,1,480,1,1,1,3232,3200,1,1,0,640,608,1,0,224,225,1152,0,0,0,0,227,226,160,161,162,0,0,163],"FLAG":0,"BASE":1}
|
||||
Shelly Pro 1 {"NAME":"Shelly Pro 1","GPIO":[0,1,0,1,768,0,0,0,672,704,736,0,0,0,5600,6214,0,0,0,5568,0,0,0,0,0,0,0,0,0,0,0,32,4736,0,160,0],"FLAG":0,"BASE":1,"CMND":"AdcParam1 2,10000,10000,3350"}
|
||||
Shelly Pro 1PM {"NAME":"Shelly Pro 1PM","GPIO":[9568,1,9472,1,768,0,0,0,672,704,736,0,0,0,5600,6214,0,0,0,5568,0,0,0,0,0,0,0,0,3459,0,0,32,4736,0,160,0],"FLAG":0,"BASE":1,"CMND":"AdcParam1 2,10000,10000,3350"}
|
||||
Shelly Pro 2 {"NAME":"Shelly Pro 2","GPIO":[0,1,0,1,768,0,0,0,672,704,736,0,0,0,5600,6214,0,0,0,5568,0,0,0,0,0,0,0,0,0,0,0,32,4736,4737,160,161],"FLAG":0,"BASE":1,"CMND":"AdcParam1 2,10000,10000,3350 | AdcParam2 2,10000,10000,3350"}
|
||||
Shelly Pro 2PM {"NAME":"Shelly Pro 2PM","GPIO":[9568,1,9472,1,768,0,0,0,672,704,736,9569,0,0,5600,6214,0,0,0,5568,0,0,0,0,0,0,0,0,3460,0,0,32,4736,4737,160,161],"FLAG":0,"BASE":1,"CMND":"AdcParam1 2,10000,10000,3350 | AdcParam2 2,10000,10000,3350"}
|
||||
Sinotimer {"NAME":"TM608","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sinotimer {"NAME":"Sinotimer TM60","GPIO":[0,0,0,0,0,288,0,0,224,160,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
SMTONOFF 63A {"NAME":"SMTONOFF","GPIO":[32,0,0,3104,0,0,0,0,224,544,0,0,0,0],"FLAG":0,"BASE":43}
|
||||
@ -262,6 +269,7 @@ Tongou 2P 63A Circuit Breaker {"NAME":"RCD_CONTACTOR","GPIO":[32,224,0,0,0,0,0,
|
||||
|
||||
## Dehumidifier
|
||||
```
|
||||
Duux Bora {"NAME":"Duux Bora","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 73,3 | TuyaMCU 74,4 | TuyaMCU 12,5 | TuyaMCU 13,7 | TuyaMCU 81,13 | TuyaMCU 14,101 | HumRes 0"}
|
||||
electriQ 12L Portable {"NAME":"electriQ CD12PW","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Vacplus 50 Pint {"NAME":"VacPlus Dehumidifier","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54}
|
||||
```
|
||||
@ -274,7 +282,8 @@ Adafruit HUZZAH32 ESP32 Feather {"NAME":"HUZZAH32","GPIO":[0,0,0,0,4709,0,1,1,1
|
||||
Adafruit QT Py ESP32 Pico {"NAME":"QTPy ESP32 Pico","GPIO":[32,3200,0,3232,1,1376,0,0,1,1,1,1,0,0,0,608,0,0,640,0,0,1,1,1,0,1,3840,0,1,1,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
AZ-Envy Environmental Sensor {"NAME":"AZ Envy","GPIO":[32,0,320,0,640,608,0,0,0,0,0,0,0,4704],"FLAG":0,"BASE":18}
|
||||
Coiaca Tasmota {"NAME":"AWR01t","GPIO":[576,1,1,128,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
ESP32 Lite V1.0.0 {"NAME":"ESP32 Lite V1.0.0","GPIO":[1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Coiaca Tasmota Development Board AWR12 {"NAME":"AWR12t","GPIO":[320,1,1,1,1,1,0,0,1,1,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
Espoir Rev 1.0.0 PoE+ {"NAME":"Espoir","GPIO":[0,0,1,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,5568,5600,1,7968,1,1,1,1],"FLAG":0,"BASE":1}
|
||||
LC Technology MicroPython Maker {"NAME":"LC-ESP-Python","GPIO":[1,1,544,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
LilyGO RGB LED Ring Encoder {"NAME":"T-Encoder","GPIO":[0,0,1,0,1,0,0,0,1,1,1,1,0,0,0,480,6212,0,0,0,0,449,450,448,0,0,0,0,0,0,0,0,3296,3264,32,0],"FLAG":0,"BASE":1,"CMND":"BuzzerPwm 1"}
|
||||
LilyGO T7 v1.5 {"NAME":"LilyGO T7 V1.5","GPIO":[1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,544,0,0,0,1,0,1,1,1,0,0,0,0,0,1,1,4704,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
@ -286,11 +295,11 @@ Olimex ESP32-POE Ethernet {"NAME":"Olimex ESP32-PoE","GPIO":[1,1,1,1,1,1,0,0,
|
||||
QuinLED 2 Channel {"NAME":"QuinLED 2 channel","GPIO":[416,0,417,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Silicognition wESP32 {"NAME":"wESP32","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,5568,5600,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
TZT ESP8266 Weather Station Kit {"NAME":"TZT Weather Station","GPIO":[32,0,640,0,1,1184,0,0,1,1,608,1,1,1],"FLAG":0,"BASE":18}
|
||||
WifInfo - Teleinfo Server {"NAME":"WifInfo","GPIO":[1376,1,1,5152,640,608,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
Wemos D1 Mini ESP32 {"NAME":"Wemos D1 Mini ESP32","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Wemos LOLIN32 Lite V1.0.0 (ESP32) {"NAME":"Wemos LOLIN32 Lite V1.0.0","GPIO":[1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Wireless Tag ESP32 Ethernet {"NAME":"WT32-ETH01","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
Witty Cloud {"NAME":"Witty Cloud","GPIO":[1,1,320,1,32,1,0,0,417,418,1,416,1,4704],"FLAG":0,"BASE":32}
|
||||
Yison ESP-01/ESP-202 {"NAME":"Yison Dev Board","GPIO":[259,544,258,1,260,261,1,1,416,418,257,417,256,1],"FLAG":0,"BASE":18}
|
||||
ZiGate-Ethernet {"NAME":"ZIGATE-ETH","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0],"FLAG":0,"BASE":18,"CMND":"EthClockMode 3 | EthAddress 1"}
|
||||
```
|
||||
|
||||
## Dimmable
|
||||
@ -391,12 +400,13 @@ Globe 3 Way {"NAME":"Globe Dimmer","GPIO":[0,2272,0,2304,0,0,0,
|
||||
Gosund SW2 {"NAME":"Gosund Dimmer","GPIO":[1,3200,1,3232,32,0,1,1,320,576,416,1,1,0],"FLAG":0,"BASE":18}
|
||||
iLintek / Lumary {"NAME":"L-DS100","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
iSwitch Touch Switch {"NAME":"iSwitchOZ Dimmer","GPIO":[0,0,0,0,0,0,0,0,0,0,290,0,0,0],"FLAG":0,"BASE":54}
|
||||
Martin Jerry SD01 {"NAME":"MJ-SD01 Dimmer","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256],"FLAG":0,"BASE":73}
|
||||
Martin Jerry Single Pole {"NAME":"SD01 Dimmer","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256],"FLAG":0,"BASE":73}
|
||||
Martin Jerry SD01 {"NAME":"MJ-SD01 Dimmer","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256,0],"FLAG":0,"BASE":73}
|
||||
Martin Jerry Single Pole {"NAME":"SD01 Dimmer","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256,0],"FLAG":0,"BASE":73}
|
||||
Martin Jerry Single Pole {"NAME":"MJ-KN01 Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Maxcio Rotary {"NAME":"EDM-1WAA-EU","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
Minoston 3-Way {"NAME":"MS10W","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
Moes {"NAME":"MOES DS01","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1,0],"FLAG":0,"BASE":54}
|
||||
Moes 3 Way Smart Light {"NAME":"EDM-1WAA-US","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
PS-16-DZ {"NAME":"PS-16-DZ","GPIO":[1,3200,1,3232,1,1,0,0,1,288,1,1,1,0],"FLAG":0,"BASE":58}
|
||||
Stitch {"NAME":"Stitch 35558","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 21,3|DimmerRange 21,255"}
|
||||
Teekar UIW001-1 {"NAME":"Teekar UIW001-","GPIO":[0,3232,416,3200,640,608,0,0,160,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -422,7 +432,7 @@ BrilliantSmart Jupiter {"NAME":"BrSm Jupiter","GPIO":[0,2272,0,2304,0,0,0,
|
||||
EX-Store 2 Kanal RS232 V4 {"NAME":"EXS Dimmer","GPIO":[0,3200,0,3232,0,0,0,0,0,4128,0,0,0,0],"FLAG":0,"BASE":72}
|
||||
Moes 2 Gang {"NAME":"WM-105","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 21,2 | TuyaMCU 12,7 | TuyaMCU 22,8 | DimmerRange 0,1003"}
|
||||
Moes MS-105-1 v2 {"NAME":"MS-105","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
QS-WiFi-D01-TRIAC 150W {"NAME":"QS-WiFi-D01-TRIAC","GPIO":[0,3200,0,3232,0,0,0,0,0,352,416,0,0],"FLAG":0,"BASE":18}
|
||||
QS-WiFi-D01-TRIAC 150W {"NAME":"QS-WiFi-D01-TRIAC","GPIO":[0,3200,0,3232,0,0,0,0,0,352,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
RJWF-02A {"NAME":"RJWF-02A","GPIO":[32,2272,0,2304,0,0,0,0,0,0,288,0,0,0],"FLAG":0,"BASE":54}
|
||||
Shelly Dimmer {"NAME":"Shelly Dimmer 1","GPIO":[0,3200,0,3232,5568,5600,0,0,192,0,193,288,0,4736],"FLAG":0,"BASE":18}
|
||||
Shelly Dimmer 2 {"NAME":"Shelly Dimmer 2","GPIO":[0,3200,0,3232,5568,5600,0,0,193,0,192,0,320,4736],"FLAG":0,"BASE":18}
|
||||
@ -453,7 +463,7 @@ Wireless Tag 3.5" Touch {"NAME":"WT32-SC01","GPIO":[6210,1,1,1,1,1,0,0,1,70
|
||||
## Display Switch
|
||||
```
|
||||
Lanbon L8 5 in 1 LCD Touch {"NAME":"Lanbon L8","GPIO":[0,0,0,0,0,992,0,0,224,0,225,0,0,0,1024,896,0,6624,6592,864,0,832,416,226,0,0,0,0,417,418,0,352,0,0,0,4736],"FLAG":0,"BASE":1}
|
||||
Sonoff NSPanel Touch {"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam 2,11200,10000,3950 | Sleep 0 | BuzzerPWM 1"}
|
||||
Sonoff NSPanel Touch {"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam1 2,11200,10000,3950 | Sleep 0 | BuzzerPWM 1"}
|
||||
```
|
||||
|
||||
## Downlight
|
||||
@ -538,6 +548,7 @@ Sonoff iFan04-L 110V Light and Ceiling {"NAME":"iFan04-L","GPIO":[32,3200,0,323
|
||||
Avatto Light and {"NAME":"AVATTO SYS-FL01","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Deta Light and {"NAME":"Deta Fan Speed and Light Controller","GPIO":[33,0,0,576,226,34,0,0,0,225,224,227,32,0],"FLAG":0,"BASE":18}
|
||||
iSwitch Light and {"NAME":"iSwitchOZ Light Fan","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Martin Jerry Fan Controller {"NAME":"US-FC-01","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
Treatlife 1.5A 4 Speed Ceiling {"NAME":"DS02F","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1|SO97 1|SO68 0"}
|
||||
```
|
||||
|
||||
@ -564,12 +575,14 @@ SmartMi Electric Air {"NAME":"ZNNFJ07ZM","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
## Humidifier
|
||||
```
|
||||
Duux Beam {"NAME":"Duux Beam","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,5 | TuyaMCU 13,21 | TuyaMCU 71,14 | TuyaMCU 74,15 | TuyaMCU 73,16"}
|
||||
Duux Beam Ultrasonic {"NAME":"Duux Beam","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,5 | TuyaMCU 13,21 | TuyaMCU 71,14 | TuyaMCU 74,15 | TuyaMCU 73,16"}
|
||||
Proscenic {"NAME":"Generic","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
```
|
||||
|
||||
## IR Controller
|
||||
```
|
||||
3DStar ESP IR Blaster 8L {"NAME":"3DS_IRblaster_xL","GPIO":[0,0,0,0,0,0,0,0,0,0,0,1056,0,0],"FLAG":0,"BASE":18}
|
||||
3DStar ESP IR Blaster xLR {"NAME":"3DS_IR Blaster_xLR","GPIO":[0,0,0,0,0,0,0,0,0,1088,0,1056,0,0],"FLAG":0,"BASE":18}
|
||||
A1 Universal Remote Control {"NAME":"A1 IR Controller","GPIO":[1,1,1,1,320,1088,0,0,0,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
AI Universal Remote {"NAME":"YTF IR Controller","GPIO":[1,1,1,1,320,1088,0,0,0,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
Alfawise KS1 {"NAME":"KS1","GPIO":[1,1792,32,1824,32,1088,0,0,320,0,1056,0,0,4704],"FLAG":0,"BASE":62}
|
||||
@ -598,6 +611,7 @@ Orvibo Magic Cube {"NAME":"Orvibo CT10W","GPIO":[0,0,0,0,32,1088,0,0,
|
||||
Phlipton Universal Remote {"NAME":"Phliptron IR","GPIO":[1,3200,1,3232,576,1088,0,0,320,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
Remote Control {"NAME":"DC-QRA2","GPIO":[0,0,0,0,320,1088,0,0,0,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
RM mini {"NAME":"RM mini","GPIO":[1,1,1,1,320,1088,0,0,0,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
Smart Remote {"NAME":"IRC","GPIO":[0,0,544,0,0,288,0,0,1088,32,1056,0,0,0],"FLAG":0,"BASE":18}
|
||||
Smartpoint Smart Remote {"NAME":"Smartpoint SPCNTRL-WM","GPIO":[0,0,0,0,288,1088,0,0,0,0,1056,0,0,0],"FLAG":0,"BASE":18}
|
||||
STITCH {"NAME":"Stitch 35753","GPIO":[0,0,0,0,288,1088,0,0,0,64,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
SZMDLX IR Remote Controller {"NAME":"SZMDLX WiFi IR","GPIO":[0,0,0,0,320,1088,0,0,0,32,1056,0,0,0],"FLAG":0,"BASE":62}
|
||||
@ -640,6 +654,7 @@ DD001-MINI(G)-IR-V03 {"NAME":"WIFI-RGB","GPIO":[32,0,0,0,0,0,0,0,417,418
|
||||
DD001-MINI(G)-IR-V08 {"NAME":"WIFI-RGB","GPIO":[0,0,0,0,416,0,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Electrodragon ESP LED Strip Board, Mosfet Drive {"NAME":"LEDBoard RGBW","GPIO":[0,0,0,0,0,0,0,0,418,417,419,416,288,0],"FLAG":0,"BASE":18}
|
||||
H801 {"NAME":"H801","GPIO":[1,288,1,1,420,321,0,0,418,417,419,416,0,0],"FLAG":0,"BASE":20}
|
||||
Hama Adapter and RGB {"NAME":"HAMA LED-Strip WLAN-Controller","GPIO":[0,0,0,0,417,419,0,0,0,416,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Holman Garden Light RGB {"NAME":"Holman RGB","GPIO":[0,0,0,0,0,0,0,0,417,416,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Jinvoo SM-WA104 RGB {"NAME":"Jinvoo LED Controller","GPIO":[0,0,0,0,256,418,0,0,416,32,417,0,257,0],"FLAG":0,"BASE":18}
|
||||
Konesky 12V RGB {"NAME":"RGBwifi","GPIO":[0,0,0,0,416,0,0,0,417,320,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -697,13 +712,14 @@ HitLights L1012V-MC1 {"NAME":"HitLights RBG","GPIO":[32,0,0,0,416,419,0,
|
||||
HomeMate 10m RGB {"NAME":"Homemate Strip","GPIO":[0,0,0,0,0,416,0,0,418,32,417,0,0,0],"FLAG":0,"BASE":18}
|
||||
Hykker 3m RGB {"NAME":"HYKKER Strip","GPIO":[0,0,0,0,0,416,0,0,418,32,417,0,0,0],"FLAG":0,"BASE":18}
|
||||
INDARUN RGB String Lights {"NAME":"STAR301","GPIO":[0,0,0,0,1088,416,0,0,417,418,0,0,0,0],"FLAG":0,"BASE":34}
|
||||
Kogan RGB + Cool & Warm White 2m {"NAME":"RGB+W+C Strip","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Kogan RGB + Cool & Warm White 2m {"NAME":"RGB+W+C Strip","GPIO":[32,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
LE LampUX 16.4ft RGB {"NAME":"LampUX","GPIO":[0,33,32,0,0,417,0,0,418,1088,0,416,0,0],"FLAG":0,"BASE":18}
|
||||
LE LampUX 2m RGB TV Backlight {"NAME":"LE 904102","GPIO":[0,32,33,0,0,417,0,0,418,34,0,416,0,0],"FLAG":0,"BASE":18}
|
||||
LE LampUX 5m RGB {"NAME":"LampUX","GPIO":[32,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":18}
|
||||
LE LampUX 5m RGB {"NAME":"LE LampUx","GPIO":[0,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":34}
|
||||
LE lampUX 5m RGBW {"NAME":"LampUX","GPIO":[0,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lednify WiZ Connected 5m RGB+W {"NAME":"Lednify 429336","GPIO":[0,0,420,0,419,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,416,417,418,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Lenovo 2m RGB {"NAME":"Lenovo LED Strip 2m","GPIO":[32,0,0,0,416,0,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo 5m RGBW {"NAME":"Lenovo LED Strip 5m","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
LePower 32.8ft RGB {"NAME":"LePower","GPIO":[0,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":18}
|
||||
Lohas ZN022 5m RGBW {"NAME":"LOHAS M5-022","GPIO":[0,0,0,0,417,416,0,0,32,418,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -712,6 +728,7 @@ Lumary RGBCCT {"NAME":"Lumary LED","GPIO":[32,0,0,0,416,419,0,0,4
|
||||
Lumary RGBCCT {"NAME":"Lumary LED","GPIO":[32,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Maxonar Lightstrip Pro XS-SLD001 {"NAME":"Maxonar LED","GPIO":[0,0,0,0,0,416,0,0,418,32,417,0,0,0],"FLAG":0,"BASE":18}
|
||||
MegaLight Smart RGB {"NAME":"MegaLight Smart LED-Stripe","GPIO":[0,0,0,0,417,1088,0,0,418,416,0,0,32,0],"FLAG":0,"BASE":18}
|
||||
Merkury 6-1/2 ft {"NAME":"Mercury RGBWWCW String","GPIO":[32,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Merkury Innovations MI-EW003-999W {"NAME":"MI-EW003-999W ","GPIO":[32,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Mirabella Genio RGB+CW {"NAME":"MirabellaStrip","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Monster Smart IlluminEssence {"NAME":"MI-EW003-999W ","GPIO":[32,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -781,7 +798,7 @@ Sonoff {"NAME":"Sonoff BN-SZ","GPIO":[0,0,0,0,0,0,0,0,416,
|
||||
Spotlight 9cm RGB+W 7W {"NAME":"Spotlight RGBW","GPIO":[0,0,0,0,0,0,0,0,0,3008,0,3040,0,0],"FLAG":0,"BASE":27}
|
||||
TCP WPAN Square 600X600mm 36W CCT Panel {"NAME":"TCPsmart LED Panel","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO92 1|DimmerRange 30,100"}
|
||||
Teckin FL41 {"NAME":"Teckin FL41","GPIO":[0,0,0,0,0,32,0,0,0,0,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Wipro 20W LED RGB Batten {"NAME":"Wipro RGBW Tubelight","GPIO":[0,0,0,0,416,420,0,0,417,419,418,0,0,1],"FLAG":0,"BASE":18}
|
||||
Wipro 20W LED RGB Batten {"NAME":"Wipro RGBW Tubelight","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,1],"FLAG":0,"BASE":18}
|
||||
Wipro Next Smart Batten 20W CCT {"NAME":"WIPROBatten","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Xiaomi Mi Computer Monitor Light Bar 1S {"NAME":"Mijia Desk Lamp 1S (MJGJD02YL)","GPIO":[0,0,0,0,3840,0,1,1,0,0,0,0,0,0,0,416,0,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"DimmerRange 45,255"}
|
||||
Xiaomi Mi Desk Lamp Pro {"NAME":"Mi Desk Lamp Pro","GPIO":[6212,0,416,0,417,0,0,0,3840,0,0,0,160,640,608,0,0,0,0,0,0,0,3296,3264,0,0,0,0,0,32,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"DimmerRange 30,100"}
|
||||
@ -809,6 +826,7 @@ Liectroux C30B Robot Vacuum {"NAME":"Liectroux C30B","GPIO":[1,1,1,1,1,1,0,0,1,
|
||||
Mosquito Killer Lamp {"NAME":"MosquitoKiller","GPIO":[32,0,0,0,0,0,0,0,416,320,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
NEO Coolcam Mouse Trap {"NAME":"Neo Mouse Trap","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
PCI-e Desktop PC Remote Control {"NAME":"PC-Switch-01","GPIO":[32,0,0,0,0,0,0,0,224,544,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Petoneer Smart Dot Cat Toy {"NAME":"Petoneer Smart Dot","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Proscenic T21 Air Fryer {"NAME":"Proscenic T21","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
RainPoint Indoor Water Pump {"NAME":"RainPoint","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 81,107|TuyaMCU 12,109|TuyaMCU 11,1|TuyaMCU 82,104"}
|
||||
Sinilink PCIe Computer Remote {"NAME":"XY-WPCE","GPIO":[1,1,320,1,32,224,0,0,160,0,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO114 1 | SwitchMode1 2"}
|
||||
@ -835,6 +853,11 @@ Sinilink MODBUS Interface {"NAME":"XY-WFPOW","GPIO":[0,8768,544,8800,32,0,0,0
|
||||
TYWE2S Replacement {"NAME":"ESP-02S","GPIO":[1,1,1,1,1,1,0,0,1,1,1,0,0,1],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Module Switch
|
||||
```
|
||||
Moes Mini 3 Gang 1/2 Way {"NAME":"Moes MS-104C","GPIO":[0,0,0,34,32,33,0,0,224,225,226,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Motion Sensor
|
||||
```
|
||||
DP-WP001 PIR {"NAME":"TUYA PIR","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
@ -847,7 +870,7 @@ Tuya Alarm PIR {"NAME":"CT61W","GPIO":[0,0,0,0,0,0,0,0,0,160,480,2
|
||||
```
|
||||
Steren Curtain {"NAME":"Steren_SHOME-155","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54,"CMND":"SO54 1|SO20 1|TuyaMCU 61,1|TuyaMCU 21,2|TuyaMCU 27,3|TuyaMCU 97,5|TuyaMCU 11,6|TuyaMCU 62,7|TuyaMCU 63,8|TuyaMCU 81,9|TuyaMCU 98,10|TuyaMCU 82,11"}
|
||||
Zemismart BCM300D-TY {"NAME":"Zemistart_Curt","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54}
|
||||
Zemismart Blinds Controller {"NAME":"Zemismart Blind","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1],"FLAG":0,"BASE":54}
|
||||
Zemismart Blinds Controller {"NAME":"Zemismart Blind","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1,0],"FLAG":0,"BASE":54}
|
||||
Zemismart Curtain {"NAME":"Zemismart_Curt","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54}
|
||||
Zemismart Rechargeable Roller Shade {"NAME":"Zemismart Remote","GPIO":[544,0,288,33,225,32,0,0,34,226,289,224,290,0],"FLAG":0,"BASE":18}
|
||||
Zemismart Roller Shade {"NAME":"M2805EIGB","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
@ -936,6 +959,7 @@ Wyze {"NAME":"Wyze Plug Outdoor","GPIO":[0,0,0,0,0,576,0
|
||||
|
||||
## Plug
|
||||
```
|
||||
16A {"NAME":"AWP16L","GPIO":[0,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45}
|
||||
1AC 2USB {"NAME":"BSD31","GPIO":[0,0,0,0,0,225,0,0,224,32,320,0,0,0],"FLAG":0,"BASE":18}
|
||||
2nice {"NAME":"2NICE SP111","GPIO":[320,0,321,0,0,0,0,0,0,32,0,224,0,4736],"FLAG":0,"BASE":18}
|
||||
3Stone Mini {"NAME":"3Stone Smart Plug","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -949,6 +973,7 @@ Aisirer AWP07L {"NAME":"AISIRER AWP07L","GPIO":[320,0,321,0,0,2688
|
||||
Aisirer JH-G018 {"NAME":"AISIRER JH-G01","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Aisirer SWA11 {"NAME":"SWA11","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Aisirer UK-1 {"NAME":"AISIRER","GPIO":[0,32,0,0,0,0,0,0,0,288,224,0,0,4704],"FLAG":0,"BASE":18}
|
||||
AiYaTo 12W {"NAME":"AiYaTo-SWITCH","GPIO":[0,0,0,0,32,544,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Alecto SMART-PLUG20 {"NAME":"Alecto SP20","GPIO":[0,0,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Alexfirst TV-ASP801EU {"NAME":"Alexfirst","GPIO":[32,0,0,0,290,320,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Alfawise {"NAME":"PE1606","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1026,7 +1051,7 @@ Bardi 16A {"NAME":"BARDI","GPIO":[320,0,0,0,0,2720,0,0,224,32
|
||||
Bauhn ASPU-1019 {"NAME":"Bauhn Smart Pl","GPIO":[0,0,0,0,224,225,0,0,0,320,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
BAW {"NAME":"BAW TPSWIFI-10","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Bawoo {"NAME":"Bawoo S120","GPIO":[0,0,0,0,288,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Be HiTech 16A {"NAME":"Be HiTech","GPIO":[0,0,0,288,0,2720,0,0,2624,32,2656,224,0],"FLAG":0,"BASE":18}
|
||||
Be HiTech 16A {"NAME":"Be HiTech","GPIO":[0,0,0,288,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":18}
|
||||
Bearware 303492 3AC+2USB {"NAME":"Bearware 30349","GPIO":[0,320,0,32,225,226,0,0,227,224,544,0,0,0],"FLAG":0,"BASE":18}
|
||||
Bestek MRJ1011 {"NAME":"BestekMRJ1011","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
BlitzWolf 1200W Dual {"NAME":"BlitzWolf SHP3","GPIO":[320,0,321,0,225,2720,0,0,2624,33,2656,224,32,0],"FLAG":0,"BASE":45}
|
||||
@ -1112,10 +1137,9 @@ ednet 84334 {"NAME":"84334","GPIO":[0,0,0,0,320,321,0,0,224,32,
|
||||
eFamilyCloud ASDFEE174 {"NAME":"eFamily Plug","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
EFUN SH330W {"NAME":"EFUNPlug","GPIO":[320,1,1,1,1,1,1,1,1,32,1,224,1,1],"FLAG":0,"BASE":18}
|
||||
EFUN SH331W {"NAME":"Efun-Plug","GPIO":[320,0,576,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":18}
|
||||
Elehot 16A {"NAME":"ELEHOT AWP16L","GPIO":[0,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45}
|
||||
EleLight {"NAME":"EleLight PE1004T","GPIO":[0,0,0,0,288,289,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
EletecPro 2 {"NAME":"EletecPro-2","GPIO":[1,1,1,1,32,1,0,0,289,288,224,1,1,4704],"FLAG":0,"BASE":18}
|
||||
Emil Lux Wifi-Stecker IP20 {"NAME":"Emil Lux Wifi-Steckdose","GPIO":[0,0,0,0,321,0,0,0,224,320,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
Emil Lux Wifi-Stecker IP20 {"NAME":"Obi CH Plug","GPIO":[0,0,0,0,320,0,0,0,224,576,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
Emporia {"NAME":"Emporia EMS01","GPIO":[0,0,0,289,224,2720,0,0,2624,32,2656,288,0,0],"FLAG":0,"BASE":18}
|
||||
Emporia 15A {"NAME":"Emporia EMS02","GPIO":[320,0,321,0,224,2720,0,0,2624,32,2656,0,0,0],"FLAG":0,"BASE":18}
|
||||
Ener-J {"NAME":"ENER-J SHA5264","GPIO":[32,0,0,0,2720,2656,0,0,2624,288,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1195,10 +1219,10 @@ HBN 13A {"NAME":"BNC-50/E75T","GPIO":[0,0,0,0,576,320,0,0,2
|
||||
HBN BNC-60/U152T {"NAME":"BNC-60/U152T","GPIO":[0,0,0,0,320,0,1,1,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
HerePow {"NAME":"HerePow ZHX-ZNOC","GPIO":[0,544,0,2624,2720,2656,0,0,224,32,320,0,0,0],"FLAG":0,"BASE":68}
|
||||
Heygo 02 {"NAME":"Heygo 02","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
HiHome WPP-10S1 {"NAME":"HIhome WPP-10S","GPIO":[320,0,576,1,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome WPP-10S2 {"NAME":"HiHome WPP-10S","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome WPP-16S {"NAME":"HIhome WPP-16S","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome WPP-16T {"NAME":"HiHome WPP-16T","GPIO":[32,320,1,1,2720,2656,0,0,33,1,225,2592,224,4704],"FLAG":0,"BASE":18}
|
||||
HiHome {"NAME":"HIhome WPP-16S","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome {"NAME":"HiHome WPP-10S","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome {"NAME":"HIhome WPP-10S","GPIO":[320,0,576,1,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":49}
|
||||
HiHome {"NAME":"HiHome WPP-16T","GPIO":[32,320,1,1,2720,2656,0,0,33,1,225,2592,224,4704],"FLAG":0,"BASE":18}
|
||||
HIPER IoT P01 {"NAME":"HIPER IoT P01","GPIO":[0,0,0,0,0,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
hiwild W-US002 {"NAME":"W-US002","GPIO":[0,32,0,0,0,0,0,0,0,288,224,0,576,0],"FLAG":0,"BASE":18}
|
||||
HLT-309 {"NAME":"HLT-309","GPIO":[0,0,0,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1273,7 +1297,7 @@ Ledvance Smart+ {"NAME":"Ledvance Plug","GPIO":[0,0,0,320,2688,2656
|
||||
Ledvance Smart+ CH {"NAME":"Ledvance Plug CH","GPIO":[0,0,0,288,32,0,0,0,2656,224,2720,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo SE-341A {"NAME":"Lenovo SE-341A","GPIO":[0,0,0,0,32,224,0,0,576,0,320,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo SE-341AA {"NAME":"Lenovo SE-341AC","GPIO":[0,0,0,0,32,224,0,0,576,0,320,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo SE-341AC {"NAME":"Lenovo SE-341AC","GPIO":[0,0,0,32,0,0,0,0,320,224,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo SE-341AC {"NAME":"Lenovo SE-341AC","GPIO":[0,321,0,32,2720,2656,0,0,320,224,2624,0,0,0],"FLAG":0,"BASE":18}
|
||||
LESHP KS-501 {"NAME":"LESHP KS-501","GPIO":[32,0,0,0,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Lighting Arena {"NAME":"Lighting Arena Smart Plug","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18}
|
||||
Lloyd's {"NAME":"Lloyds LC-1193","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1284,7 +1308,7 @@ Lohas Nightlight + USB {"NAME":"Lohas LED Mini Plug","GPIO":[0,321,0,288,3
|
||||
Lombex Actis Pro {"NAME":"U11-Socket","GPIO":[0,0,0,0,289,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lonsonho 10A Type E {"NAME":"Lonsonho10ALed","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
LoraTap SP400W-IT {"NAME":"LoraTap SP400W","GPIO":[0,0,0,0,544,320,0,0,224,32,0,0,0,1],"FLAG":0,"BASE":18}
|
||||
LSC Power {"NAME":"LSC Smart Plug","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
LSC Power {"NAME":"LSC Smart Plug (CB2S)","GPIO":[0,0,0,0,32,224,0,0,0,288,289,0,0,0],"FLAG":0,"BASE":18}
|
||||
LSC Smart Connect {"NAME":"LSC Smart Plug FR","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lumiman LM650 {"NAME":"Lumiman LM650","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Luminea {"NAME":"CH-1556","GPIO":[0,0,0,32,2720,2656,1,1,2624,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1296,6 +1320,7 @@ Lunvon 2000W {"NAME":"Lunvon Smart Plug","GPIO":[32,0,0,0,0,0,28
|
||||
Lunvon 3000W {"NAME":"Lunvon Smart Plug","GPIO":[32,0,0,0,0,0,288,224,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Martin Jerry V01 {"NAME":"MJ V01","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Martin Jerry XS-SSA01 {"NAME":"MJ_XS-SSA01","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Maxcio 16A Mini {"NAME":"MAXCIO RMC021","GPIO":[0,0,0,32,2720,2656,0,0,2624,544,224,0,0,0],"FLAG":0,"BASE":1}
|
||||
Maxcio W-UK007S {"NAME":"Maxcio","GPIO":[320,0,1,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45}
|
||||
Maxcio W-US002S {"NAME":"W-US002S","GPIO":[321,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45}
|
||||
Maxcio W-US003 {"NAME":"W-US003","GPIO":[1,32,1,1,1,1,0,0,1,225,224,1,1,0],"FLAG":0,"BASE":18}
|
||||
@ -1341,13 +1366,14 @@ NGS Loop Track 16A {"NAME":"LOOP","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224
|
||||
Nightlight and AC Outlet {"NAME":"SWN03","GPIO":[32,0,0,0,0,0,1,1,416,0,0,224,0,0],"FLAG":0,"BASE":18}
|
||||
Nishica SM-PW701I {"NAME":"SM-PW701I","GPIO":[1,1,1,1,1,1,1,1,224,288,32,1,1,1],"FLAG":0,"BASE":18}
|
||||
Nivian {"NAME":"Nivian Smart Socket","GPIO":[0,0,320,0,0,2688,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":18}
|
||||
Nous 16A {"NAME":"NOUS A1T","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0],"FLAG":0,"BASE":49}
|
||||
Nous 16A {"NAME":"NOUS A1T","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
|
||||
Nous A1 {"NAME":"NOUS A1","GPIO":[320,0,576,0,2656,2720,0,0,2624,32,0,224,0,0],"FLAG":0,"BASE":45}
|
||||
NX-SM112 {"NAME":"NX-SM112v3","GPIO":[0,0,0,0,2720,2656,0,0,576,32,2592,224,0,0],"FLAG":0,"BASE":45}
|
||||
NX-SM200 {"NAME":"NX-SM200","GPIO":[320,0,0,0,0,2720,0,0,224,32,2656,321,2624,0],"FLAG":0,"BASE":18}
|
||||
NX-SM210 {"NAME":"NX-SM210","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
NX-SM223 {"NAME":"Smart Thurmm","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Oakter Oak Plug Plus 16A {"NAME":"Oakter OakPlug Plus","GPIO":[0,0,0,0,224,0,0,0,544,320,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Oakter OakPlug Mini 10A {"NAME":"Oakter OakPlug Mini","GPIO":[0,0,0,0,224,0,0,0,544,320,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Oakter OakPlug Plus (old) {"NAME":"Oakter OakPlug Plus (old)","GPIO":[0,0,0,0,224,0,0,0,0,320,0,0,544,0],"FLAG":0,"BASE":18}
|
||||
Obi Stecker {"NAME":"OBI Socket","GPIO":[1,1,0,1,288,224,0,0,290,1,32,0,1,4704],"FLAG":0,"BASE":51}
|
||||
Obi Stecker 2 {"NAME":"OBI Socket 2","GPIO":[0,0,0,0,224,32,0,0,320,289,0,0,0,0],"FLAG":0,"BASE":61}
|
||||
@ -1559,7 +1585,7 @@ ZSP-001 {"NAME":"ZSP-001","GPIO":[32,1,1,1,2688,2656,0,0,25
|
||||
## Power Strip
|
||||
```
|
||||
3AC 4USB {"NAME":"C723","GPIO":[0,0,320,0,0,224,0,0,226,320,32,227,225,0],"FLAG":0,"BASE":18}
|
||||
4 AC Outlets 10A and 4 USB Ports {"NAME":"SA-P802 Power Strip","GPIO":[544,0,0,0,227,228,0,0,225,224,226,0,35,1],"FLAG":0,"BASE":18}
|
||||
4 AC Outlets 10A and 4 USB Ports {"NAME":"SA-P802 Power Strip","GPIO":[544,0,0,0,227,228,0,0,225,224,226,0,32,0],"FLAG":0,"BASE":18}
|
||||
A0F0 ZLD-44EU-W {"NAME":"AOFO-4AC-4USB","GPIO":[0,320,0,32,225,224,0,0,226,227,260,0,0,4704],"FLAG":0,"BASE":18}
|
||||
Acenx 3AC+3USB {"NAME":"ACENX 3-Outlet","GPIO":[320,291,290,289,0,224,0,0,226,227,225,0,32,0],"FLAG":0,"BASE":18}
|
||||
AHRise 4+4AC+4USB {"NAME":"AHRise-083","GPIO":[0,0,0,0,320,32,0,0,225,224,226,227,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1585,6 +1611,7 @@ Brennenstuhl Connect Eco-Line {"NAME":"WS EL01 DE","GPIO":[34,33,0,32,224,225,0
|
||||
Brennenstuhl Connect Premium-Line {"NAME":"WS PL01 DE","GPIO":[34,33,0,32,224,225,0,0,288,0,35,289,576,0],"FLAG":0,"BASE":18}
|
||||
BrilliantSmart Powerboard with USB Chargers {"NAME":"B_WiFi-4","GPIO":[320,0,0,321,256,32,0,0,258,257,259,0,228,4704],"FLAG":0,"BASE":18}
|
||||
Calex 4AC 2USB {"NAME":"Calex Power Strip 429228","GPIO":[0,320,0,36,225,224,0,0,226,227,228,0,0,0],"FLAG":0,"BASE":18}
|
||||
Calex 4AC 4USB {"NAME":"Calex Power Strip 429228","GPIO":[0,0,0,288,224,226,0,0,0,228,227,225,32,0],"FLAG":0,"BASE":18}
|
||||
CE Smart Home {"NAME":"CE Power Strip","GPIO":[288,0,0,0,227,228,0,0,225,226,224,0,32,0],"FLAG":0,"BASE":18}
|
||||
CE Smart Home Garden Stake {"NAME":"CE Power Stake","GPIO":[0,0,0,0,320,321,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
CRST LTS-4G-W {"NAME":"CRST LTS-4G-W","GPIO":[0,0,0,0,227,0,0,0,225,226,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1653,6 +1680,7 @@ Surge Protector 3AC 2USB {"NAME":"C158","GPIO":[260,0,0,0,261,230,0,0,224,0,
|
||||
SWB1 {"NAME":"SWB1","GPIO":[288,0,0,0,0,227,0,0,224,32,225,226,0,0],"FLAG":0,"BASE":18}
|
||||
SWB2 3AC + 2USB {"NAME":"SWB2","GPIO":[576,1,0,1,0,226,0,0,224,32,225,227,0,0],"FLAG":0,"BASE":18}
|
||||
Swisstone 4AC 4USB {"NAME":"Swisstone SH140","GPIO":[0,576,0,32,225,224,0,0,226,227,228,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sygonix 4AC {"NAME":"Sygonix SY-4538254","GPIO":[576,32,0,231,229,230,0,0,225,224,226,228,259,0],"FLAG":0,"BASE":18}
|
||||
TCP Smart 4AC+USB {"NAME":"TCP WPS4WUK","GPIO":[1,320,0,32,226,227,0,0,225,224,228,0,0,1],"FLAG":0,"BASE":18}
|
||||
Teckin SS30 {"NAME":"Teckin SS30","GPIO":[288,1,1,321,256,32,0,0,258,257,259,1,228,0],"FLAG":0,"BASE":18}
|
||||
Tellur 3AC 4USB {"NAME":"Tellur","GPIO":[0,320,0,32,225,224,0,0,0,226,227,0,0,4704],"FLAG":0,"BASE":18}
|
||||
@ -1687,10 +1715,15 @@ ZLD-44USA-W {"NAME":"ZLD-44USA-W","GPIO":[0,320,0,32,225,224,0,
|
||||
ZLD64-EU-W {"NAME":"ZLD64-EU-W","GPIO":[0,320,0,32,225,224,0,0,0,0,226,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Presence Sensor
|
||||
```
|
||||
Tuya mmWave {"NAME":"ZY-M100","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"SO97 1 | TuyaMCU 99,1 | TuyaMCU 75,104"}
|
||||
```
|
||||
|
||||
## RF Gateway
|
||||
```
|
||||
Sonoff RF Bridge 433 {"NAME":"Sonoff Bridge","GPIO":[32,3200,1,3232,1,1,0,0,1,320,1,0,0,0],"FLAG":0,"BASE":25}
|
||||
Virage Labs VirageBridge 433MHz {"NAME":"VirageBridge","GPIO":[32,3200,1,3232,1,1,0,0,1,320,1,0,0],"FLAG":0,"BASE":25}
|
||||
Virage Labs VirageBridge 433MHz {"NAME":"VirageBridge","GPIO":[32,3200,1,3232,1,1,0,0,1,320,1,0,0,0],"FLAG":0,"BASE":25}
|
||||
```
|
||||
|
||||
## RGB
|
||||
@ -1714,6 +1747,7 @@ Wipro Garnet NS7001 480lm {"NAME":"WiproSmartBulb","GPIO":[0,0,0,0,416,419,0,
|
||||
Aigital LE13 800lm {"NAME":"Aigital 9W RGB","GPIO":[0,0,0,0,420,417,0,0,418,0,419,416,0,0],"FLAG":0,"BASE":18}
|
||||
Aisirer 10W 1000lm {"NAME":"Aisirer RGBCW","GPIO":[160,0,0,0,0,0,0,0,0,4032,4064,0,0,0],"FLAG":0,"BASE":18}
|
||||
AiYaTo 12W {"NAME":"AiYaTo RGBCW","GPIO":[0,0,0,0,419,418,0,0,416,420,417,0,0,0],"FLAG":0,"BASE":18}
|
||||
AiYaTo 12W {"NAME":"AiYaTo RGBCW","GPIO":[0,0,0,0,419,418,0,0,416,420,417,0,0,0],"FLAG":0,"BASE":18}
|
||||
Alfawise LE12 9W 900LM {"NAME":"Alfawise LE12 ","GPIO":[0,0,0,0,420,417,0,0,418,0,419,416,0,0],"FLAG":0,"BASE":18}
|
||||
Aoycocr JL81 5W 400lm {"NAME":"AoycocrJLB1","GPIO":[0,0,0,0,418,0,0,0,417,420,416,419,0,0],"FLAG":0,"BASE":18}
|
||||
Aoycocr Q10CWM BR30 9W 720lm {"NAME":"AoycocrBR30","GPIO":[0,0,0,0,0,418,0,0,417,0,416,419,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1729,6 +1763,7 @@ Aunics 7W 600lm {"NAME":"Aunics RGBW","GPIO":[0,0,0,0,416,419,0,0,4
|
||||
Avatar 8W 800lm {"NAME":"Avatar 8W RGBCW","GPIO":[1,1,1,1,416,419,1,1,417,420,418,1,1,1],"FLAG":0,"BASE":18}
|
||||
Avatar ALB201W 720lm {"NAME":"AVATAR ALB201W","GPIO":[0,0,0,0,0,418,0,0,417,0,416,419,0,0],"FLAG":0,"BASE":18}
|
||||
Avatar ALS18L A60 800lm {"NAME":"Avatar E14 7W","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":20}
|
||||
AZzardo 10W {"NAME":"Azzardo AZ3213","GPIO":[0,0,0,0,4032,0,0,0,0,0,4064,0,0,0],"FLAG":0,"BASE":18,"CMND":"SetOption37 6"}
|
||||
B.K. Licht 5.5W 350lm {"NAME":"BKL1262","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
B.K. Licht 9W 806lm {"NAME":"BKL1253","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
Bakibo TB95 9W 1000lm {"NAME":"Bakibo A19 9W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1806,6 +1841,7 @@ Legelite A60 7W {"NAME":"Legelite A60 7","GPIO":[0,0,0,0,416,419,0,
|
||||
Legelite A60 7W 600lm {"NAME":"Legelite E26","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lenovo 800lm {"NAME":"Lenovo SE-241EB","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lloyd's 5W 400Lm {"NAME":"LLOYDS LC-1271","GPIO":[160,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18}
|
||||
Local Bytes 9W 900lm {"NAME":"localbytes bulb","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lohas ZN004 8W 680lm {"NAME":"Lohas B22 R63","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lohas ZN011 5W 420lm {"NAME":"LohasZN011","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lohas ZN014-2 5W 380lm {"NAME":"Lohas ZN014-2","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1859,7 +1895,7 @@ Ruihai 9W 800lm {"NAME":"Ruihai SB50","GPIO":[0,0,0,0,416,419,0,0,4
|
||||
RYE 5W 450LM Candle {"NAME":"RYE Candlebra","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Saudio A19 7W 700lm {"NAME":"X002BU0DOL","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Sealight A19 9W 810lm {"NAME":"DGO/SEASTAR","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18}
|
||||
Slitinto 5W Candle {"NAME":"Slitinto RGBWW","GPIO":[0,0,0,0,40,41,0,0,38,39,37,0,0,0],"FLAG":0,"BASE":18}
|
||||
Slitinto 5W Candle {"NAME":"Slitinto RGBWW","GPIO":[0,0,0,0,419,420,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Slitinto TB95 9W 1000lm {"NAME":"Slitinto 9W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Smart 9W 800lm {"NAME":"SmartLED ","GPIO":[0,0,0,0,420,417,0,0,418,0,419,416,0,0],"FLAG":0,"BASE":18}
|
||||
SmartLED 9W 400lm {"NAME":"SmartLED","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -1893,6 +1929,19 @@ ZunPulse 9W {"NAME":"ZunPulse B22 9W","GPIO":[0,0,0,0,416,419,0
|
||||
ZZHXON 600lm {"NAME":"E27_RGB_Bulb","GPIO":[0,0,0,0,419,420,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## RGBIC LED
|
||||
```
|
||||
Athom 2812b Controller for {"NAME":"LS2812B-TAS","GPIO":[32,0,1376,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Athom ESP32 Music Controller for {"NAME":"Athom LS8P","GPIO":[32,1,224,1,1,1,1,1,1,1,1,7904,1,1377,1376,1,0,1,1,1,0,1088,1,1,0,0,0,0,7872,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
Athom High Power 16A Controller for {"NAME":"LS_4PIN_TAS","GPIO":[32,1376,0,0,0,0,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"Rule1 on Power1#State do power2 2 endon|Rule1 1"}
|
||||
BlitzWolf IC Smart RGB Controller for {"NAME":"BW-LT31","GPIO":[0,0,32,1376,0,0,0,0,0,1088,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO37 24"}
|
||||
cod.m WLAN Pixel Controller v0.8 {"NAME":"cod.m Pixel Controller V0.8","GPIO":[0,0,0,0,0,544,0,0,0,0,0,32,1376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
ESP01 NeoPixel Ring {"NAME":"ESP-01S-RGB-LED-v1.0","GPIO":[1,1,1376,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
H803WF 2048 Pixel 5V-24V {"NAME":"H803WF","GPIO":[0,0,0,0,3840,3840,0,0,3872,1376,0,3872,0,0],"FLAG":0,"BASE":18}
|
||||
IOTMCU {"NAME":"IOTMCU_ESP-12S-RGB-LED-v1","GPIO":[1,1,1,1,0,1376,0,0,1,1088,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
SP501E WS2812B {"NAME":"SP501E","GPIO":[0,32,0,1376,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## RGBW
|
||||
```
|
||||
3Stone EBE-QPW36 1050lm {"NAME":"3STONE","GPIO":[0,0,0,0,2944,2912,0,0,416,2976,0,0,0,1],"FLAG":0,"BASE":18}
|
||||
@ -2031,7 +2080,7 @@ REPSN G45 5W 500lm {"NAME":"REPSN RGBW E14","GPIO":[0,0,0,0,0,0,0,0,40
|
||||
Riversong Juno 10W {"NAME":"Juno10","GPIO":[0,0,0,0,2912,416,0,0,0,2976,2944,0,0,0],"FLAG":0,"BASE":18}
|
||||
Rogoei EBE-QPZ04 6.5W 450lm {"NAME":"EBE-QPZ04","GPIO":[0,0,0,0,4032,0,0,0,0,0,4064,0,0,0],"FLAG":0,"BASE":18}
|
||||
Saudio 7W 700lm {"NAME":"X002BU0DOL","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Shelly Duo RGBW 5W {"NAME":"Shelly Duo RGBW","GPIO":[0,0,0,0,0,419,0,0,417,416,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Shelly Duo RGBW 5W 400lm {"NAME":"Shelly Duo RGBW","GPIO":[0,0,0,0,0,419,0,0,417,416,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Shelly Duo RGBW 9W 800lm {"NAME":"Shelly Duo RGBW","GPIO":[0,0,0,0,0,419,0,0,417,416,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Smart 810lm {"NAME":"OOOLED 60W RGB","GPIO":[0,0,0,0,418,419,0,0,416,0,417,0,0,4704],"FLAG":0,"BASE":18}
|
||||
SmartLED 9W 400lm {"NAME":"SmartLED RGBWW","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -2046,6 +2095,7 @@ Swisstone 806lm {"NAME":"SH 340","GPIO":[0,0,0,0,2912,416,0,0,0,297
|
||||
Syska 7W 480lm {"NAME":"Syska","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Syska 8W {"NAME":"Syska SMW-8W-C","GPIO":[0,0,0,0,420,419,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
Syska 9W 720lm {"NAME":"SyskaSmartBulb","GPIO":[0,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
TCP Smart 5W {"NAME":"TAOLGU42OWW25RGBW","GPIO":[0,0,0,0,417,416,0,0,419,418,420,0,0,0],"FLAG":0,"BASE":18}
|
||||
TCP Smart 9W 806lm {"NAME":"TCP Smart RGBW","GPIO":[0,0,0,0,2912,416,0,0,417,2976,2944,0,0,0],"FLAG":0,"BASE":18}
|
||||
Teckin 7.5W 800lm {"NAME":"Teckin SB60","GPIO":[0,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18}
|
||||
Teckin SB50 800lm {"NAME":"Teckin SB50","GPIO":[0,0,0,0,419,0,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -2072,6 +2122,11 @@ Zemismart A19 10W {"NAME":"Zemism_E27_A19","GPIO":[0,0,0,0,0,0,0,0,0,
|
||||
Zilotek A19 800lm {"NAME":"Zilotek RGBW","GPIO":[0,0,0,0,2912,416,0,0,417,2976,2944,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Relay
|
||||
```
|
||||
LilyGo T-Relay 8 {"NAME":"LilyGo ESP32 Relay 8","GPIO":[1,1,1,1,1,231,1,1,227,226,1,1,1,1,230,229,0,228,1,1,0,544,1,1,0,0,0,0,225,224,1,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
```
|
||||
|
||||
## Relay Board
|
||||
```
|
||||
2 Channel Tuya {"NAME":"TY-DIY-S02","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,2 | TuyaMCU 13,13 | TuyaMCU 1,101"}
|
||||
@ -2089,7 +2144,7 @@ Eachen ST-UDC1 {"NAME":"ST-UDC1","GPIO":[160,0,0,0,0,0,0,0,224,320
|
||||
Electrodragon Board SPDT {"NAME":"ED Relay Board","GPIO":[1,1,1,1,1,1,0,0,224,225,1,1,288,4704],"FLAG":0,"BASE":18}
|
||||
Electrodragon ESP8266 {"NAME":"ElectroDragon","GPIO":[33,1,32,1,1,1,0,0,225,224,1,1,288,4704],"FLAG":0,"BASE":15}
|
||||
Electrodragon Inductive Load {"NAME":"ED RelayBoard IL","GPIO":[0,0,1,0,1,1,0,0,224,225,1,1,288,0],"FLAG":0,"BASE":18}
|
||||
ESP-01 Relay V4.0 {"NAME":"ESP01v4","GPIO":[256,320,0,32,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
ESP-01 Relay V4.0 {"NAME":"ESP01v4","GPIO":[256,320,0,32,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
ESP-01S 5V Relay Module V1.0 {"NAME":"ESP-01S Relay","GPIO":[256,288,1,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
ESP-12F 5V/7-28V 1 Channel 30A {"NAME":"Aideepen","GPIO":[0,0,0,0,0,288,0,0,0,0,0,0,224,0],"FLAG":0,"BASE":18}
|
||||
ESP-12F 5V/7-28V 4 Channel 30A {"NAME":"ESP12F_Relay_30A_X4","GPIO":[1,1,1,1,32,1,1,1,226,227,225,1,224,1],"FLAG":0,"BASE":18}
|
||||
@ -2111,6 +2166,7 @@ KRIDA 8 Channel 10A Electromagnetic {"NAME":"8CH Relay","GPIO":[230,1,231,229,1
|
||||
LC Technology 12V 4 Channel {"NAME":"LC Technology 4CH Relay","GPIO":[224,0,225,0,226,227,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
LC Technology 5V 2 Channel {"NAME":"LC-ESP01-2R-5V","GPIO":[0,3200,0,3232,0,0,0,0,224,225,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
LC Technology 5V 4 Channel {"NAME":"LC-Tech_4CH ","GPIO":[288,1,32,1,0,0,0,0,224,225,226,227,0,0],"FLAG":0,"BASE":18}
|
||||
LC Technology 5V/7-30V 8 Channel {"NAME":"ESP32_Relay_X8","GPIO":[0,0,0,0,0,0,0,0,225,224,226,0,0,0,0,0,0,0,0,0,0,229,228,227,0,0,0,0,231,230,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
LC Technology 5V/8-80V 1 Channel {"NAME":"LC-Relay-ESP12-1R-MV","GPIO":[1,1,544,1,1,224,1,1,1,1,1,1,321,1],"FLAG":0,"BASE":18}
|
||||
LC Technology 5V/8-80V 1 Channel {"NAME":"LC-Relay-ESP12-1R-D8","GPIO":[1,1,544,1,1,224,1,1,1,1,1,1,321,1],"FLAG":0,"BASE":18}
|
||||
LC Technology AC90V-250V 1 Channel {"NAME":"ESP32_Relay_AC_X1","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,224,1,1,1,0,1,1,544,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
@ -2140,12 +2196,14 @@ Yunshan 7-30V 10A {"NAME":"Yunshan 10A","GPIO":[32,1,288,1,224,161,0,
|
||||
```
|
||||
2 CH Smart Switch {"NAME":"Generic","GPIO":[32,1,1,1,1,225,33,1,224,288,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
Aubess Power Monitor Switch 16A {"NAME":"Aubess with (BL0942)","GPIO":[0,3200,0,7520,0,0,0,0,0,0,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Mini Smart Switch {"NAME":"SmartSwitch-MK601","GPIO":[0,0,0,160,32,224,0,0,0,0,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
Moes 10A {"NAME":"Moes MS-101","GPIO":[0,0,0,0,0,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Smarsecur Smart Switch {"NAME":"ESP-02S","GPIO":[0,0,0,32,0,0,0,0,0,0,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Sensor
|
||||
```
|
||||
Bresser 7-Kanal Thermo-/Hygrometer with Outdoor {"NAME":"Bresser","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"SO97 1 | TuyaMCU 73,2 | TuyaMCU 71,102"}
|
||||
Genesense IoT Controller {"NAME":"GNS24","GPIO":[32,1,1312,1,256,320,1,1,256,1216,160,3840,1,4704],"FLAG":0,"BASE":18}
|
||||
Shelly 3EM Power Monitoring Module {"NAME":"Shelly 3EM","GPIO":[1,1,288,1,32,8065,0,0,640,8064,608,224,8096,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
@ -2171,6 +2229,11 @@ Slampher {"NAME":"Slampher","GPIO":[32,1,0,1,0,0,0,0,224,320
|
||||
SmartBase E0260 {"NAME":"SmartBaseE0260","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
## Soil Sensor
|
||||
```
|
||||
DIY MORE ESP32 DHT11 {"NAME":"DIYMORESOILDHT11","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,544,1,1,1,0,1,1184,1,0,1,1,1,0,0,0,0,4864,288,4865,1,1,0,0,1],"FLAG":0,"BASE":1}
|
||||
```
|
||||
|
||||
## Switch
|
||||
```
|
||||
3 Way Smart Light {"NAME":"KS-602F","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
@ -2179,6 +2242,7 @@ AGL 2 Gang {"NAME":"AGL WiFi 02","GPIO":[0,0,544,0,0,33,0,0,22
|
||||
AGL 3 Gang {"NAME":"AGL WiFi 03","GPIO":[0,0,544,0,34,33,0,0,225,224,226,0,32,0],"FLAG":0,"BASE":18}
|
||||
Aoycocr SW1 {"NAME":"Aoycocr SW1","GPIO":[576,1,321,1,1,1,1,1,320,32,1,224,1,1],"FLAG":0,"BASE":18}
|
||||
APPIO 1 Gang Switch {"NAME":"Appio-9608","GPIO":[0,0,0,0,0,32,0,0,0,0,0,224,288,0],"FLAG":0,"BASE":18}
|
||||
Appio 3 Gang Touch {"NAME":"Appio 9611","GPIO":[0,0,0,0,226,33,0,0,32,224,34,225,288,0],"FLAG":0,"BASE":18}
|
||||
Athom 1 Gang {"NAME":"Athom SW011EU","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1}
|
||||
Athom 1 Gang {"NAME":"Athom SW031US","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1}
|
||||
Athom 1 Gang No Neutral {"NAME":"Athom SW111EU","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1}
|
||||
@ -2225,7 +2289,7 @@ Dierya Touch Panel 2 Gang {"NAME":"CD302","GPIO":[544,0,0,33,225,0,0,0,32,224
|
||||
Dierya Touch Panel 3 Gang {"NAME":"CD303","GPIO":[576,289,0,34,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18}
|
||||
Digoo DG-S811 3 Gang {"NAME":"DIGOO Switch","GPIO":[0,0,0,0,34,33,0,0,225,224,226,0,32,0],"FLAG":0,"BASE":18}
|
||||
DS-101 1 Gang {"NAME":"Smart Life Switch","GPIO":[0,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
DS-101 2 Gang {"NAME":"Smart Life Switch","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0],"FLAG":0,"BASE":18}
|
||||
DS-101 2 Gang {"NAME":"Smart Life Switch","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
DS-101 3 Gang {"NAME":"DS-101 3 gang","GPIO":[576,322,0,33,226,34,0,0,32,225,321,224,320,0],"FLAG":0,"BASE":18}
|
||||
DS-101 4 Gang Switch {"NAME":"DS-101 4 Gang","GPIO":[544,0,0,33,225,34,0,0,32,224,227,226,35,0],"FLAG":0,"BASE":18}
|
||||
DS-102 1 Gang {"NAME":"DS-102 1 Gang","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -2269,6 +2333,7 @@ Innens RF433 2 Gang 1 Way {"NAME":"Innens Light Switch 2G","GPIO":[0,0,289,0,
|
||||
Jinvoo SM-SW101-1 {"NAME":"SM-SW101-1","GPIO":[288,0,0,33,0,0,0,0,32,224,0,0,0,4704],"FLAG":0,"BASE":18}
|
||||
Jinvoo SM-SW101-2 {"NAME":"SM-SW101-2","GPIO":[288,0,0,33,225,0,0,0,32,224,0,0,0,4704],"FLAG":0,"BASE":18}
|
||||
Jinvoo SM-SW101-3 {"NAME":"Jinvoo Wall Sw","GPIO":[288,0,0,33,225,34,0,0,32,224,0,226,0,4704],"FLAG":0,"BASE":18}
|
||||
KaBuM! 15A 3 Gang Touch {"NAME":"Kabum Switch 3","GPIO":[0,0,0,0,226,33,0,0,32,224,34,225,576,0],"FLAG":0,"BASE":18}
|
||||
Kauf RGB Wall {"NAME":"Kauf SRF10","GPIO":[448,1,450,1,450,449,1,1,449,32,448,224,1,1],"FLAG":0,"BASE":18}
|
||||
KingArt 1 Gang {"NAME":"KING-L1","GPIO":[0,0,0,0,0,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
KingArt 3 Gang {"NAME":"KING-L3","GPIO":[0,0,0,0,226,225,0,0,224,164,165,0,167,0],"FLAG":0,"BASE":18}
|
||||
@ -2292,6 +2357,7 @@ LerLink 2 Gang No Neutral {"NAME":"Lonsonho 2gang","GPIO":[0,0,0,33,32,0,0,0,
|
||||
Lerlink 3 Gang {"NAME":"X803A","GPIO":[0,0,0,33,32,34,0,0,224,259,225,226,288,0],"FLAG":0,"BASE":18}
|
||||
Lerlink 3 Gang {"NAME":"X803A","GPIO":[0,0,0,33,32,34,0,0,224,288,225,226,0,0],"FLAG":0,"BASE":18}
|
||||
Lerlink 3 Gang No Neutral {"NAME":"X803K-L 3 Gang","GPIO":[0,0,320,0,32,34,33,0,224,0,225,226,0,0],"FLAG":0,"BASE":18}
|
||||
Lidl Silvercrest {"NAME":"Lidl Silvercrest HG06337","GPIO":[0,0,0,0,0,0,0,0,32,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
Lightstory WT02S {"NAME":"WT02S","GPIO":[0,0,0,0,321,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":50}
|
||||
Linkind 2-Way {"NAME":"Linkind WS240010008","GPIO":[0,0,0,0,0,224,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,576,321,0,0,0,0,0,33,32,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Linkind Dimmer {"NAME":"Linkind Dimmer WS240010108","GPIO":[6213,8448,0,0,640,0,0,0,0,0,288,0,0,0,0,0,0,0,608,0,0,0,544,0,0,0,0,0,33,32,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
@ -2308,7 +2374,7 @@ LX-WIFI-00M 4 Gang {"NAME":"LX-WIFI-00M","GPIO":[32,228,1,1,226,225,33
|
||||
MakeGood 2 Gang {"NAME":"MakeGood 2 Gang","GPIO":[0,0,0,0,0,0,0,0,0,0,290,0,0,0],"FLAG":0,"BASE":54}
|
||||
MakeGood 4 Gang {"NAME":"MakeGood 4 Gang","GPIO":[0,0,0,0,0,0,0,0,0,0,290,0,0,0],"FLAG":0,"BASE":54}
|
||||
Markevina KS-602S {"NAME":"Markevina KS-6","GPIO":[32,1,0,1,0,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Martin Jerry S01 15A {"NAME":"MJ-S01 Switch","GPIO":[0,0,0,0,320,321,0,0,224,32,0,0,0],"FLAG":0,"BASE":18}
|
||||
Martin Jerry S01 15A {"NAME":"MJ-S01 Switch","GPIO":[0,0,0,0,320,321,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Martin Jerry ST01 3 Way {"NAME":"MJ 3Way Switch","GPIO":[1,1,1,1,288,289,0,0,224,160,544,1,0,0],"FLAG":0,"BASE":18}
|
||||
Maxcio IT Wall 3 Gang Light {"NAME":"Maxcio 3 Gang Switch","GPIO":[544,0,0,0,32,33,0,0,225,226,224,0,34,0],"FLAG":0,"BASE":18}
|
||||
Merkury MI-WW107-199W {"NAME":"MI-WW107-199W","GPIO":[288,0,0,0,0,0,0,0,32,224,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -2336,6 +2402,7 @@ Moes 3 Gang {"NAME":"Moes WS-EU3-W","GPIO":[544,0,290,33,225,34
|
||||
Moes 3-Way {"NAME":"Moes 3-Way","GPIO":[1,1,1,1,224,321,0,0,257,161,160,1,1,0],"FLAG":0,"BASE":18}
|
||||
Moes BS-US-W Boiler {"NAME":"BS-US-W","GPIO":[290,0,0,32,224,0,0,0,0,0,288,0,291,0],"FLAG":0,"BASE":18}
|
||||
Moes Light and Fan {"NAME":"Moes WF-FL01","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Moes Push Button 3 Way Light {"NAME":"Moes ESW-1WAA-US","GPIO":[32,0,0,0,288,0,0,0,0,224,161,0,0,0],"FLAG":0,"BASE":18}
|
||||
Moes RF433 2 Gang Switch {"NAME":"WS-EUB2-WR","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Moes RF433 3 Gang {"NAME":"WS-EUB3-WR","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Moes RF433 3 Gang Touch {"NAME":"WS-EU-RF","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,2 | TuyaMCU 13,3"}
|
||||
@ -2357,11 +2424,13 @@ NaamaSmart KS602 {"NAME":"KS-602","GPIO":[32,0,0,0,0,0,0,0,224,576,0
|
||||
Nedis Dual {"NAME":"SM-SW102U-2","GPIO":[576,0,0,33,225,0,0,0,32,224,0,0,0,4704],"FLAG":0,"BASE":18}
|
||||
Nexete DS-123 {"NAME":"DS-123","GPIO":[544,321,1,32,224,33,0,0,1,225,320,1,1,0],"FLAG":0,"BASE":18}
|
||||
Nexete DS-123 Single {"NAME":"DS-123","GPIO":[544,0,1,33,0,32,0,0,1,224,320,1,1,0],"FLAG":0,"BASE":18}
|
||||
Novadigital Interruptor Touch Led 1 Botno {"NAME":"Nova Digital Switch 1 Gang","GPIO":[544,0,0,32,224,0,0,0,0,0,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
Novadigital Interruptor Touch Led 1 Boto {"NAME":"Nova Digital Switch 1 Gang","GPIO":[544,0,0,32,224,0,0,0,0,0,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
Prosto {"NAME":"Prosto WFS-T10","GPIO":[0,0,0,0,0,224,0,0,320,0,64,0,0,0],"FLAG":0,"BASE":18}
|
||||
Push Button 1/2/3/4 Gang {"NAME":"DS-122","GPIO":[321,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
Q-touch 1 Gang {"NAME":"Qtouch","GPIO":[289,0,0,32,0,0,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Q-touch 433MHz 1 Gang {"NAME":"Qtouch 1G","GPIO":[32,0,0,0,0,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Q-touch 433MHz 1 Gang No Neutral {"NAME":"QWP_W1_WIFI-TOUCH","GPIO":[32,1,1,1,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":28}
|
||||
Q-touch 433MHz 2 Gang No Neutral {"NAME":"QWP_W2_WIFI-TOUCH","GPIO":[32,1,1,1,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":29}
|
||||
Qualitel 1 Gang {"NAME":"Qualitel 1 Gang","GPIO":[544,0,0,160,224,0,0,0,0,0,288,0,0,0],"FLAG":0,"BASE":18}
|
||||
Qualitel 2-Gang {"NAME":"Qualitel 2 Gang","GPIO":[544,0,289,0,0,161,0,0,160,224,0,225,288,0],"FLAG":0,"BASE":18}
|
||||
Qualitel 3 Gang {"NAME":"Qualitel 3 Gang","GPIO":[544,0,290,161,225,162,0,0,160,224,289,226,288,0],"FLAG":0,"BASE":18}
|
||||
@ -2488,7 +2557,7 @@ ZUCZUG 3 Gang {"NAME":"2ph105626a x3","GPIO":[0,288,0,32,34,33,0,
|
||||
```
|
||||
AGL Modulo Relay 01 Canal {"NAME":"AGL-Basic","GPIO":[0,1,0,0,224,32,0,0,0,0,320,0,0,0],"FLAG":0,"BASE":18}
|
||||
Albohes 2 Channel {"NAME":"Albohes SH-08","GPIO":[0,3200,33,3232,321,320,0,0,224,544,32,0,225,1],"FLAG":0,"BASE":18}
|
||||
Athom 10A {"NAME":"CB01-TAS-1","GPIO":[0,0,0,32,576,0,0,0,0,224,0,0,0,1],"FLAG":0,"BASE":18}
|
||||
Athom 10A {"NAME":"CB01-TAS-1","GPIO":[0,0,0,32,320,0,0,0,0,224,0,0,0,1],"FLAG":0,"BASE":18}
|
||||
Athom 2Ch Inching/Self-locking {"NAME":"Athom R02","GPIO":[1,1,1,1,225,224,1,1,1,1,1,1,576,0],"FLAG":0,"BASE":18}
|
||||
Athom 3-Way Mini Relay {"NAME":"RS01-TAS-1","GPIO":[0,0,0,32,576,0,0,0,0,224,160,0,0,0],"FLAG":0,"BASE":18}
|
||||
Athom 4Ch Inching/Self-locking 10A {"NAME":"Athom R04","GPIO":[1,1,1,1,32,576,1,1,226,227,225,1,224,0],"FLAG":0,"BASE":18}
|
||||
@ -2522,7 +2591,7 @@ LoveAnna AC85-250V 10A {"NAME":"2xSwitch No RF LoveAnna","GPIO":[32,0,0,0,
|
||||
Luani HVIO {"NAME":"Luani HVIO","GPIO":[0,1,1,1,224,225,0,0,160,161,1,288,0,4704],"FLAG":0,"BASE":35}
|
||||
Milfra Smart {"NAME":"Milfra Smart Module TB41","GPIO":[576,0,0,225,2688,2656,0,0,2592,193,480,224,192,0],"FLAG":0,"BASE":18}
|
||||
Moes {"NAME":"Moes MS-104B","GPIO":[0,0,32,0,480,0,0,0,161,160,224,225,0,0],"FLAG":0,"BASE":18}
|
||||
Nedis 10A {"NAME":"Nedis WIFIPS10WT","GPIO":[0,0,0,0,21,0,0,0,17,57,0,52,0,0],"FLAG":0,"BASE":18}
|
||||
Nedis 10A {"NAME":"Nedis WIFIPS10WT","GPIO":[0,0,0,0,224,0,0,0,32,321,0,288,0,0],"FLAG":0,"BASE":18}
|
||||
Nova Digital Basic 1 MS101 {"NAME":"NovaDigBasic1","GPIO":[0,1,0,1,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
PPA Contatto Wi-Fi {"NAME":"PPA Contatto","GPIO":[0,0,32,0,224,162,0,0,288,225,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
PS-1604 16A {"NAME":"PS-1604 16A","GPIO":[32,1,1,1,1,0,0,0,224,320,1,0,0,0],"FLAG":0,"BASE":1}
|
||||
@ -2534,10 +2603,10 @@ Shelly 1L No Neutral {"NAME":"Shelly 1L","GPIO":[320,0,0,0,192,224,0,0,0
|
||||
Shelly 1PM {"NAME":"Shelly 1PM","GPIO":[320,0,0,0,192,2720,0,0,0,0,0,224,0,4736],"FLAG":0,"BASE":18}
|
||||
Shelly 2 {"NAME":"Shelly 2","GPIO":[0,2752,0,2784,224,225,0,0,160,0,161,2816,0,0],"FLAG":0,"BASE":47}
|
||||
Shelly 2.5 {"NAME":"Shelly 2.5","GPIO":[320,0,0,0,224,193,0,0,640,192,608,225,3456,4736],"FLAG":0,"BASE":18}
|
||||
Shelly EM {"NAME":"Shelly EM","GPIO":[0,0,0,0,0,0,0,0,640,3456,608,224,0,1],"FLAG":0,"BASE":18}
|
||||
Shelly EM {"NAME":"Shelly EM","GPIO":[0,0,0,0,0,0,0,0,640,3457,608,224,8832,1],"FLAG":0,"BASE":18}
|
||||
Shelly i3 Action and Scenes Activation Device {"NAME":"Shelly i3","GPIO":[0,0,0,0,0,320,0,0,193,194,192,0,0,4736],"FLAG":0,"BASE":18}
|
||||
Shelly Plus 1 {"NAME":"Shelly Plus 1 ","GPIO":[0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Shelly Plus 1PM {"NAME":"Shelly Plus 1PM","GPIO":[0,0,0,0,192,2720,0,0,0,0,0,0,0,0,2656,0,0,0,0,2624,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Shelly Plus 1PM {"NAME":"Shelly Plus 1PM","GPIO":[0,0,0,0,192,2720,0,0,0,0,0,0,0,0,2656,0,0,0,0,2624,0,32,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Shelly Plus 2PM {"NAME":"Shelly Plus 2PM PCB v0.1.9","GPIO":[320,0,0,0,32,192,0,0,225,224,0,0,0,0,193,0,0,0,0,0,0,608,640,3456,0,0,0,0,0,0,0,4736,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"AdcParam1 2,10000,10000,3350"}
|
||||
Shelly Plus i4 {"NAME":"Shelly Plus i4","GPIO":[0,0,0,0,0,0,0,0,192,0,193,0,0,0,0,0,0,0,0,0,0,0,195,194,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"SwitchMode1 1 | SwitchMode2 1 | SwitchMode3 1 | SwitchMode4 1 | SwitchTopic 0 | SetOption114 1"}
|
||||
Sinilink USB {"NAME":"XY-WFUSB","GPIO":[1,1,0,1,32,224,0,0,0,0,320,0,544,0],"FLAG":0,"BASE":18}
|
||||
@ -2594,7 +2663,8 @@ Shelly Add-on {"NAME":"Shelly 1 Temp ","GPIO":[1344,0,0,1312,224,
|
||||
## Thermostat
|
||||
```
|
||||
Floor Heating or Water/Gas Boiler {"NAME":"ME81H Thermostat","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54}
|
||||
Moes Floor Heating or Water/Gas Boiler Wall {"NAME":"WHT-HY609-GB-WH-MS","GPIO":[0,2304,0,2272,0,0,0,0,0,0,896,928,0,0],"FLAG":0,"BASE":54}
|
||||
Lytko 101 {"NAME":"Lytko 101","GPIO":[1,7584,1312,1,1792,1824,0,0,1,1,1,224,1,4736],"FLAG":0,"BASE":18}
|
||||
Moes Floor Heating or Water/Gas Boiler Wall {"NAME":"WHT-HY609-GB-WH-MS","GPIO":[0,2304,0,2272,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
Mysa V1 Electric Baseboard Heater {"NAME":"Mysa Thermostat","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,640,608,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
```
|
||||
|
||||
@ -2613,8 +2683,9 @@ Tuya Gas/Water {"NAME":"Valve FM101","GPIO":[320,0,0,0,224,0,0,0,0
|
||||
## Wall Outlet
|
||||
```
|
||||
2AC 1USB {"NAME":"SM-SW801U","GPIO":[0,0,0,0,288,32,0,0,224,0,225,0,226,0],"FLAG":0,"BASE":18}
|
||||
Aigostar P40 {"NAME":"Aigostar 8433325212278","GPIO":[0,0,0,0,544,288,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Aseer THWFS01 {"NAME":"ASEER-THWFS01","GPIO":[320,33,544,323,2720,2656,0,0,2624,225,321,224,32,0],"FLAG":0,"BASE":18}
|
||||
Athom {"NAME":"Athom SK01","GPIO":[0,0,0,3104,0,32,0,0,224,576,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Athom {"NAME":"Athom SK01","GPIO":[0,0,0,3104,0,32,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Bestten LO-2-W {"NAME":"BESTTEN LO-2-W","GPIO":[0,0,0,0,576,32,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
BingoElec 16A {"NAME":"BingoElecPower","GPIO":[0,0,0,0,288,289,1,1,224,32,0,0,1,1],"FLAG":0,"BASE":18}
|
||||
BlitzWolf SHP8 {"NAME":"SHP8","GPIO":[0,320,0,32,2720,2656,0,0,2624,289,224,0,0,0],"FLAG":0,"BASE":64}
|
||||
@ -2632,6 +2703,7 @@ Kapok T16 {"NAME":"tiltech-t16","GPIO":[0,320,0,32,192,0,0,0,
|
||||
Kesen KS-604 {"NAME":"KS-604","GPIO":[1,1,288,1,1,33,0,0,225,224,1,1,32,0],"FLAG":0,"BASE":18}
|
||||
Kesen KS-604S {"NAME":"KS-604S","GPIO":[1,1,258,1,1,33,0,0,225,224,1,1,32,4704],"FLAG":0,"BASE":18}
|
||||
Keygma KS-15TW {"NAME":"Keygma KS-15T","GPIO":[0,0,0,0,0,320,0,0,224,160,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Knightsbridge Dual Waterproof {"NAME":"Knightsbridge Dual Socket","GPIO":[321,544,320,544,225,0,0,0,0,33,0,224,32,0],"FLAG":0,"BASE":18}
|
||||
KS-621 {"NAME":"KS-621","GPIO":[32,0,0,0,2688,2656,0,0,2592,288,0,224,65,1],"FLAG":0,"BASE":18}
|
||||
Makegood MG-AUWF01 {"NAME":"MG-AUWF01","GPIO":[320,161,544,323,2720,2656,0,0,2624,225,321,224,160,0],"FLAG":0,"BASE":18}
|
||||
Makegood MG-UKWSG01 {"NAME":"Aseer 2-Gang","GPIO":[321,160,544,323,2720,2656,0,0,2624,224,320,225,161,0],"FLAG":0,"BASE":18}
|
||||
@ -2649,8 +2721,8 @@ Steren Dual Plug and USB Charger {"NAME":"Steren_SHOME-118","GPIO":[0,576,0,32,
|
||||
T16E Dual USB 10A {"NAME":"T16E 10A","GPIO":[0,0,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18}
|
||||
TCP Smart Dual {"NAME":"TCP TAUWIS2GUK","GPIO":[33,0,0,0,0,224,32,0,225,544,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Teckin SR40 {"NAME":"RF-SR40-US","GPIO":[576,0,0,32,320,33,0,0,225,224,321,226,0,0],"FLAG":0,"BASE":18}
|
||||
TopGreener {"NAME":"TGWF15RM","GPIO":[0,320,0,32,2720,2656,0,0,2624,321,224,0,0,0],"FLAG":0,"BASE":55}
|
||||
TopGreener Dual USB {"NAME":"TGWF215U2A","GPIO":[0,320,0,32,2720,2656,0,0,2624,225,224,321,0,0],"FLAG":0,"BASE":18}
|
||||
TopGreener TGWF15RM {"NAME":"TGWF15RM","GPIO":[0,320,0,32,2720,2656,0,0,2624,321,224,0,0,0],"FLAG":0,"BASE":55}
|
||||
Vigica VGSPK00815 {"NAME":"VIGICA outlet","GPIO":[32,1,1,1,1,225,33,1,224,1,1,1,1,4704],"FLAG":0,"BASE":18}
|
||||
Virage Labs ViragePlug {"NAME":"ViragePlug","GPIO":[544,0,0,32,320,33,0,0,225,224,320,226,0,0],"FLAG":0,"BASE":18}
|
||||
Woox Dual {"NAME":"Woox R4053","GPIO":[33,0,0,0,0,224,32,0,225,320,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
@ -2659,12 +2731,14 @@ Xenon 2AC 1USB {"NAME":"Xenon SM-PW801-U1","GPIO":[0,0,0,0,288,32,
|
||||
|
||||
## Water Sensor
|
||||
```
|
||||
Nedis SmartLife Water Detector {"NAME":"Nedis WIFIDW10WT","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 51,21"}
|
||||
W06 {"NAME":"W06 Water Sensor","GPIO":[0,3200,0,3232,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18}
|
||||
Y09 {"NAME":"Y09","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
|
||||
```
|
||||
|
||||
## Zigbee Gateway
|
||||
```
|
||||
Athom ESP32 Ethernet {"NAME":"Athom ZG01","GPIO":[32,0,0,0,0,0,0,0,5472,0,5504,544,0,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,1,5792,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Eachen eWeLink ZbBridge Pro Ethernet {"NAME":"ZB-GW03-V1.2","GPIO":[0,0,3552,0,3584,0,0,0,5793,5792,320,544,5536,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,608,640,32,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
Sonoff ZBBridge {"NAME":"Sonoff ZbBridge","GPIO":[320,3552,0,3584,5312,0,0,0,640,576,608,0,32,0],"FLAG":0,"BASE":75}
|
||||
Sonoff ZBBridge Pro {"NAME":"Sonoff Zigbee Pro","GPIO":[0,0,576,0,480,0,0,0,0,1,1,5792,0,0,0,3552,0,320,5793,3584,0,640,608,32,0,0,0,0,0,1,0,0,0,0,0,0],"FLAG":0,"BASE":1}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DCAMERA_MODEL_AI_THINKER -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",
|
||||
"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": "dio",
|
||||
@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "AI Thinker ESP32-CAM, 4M Flash 4MB PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32 >= 4M Flash, PSRAM with fix, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
@ -41,6 +41,6 @@
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://wiki.ai-thinker.com/esp32-cam",
|
||||
"vendor": "AI Thinker"
|
||||
"url": "https://en.wikipedia.org/wiki/ESP32",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"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": "qio",
|
||||
"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"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"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"
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M",
|
||||
"f_cpu": "80000000L",
|
||||
"f_cpu": "160000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"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"
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"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"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"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"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"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"
|
||||
}
|
@ -4,8 +4,8 @@
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DCORE32SOLO1",
|
||||
"f_cpu": "80000000L",
|
||||
"extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DCORE32SOLO1",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
@ -25,7 +25,7 @@
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32 >= 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
@ -23,7 +23,7 @@
|
||||
"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": [
|
||||
|
@ -23,7 +23,7 @@
|
||||
"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": [
|
||||
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"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": "dio",
|
||||
"mcu": "esp32c3",
|
||||
"variant": "esp32c3",
|
||||
"partitions": "partitions/esp32_partition_app1856k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32c3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-C3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"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"
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S2 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
|
@ -1,35 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s2_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 -DESP32S2",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32s2",
|
||||
"variant": "esp32s2",
|
||||
"partitions": "partitions/esp32_partition_app1856k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"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/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S2 >= 4M Flash PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
|
@ -2,16 +2,16 @@
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_qspi"
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"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",
|
||||
"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": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs2M.csv"
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
@ -25,11 +25,19 @@
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 8M Flash, Tasmota 2944k Code/OTA, 2112k FS",
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash OPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "8MB",
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
||||
[
|
||||
"0x10000",
|
||||
"variants/tasmota/tasmota32s3-safeboot.bin"
|
||||
]
|
||||
]
|
||||
},
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 8388608,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
@ -25,7 +25,7 @@
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash QSPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
@ -1,40 +0,0 @@
|
||||
{
|
||||
"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": "qio",
|
||||
"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"
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DCAMERA_MODEL_TTGO_T_CAM_SIM -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": "qio",
|
||||
"hwids": [
|
||||
[
|
||||
"0x303A",
|
||||
"0x1001"
|
||||
]
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": [
|
||||
"esp-builtin"
|
||||
],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "LilyGo T-SIMCAM ESP32-S3 16M Flash 8MB OPI PSRAM, Tasmota 2944k 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://github.com/Xinyuan-LilyGO/LilyGo-Camera-Series",
|
||||
"vendor": "LilyGo"
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DCAMERA_MODEL_ESP32S3_EYE -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DUSE_USB_CDC_CONSOLE -DESP32_8M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [
|
||||
[
|
||||
"0x303A",
|
||||
"0x1001"
|
||||
]
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs2M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": [
|
||||
"esp-builtin"
|
||||
],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "ESP32-S3-EYE 8M Flash 8MB OPI PSRAM, Tasmota 2944k Code/OTA, 2M FS",
|
||||
"upload": {
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 8388608,
|
||||
"require_upload_port": true,
|
||||
"before_reset": "usb_reset",
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP32-S3-EYE_Getting_Started_Guide.md",
|
||||
"vendor": "Espressif"
|
||||
}
|
@ -2,16 +2,22 @@
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_qspi"
|
||||
"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_4M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [
|
||||
[
|
||||
"0x303A",
|
||||
"0x1001"
|
||||
]
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app1856k_fs320k.csv"
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
@ -19,14 +25,26 @@
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": [
|
||||
"esp-builtin"
|
||||
],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash OPI PSRAM, 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,
|
@ -9,6 +9,12 @@
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [
|
||||
[
|
||||
"0x303A",
|
||||
"0x1001"
|
||||
]
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2880k_fs320k.csv"
|
||||
@ -19,13 +25,17 @@
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": [
|
||||
"esp-builtin"
|
||||
],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"name": "Espressif Generic ESP32-S3 >= 4M Flash QSPI PSRAM, Tasmota 2880k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"arduino": {
|
||||
"flash_extra_images": [
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
"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_8M -DESP32S3",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [
|
||||
[
|
||||
"0x303A",
|
||||
"0x1001"
|
||||
]
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "partitions/esp32_partition_app2944k_fs10M.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": "esp-builtin",
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "LilyGo T-Display-S3 16M Flash 8MB OPI PSRAM, Tasmota 2944k 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://github.com/Xinyuan-LilyGO/T-Display-S3",
|
||||
"vendor": "LilyGo"
|
||||
}
|
@ -208,9 +208,12 @@ 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;
|
||||
}
|
||||
@ -224,8 +227,10 @@ 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; }
|
||||
if (fmt_cpy == nullptr) { return 0; } // we couldn't copy the format, abort
|
||||
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
|
||||
@ -277,6 +282,7 @@ 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;
|
||||
@ -292,6 +298,7 @@ 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;
|
||||
@ -299,6 +306,28 @@ int32_t ext_vsnprintf_P(char * out_buf, size_t buf_len, const char * fmt_P, va_l
|
||||
}
|
||||
}
|
||||
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;
|
||||
@ -307,6 +336,7 @@ 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;
|
||||
@ -350,6 +380,7 @@ 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;
|
||||
}
|
||||
}
|
||||
@ -363,24 +394,11 @@ 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;
|
||||
// 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
|
||||
@ -392,9 +410,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
|
||||
@ -407,12 +425,18 @@ 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "TasmotaSerial",
|
||||
"version": "3.5.0",
|
||||
"version": "3.6.0",
|
||||
"keywords": [
|
||||
"serial", "io", "TasmotaSerial"
|
||||
],
|
@ -1,5 +1,5 @@
|
||||
name=TasmotaSerial
|
||||
version=3.5.0
|
||||
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.
|
@ -46,14 +46,18 @@ static uint32_t tasmota_serial_uart_bitmap = 0; // Assigned UARTs
|
||||
|
||||
TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback, int nwmode, int buffer_size) {
|
||||
m_valid = false;
|
||||
m_tx_enable_valid = false;
|
||||
m_hardserial = false;
|
||||
m_hardswap = false;
|
||||
m_overflow = false;
|
||||
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_in_pos = m_out_pos = 0;
|
||||
m_in_pos = 0;
|
||||
m_out_pos = 0;
|
||||
#ifdef ESP8266
|
||||
if (!((isValidGPIOpin(receive_pin)) && (isValidGPIOpin(transmit_pin) || transmit_pin == 16))) {
|
||||
return;
|
||||
@ -95,7 +99,7 @@ TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fal
|
||||
void TasmotaSerial::end(bool turnOffDebug) {
|
||||
#ifdef ESP8266
|
||||
if (m_hardserial) {
|
||||
Serial.end();
|
||||
// Serial.end(); // Keep active for logging
|
||||
} else {
|
||||
if (m_rx_pin > -1) {
|
||||
detachInterrupt(m_rx_pin);
|
||||
@ -120,7 +124,23 @@ TasmotaSerial::~TasmotaSerial(void) {
|
||||
}
|
||||
|
||||
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) {
|
||||
if ((tx_enable_pin > -1) && isValidGPIOpin(tx_enable_pin)) {
|
||||
m_tx_enable_valid = true;
|
||||
m_tx_enable_pin = tx_enable_pin;
|
||||
pinMode(m_tx_enable_pin, OUTPUT);
|
||||
digitalWrite(m_tx_enable_pin, LOW);
|
||||
} else {
|
||||
m_tx_enable_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
@ -134,12 +154,70 @@ bool TasmotaSerial::freeUart(void) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TasmotaSerial::Esp32Begin(void) {
|
||||
TSerial->begin(m_speed, m_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 (m_speed <= 9600) {
|
||||
// At 9600, 10 chars are ~10ms
|
||||
uart_set_rx_full_threshold(m_uart, 10);
|
||||
} 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 {
|
||||
// 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 (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);
|
||||
@ -157,10 +235,10 @@ bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||
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;
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
delay(10); // Allow time to cleanup queues - if not used hangs ESP32
|
||||
TSerial = &Serial;
|
||||
} else {
|
||||
TSerial = new HardwareSerial(m_uart);
|
||||
}
|
||||
@ -173,34 +251,23 @@ bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||
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);
|
||||
}
|
||||
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 = ((config &0x30) >> 5) +1;
|
||||
m_stop_bits = 1 + ((config &0x30) >> 5);
|
||||
// #define UART_PARITY_NONE 0B00000000
|
||||
// #define UART_PARITY_EVEN 0B00000010
|
||||
// #define UART_PARITY_ODD 0B00000011
|
||||
@ -216,6 +283,10 @@ bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
void TasmotaSerial::setReadChunkMode(bool mode) {
|
||||
m_very_high_speed = mode;
|
||||
}
|
||||
|
||||
bool TasmotaSerial::hardwareSerial(void) {
|
||||
#ifdef ESP8266
|
||||
return m_hardserial;
|
||||
@ -225,6 +296,21 @@ bool TasmotaSerial::hardwareSerial(void) {
|
||||
#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
|
||||
@ -235,7 +321,8 @@ void TasmotaSerial::flush(void) {
|
||||
while (TSerial->available()) { TSerial->read(); }
|
||||
#endif // ESP32
|
||||
} else {
|
||||
m_in_pos = m_out_pos = 0;
|
||||
m_in_pos = 0;
|
||||
m_out_pos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,7 +349,9 @@ int TasmotaSerial::read(void) {
|
||||
return TSerial->read();
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) return -1;
|
||||
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;
|
||||
@ -278,9 +367,11 @@ size_t TasmotaSerial::read(char* buffer, size_t size) {
|
||||
return TSerial->read(buffer, size);
|
||||
#endif // ESP32
|
||||
} else {
|
||||
if ((-1 == m_rx_pin) || (m_in_pos == m_out_pos)) { return 0; }
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
@ -299,13 +390,18 @@ int TasmotaSerial::available(void) {
|
||||
} 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 { 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 { 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) {
|
||||
@ -314,7 +410,7 @@ void IRAM_ATTR TasmotaSerial::_fast_write(uint8_t b) {
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND_FAST;
|
||||
for (uint32_t i = 0; i < 8; i++) {
|
||||
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;
|
||||
@ -327,15 +423,20 @@ void IRAM_ATTR TasmotaSerial::_fast_write(uint8_t b) {
|
||||
}
|
||||
|
||||
size_t TasmotaSerial::write(uint8_t b) {
|
||||
if (!m_hardserial && (-1 == m_tx_pin)) { return 0; }
|
||||
|
||||
if (m_tx_enable_valid) {
|
||||
digitalWrite(m_tx_enable_pin, HIGH);
|
||||
}
|
||||
size_t size = 0;
|
||||
if (m_hardserial) {
|
||||
#ifdef ESP8266
|
||||
return Serial.write(b);
|
||||
size = Serial.write(b);
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
return TSerial->write(b);
|
||||
size = 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);
|
||||
@ -347,7 +448,7 @@ size_t TasmotaSerial::write(uint8_t b) {
|
||||
// Start bit;
|
||||
digitalWrite(m_tx_pin, LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
for (uint32_t i = 0; i < 8; i++) {
|
||||
for (uint32_t i = 0; i < m_data_bits; i++) {
|
||||
digitalWrite(m_tx_pin, (b & 1) ? HIGH : LOW);
|
||||
TM_SERIAL_WAIT_SND;
|
||||
b >>= 1;
|
||||
@ -359,30 +460,42 @@ size_t TasmotaSerial::write(uint8_t b) {
|
||||
TM_SERIAL_WAIT_SND;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
size = 1;
|
||||
}
|
||||
if (m_tx_enable_valid) {
|
||||
digitalWrite(m_tx_enable_pin, LOW);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
if (!m_nwmode) {
|
||||
int32_t loop_read = m_very_high_speed ? serial_buffer_size : 1;
|
||||
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;
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
while (loop_read-- > 0) { // try to receveive all consecutive bytes in a raw
|
||||
// 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 < 8; i++) {
|
||||
for (uint32_t i = 0; i < m_data_bits; i++) {
|
||||
TM_SERIAL_WAIT_RCV;
|
||||
rec >>= 1;
|
||||
if (digitalRead(m_rx_pin)) rec |= 0x80;
|
||||
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 != (int)m_out_pos) {
|
||||
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
|
||||
@ -415,6 +528,7 @@ void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
// 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;
|
||||
|
||||
@ -444,7 +558,7 @@ void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
}
|
||||
//stobyte(0,ssp->ss_byte>>1);
|
||||
uint32_t next = (m_in_pos + 1) % serial_buffer_size;
|
||||
if (next != (uint32_t)m_out_pos) {
|
||||
if (next != m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
||||
@ -458,7 +572,7 @@ void IRAM_ATTR TasmotaSerial::rxRead(void) {
|
||||
// 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) {
|
||||
if (next != m_out_pos) {
|
||||
m_buffer[m_in_pos] = ss_byte >> 1;
|
||||
m_in_pos = next;
|
||||
}
|
@ -39,6 +39,10 @@ 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();
|
||||
void setTransmitEnablePin(int tx_enable_pin);
|
||||
|
||||
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(bool turnOffDebug = true);
|
||||
@ -48,6 +52,10 @@ class TasmotaSerial : public Stream {
|
||||
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;
|
||||
|
||||
@ -57,20 +65,25 @@ class TasmotaSerial : public Stream {
|
||||
#ifdef ESP32
|
||||
uint32_t getUart(void) const { return m_uart; }
|
||||
#endif
|
||||
bool isValid() { return m_valid; }
|
||||
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
|
||||
size_t txWrite(uint8_t byte);
|
||||
|
||||
// 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;
|
||||
@ -80,18 +93,19 @@ class TasmotaSerial : public Stream {
|
||||
uint32_t m_bit_follow_metric = 0;
|
||||
uint32_t m_in_pos;
|
||||
uint32_t m_out_pos;
|
||||
uint32_t serial_buffer_size;
|
||||
uint32_t serial_buffer_size = TM_SERIAL_BUFFER_SIZE;
|
||||
bool m_valid;
|
||||
bool m_tx_enable_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
|
||||
uint8_t *m_buffer;
|
||||
|
||||
void _fast_write(uint8_t b); // IRAM minimized version
|
||||
|
||||
uint8_t *m_buffer = nullptr;
|
||||
#ifdef ESP32
|
||||
uint32_t m_speed;
|
||||
uint32_t m_config;
|
||||
HardwareSerial *TSerial;
|
||||
int m_uart = 0;
|
||||
#endif
|
@ -370,6 +370,9 @@ uint64_t JsonParserToken::getULong(void) const { return getULong(0); }
|
||||
float JsonParserToken::getFloat(void) const { return getFloat(0); }
|
||||
const char * JsonParserToken::getStr(void) const { return getStr(""); }
|
||||
|
||||
bool JsonParserObject::getBool(const char * needle, bool val) const {
|
||||
return (*this)[needle].getBool(val);
|
||||
}
|
||||
int32_t JsonParserObject::getInt(const char * needle, int32_t val) const {
|
||||
return (*this)[needle].getInt(val);
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ public:
|
||||
const char * findConstCharNull(const char * needle) const;
|
||||
|
||||
// all-in-one methods: search for key (case insensitive), convert value and set default
|
||||
bool getBool(const char *, bool val) const;
|
||||
int32_t getInt(const char *, int32_t) const;
|
||||
uint32_t getUInt(const char *, uint32_t) const;
|
||||
uint64_t getULong(const char *, uint64_t) const;
|
||||
|
@ -27,8 +27,9 @@ enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_D
|
||||
|
||||
//#define TASMOTAMODBUSDEBUG
|
||||
|
||||
TasmotaModbus::TasmotaModbus(int receive_pin, int transmit_pin) : TasmotaSerial(receive_pin, transmit_pin, 1)
|
||||
TasmotaModbus::TasmotaModbus(int receive_pin, int transmit_pin, int tx_enable_pin) : TasmotaSerial(receive_pin, transmit_pin, 1)
|
||||
{
|
||||
setTransmitEnablePin(tx_enable_pin);
|
||||
mb_address = 0;
|
||||
}
|
||||
|
||||
@ -91,7 +92,7 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
||||
}
|
||||
else if ((function_code == 5) || (function_code == 6))
|
||||
{
|
||||
if (write_data == NULL)
|
||||
if (write_data == NULL)
|
||||
{
|
||||
free(frame);
|
||||
return 13; // Register data not specified
|
||||
@ -108,10 +109,10 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
||||
{
|
||||
frame[framepointer++] = (uint8_t)(count >> 8); // MSB
|
||||
frame[framepointer++] = (uint8_t)(count); // LSB
|
||||
|
||||
|
||||
frame[framepointer++] = byte_count;
|
||||
|
||||
if (write_data == NULL)
|
||||
if (write_data == NULL)
|
||||
{
|
||||
free(frame);
|
||||
return 13; // Register data not specified
|
||||
@ -126,7 +127,7 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
||||
frame[framepointer++] = (uint8_t)(write_data[bytepointer/2] >> (bytepointer % 2 ? 0 : 8)); // MSB, LSB, MSB ....
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
free(frame);
|
||||
return 1; // Wrong function code
|
||||
@ -136,7 +137,7 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
||||
frame[framepointer++] = (uint8_t)(crc);
|
||||
frame[framepointer++] = (uint8_t)(crc >> 8);
|
||||
|
||||
#ifdef TASMOTAMODBUSDEBUG
|
||||
#ifdef TASMOTAMODBUSDEBUG
|
||||
uint8_t *buf;
|
||||
uint16_t bufsize=(framepointer + 1) * 3;
|
||||
buf = (uint8_t *)malloc(bufsize);
|
||||
@ -147,7 +148,7 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
||||
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("MBS: Serial Send: %s"), buf);
|
||||
free(buf);
|
||||
#endif
|
||||
|
||||
|
||||
flush();
|
||||
write(frame, framepointer);
|
||||
free(frame);
|
||||
@ -213,7 +214,7 @@ uint8_t TasmotaModbus::ReceiveBuffer(uint8_t *buffer, uint8_t register_count, ui
|
||||
// 10 = Gateway Path Unavailable
|
||||
// 11 = Gateway Target device failed to respond
|
||||
}
|
||||
|
||||
|
||||
if (mb_len < 6) { return 7; } // 7 = Not enough data
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
class TasmotaModbus : public TasmotaSerial {
|
||||
public:
|
||||
TasmotaModbus(int receive_pin, int transmit_pin);
|
||||
TasmotaModbus(int receive_pin, int transmit_pin, int tx_enable_pin = -1);
|
||||
virtual ~TasmotaModbus() {}
|
||||
|
||||
int Begin(long speed = TM_MODBUS_BAUDRATE, uint32_t config = SERIAL_8N1);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -670,10 +670,10 @@ Renderer *uDisplay::Init(void) {
|
||||
}
|
||||
} else {
|
||||
for (uint32_t cnt = 0; cnt < 8; cnt ++) {
|
||||
bus_config.data_gpio_nums[cnt] = par_dbh[cnt];
|
||||
bus_config.data_gpio_nums[cnt] = par_dbl[cnt];
|
||||
}
|
||||
for (uint32_t cnt = 0; cnt < 8; cnt ++) {
|
||||
bus_config.data_gpio_nums[cnt + 8] = par_dbl[cnt];
|
||||
bus_config.data_gpio_nums[cnt + 8] = par_dbh[cnt];
|
||||
}
|
||||
}
|
||||
|
||||
@ -2490,6 +2490,8 @@ void uDisplay::_setup_dma_desc_links(const uint8_t *data, int32_t len) {
|
||||
*/
|
||||
}
|
||||
|
||||
#define WAIT_LCD_NOT_BUSY while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
|
||||
|
||||
void uDisplay::pb_beginTransaction(void) {
|
||||
auto dev = _dev;
|
||||
@ -2533,84 +2535,60 @@ bool uDisplay::pb_busy(void) {
|
||||
}
|
||||
|
||||
bool uDisplay::pb_writeCommand(uint32_t data, uint_fast8_t bit_length) {
|
||||
if (interface == _UDSP_PAR8) {
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE | LCD_CAM_LCD_CD_CMD_SET;
|
||||
|
||||
if (interface == _UDSP_PAR8) {
|
||||
// 8bit bus
|
||||
auto bytes = bit_length >> 3;
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE | LCD_CAM_LCD_CD_CMD_SET;
|
||||
do {
|
||||
dev->lcd_cmd_val.lcd_cmd_value = data;
|
||||
data >>= 8;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
} while (--bytes);
|
||||
return true;
|
||||
} else {
|
||||
// 16 bit bus
|
||||
if (_has_align_data) { _send_align_data(); }
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE | LCD_CAM_LCD_CD_CMD_SET;
|
||||
} else {
|
||||
dev->lcd_cmd_val.val = data;
|
||||
|
||||
if (bit_length <= 16) {
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
return true;
|
||||
}
|
||||
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD_2_CYCLE_EN | LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void uDisplay::pb_writeData(uint32_t data, uint_fast8_t bit_length) {
|
||||
if (interface == _UDSP_PAR8) {
|
||||
auto bytes = bit_length >> 3;
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE;
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE;
|
||||
auto bytes = bit_length >> 3;
|
||||
|
||||
if (interface == _UDSP_PAR8) {
|
||||
uint8_t shift = (bytes - 1) * 8;
|
||||
for (uint32_t cnt = 0; cnt < bytes; cnt++) {
|
||||
dev->lcd_cmd_val.lcd_cmd_value = (data >> shift) & 0xff;
|
||||
shift -= 8;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
}
|
||||
return;
|
||||
|
||||
} else {
|
||||
auto bytes = bit_length >> 3;
|
||||
auto dev = _dev;
|
||||
auto reg_lcd_user = &(dev->lcd_user.val);
|
||||
dev->lcd_misc.val = LCD_CAM_LCD_CD_IDLE_EDGE;
|
||||
if (_has_align_data) {
|
||||
_has_align_data = false;
|
||||
dev->lcd_cmd_val.val = _align_data | (data << 8);
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
if (--bytes == 0) { return; }
|
||||
data >>= 8;
|
||||
if (bytes == 1 || bytes == 4) {
|
||||
uint8_t shift = (bytes - 1) * 8;
|
||||
for (uint32_t cnt = 0; cnt < bytes; cnt++) {
|
||||
dev->lcd_cmd_val.lcd_cmd_value = (data >> shift) & 0xff;
|
||||
shift -= 8;
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (bytes > 1) {
|
||||
dev->lcd_cmd_val.val = data;
|
||||
if (bytes == 4) {
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD_2_CYCLE_EN | LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
return;
|
||||
}
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
if (bytes == 2) { return; }
|
||||
data >>= 16;
|
||||
}
|
||||
_has_align_data = true;
|
||||
_align_data = data;
|
||||
dev->lcd_cmd_val.val = data;
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2626,7 +2604,7 @@ void uDisplay::pb_pushPixels(uint16_t* data, uint32_t length, bool swap_bytes, b
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
dev->lcd_cmd_val.lcd_cmd_value = *data >> 8;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
data++;
|
||||
}
|
||||
@ -2636,7 +2614,7 @@ void uDisplay::pb_pushPixels(uint16_t* data, uint32_t length, bool swap_bytes, b
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
dev->lcd_cmd_val.lcd_cmd_value = *data;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
data++;
|
||||
}
|
||||
@ -2648,14 +2626,13 @@ void uDisplay::pb_pushPixels(uint16_t* data, uint32_t length, bool swap_bytes, b
|
||||
iob = *data++;
|
||||
iob = (iob << 8) | (iob >> 8);
|
||||
dev->lcd_cmd_val.lcd_cmd_value = iob;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
data++;
|
||||
}
|
||||
} else {
|
||||
for (uint32_t cnt = 0; cnt < length; cnt++) {
|
||||
dev->lcd_cmd_val.lcd_cmd_value = *data++;
|
||||
while (*reg_lcd_user & LCD_CAM_LCD_START) {}
|
||||
WAIT_LCD_NOT_BUSY
|
||||
*reg_lcd_user = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG | LCD_CAM_LCD_START;
|
||||
}
|
||||
}
|
||||
|
@ -57,21 +57,21 @@
|
||||
/* Protocol description format
|
||||
*
|
||||
* {
|
||||
* Pulse length,
|
||||
*
|
||||
* Pulse length,
|
||||
*
|
||||
* PreambleFactor,
|
||||
* Preamble {high,low},
|
||||
*
|
||||
*
|
||||
* HeaderFactor,
|
||||
* Header {high,low},
|
||||
*
|
||||
*
|
||||
* "0" bit {high,low},
|
||||
* "1" bit {high,low},
|
||||
*
|
||||
*
|
||||
* Inverted Signal,
|
||||
* Guard time
|
||||
* }
|
||||
*
|
||||
*
|
||||
* Pulse length: pulse duration (Te) in microseconds,
|
||||
* for example 350
|
||||
* PreambleFactor: Number of high and low states to send
|
||||
@ -80,7 +80,7 @@
|
||||
* Preamble: Pulse shape which defines a preamble bit.
|
||||
* Sent ceil(PreambleFactor/2) times.
|
||||
* For example, {1, 2} with factor 3 would send
|
||||
* _ _
|
||||
* _ _
|
||||
* | |__| |__ (each horizontal bar has a duration of Te,
|
||||
* vertical bars are ignored)
|
||||
* HeaderFactor: Number of times to send the header pulse.
|
||||
@ -88,22 +88,22 @@
|
||||
* {1, 31} means one pulse of duration 1 Te high and 31 Te low
|
||||
* _
|
||||
* | |_______________________________ (don't count the vertical bars)
|
||||
*
|
||||
*
|
||||
* "0" bit: pulse shape defining a data bit, which is a logical "0"
|
||||
* {1, 3} means 1 pulse duration Te high level and 3 low
|
||||
* _
|
||||
* | |___
|
||||
*
|
||||
*
|
||||
* "1" bit: pulse shape that defines the data bit, which is a logical "1"
|
||||
* {3, 1} means 3 pulses with a duration of Te high level and 1 low
|
||||
* ___
|
||||
* | |_
|
||||
*
|
||||
* (note: to form the state bit Z (Tri-State bit), two codes are combined)
|
||||
*
|
||||
*
|
||||
* Inverted Signal: Signal inversion - if true the signal is inverted
|
||||
* replacing high to low in a transmitted / received packet
|
||||
* Guard time: Separation time between two retries. It will be followed by the
|
||||
* Guard time: Separation time between two retries. It will be followed by the
|
||||
* next preamble of the next packet. In number of Te.
|
||||
* e.g. 39 pulses of duration Te low level
|
||||
*/
|
||||
@ -149,8 +149,10 @@ static const RCSwitch::Protocol PROGMEM proto[] = {
|
||||
{ 400, 0, { 0, 0 }, 1, { 1, 1 }, { 1, 2 }, { 2, 1 }, false, 43 }, // 31 (Mertik Maxitrol G6R-H4T1)
|
||||
{ 365, 0, { 0, 0 }, 1, { 18, 1 }, { 3, 1 }, { 1, 3 }, true, 0 }, // 32 (1ByOne Doorbell) from @Fatbeard https://github.com/sui77/rc-switch/pull/277
|
||||
{ 340, 0, { 0, 0 }, 1, { 14, 4 }, { 1, 2 }, { 2, 1 }, false, 0 }, // 33 (Dooya Control DC2708L)
|
||||
{ 120, 0, { 0, 0 }, 1, { 1, 28 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 34 DIGOO SD10 - so as to use this protocol RCSWITCH_SEPARATION_LIMIT must be set to 2600
|
||||
{ 20, 0, { 0, 0 }, 1, { 239, 78 }, {20, 35 }, {35, 20}, false, 10000 } // 35 Dooya 5-Channel blinds remote DC1603
|
||||
{ 120, 0, { 0, 0 }, 1, { 1, 28 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 34 DIGOO SD10 - so as to use this protocol RCSWITCH_SEPARATION_LIMIT must be set to 2600
|
||||
{ 20, 0, { 0, 0 }, 1, { 239, 78 }, {20, 35 }, {35, 20}, false, 10000},// 35 Dooya 5-Channel blinds remote DC1603
|
||||
{ 250, 0, { 0, 0 }, 1, { 18, 6 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 36 Dooya remote DC2700AC for Dooya DT82TV curtains motor
|
||||
{ 200, 0, { 0, 0 }, 0, { 0, 0 }, { 1, 3 }, { 3, 1} , false, 20} // 37 DEWENWILS Power Strip
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -756,7 +758,7 @@ bool RECEIVE_ATTR RCSwitch::receiveProtocol(const int p, unsigned int changeCoun
|
||||
unsigned int sdelay = 0;
|
||||
if (syncLengthInPulses > 0) {
|
||||
sdelay = RCSwitch::timings[FirstTiming] / syncLengthInPulses;
|
||||
} else {
|
||||
} else if (pro.PreambleFactor > 0) {
|
||||
sdelay = RCSwitch::timings[FirstTiming-2] / pro.PreambleFactor;
|
||||
}
|
||||
const unsigned int delay = sdelay;
|
||||
|
@ -5,8 +5,8 @@
|
||||
*
|
||||
* Copyright (c) 2015 Markus Sattler. All rights reserved.
|
||||
* This file is part of the HTTPClient for Arduino.
|
||||
* Port to ESP32 by Evandro Luis Copercini (2017),
|
||||
* changed fingerprints to CA verification.
|
||||
* Port to ESP32 by Evandro Luis Copercini (2017),
|
||||
* changed fingerprints to CA verification.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -78,7 +78,7 @@ public:
|
||||
_recv(recv), _xmit(xmit)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<WiFiClient> create() override
|
||||
{
|
||||
std::unique_ptr<WiFiClient> p = std::unique_ptr<WiFiClient>(new BearSSL::WiFiClientSecure_light(_recv, _xmit));
|
||||
@ -569,6 +569,20 @@ int HTTPClientLight::PUT(String payload) {
|
||||
return PUT((uint8_t *) payload.c_str(), payload.length());
|
||||
}
|
||||
|
||||
/**
|
||||
* sends a delete request to the server
|
||||
* @param payload uint8_t *
|
||||
* @param size size_t
|
||||
* @return http code
|
||||
*/
|
||||
int HTTPClientLight::DELETE(uint8_t * payload, size_t size) {
|
||||
return sendRequest("DELETE", payload, size);
|
||||
}
|
||||
|
||||
int HTTPClientLight::DELETE(String payload) {
|
||||
return DELETE((uint8_t *) payload.c_str(), payload.length());
|
||||
}
|
||||
|
||||
/**
|
||||
* sendRequest
|
||||
* @param type const char * "GET", "POST", ....
|
||||
@ -601,7 +615,7 @@ int HTTPClientLight::sendRequest(const char * type, uint8_t * payload, size_t si
|
||||
}
|
||||
|
||||
log_d("request type: '%s' redirCount: %d\n", type, redirectCount);
|
||||
|
||||
|
||||
// connect to server
|
||||
if(!connect()) {
|
||||
if (_secure) {
|
||||
@ -640,7 +654,7 @@ int HTTPClientLight::sendRequest(const char * type, uint8_t * payload, size_t si
|
||||
//
|
||||
redirect = false;
|
||||
if (
|
||||
_followRedirects != HTTPC_DISABLE_FOLLOW_REDIRECTS &&
|
||||
_followRedirects != HTTPC_DISABLE_FOLLOW_REDIRECTS &&
|
||||
redirectCount < _redirectLimit &&
|
||||
_location.length() > 0
|
||||
) {
|
||||
@ -653,7 +667,7 @@ int HTTPClientLight::sendRequest(const char * type, uint8_t * payload, size_t si
|
||||
// (the RFC require user to accept the redirection)
|
||||
_followRedirects == HTTPC_FORCE_FOLLOW_REDIRECTS ||
|
||||
// allow GET and HEAD methods without force
|
||||
!strcmp(type, "GET") ||
|
||||
!strcmp(type, "GET") ||
|
||||
!strcmp(type, "HEAD")
|
||||
) {
|
||||
redirectCount += 1;
|
||||
@ -972,7 +986,7 @@ String HTTPClientLight::getString(void)
|
||||
// try to reserve needed memory (noop if _size == -1)
|
||||
if(sstring.reserve((_size + 1))) {
|
||||
writeToStream(&sstring);
|
||||
return sstring;
|
||||
return sstring;
|
||||
} else {
|
||||
log_d("not enough memory to reserve a string! need: %d", (_size + 1));
|
||||
}
|
||||
@ -1142,7 +1156,7 @@ bool HTTPClientLight::connect(void)
|
||||
log_d("transport level verify failed");
|
||||
_client->stop();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!_client->connect(_host.c_str(), _port, _connectTimeout)) {
|
||||
log_d("failed connect to %s:%u", _host.c_str(), _port);
|
||||
@ -1150,7 +1164,7 @@ bool HTTPClientLight::connect(void)
|
||||
}
|
||||
|
||||
// set Timeout for WiFiClient and for Stream::readBytesUntil() and Stream::readStringUntil()
|
||||
_client->setTimeout((_tcpTimeout + 500) / 1000);
|
||||
_client->setTimeout((_tcpTimeout + 500) / 1000);
|
||||
|
||||
log_d(" connected to %s:%u", _host.c_str(), _port);
|
||||
|
||||
@ -1362,8 +1376,8 @@ int HTTPClientLight::writeToStreamDataBlock(Stream * stream, int size)
|
||||
if(readBytes > buff_size) {
|
||||
readBytes = buff_size;
|
||||
}
|
||||
|
||||
// stop if no more reading
|
||||
|
||||
// stop if no more reading
|
||||
if (readBytes == 0)
|
||||
break;
|
||||
|
||||
@ -1491,8 +1505,8 @@ bool HTTPClientLight::setURL(const String& url)
|
||||
_port = (_protocol == "https" ? 443 : 80);
|
||||
}
|
||||
|
||||
// disconnect but preserve _client.
|
||||
// Also have to keep the connection otherwise it will free some of the memory used by _client
|
||||
// disconnect but preserve _client.
|
||||
// Also have to keep the connection otherwise it will free some of the memory used by _client
|
||||
// and will blow up later when trying to do _client->available() or similar
|
||||
_canReuse = true;
|
||||
disconnect(true);
|
||||
|
@ -5,8 +5,8 @@
|
||||
*
|
||||
* Copyright (c) 2015 Markus Sattler. All rights reserved.
|
||||
* This file is part of the HTTPClient for Arduino.
|
||||
* Port to ESP32 by Evandro Luis Copercini (2017),
|
||||
* changed fingerprints to CA verification.
|
||||
* Port to ESP32 by Evandro Luis Copercini (2017),
|
||||
* changed fingerprints to CA verification.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -154,7 +154,7 @@ public:
|
||||
~HTTPClientLight();
|
||||
|
||||
/*
|
||||
* Since both begin() functions take a reference to client as a parameter, you need to
|
||||
* Since both begin() functions take a reference to client as a parameter, you need to
|
||||
* ensure the client object lives the entire time of the HTTPClientLight
|
||||
*/
|
||||
// bool begin(WiFiClient &client, String url);
|
||||
@ -194,6 +194,8 @@ public:
|
||||
int POST(String payload);
|
||||
int PUT(uint8_t * payload, size_t size);
|
||||
int PUT(String payload);
|
||||
int DELETE(uint8_t * payload, size_t size);
|
||||
int DELETE(String payload);
|
||||
int sendRequest(const char * type, String payload);
|
||||
int sendRequest(const char * type, uint8_t * payload = NULL, size_t size = 0);
|
||||
int sendRequest(const char * type, Stream * stream, size_t size = 0);
|
||||
|
@ -1,233 +0,0 @@
|
||||
/*
|
||||
AddrList.h - cycle through lwIP netif's ip addresses like a c++ list
|
||||
Copyright (c) 2018 david gauchard. All right reserved.
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
/*
|
||||
This class allows to explore all configured IP addresses
|
||||
in lwIP netifs, with that kind of c++ loop:
|
||||
|
||||
for (auto a: addrList)
|
||||
out.printf("IF='%s' index=%d legacy=%d IPv4=%d local=%d hostname='%s' addr= %s\n",
|
||||
a.iface().c_str(),
|
||||
a.ifnumber(),
|
||||
a.addr().isLegacy(),
|
||||
a.addr().isV4(),
|
||||
a.addr().isLocal(),
|
||||
a.hostname().c_str(),
|
||||
a.addr().toString().c_str());
|
||||
|
||||
This loop:
|
||||
|
||||
while (WiFi.status() != WL_CONNECTED()) {
|
||||
Serial.print('.');
|
||||
delay(500);
|
||||
}
|
||||
|
||||
can be replaced by:
|
||||
|
||||
for (bool configured = false; !configured; ) {
|
||||
for (auto iface: addrList)
|
||||
if ((configured = !iface.addr().isLocal())
|
||||
break;
|
||||
Serial.print('.');
|
||||
delay(500);
|
||||
}
|
||||
|
||||
waiting for an IPv6 global address:
|
||||
|
||||
for (bool configured = false; !configured; ) {
|
||||
for (auto iface: addrList)
|
||||
if ((configured = ( !iface.addr().isV4()
|
||||
&& !iface.addr().isLocal())))
|
||||
break;
|
||||
Serial.print('.');
|
||||
delay(500);
|
||||
}
|
||||
|
||||
waiting for an IPv6 global address, on a specific interface:
|
||||
|
||||
for (bool configured = false; !configured; ) {
|
||||
for (auto iface: addrList)
|
||||
if ((configured = ( !iface.addr().isV4()
|
||||
&& !iface.addr().isLocal()
|
||||
&& iface.ifnumber() == STATION_IF)))
|
||||
break;
|
||||
Serial.print('.');
|
||||
delay(500);
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef __ADDRLIST_H
|
||||
#define __ADDRLIST_H
|
||||
|
||||
#include <IPAddress.h>
|
||||
#include <lwip/netif.h>
|
||||
|
||||
#if LWIP_IPV6
|
||||
#define IF_NUM_ADDRESSES (1 + LWIP_IPV6_NUM_ADDRESSES)
|
||||
#else
|
||||
#define IF_NUM_ADDRESSES (1)
|
||||
#endif
|
||||
|
||||
|
||||
namespace esp8266
|
||||
{
|
||||
|
||||
namespace AddressListImplementation
|
||||
{
|
||||
|
||||
|
||||
struct netifWrapper
|
||||
{
|
||||
netifWrapper (netif* netif) : _netif(netif), _num(-1) {}
|
||||
netifWrapper (const netifWrapper& o) : _netif(o._netif), _num(o._num) {}
|
||||
|
||||
netifWrapper& operator= (const netifWrapper& o)
|
||||
{
|
||||
_netif = o._netif;
|
||||
_num = o._num;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool equal(const netifWrapper& o)
|
||||
{
|
||||
return _netif == o._netif && (!_netif || _num == o._num);
|
||||
}
|
||||
|
||||
// address properties
|
||||
class IPAddress4 : public IPAddress
|
||||
{
|
||||
public:
|
||||
bool isV6() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool isLocal() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
IPAddress4 addr () const { return ipFromNetifNum(); }
|
||||
bool isLegacy () const { return _num == 0; }
|
||||
//bool isLocal () const { return addr().isLocal(); }
|
||||
bool isV4 () const { return addr().isV4(); }
|
||||
bool isV6 () const { return !addr().isV4(); }
|
||||
String toString() const { return addr().toString(); }
|
||||
|
||||
// related to legacy address (_num=0, ipv4)
|
||||
IPAddress ipv4 () const { return _netif->ip_addr; }
|
||||
IPAddress netmask () const { return _netif->netmask; }
|
||||
IPAddress gw () const { return _netif->gw; }
|
||||
|
||||
// common to all addresses of this interface
|
||||
String ifname () const { return String(_netif->name[0]) + _netif->name[1]; }
|
||||
const char* ifhostname () const { return _netif->hostname?: emptyString.c_str(); }
|
||||
const char* ifmac () const { return (const char*)_netif->hwaddr; }
|
||||
int ifnumber () const { return _netif->num; }
|
||||
bool ifUp () const { return !!(_netif->flags & NETIF_FLAG_UP); }
|
||||
const netif* interface () const { return _netif; }
|
||||
|
||||
const ip_addr_t* ipFromNetifNum () const
|
||||
{
|
||||
#if LWIP_IPV6
|
||||
return _num ? &_netif->ip6_addr[_num - 1] : &_netif->ip_addr;
|
||||
#else
|
||||
return &_netif->ip_addr;
|
||||
#endif
|
||||
}
|
||||
|
||||
// lwIP interface
|
||||
netif* _netif;
|
||||
|
||||
// address index within interface
|
||||
// 0: legacy address (IPv4)
|
||||
// n>0: (_num-1) is IPv6 index for netif->ip6_addr[]
|
||||
int _num;
|
||||
};
|
||||
|
||||
|
||||
class AddressListIterator
|
||||
{
|
||||
public:
|
||||
AddressListIterator (const netifWrapper& o) : netIf(o) {}
|
||||
AddressListIterator (netif* netif) : netIf(netif)
|
||||
{
|
||||
// This constructor is called with lwIP's global netif_list, or
|
||||
// nullptr. operator++() is designed to loop through _configured_
|
||||
// addresses. That's why netIf's _num is initialized to -1 to allow
|
||||
// returning the first usable address to AddressList::begin().
|
||||
(void)operator++();
|
||||
}
|
||||
|
||||
const netifWrapper& operator* () const { return netIf; }
|
||||
const netifWrapper* operator-> () const { return &netIf; }
|
||||
|
||||
bool operator== (AddressListIterator& o) { return netIf.equal(*o); }
|
||||
bool operator!= (AddressListIterator& o) { return !netIf.equal(*o); }
|
||||
|
||||
AddressListIterator operator++ (int)
|
||||
{
|
||||
AddressListIterator ret = *this;
|
||||
(void)operator++();
|
||||
return ret;
|
||||
}
|
||||
|
||||
AddressListIterator& operator++ ()
|
||||
{
|
||||
while (netIf._netif)
|
||||
{
|
||||
if (++netIf._num == IF_NUM_ADDRESSES)
|
||||
{
|
||||
// all addresses from current interface were iterated,
|
||||
// switching to next interface
|
||||
netIf = netifWrapper(netIf._netif->next);
|
||||
continue;
|
||||
}
|
||||
if (!ip_addr_isany(netIf.ipFromNetifNum()))
|
||||
// found an initialized address
|
||||
break;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
netifWrapper netIf;
|
||||
};
|
||||
|
||||
|
||||
class AddressList
|
||||
{
|
||||
public:
|
||||
using const_iterator = const AddressListIterator;
|
||||
|
||||
const_iterator begin () const { return const_iterator(netif_list); }
|
||||
const_iterator end () const { return const_iterator(nullptr); }
|
||||
|
||||
};
|
||||
|
||||
inline AddressList::const_iterator begin (const AddressList& a) { return a.begin(); }
|
||||
inline AddressList::const_iterator end (const AddressList& a) { return a.end(); }
|
||||
|
||||
|
||||
} // AddressListImplementation
|
||||
|
||||
} // esp8266
|
||||
|
||||
extern AddressList addrList;
|
||||
|
||||
|
||||
#endif
|
@ -91,6 +91,16 @@ bool WiFiClass32::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int3
|
||||
return WiFi.getNetworkInfo(i, ssid, encType, rssi, bssid, channel);
|
||||
}
|
||||
|
||||
// from https://github.com/espressif/arduino-esp32/pull/7520
|
||||
static const int WIFI_WANT_IP6_BIT_ALT = BIT15;
|
||||
bool WiFiClass32::IPv6(bool state) {
|
||||
if (state)
|
||||
WiFiGenericClass::setStatusBits(WIFI_WANT_IP6_BIT_ALT);
|
||||
else
|
||||
WiFiGenericClass::clearStatusBits(WIFI_WANT_IP6_BIT_ALT);
|
||||
return true;
|
||||
}
|
||||
|
||||
void wifi_station_disconnect() {
|
||||
// erase ap: empty ssid, ...
|
||||
WiFi.disconnect(true, true);
|
||||
|
@ -19,9 +19,6 @@
|
||||
#pragma once
|
||||
#include <WiFi.h>
|
||||
|
||||
// sorry, no <AddrList.h>
|
||||
#undef LWIP_IPV6
|
||||
|
||||
#define ENC_TYPE_NONE WIFI_AUTH_OPEN
|
||||
#define ENC_TYPE_WEP WIFI_AUTH_WEP
|
||||
#define ENC_TYPE_CCMP WIFI_AUTH_WPA2_PSK
|
||||
@ -53,6 +50,8 @@ public:
|
||||
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);
|
||||
|
||||
bool IPv6(bool state); // make sure it always exists even with older Arduino framework
|
||||
};
|
||||
|
||||
void wifi_station_disconnect();
|
||||
|
@ -137,8 +137,6 @@ typedef int SerialConfig;
|
||||
//#define PortUdp_writestr(log_data) PortUdp.write((const uint8_t *)(log_data), strlen(log_data))
|
||||
#define PortUdp_write(log_data, n) PortUdp.write((const uint8_t *)(log_data), n)
|
||||
|
||||
#undef LWIP_IPV6
|
||||
|
||||
#define REASON_DEFAULT_RST 0 // "Power on" normal startup by power on
|
||||
#define REASON_WDT_RST 1 // "Hardware Watchdog" hardware watch dog reset
|
||||
#define REASON_EXCEPTION_RST 2 // "Exception" exception reset, GPIO status won’t change
|
||||
|
@ -50,6 +50,7 @@ be_extern_native_module(partition_core);
|
||||
be_extern_native_module(crc);
|
||||
be_extern_native_module(crypto);
|
||||
be_extern_native_module(ULP);
|
||||
be_extern_native_module(mdns);
|
||||
#ifdef USE_ZIGBEE
|
||||
be_extern_native_module(zigbee);
|
||||
#endif // USE_ZIGBEE
|
||||
@ -163,21 +164,23 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = {
|
||||
&be_native_module(flash),
|
||||
&be_native_module(partition_core),
|
||||
&be_native_module(crc),
|
||||
#ifdef USE_ALEXA_AVS
|
||||
&be_native_module(crypto),
|
||||
#endif
|
||||
#if defined(USE_BERRY_ULP) && defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(USE_BERRY_ULP) && ((CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3))
|
||||
&be_native_module(ULP),
|
||||
#endif // USE_BERRY_ULP
|
||||
#if defined(USE_MI_ESP32) && !defined(USE_BLE_ESP32)
|
||||
&be_native_module(MI32),
|
||||
&be_native_module(BLE),
|
||||
#endif //USE_MI_ESP32
|
||||
#ifdef USE_DISCOVERY
|
||||
&be_native_module(mdns),
|
||||
#endif // USE_DISCOVERY
|
||||
#endif // TASMOTA
|
||||
/* user-defined modules register end */
|
||||
NULL /* do not remove */
|
||||
};
|
||||
|
||||
be_extern_native_class(dyn);
|
||||
be_extern_native_class(tasmota);
|
||||
be_extern_native_class(Trigger);
|
||||
be_extern_native_class(Driver);
|
||||
@ -228,6 +231,7 @@ be_extern_native_class(int64);
|
||||
BERRY_LOCAL bclass_array be_class_table = {
|
||||
#ifdef TASMOTA
|
||||
/* first list are direct classes */
|
||||
&be_native_class(dyn),
|
||||
&be_native_class(tasmota),
|
||||
&be_native_class(Trigger),
|
||||
&be_native_class(Driver),
|
||||
|
@ -208,6 +208,31 @@ BERRY_API bbool be_isinstance(bvm *vm, int index)
|
||||
return var_isinstance(v);
|
||||
}
|
||||
|
||||
static bbool be_isinstanceofbuiltin(bvm *vm, int rel_index, const char *classname)
|
||||
{
|
||||
bbool ret = bfalse;
|
||||
int index = be_absindex(vm, rel_index);
|
||||
if (be_isinstance(vm, index)) {
|
||||
be_getbuiltin(vm, classname);
|
||||
if (be_isderived(vm, index)) {
|
||||
ret = btrue;
|
||||
}
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
BERRY_API bbool be_ismapinstance(bvm *vm, int index)
|
||||
{
|
||||
return be_isinstanceofbuiltin(vm, index, "map");
|
||||
}
|
||||
|
||||
BERRY_API bbool be_islistinstance(bvm *vm, int index)
|
||||
{
|
||||
return be_isinstanceofbuiltin(vm, index, "list");
|
||||
}
|
||||
|
||||
|
||||
BERRY_API bbool be_ismodule(bvm *vm, int index)
|
||||
{
|
||||
bvalue *v = be_indexof(vm, index);
|
||||
|
@ -949,6 +949,109 @@ static int m_setfloat(bvm *vm)
|
||||
be_return_nil(vm);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fills a buffer with another buffer.
|
||||
*
|
||||
* This is meant to be very flexible and avoid loops
|
||||
*
|
||||
* `setbytes(index:int, fill:bytes [, from:int, len:int]) -> nil`
|
||||
*
|
||||
*/
|
||||
static int m_setbytes(bvm *vm)
|
||||
{
|
||||
int argc = be_top(vm);
|
||||
buf_impl attr = bytes_check_data(vm, 0); /* we reserve 4 bytes anyways */
|
||||
check_ptr(vm, &attr);
|
||||
if (argc >=3 && be_isint(vm, 2) && (be_isbytes(vm, 3))) {
|
||||
int32_t idx = be_toint(vm, 2);
|
||||
size_t from_len_total;
|
||||
const uint8_t* buf_ptr = (const uint8_t*) be_tobytes(vm, 3, &from_len_total);
|
||||
if (idx < 0) { idx = 0; }
|
||||
if (idx >= attr.len) { idx = attr.len; }
|
||||
|
||||
int32_t from_byte = 0;
|
||||
if (argc >= 4 && be_isint(vm, 4)) {
|
||||
from_byte = be_toint(vm, 4);
|
||||
if (from_byte < 0) { from_byte = 0; }
|
||||
if ((size_t)from_byte >= from_len_total) { from_byte = from_len_total; }
|
||||
}
|
||||
|
||||
int32_t from_len = from_len_total - from_byte;
|
||||
if (argc >= 5 && be_isint(vm, 5)) {
|
||||
from_len = be_toint(vm, 5);
|
||||
if (from_len < 0) { from_len = 0; }
|
||||
if (from_len >= (int32_t)from_len_total) { from_len = from_len_total; }
|
||||
}
|
||||
if (idx + from_len >= attr.len) { from_len = attr.len - idx; }
|
||||
|
||||
// all parameters ok
|
||||
if (from_len > 0) {
|
||||
memmove(attr.bufptr + idx, buf_ptr + from_byte, from_len);
|
||||
}
|
||||
}
|
||||
be_return_nil(vm);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Reverses in-place a sub-buffer composed of groups of n-bytes packets
|
||||
*
|
||||
* This is useful for pixel manipulation when displaying RGB pixels
|
||||
*
|
||||
* `reverse([index:int, len:int, grouplen:int]) -> self`
|
||||
*
|
||||
*/
|
||||
static int m_reverse(bvm *vm)
|
||||
{
|
||||
int argc = be_top(vm);
|
||||
buf_impl attr = bytes_check_data(vm, 0); /* we reserve 4 bytes anyways */
|
||||
check_ptr(vm, &attr);
|
||||
|
||||
int32_t idx = 0; /* start from index 0 */
|
||||
int32_t len = attr.len; /* entire len */
|
||||
int32_t grouplen = 1; /* default to 1-byte group */
|
||||
|
||||
if (argc >= 2 && be_isint(vm, 2)) {
|
||||
idx = be_toint(vm, 2);
|
||||
if (idx < 0) { idx = 0; } /* railguards */
|
||||
if (idx > attr.len) { idx = attr.len; }
|
||||
}
|
||||
if (argc >= 3 && be_isint(vm, 3)) {
|
||||
len = be_toint(vm, 3);
|
||||
if (len < 0) { len = attr.len - idx; } /* negative len means */
|
||||
}
|
||||
if (idx + len >= attr.len) { len = attr.len - idx; }
|
||||
|
||||
// truncate len to multiple of grouplen
|
||||
if (argc >= 4 && be_isint(vm, 4)) {
|
||||
grouplen = be_toint(vm, 4);
|
||||
if (grouplen <= 0) { grouplen = 1; }
|
||||
}
|
||||
len = len - (len % grouplen);
|
||||
|
||||
// apply reverse
|
||||
if (len > 0) {
|
||||
if (grouplen == 1) {
|
||||
/* fast version if simple byte inversion */
|
||||
for (int32_t i = idx, j = idx + len -1; i < j; i++, j--) {
|
||||
uint8_t temp = attr.bufptr[i];
|
||||
attr.bufptr[i] = attr.bufptr[j];
|
||||
attr.bufptr[j] = temp;
|
||||
}
|
||||
} else {
|
||||
for (int32_t i = idx, j = idx + len - grouplen; i < j; i += grouplen, j -= grouplen) {
|
||||
for (int32_t k = 0; k < grouplen; k++) {
|
||||
uint8_t temp = attr.bufptr[i+k];
|
||||
attr.bufptr[i+k] = attr.bufptr[j+k];
|
||||
attr.bufptr[j+k] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
be_pushvalue(vm, 1); /* push bytes object */
|
||||
be_return(vm);
|
||||
}
|
||||
|
||||
static int m_setitem(bvm *vm)
|
||||
{
|
||||
int argc = be_top(vm);
|
||||
@ -1575,6 +1678,7 @@ void be_load_byteslib(bvm *vm)
|
||||
{ "geti", m_geti },
|
||||
{ "set", m_set },
|
||||
{ "seti", m_set }, // setters for signed and unsigned are identical
|
||||
{ "setbytes", m_setbytes },
|
||||
{ "getfloat", m_getfloat },
|
||||
{ "setfloat", m_setfloat },
|
||||
{ "item", m_item },
|
||||
@ -1582,6 +1686,7 @@ void be_load_byteslib(bvm *vm)
|
||||
{ "size", m_size },
|
||||
{ "resize", m_resize },
|
||||
{ "clear", m_clear },
|
||||
{ "reverse", m_reverse },
|
||||
{ "copy", m_copy },
|
||||
{ "+", m_merge },
|
||||
{ "..", m_connect },
|
||||
@ -1621,11 +1726,13 @@ class be_class_bytes (scope: global, name: bytes) {
|
||||
setfloat, func(m_setfloat)
|
||||
set, func(m_set)
|
||||
seti, func(m_set)
|
||||
setbytes, func(m_setbytes)
|
||||
item, func(m_item)
|
||||
setitem, func(m_setitem)
|
||||
size, func(m_size)
|
||||
resize, func(m_resize)
|
||||
clear, func(m_clear)
|
||||
reverse, func(m_reverse)
|
||||
copy, func(m_copy)
|
||||
+, func(m_merge)
|
||||
.., func(m_connect)
|
||||
|
@ -464,6 +464,8 @@ BERRY_API bbool be_isfunction(bvm *vm, int index);
|
||||
BERRY_API bbool be_isproto(bvm *vm, int index);
|
||||
BERRY_API bbool be_isclass(bvm *vm, int index);
|
||||
BERRY_API bbool be_isinstance(bvm *vm, int index);
|
||||
BERRY_API bbool be_ismapinstance(bvm *vm, int index);
|
||||
BERRY_API bbool be_islistinstance(bvm *vm, int index);
|
||||
BERRY_API bbool be_ismodule(bvm *vm, int index);
|
||||
BERRY_API bbool be_islist(bvm *vm, int index);
|
||||
BERRY_API bbool be_ismap(bvm *vm, int index);
|
||||
|
@ -202,3 +202,49 @@ assert(b == bytes())
|
||||
b = bytes("FFFEAABBCC")
|
||||
assert(b.tohex() == "FFFEAABBCC")
|
||||
assert(bytes().tohex() == "")
|
||||
|
||||
# assign buffer to bytes
|
||||
var a0 = bytes("112233445566778899")
|
||||
b = bytes("aabbccddeeff")
|
||||
|
||||
a = a0.copy()
|
||||
a.setbytes(0, b) # assign from start
|
||||
assert(a == bytes('AABBCCDDEEFF778899'))
|
||||
a = a0.copy()
|
||||
a.setbytes(0, b, 0, 0) # zero len
|
||||
assert(a == a0)
|
||||
a = a0.copy()
|
||||
a.setbytes(100, b) # index out of range
|
||||
assert(a == a0)
|
||||
a = a0.copy()
|
||||
a.setbytes(6, b) # entire buffer not fitting
|
||||
assert(a == bytes('112233445566AABBCC'))
|
||||
a = a0.copy()
|
||||
a.setbytes(6, b, 2, 2)
|
||||
assert(a == bytes('112233445566CCDD99'))
|
||||
a = b.copy()
|
||||
a.setbytes(0, a0)
|
||||
assert(a == bytes('112233445566'))
|
||||
|
||||
# reverse
|
||||
assert(bytes().reverse() == bytes())
|
||||
assert(bytes("AA").reverse() == bytes("AA"))
|
||||
assert(bytes("1122334455").reverse() == bytes("5544332211"))
|
||||
assert(bytes("11223344").reverse() == bytes("44332211"))
|
||||
|
||||
assert(bytes("0011223344").reverse(1) == bytes("0044332211"))
|
||||
assert(bytes("0011223344").reverse(3) == bytes("0011224433"))
|
||||
assert(bytes("0011223344").reverse(4) == bytes("0011223344"))
|
||||
assert(bytes("0011223344").reverse(5) == bytes("0011223344"))
|
||||
assert(bytes("0011223344").reverse(15) == bytes("0011223344"))
|
||||
assert(bytes("0011223344").reverse(-2) == bytes("4433221100"))
|
||||
|
||||
assert(bytes("0011223344").reverse(1,3) == bytes("0033221144"))
|
||||
assert(bytes("0011223344").reverse(1,0) == bytes("0011223344"))
|
||||
assert(bytes("0011223344").reverse(2,2) == bytes("0011332244"))
|
||||
assert(bytes("0011223344").reverse(0,2) == bytes("1100223344"))
|
||||
assert(bytes("0011223344").reverse(nil,2) == bytes("1100223344"))
|
||||
assert(bytes("0011223344").reverse(1, nil) == bytes("0044332211"))
|
||||
|
||||
assert(bytes("0011223344").reverse(nil, nil, 2) == bytes("2233001144"))
|
||||
assert(bytes("001122334455").reverse(nil, nil, 3) == bytes("334455001122"))
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include "be_constobj.h"
|
||||
#include "be_mapping.h"
|
||||
|
||||
#if defined(USE_BERRY_ULP) && defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(USE_BERRY_ULP) && (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3))
|
||||
|
||||
#include "esp32/ulp.h"
|
||||
// #include "esp32/ulp.h"
|
||||
#include "driver/rtc_io.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/adc.h"
|
||||
@ -37,8 +37,6 @@ BE_FUNC_CTYPE_DECLARE(be_ULP_sleep, "", "[i]"); // optional int arg
|
||||
extern void be_ULP_load(struct bvm *vm, const uint8_t *buf, size_t size);
|
||||
BE_FUNC_CTYPE_DECLARE(be_ULP_load, "", "@(bytes)~"); // pass: 1/ vm, 2/ bytes point, 3/ bytes size
|
||||
|
||||
#include "be_fixed_ULP.h"
|
||||
|
||||
/* @const_object_info_begin
|
||||
module ULP (scope: global) {
|
||||
run, ctype_func(be_ULP_run)
|
||||
@ -51,5 +49,6 @@ module ULP (scope: global) {
|
||||
adc_config, ctype_func(be_ULP_adc_config)
|
||||
}
|
||||
@const_object_info_end */
|
||||
#include "be_fixed_ULP.h"
|
||||
|
||||
#endif // USE_BERRY_ULP
|
||||
#endif // USE_BERRY_ULP
|
||||
|
@ -7,8 +7,6 @@
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
#ifdef USE_ALEXA_AVS
|
||||
|
||||
extern int m_aes_gcm_init(bvm *vm);
|
||||
extern int m_aes_gcm_encryt(bvm *vm);
|
||||
extern int m_aes_gcm_decryt(bvm *vm);
|
||||
@ -23,7 +21,7 @@ extern int m_ec_c25519_sharedkey(bvm *vm);
|
||||
|
||||
/* @const_object_info_begin
|
||||
|
||||
class be_class_aes_gcm (scope: global, name: AES_GCM, strings: weak) {
|
||||
class be_class_aes_gcm (scope: global, name: AES_GCM) {
|
||||
.p1, var
|
||||
.p2, var
|
||||
|
||||
@ -33,16 +31,14 @@ class be_class_aes_gcm (scope: global, name: AES_GCM, strings: weak) {
|
||||
tag, func(m_aes_gcm_tag)
|
||||
}
|
||||
|
||||
class be_class_ec_c25519 (scope: global, name: EC_C25519, strings: weak) {
|
||||
class be_class_ec_c25519 (scope: global, name: EC_C25519) {
|
||||
public_key, func(m_ec_c25519_pubkey)
|
||||
shared_key, func(m_ec_c25519_sharedkey)
|
||||
}
|
||||
|
||||
module crypto (scope: global, strings: weak) {
|
||||
module crypto (scope: global) {
|
||||
AES_GCM, class(be_class_aes_gcm)
|
||||
EC_C25519, class(be_class_ec_c25519)
|
||||
}
|
||||
|
||||
@const_object_info_end */
|
||||
|
||||
#endif // USE_ALEXA_AVS
|
||||
|
4
lib/libesp32/berry_tasmota/src/be_dyn_class.c
Normal file
4
lib/libesp32/berry_tasmota/src/be_dyn_class.c
Normal file
@ -0,0 +1,4 @@
|
||||
/********************************************************************
|
||||
* Tasmota dyn class
|
||||
*******************************************************************/
|
||||
#include "solidify/solidified_dyn.h"
|
128
lib/libesp32/berry_tasmota/src/be_mdns_module.cpp
Normal file
128
lib/libesp32/berry_tasmota/src/be_mdns_module.cpp
Normal file
@ -0,0 +1,128 @@
|
||||
/********************************************************************
|
||||
* Berry module `mdns`
|
||||
*
|
||||
* To use: `import mdns`
|
||||
*
|
||||
* MDNS support
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
#include "be_mapping.h"
|
||||
#include "be_mem.h"
|
||||
|
||||
#ifdef USE_DISCOVERY
|
||||
#include "mdns.h"
|
||||
#include <string.h>
|
||||
|
||||
//
|
||||
// `mdsn.start([hostname:string]) -> nil`
|
||||
// start or restart mdns, specify hostname or use tasmota.hostname() if none provided (default)
|
||||
extern char* NetworkHostname(void);
|
||||
static void m_mdns_start(struct bvm *vm, const char* hostname) {
|
||||
esp_err_t err = mdns_init();
|
||||
if (err != ESP_OK) {
|
||||
be_raisef(vm, "internal_error", "could not initialize mdns err=%i", err);
|
||||
}
|
||||
if (hostname == NULL) {
|
||||
hostname = NetworkHostname(); // revert to default hostname if none is specified
|
||||
}
|
||||
err = mdns_hostname_set(hostname);
|
||||
if (err != ESP_OK) {
|
||||
be_raisef(vm, "internal_error", "could not set hostname err=%i", err);
|
||||
}
|
||||
}
|
||||
BE_FUNC_CTYPE_DECLARE(m_mdns_start, "", "@[s]")
|
||||
|
||||
//
|
||||
// `msdn.stop() -> nil`
|
||||
// free all mdns resources
|
||||
static void m_mdns_stop(void) {
|
||||
mdns_free();
|
||||
}
|
||||
BE_FUNC_CTYPE_DECLARE(m_mdns_stop, "", "")
|
||||
|
||||
//
|
||||
// `mdns.set_hostname(hostname:string) -> nil`
|
||||
// change the hostname
|
||||
static void m_mdns_set_hostname(struct bvm *vm, const char * hostname) {
|
||||
esp_err_t err = mdns_hostname_set(hostname);
|
||||
if (err != ESP_OK) {
|
||||
be_raisef(vm, "internal_error", "mdns set_hostname err=%i", err);
|
||||
}
|
||||
}
|
||||
BE_FUNC_CTYPE_DECLARE(m_mdns_set_hostname, "", "@s")
|
||||
|
||||
//
|
||||
// `mdns.add_service(service:string, proto:string, port:int, txt:map) -> nil`
|
||||
//
|
||||
// add a service declaration using the current hostname as instance name, and specify TXT fields as a `map`
|
||||
//
|
||||
// Test:
|
||||
// import mdns mdns.add_service("_arduino","_tcp",1111, {"board":"tasmota", "tcp_check":"no", "ssh_upload":"no", "auth_upload":"no"})
|
||||
//
|
||||
// import mdns mdns.add_service("_matterc","_udp", 5540, {"VP":"65521+32768", "SII":5000, "SAI":300, "T":1, "D":3840, "CM":1, "PH":33, "PI":""})
|
||||
static int32_t m_mdns_add_service(struct bvm *vm) {
|
||||
int32_t top = be_top(vm);
|
||||
if (top >= 3 && be_isstring(vm, 1) && be_isstring(vm, 2) && be_isint(vm, 3)) {
|
||||
const char* service_type = be_tostring(vm, 1);
|
||||
const char* proto = be_tostring(vm, 2);
|
||||
uint16_t port = be_toint(vm, 3);
|
||||
|
||||
mdns_txt_item_t * txt_items = NULL;
|
||||
int32_t txt_num = 0;
|
||||
if (top >= 4 && be_ismapinstance(vm, 4)) {
|
||||
// parse txt map
|
||||
be_getmember(vm, 4, ".p");
|
||||
int32_t map_len = be_data_size(vm, -1);
|
||||
if (map_len > 0) {
|
||||
uint32_t i= 0;
|
||||
txt_items = (mdns_txt_item_t*) be_os_malloc(sizeof(mdns_txt_item_t) * map_len);
|
||||
if (txt_items != NULL) {
|
||||
be_pushiter(vm, -1); /* map iterator use 1 register */
|
||||
while (be_iter_hasnext(vm, -2) && i < map_len) {
|
||||
be_iter_next(vm, -2);
|
||||
const char* key = be_tostring(vm, -2);
|
||||
const char* val = be_tostring(vm, -1);
|
||||
size_t key_len = strlen(key)+1;
|
||||
txt_items[i].key = (const char*)be_os_malloc(key_len);
|
||||
if (txt_items[i].key) { strcpy((char*)txt_items[i].key, key); }
|
||||
size_t val_len = strlen(val)+1;
|
||||
txt_items[i].value = (const char*)be_os_malloc(val_len);
|
||||
if (txt_items[i].value) { strcpy((char*)txt_items[i].value, val); }
|
||||
be_pop(vm, 2);
|
||||
i++;
|
||||
}
|
||||
txt_num = i;
|
||||
} else {
|
||||
txt_num = 0; // failed to allocate, pretend it's empty
|
||||
}
|
||||
be_pop(vm, 1); /* pop iterator */
|
||||
}
|
||||
}
|
||||
esp_err_t err = mdns_service_add(NULL, service_type, proto, port, txt_items, txt_num);
|
||||
// free all allocated memory
|
||||
if (txt_items != NULL) {
|
||||
for (uint32_t i = 0; i < txt_num; i++) {
|
||||
if (txt_items[i].key != NULL) { be_os_free((void*)txt_items[i].key); }
|
||||
if (txt_items[i].value != NULL) { be_os_free((void*)txt_items[i].value); }
|
||||
}
|
||||
be_os_free(txt_items);
|
||||
}
|
||||
if (err != ESP_OK) {
|
||||
be_raisef(vm, "internal_error", "mdns service_add err=%i", err);
|
||||
}
|
||||
be_return_nil(vm);
|
||||
}
|
||||
be_raise(vm, "value_error", "wrong or missing arguments");
|
||||
}
|
||||
|
||||
/* @const_object_info_begin
|
||||
module mdns (scope: global) {
|
||||
start, ctype_func(m_mdns_start)
|
||||
stop, ctype_func(m_mdns_stop)
|
||||
set_hostname, ctype_func(m_mdns_set_hostname)
|
||||
add_service, func(m_mdns_add_service)
|
||||
}
|
||||
@const_object_info_end */
|
||||
#include "be_fixed_mdns.h"
|
||||
|
||||
#endif // USE_DISCOVERY
|
@ -27,8 +27,10 @@ extern int l_strptime(bvm *vm);
|
||||
extern int l_memory(bvm *vm);
|
||||
extern int l_wifi(bvm *vm);
|
||||
extern int l_eth(bvm *vm);
|
||||
extern int l_hostname(bvm *vm);
|
||||
extern int l_yield(bvm *vm);
|
||||
extern int l_delay(bvm *vm);
|
||||
extern int l_delay_microseconds(bvm *vm);
|
||||
extern int l_scaleuint(bvm *vm);
|
||||
extern int l_logInfo(bvm *vm);
|
||||
extern int l_save(bvm *vm);
|
||||
@ -100,8 +102,10 @@ class be_class_tasmota (scope: global, name: Tasmota) {
|
||||
memory, func(l_memory)
|
||||
wifi, func(l_wifi)
|
||||
eth, func(l_eth)
|
||||
hostname, func(l_hostname)
|
||||
yield, func(l_yield)
|
||||
delay, func(l_delay)
|
||||
delay_microseconds, func(l_delay_microseconds)
|
||||
scale_uint, func(l_scaleuint)
|
||||
log, func(l_logInfo)
|
||||
save, func(l_save)
|
||||
|
@ -18,6 +18,10 @@
|
||||
#include <WiFiUdp.h>
|
||||
#include "be_mapping.h"
|
||||
|
||||
// Tasmota Logging
|
||||
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};
|
||||
|
||||
extern "C" {
|
||||
|
||||
// init()
|
||||
@ -37,22 +41,32 @@ extern "C" {
|
||||
return be_call_c_func(vm, (void*) &be_udp_deinit_ntv, "=.p", "");
|
||||
}
|
||||
|
||||
// udp.begin(address:string, port:int) -> nil
|
||||
int32_t be_udp_begin_ntv(WiFiUDP *udp, const char *host, int32_t port) {
|
||||
IPAddress addr((uint32_t)0);
|
||||
// if no host or host is "" then we defult to INADDR_ANY (0.0.0.0)
|
||||
if(host && (*host != 0) && !WiFiGenericClass::hostByName(host, addr)){
|
||||
return 0;
|
||||
}
|
||||
// udp.begin(address:string, port:int) -> bool
|
||||
int32_t be_udp_begin_ntv(WiFiUDP *udp, int32_t port) {
|
||||
IPAddress addr;
|
||||
// AddLog(LOG_LEVEL_DEBUG, "BRY: udp.begin listening to '%s'", addr.toString().c_str());
|
||||
return udp->begin(addr, port);
|
||||
}
|
||||
int32_t be_udp_begin(struct bvm *vm) {
|
||||
return be_call_c_func(vm, (void*) &be_udp_begin_ntv, "b", ".si");
|
||||
if (be_top(vm) >= 3 && be_isstring(vm, 2)) {
|
||||
// legacy string parameter, now ignored
|
||||
return be_call_c_func(vm, (void*) &be_udp_begin_ntv, "b", ".-i");
|
||||
} else {
|
||||
return be_call_c_func(vm, (void*) &be_udp_begin_ntv, "b", ".i");
|
||||
}
|
||||
}
|
||||
|
||||
// udp.stop() -> nil
|
||||
void be_udp_stop_ntv(WiFiUDP *udp) {
|
||||
udp->stop();
|
||||
}
|
||||
int32_t be_udp_stop(struct bvm *vm) {
|
||||
return be_call_c_func(vm, (void*) &be_udp_stop_ntv, "b", ".");
|
||||
}
|
||||
|
||||
// udp.begin_multicast(address:string, port:int) -> nil
|
||||
int32_t be_udp_begin_mcast_ntv(WiFiUDP *udp, const char *host, int32_t port) {
|
||||
IPAddress addr((uint32_t)0);
|
||||
IPAddress addr;
|
||||
if(!WiFiGenericClass::hostByName(host, addr)){
|
||||
return 0;
|
||||
}
|
||||
@ -64,10 +78,11 @@ extern "C" {
|
||||
|
||||
// udp.send(address:string, port:int, payload:bytes) -> bool
|
||||
int32_t be_udp_send_ntv(WiFiUDP *udp, const char *host, int32_t port, const uint8_t* buf, int32_t len) {
|
||||
IPAddress addr((uint32_t)0);
|
||||
IPAddress addr;
|
||||
if (!WiFiGenericClass::hostByName(host, addr)){
|
||||
return 0;
|
||||
}
|
||||
// AddLog(LOG_LEVEL_DEBUG, "BRY: udp.begin got host '%s'", addr.toString().c_str());
|
||||
if (!udp->beginPacket(addr, port)) { return 0; }
|
||||
int bw = udp->write(buf, len);
|
||||
if (!bw) { return 0; }
|
||||
@ -94,10 +109,30 @@ extern "C" {
|
||||
int32_t be_udp_read(struct bvm *vm) {
|
||||
WiFiUDP *udp = (WiFiUDP*) be_convert_single_elt(vm, 1, NULL, NULL);
|
||||
if (udp->parsePacket()) {
|
||||
int btr = udp->available();
|
||||
uint8_t * buf = (uint8_t*) be_pushbuffer(vm, btr);
|
||||
int btr = udp->available(); // btr contains the size of bytes_to_read
|
||||
|
||||
int argc = be_top(vm);
|
||||
if (argc >= 2 && be_isbytes(vm, 2)) {
|
||||
// we have already a bytes() buffer
|
||||
be_pushvalue(vm, 2); // push on top
|
||||
// resize to btr
|
||||
be_getmember(vm, -1, "resize");
|
||||
be_pushvalue(vm, -2);
|
||||
be_pushint(vm, btr);
|
||||
be_call(vm, 2);
|
||||
be_pop(vm, 3);
|
||||
} else {
|
||||
be_pushbytes(vm, nullptr, btr); // allocate a buffer of size btr filled with zeros
|
||||
}
|
||||
|
||||
// get the address of the buffer
|
||||
be_getmember(vm, -1, "_buffer");
|
||||
be_pushvalue(vm, -2);
|
||||
be_call(vm, 1);
|
||||
uint8_t * buf = (uint8_t*) be_tocomptr(vm, -2);
|
||||
be_pop(vm, 2);
|
||||
|
||||
int32_t btr2 = udp->read(buf, btr);
|
||||
be_pushbytes(vm, buf, btr2);
|
||||
|
||||
// set remotet ip
|
||||
IPAddress remote_ip = udp->remoteIP();
|
||||
@ -139,6 +174,7 @@ class be_class_udp (scope: global, name: udp) {
|
||||
begin, func(be_udp_begin)
|
||||
begin_multicast, func(be_udp_begin_mcast)
|
||||
read, func(be_udp_read)
|
||||
close, func(be_udp_stop)
|
||||
}
|
||||
@const_object_info_end */
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/********************************************************************
|
||||
* Webclient mapped to Arduino framework
|
||||
*
|
||||
*
|
||||
* To use: `d = webclient()`
|
||||
*
|
||||
*
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
@ -20,6 +20,9 @@ extern int wc_close(bvm *vm);
|
||||
extern int wc_addheader(bvm *vm);
|
||||
extern int wc_GET(bvm *vm);
|
||||
extern int wc_POST(bvm *vm);
|
||||
extern int wc_PUT(bvm *vm);
|
||||
extern int wc_PATCH(bvm *vm);
|
||||
extern int wc_DELETE(bvm *vm);
|
||||
extern int wc_getstring(bvm *vm);
|
||||
extern int wc_writefile(bvm *vm);
|
||||
extern int wc_writeflash(bvm *vm);
|
||||
@ -49,6 +52,9 @@ class be_class_webclient (scope: global, name: webclient) {
|
||||
add_header, func(wc_addheader)
|
||||
GET, func(wc_GET)
|
||||
POST, func(wc_POST)
|
||||
PUT, func(wc_PUT)
|
||||
PATCH, func(wc_PATCH)
|
||||
DELETE, func(wc_DELETE)
|
||||
get_string, func(wc_getstring)
|
||||
write_file, func(wc_writefile)
|
||||
write_flash, func(wc_writeflash)
|
||||
|
27
lib/libesp32/berry_tasmota/src/embedded/dyn.be
Normal file
27
lib/libesp32/berry_tasmota/src/embedded/dyn.be
Normal file
@ -0,0 +1,27 @@
|
||||
#################################################################################
|
||||
# dyn class
|
||||
#
|
||||
# Allows to use a map with members
|
||||
# see https://github.com/berry-lang/berry/wiki/Chapter-8
|
||||
#################################################################################
|
||||
#@ solidify:dyn
|
||||
class dyn
|
||||
var _attr
|
||||
def init()
|
||||
self._attr = {}
|
||||
end
|
||||
def setmember(name, value)
|
||||
self._attr[name] = value
|
||||
end
|
||||
def member(name)
|
||||
if self._attr.contains(name)
|
||||
return self._attr[name]
|
||||
else
|
||||
import undefined
|
||||
return undefined
|
||||
end
|
||||
end
|
||||
def tostring()
|
||||
return self._attr.tostring()
|
||||
end
|
||||
end
|
@ -117,8 +117,14 @@ class Leds : Leds_ntv
|
||||
def dirty()
|
||||
self.call_native(5)
|
||||
end
|
||||
def pixels_buffer()
|
||||
return self.call_native(6)
|
||||
def pixels_buffer(old_buf)
|
||||
var buf = self.call_native(6) # address of buffer in memory
|
||||
if old_buf == nil
|
||||
return bytes(buf, self.pixel_size() * self.pixel_count())
|
||||
else
|
||||
old_buf._change_buffer(buf)
|
||||
return old_buf
|
||||
end
|
||||
end
|
||||
def pixel_size()
|
||||
return self.call_native(7)
|
||||
@ -249,6 +255,8 @@ class Leds : Leds_ntv
|
||||
var offset
|
||||
var h, w
|
||||
var alternate # are rows in alternate mode (even/odd are reversed)
|
||||
var pix_buffer
|
||||
var pix_size
|
||||
|
||||
def init(strip, w, h, offset)
|
||||
self.strip = strip
|
||||
@ -256,6 +264,9 @@ class Leds : Leds_ntv
|
||||
self.h = h
|
||||
self.w = w
|
||||
self.alternate = false
|
||||
|
||||
self.pix_buffer = self.strip.pixels_buffer()
|
||||
self.pix_size = self.strip.pixel_size()
|
||||
end
|
||||
|
||||
def clear()
|
||||
@ -270,6 +281,7 @@ class Leds : Leds_ntv
|
||||
# don't trigger on segment, you will need to trigger on full strip instead
|
||||
if bool(force) || (self.offset == 0 && self.w * self.h == self.strip.leds)
|
||||
self.strip.show()
|
||||
self.pix_buffer = self.strip.pixels_buffer(self.pix_buffer) # update buffer after show()
|
||||
end
|
||||
end
|
||||
def can_show()
|
||||
@ -282,10 +294,10 @@ class Leds : Leds_ntv
|
||||
self.strip.dirty()
|
||||
end
|
||||
def pixels_buffer()
|
||||
return nil
|
||||
return self.strip.pixels_buffer()
|
||||
end
|
||||
def pixel_size()
|
||||
return self.strip.pixel_size()
|
||||
return self.pix_size
|
||||
end
|
||||
def pixel_count()
|
||||
return self.w * self.h
|
||||
@ -304,6 +316,15 @@ class Leds : Leds_ntv
|
||||
return self.strip.get_pixel_color(idx + self.offseta)
|
||||
end
|
||||
|
||||
# setbytes(row, bytes)
|
||||
# sets the raw bytes for `row`, copying at most 3 or 4 x col bytes
|
||||
def set_bytes(row, buf, offset, len)
|
||||
var h_bytes = self.h * self.pix_size
|
||||
if (len > h_bytes) len = h_bytes end
|
||||
var offset_in_matrix = (self.offset + row) * h_bytes
|
||||
self.pix_buffer.setbytes(offset_in_matrix, buf, offset, len)
|
||||
end
|
||||
|
||||
# Leds_matrix specific
|
||||
def set_alternate(alt)
|
||||
self.alternate = alt
|
||||
|
@ -17,7 +17,8 @@ class Leds_animator
|
||||
#
|
||||
self.clear() # clear all leds first
|
||||
#
|
||||
tasmota.add_driver(self)
|
||||
tasmota.add_fast_loop(/-> self.fast_loop())
|
||||
# it may be useful to reduce Sleep time here
|
||||
end
|
||||
|
||||
def add_anim(anim)
|
||||
@ -43,7 +44,7 @@ class Leds_animator
|
||||
return self.bri
|
||||
end
|
||||
|
||||
def every_50ms()
|
||||
def fast_loop()
|
||||
if self.running
|
||||
# run animators first
|
||||
var i = 0
|
||||
|
157
lib/libesp32/berry_tasmota/src/solidify/solidified_dyn.h
Normal file
157
lib/libesp32/berry_tasmota/src/solidify/solidified_dyn.h
Normal file
@ -0,0 +1,157 @@
|
||||
/* Solidification of dyn.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(dyn_tostring, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(_attr),
|
||||
/* K1 */ be_nested_str(tostring),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(dyn_member, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(_attr),
|
||||
/* K1 */ be_nested_str(contains),
|
||||
/* K2 */ be_nested_str(undefined),
|
||||
}),
|
||||
&be_const_str_member,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x5C100200, // 0002 MOVE R4 R1
|
||||
0x7C080400, // 0003 CALL R2 2
|
||||
0x780A0003, // 0004 JMPF R2 #0009
|
||||
0x88080100, // 0005 GETMBR R2 R0 K0
|
||||
0x94080401, // 0006 GETIDX R2 R2 R1
|
||||
0x80040400, // 0007 RET 1 R2
|
||||
0x70020001, // 0008 JMP #000B
|
||||
0xA40A0400, // 0009 IMPORT R2 K2
|
||||
0x80040400, // 000A RET 1 R2
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(dyn_setmember, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_attr),
|
||||
}),
|
||||
&be_const_str_setmember,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x880C0100, // 0000 GETMBR R3 R0 K0
|
||||
0x980C0202, // 0001 SETIDX R3 R1 R2
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(dyn_init, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_attr),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x60040013, // 0000 GETGBL R1 G19
|
||||
0x7C040000, // 0001 CALL R1 0
|
||||
0x90020001, // 0002 SETMBR R0 K0 R1
|
||||
0x80000000, // 0003 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: dyn
|
||||
********************************************************************/
|
||||
be_local_class(dyn,
|
||||
1,
|
||||
NULL,
|
||||
be_nested_map(5,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(tostring, 2), be_const_closure(dyn_tostring_closure) },
|
||||
{ be_const_key(member, 3), be_const_closure(dyn_member_closure) },
|
||||
{ be_const_key(init, 4), be_const_closure(dyn_init_closure) },
|
||||
{ be_const_key(setmember, -1), be_const_closure(dyn_setmember_closure) },
|
||||
{ be_const_key(_attr, -1), be_const_var(0) },
|
||||
})),
|
||||
(bstring*) &be_const_str_dyn
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_dyn_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_dyn);
|
||||
be_setglobal(vm, "dyn");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -736,66 +736,9 @@ be_local_closure(Leds_is_dirty, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pixel_count
|
||||
** Solidified function: pixels_buffer
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_pixel_count, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(w),
|
||||
/* K1 */ be_nested_str(h),
|
||||
}),
|
||||
&be_const_str_pixel_count,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x08040202, // 0002 MUL R1 R1 R2
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_alternate
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_set_alternate, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(alternate),
|
||||
}),
|
||||
&be_const_str_set_alternate,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pixel_size
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_pixel_size, /* name */
|
||||
be_local_closure(Leds_matrix_pixels_buffer, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
@ -807,9 +750,9 @@ be_local_closure(Leds_matrix_pixel_size, /* name */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(pixel_size),
|
||||
/* K1 */ be_nested_str(pixels_buffer),
|
||||
}),
|
||||
&be_const_str_pixel_size,
|
||||
&be_const_str_pixels_buffer,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
@ -822,6 +765,54 @@ be_local_closure(Leds_matrix_pixel_size, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 9]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(offset),
|
||||
/* K2 */ be_nested_str(h),
|
||||
/* K3 */ be_nested_str(w),
|
||||
/* K4 */ be_nested_str(alternate),
|
||||
/* K5 */ be_nested_str(pix_buffer),
|
||||
/* K6 */ be_nested_str(pixels_buffer),
|
||||
/* K7 */ be_nested_str(pix_size),
|
||||
/* K8 */ be_nested_str(pixel_size),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020204, // 0001 SETMBR R0 K1 R4
|
||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||
0x90020602, // 0003 SETMBR R0 K3 R2
|
||||
0x50140000, // 0004 LDBOOL R5 0 0
|
||||
0x90020805, // 0005 SETMBR R0 K4 R5
|
||||
0x88140100, // 0006 GETMBR R5 R0 K0
|
||||
0x8C140B06, // 0007 GETMET R5 R5 K6
|
||||
0x7C140200, // 0008 CALL R5 1
|
||||
0x90020A05, // 0009 SETMBR R0 K5 R5
|
||||
0x88140100, // 000A GETMBR R5 R0 K0
|
||||
0x8C140B08, // 000B GETMET R5 R5 K8
|
||||
0x7C140200, // 000C CALL R5 1
|
||||
0x90020E05, // 000D SETMBR R0 K7 R5
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_pixel_color
|
||||
********************************************************************/
|
||||
@ -857,6 +848,180 @@ be_local_closure(Leds_matrix_set_pixel_color, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: begin
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_begin, /* name */
|
||||
be_nested_proto(
|
||||
1, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
&be_const_str_begin,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_pixel_color
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_get_pixel_color, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(get_pixel_color),
|
||||
/* K2 */ be_nested_str(offseta),
|
||||
}),
|
||||
&be_const_str_get_pixel_color,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x88100102, // 0002 GETMBR R4 R0 K2
|
||||
0x00100204, // 0003 ADD R4 R1 R4
|
||||
0x7C080400, // 0004 CALL R2 2
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pixel_size
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_pixel_size, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(pix_size),
|
||||
}),
|
||||
&be_const_str_pixel_size,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_alternate
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_set_alternate, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(alternate),
|
||||
}),
|
||||
&be_const_str_set_alternate,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: can_show
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_can_show, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(can_show),
|
||||
}),
|
||||
&be_const_str_can_show,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_clear, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(clear_to),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(show),
|
||||
}),
|
||||
&be_const_str_clear,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x580C0001, // 0001 LDCONST R3 K1
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x8C040102, // 0003 GETMET R1 R0 K2
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_matrix_pixel_color
|
||||
********************************************************************/
|
||||
@ -919,58 +1084,9 @@ be_local_closure(Leds_matrix_set_matrix_pixel_color, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: show
|
||||
** Solidified function: pixel_count
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_show, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str(offset),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(w),
|
||||
/* K3 */ be_nested_str(h),
|
||||
/* K4 */ be_nested_str(strip),
|
||||
/* K5 */ be_nested_str(leds),
|
||||
/* K6 */ be_nested_str(show),
|
||||
}),
|
||||
&be_const_str_show,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60080017, // 0000 GETGBL R2 G23
|
||||
0x5C0C0200, // 0001 MOVE R3 R1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x740A0009, // 0003 JMPT R2 #000E
|
||||
0x88080100, // 0004 GETMBR R2 R0 K0
|
||||
0x1C080501, // 0005 EQ R2 R2 K1
|
||||
0x780A0009, // 0006 JMPF R2 #0011
|
||||
0x88080102, // 0007 GETMBR R2 R0 K2
|
||||
0x880C0103, // 0008 GETMBR R3 R0 K3
|
||||
0x08080403, // 0009 MUL R2 R2 R3
|
||||
0x880C0104, // 000A GETMBR R3 R0 K4
|
||||
0x880C0705, // 000B GETMBR R3 R3 K5
|
||||
0x1C080403, // 000C EQ R2 R2 R3
|
||||
0x780A0002, // 000D JMPF R2 #0011
|
||||
0x88080104, // 000E GETMBR R2 R0 K4
|
||||
0x8C080506, // 000F GETMET R2 R2 K6
|
||||
0x7C080200, // 0010 CALL R2 1
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: is_dirty
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_is_dirty, /* name */
|
||||
be_local_closure(Leds_matrix_pixel_count, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
@ -981,15 +1097,15 @@ be_local_closure(Leds_matrix_is_dirty, /* name */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(is_dirty),
|
||||
/* K0 */ be_nested_str(w),
|
||||
/* K1 */ be_nested_str(h),
|
||||
}),
|
||||
&be_const_str_is_dirty,
|
||||
&be_const_str_pixel_count,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x08040202, // 0002 MUL R1 R1 R2
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
@ -997,6 +1113,62 @@ be_local_closure(Leds_matrix_is_dirty, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: show
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_show, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 9]) { /* constants */
|
||||
/* K0 */ be_nested_str(offset),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(w),
|
||||
/* K3 */ be_nested_str(h),
|
||||
/* K4 */ be_nested_str(strip),
|
||||
/* K5 */ be_nested_str(leds),
|
||||
/* K6 */ be_nested_str(show),
|
||||
/* K7 */ be_nested_str(pix_buffer),
|
||||
/* K8 */ be_nested_str(pixels_buffer),
|
||||
}),
|
||||
&be_const_str_show,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[23]) { /* code */
|
||||
0x60080017, // 0000 GETGBL R2 G23
|
||||
0x5C0C0200, // 0001 MOVE R3 R1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x740A0009, // 0003 JMPT R2 #000E
|
||||
0x88080100, // 0004 GETMBR R2 R0 K0
|
||||
0x1C080501, // 0005 EQ R2 R2 K1
|
||||
0x780A000E, // 0006 JMPF R2 #0016
|
||||
0x88080102, // 0007 GETMBR R2 R0 K2
|
||||
0x880C0103, // 0008 GETMBR R3 R0 K3
|
||||
0x08080403, // 0009 MUL R2 R2 R3
|
||||
0x880C0104, // 000A GETMBR R3 R0 K4
|
||||
0x880C0705, // 000B GETMBR R3 R3 K5
|
||||
0x1C080403, // 000C EQ R2 R2 R3
|
||||
0x780A0007, // 000D JMPF R2 #0016
|
||||
0x88080104, // 000E GETMBR R2 R0 K4
|
||||
0x8C080506, // 000F GETMET R2 R2 K6
|
||||
0x7C080200, // 0010 CALL R2 1
|
||||
0x88080104, // 0011 GETMBR R2 R0 K4
|
||||
0x8C080508, // 0012 GETMET R2 R2 K8
|
||||
0x88100107, // 0013 GETMBR R4 R0 K7
|
||||
0x7C080400, // 0014 CALL R2 2
|
||||
0x90020E02, // 0015 SETMBR R0 K7 R2
|
||||
0x80000000, // 0016 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear_to
|
||||
********************************************************************/
|
||||
@ -1044,100 +1216,6 @@ be_local_closure(Leds_matrix_clear_to, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_clear, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(clear_to),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(show),
|
||||
}),
|
||||
&be_const_str_clear,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x580C0001, // 0001 LDCONST R3 K1
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x8C040102, // 0003 GETMET R1 R0 K2
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pixels_buffer
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_pixels_buffer, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
&be_const_str_pixels_buffer,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C040000, // 0000 LDNIL R1
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_init, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(offset),
|
||||
/* K2 */ be_nested_str(h),
|
||||
/* K3 */ be_nested_str(w),
|
||||
/* K4 */ be_nested_str(alternate),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020204, // 0001 SETMBR R0 K1 R4
|
||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||
0x90020602, // 0003 SETMBR R0 K3 R2
|
||||
0x50140000, // 0004 LDBOOL R5 0 0
|
||||
0x90020805, // 0005 SETMBR R0 K4 R5
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: dirty
|
||||
********************************************************************/
|
||||
@ -1168,39 +1246,6 @@ be_local_closure(Leds_matrix_dirty, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_pixel_color
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_get_pixel_color, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(get_pixel_color),
|
||||
/* K2 */ be_nested_str(offseta),
|
||||
}),
|
||||
&be_const_str_get_pixel_color,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x88100102, // 0002 GETMBR R4 R0 K2
|
||||
0x00100204, // 0003 ADD R4 R1 R4
|
||||
0x7C080400, // 0004 CALL R2 2
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_alternate
|
||||
********************************************************************/
|
||||
@ -1229,33 +1274,9 @@ be_local_closure(Leds_matrix_get_alternate, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: begin
|
||||
** Solidified function: is_dirty
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_begin, /* name */
|
||||
be_nested_proto(
|
||||
1, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
&be_const_str_begin,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: can_show
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_can_show, /* name */
|
||||
be_local_closure(Leds_matrix_is_dirty, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
@ -1267,9 +1288,9 @@ be_local_closure(Leds_matrix_can_show, /* name */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(can_show),
|
||||
/* K1 */ be_nested_str(is_dirty),
|
||||
}),
|
||||
&be_const_str_can_show,
|
||||
&be_const_str_is_dirty,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
@ -1282,35 +1303,84 @@ be_local_closure(Leds_matrix_can_show, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_bytes
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_matrix_set_bytes, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(h),
|
||||
/* K1 */ be_nested_str(pix_size),
|
||||
/* K2 */ be_nested_str(offset),
|
||||
/* K3 */ be_nested_str(pix_buffer),
|
||||
/* K4 */ be_nested_str(setbytes),
|
||||
}),
|
||||
&be_const_str_set_bytes,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x88180101, // 0001 GETMBR R6 R0 K1
|
||||
0x08140A06, // 0002 MUL R5 R5 R6
|
||||
0x24180805, // 0003 GT R6 R4 R5
|
||||
0x781A0000, // 0004 JMPF R6 #0006
|
||||
0x5C100A00, // 0005 MOVE R4 R5
|
||||
0x88180102, // 0006 GETMBR R6 R0 K2
|
||||
0x00180C01, // 0007 ADD R6 R6 R1
|
||||
0x08180C05, // 0008 MUL R6 R6 R5
|
||||
0x881C0103, // 0009 GETMBR R7 R0 K3
|
||||
0x8C1C0F04, // 000A GETMET R7 R7 K4
|
||||
0x5C240C00, // 000B MOVE R9 R6
|
||||
0x5C280400, // 000C MOVE R10 R2
|
||||
0x5C2C0600, // 000D MOVE R11 R3
|
||||
0x5C300800, // 000E MOVE R12 R4
|
||||
0x7C1C0A00, // 000F CALL R7 5
|
||||
0x80000000, // 0010 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Leds_matrix
|
||||
********************************************************************/
|
||||
be_local_class(Leds_matrix,
|
||||
5,
|
||||
7,
|
||||
NULL,
|
||||
be_nested_map(21,
|
||||
be_nested_map(24,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(pixel_count, -1), be_const_closure(Leds_matrix_pixel_count_closure) },
|
||||
{ be_const_key(h, 6), be_const_var(2) },
|
||||
{ be_const_key(set_alternate, 7), be_const_closure(Leds_matrix_set_alternate_closure) },
|
||||
{ be_const_key(pixel_size, 16), be_const_closure(Leds_matrix_pixel_size_closure) },
|
||||
{ be_const_key(set_pixel_color, 19), be_const_closure(Leds_matrix_set_pixel_color_closure) },
|
||||
{ be_const_key(set_matrix_pixel_color, 10), be_const_closure(Leds_matrix_set_matrix_pixel_color_closure) },
|
||||
{ be_const_key(show, -1), be_const_closure(Leds_matrix_show_closure) },
|
||||
{ be_const_key(alternate, -1), be_const_var(4) },
|
||||
{ be_const_key(strip, -1), be_const_var(0) },
|
||||
{ be_const_key(clear_to, -1), be_const_closure(Leds_matrix_clear_to_closure) },
|
||||
{ be_const_key(w, 15), be_const_var(3) },
|
||||
{ be_const_key(pixels_buffer, -1), be_const_closure(Leds_matrix_pixels_buffer_closure) },
|
||||
{ be_const_key(set_bytes, -1), be_const_closure(Leds_matrix_set_bytes_closure) },
|
||||
{ be_const_key(pix_buffer, -1), be_const_var(5) },
|
||||
{ be_const_key(pix_size, 20), be_const_var(6) },
|
||||
{ be_const_key(init, -1), be_const_closure(Leds_matrix_init_closure) },
|
||||
{ be_const_key(dirty, -1), be_const_closure(Leds_matrix_dirty_closure) },
|
||||
{ be_const_key(get_pixel_color, -1), be_const_closure(Leds_matrix_get_pixel_color_closure) },
|
||||
{ be_const_key(get_alternate, 17), be_const_closure(Leds_matrix_get_alternate_closure) },
|
||||
{ be_const_key(offset, 8), be_const_var(1) },
|
||||
{ be_const_key(clear, -1), be_const_closure(Leds_matrix_clear_closure) },
|
||||
{ be_const_key(set_pixel_color, 16), be_const_closure(Leds_matrix_set_pixel_color_closure) },
|
||||
{ be_const_key(alternate, -1), be_const_var(4) },
|
||||
{ be_const_key(begin, -1), be_const_closure(Leds_matrix_begin_closure) },
|
||||
{ be_const_key(is_dirty, -1), be_const_closure(Leds_matrix_is_dirty_closure) },
|
||||
{ be_const_key(h, -1), be_const_var(2) },
|
||||
{ be_const_key(get_pixel_color, -1), be_const_closure(Leds_matrix_get_pixel_color_closure) },
|
||||
{ be_const_key(pixel_size, 21), be_const_closure(Leds_matrix_pixel_size_closure) },
|
||||
{ be_const_key(set_alternate, -1), be_const_closure(Leds_matrix_set_alternate_closure) },
|
||||
{ be_const_key(can_show, -1), be_const_closure(Leds_matrix_can_show_closure) },
|
||||
{ be_const_key(get_alternate, 13), be_const_closure(Leds_matrix_get_alternate_closure) },
|
||||
{ be_const_key(w, -1), be_const_var(3) },
|
||||
{ be_const_key(set_matrix_pixel_color, 12), be_const_closure(Leds_matrix_set_matrix_pixel_color_closure) },
|
||||
{ be_const_key(pixel_count, -1), be_const_closure(Leds_matrix_pixel_count_closure) },
|
||||
{ be_const_key(show, -1), be_const_closure(Leds_matrix_show_closure) },
|
||||
{ be_const_key(offset, -1), be_const_var(1) },
|
||||
{ be_const_key(clear_to, 17), be_const_closure(Leds_matrix_clear_to_closure) },
|
||||
{ be_const_key(dirty, -1), be_const_closure(Leds_matrix_dirty_closure) },
|
||||
{ be_const_key(clear, 10), be_const_closure(Leds_matrix_clear_closure) },
|
||||
{ be_const_key(strip, -1), be_const_var(0) },
|
||||
{ be_const_key(is_dirty, -1), be_const_closure(Leds_matrix_is_dirty_closure) },
|
||||
{ be_const_key(pixels_buffer, 0), be_const_closure(Leds_matrix_pixels_buffer_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_Leds_matrix
|
||||
);
|
||||
@ -1386,24 +1456,44 @@ be_local_closure(Leds_create_matrix, /* name */
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_pixels_buffer, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
8, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(call_native),
|
||||
/* K1 */ be_nested_str(pixel_size),
|
||||
/* K2 */ be_nested_str(pixel_count),
|
||||
/* K3 */ be_nested_str(_change_buffer),
|
||||
}),
|
||||
&be_const_str_pixels_buffer,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E0005, // 0001 LDINT R3 6
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x54120005, // 0001 LDINT R4 6
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x4C0C0000, // 0003 LDNIL R3
|
||||
0x1C0C0203, // 0004 EQ R3 R1 R3
|
||||
0x780E0009, // 0005 JMPF R3 #0010
|
||||
0x600C0015, // 0006 GETGBL R3 G21
|
||||
0x5C100400, // 0007 MOVE R4 R2
|
||||
0x8C140101, // 0008 GETMET R5 R0 K1
|
||||
0x7C140200, // 0009 CALL R5 1
|
||||
0x8C180102, // 000A GETMET R6 R0 K2
|
||||
0x7C180200, // 000B CALL R6 1
|
||||
0x08140A06, // 000C MUL R5 R5 R6
|
||||
0x7C0C0400, // 000D CALL R3 2
|
||||
0x80040600, // 000E RET 1 R3
|
||||
0x70020003, // 000F JMP #0014
|
||||
0x8C0C0303, // 0010 GETMET R3 R1 K3
|
||||
0x5C140400, // 0011 MOVE R5 R2
|
||||
0x7C0C0400, // 0012 CALL R3 2
|
||||
0x80040200, // 0013 RET 1 R1
|
||||
0x80000000, // 0014 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -14,8 +14,32 @@ be_local_closure(Leds_animator_init, /* name */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 1]) {
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
1, /* has upvals */
|
||||
( &(const bupvaldesc[ 1]) { /* upvals */
|
||||
be_local_const_upval(1, 0),
|
||||
}),
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(fast_loop),
|
||||
}),
|
||||
be_str_weak(_X3Clambda_X3E),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x68000000, // 0000 GETUPV R0 U0
|
||||
0x8C000100, // 0001 GETMET R0 R0 K0
|
||||
0x7C000200, // 0002 CALL R0 1
|
||||
0x80040000, // 0003 RET 1 R0
|
||||
})
|
||||
),
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(strip),
|
||||
@ -25,11 +49,11 @@ be_local_closure(Leds_animator_init, /* name */
|
||||
/* K4 */ be_nested_str_weak(animators),
|
||||
/* K5 */ be_nested_str_weak(clear),
|
||||
/* K6 */ be_nested_str_weak(tasmota),
|
||||
/* K7 */ be_nested_str_weak(add_driver),
|
||||
/* K7 */ be_nested_str_weak(add_fast_loop),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x540A0031, // 0001 LDINT R2 50
|
||||
0x90020202, // 0002 SETMBR R0 K1 R2
|
||||
@ -45,9 +69,10 @@ be_local_closure(Leds_animator_init, /* name */
|
||||
0x7C080200, // 000C CALL R2 1
|
||||
0xB80A0C00, // 000D GETNGBL R2 K6
|
||||
0x8C080507, // 000E GETMET R2 R2 K7
|
||||
0x5C100000, // 000F MOVE R4 R0
|
||||
0x84100000, // 000F CLOSURE R4 P0
|
||||
0x7C080400, // 0010 CALL R2 2
|
||||
0x80000000, // 0011 RET 0
|
||||
0xA0000000, // 0011 CLOSE R0
|
||||
0x80000000, // 0012 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -55,11 +80,11 @@ be_local_closure(Leds_animator_init, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_bri
|
||||
** Solidified function: add_anim
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_set_bri, /* name */
|
||||
be_local_closure(Leds_animator_add_anim, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -67,14 +92,21 @@ be_local_closure(Leds_animator_set_bri, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(bri),
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(animators),
|
||||
/* K1 */ be_nested_str_weak(push),
|
||||
/* K2 */ be_nested_str_weak(run),
|
||||
}),
|
||||
be_str_weak(set_bri),
|
||||
be_str_weak(add_anim),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x5C100200, // 0002 MOVE R4 R1
|
||||
0x7C080400, // 0003 CALL R2 2
|
||||
0x8C080302, // 0004 GETMET R2 R1 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -109,6 +141,62 @@ be_local_closure(Leds_animator_stop, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: fast_loop
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_fast_loop, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(running),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str_weak(animators),
|
||||
/* K3 */ be_nested_str_weak(is_running),
|
||||
/* K4 */ be_nested_str_weak(animate),
|
||||
/* K5 */ be_const_int(1),
|
||||
/* K6 */ be_nested_str_weak(remove),
|
||||
}),
|
||||
be_str_weak(fast_loop),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060015, // 0001 JMPF R1 #0018
|
||||
0x58040001, // 0002 LDCONST R1 K1
|
||||
0x6008000C, // 0003 GETGBL R2 G12
|
||||
0x880C0102, // 0004 GETMBR R3 R0 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x14080202, // 0006 LT R2 R1 R2
|
||||
0x780A000D, // 0007 JMPF R2 #0016
|
||||
0x88080102, // 0008 GETMBR R2 R0 K2
|
||||
0x94080401, // 0009 GETIDX R2 R2 R1
|
||||
0x8C0C0503, // 000A GETMET R3 R2 K3
|
||||
0x7C0C0200, // 000B CALL R3 1
|
||||
0x780E0003, // 000C JMPF R3 #0011
|
||||
0x8C0C0504, // 000D GETMET R3 R2 K4
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x00040305, // 000F ADD R1 R1 K5
|
||||
0x70020003, // 0010 JMP #0015
|
||||
0x880C0102, // 0011 GETMBR R3 R0 K2
|
||||
0x8C0C0706, // 0012 GETMET R3 R3 K6
|
||||
0x5C140200, // 0013 MOVE R5 R1
|
||||
0x7C0C0400, // 0014 CALL R3 2
|
||||
0x7001FFEC, // 0015 JMP #0003
|
||||
0x8C080104, // 0016 GETMET R2 R0 K4
|
||||
0x7C080200, // 0017 CALL R2 1
|
||||
0x80000000, // 0018 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: animate
|
||||
********************************************************************/
|
||||
@ -165,55 +253,26 @@ be_local_closure(Leds_animator_remove, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_50ms
|
||||
** Solidified function: set_bri
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_every_50ms, /* name */
|
||||
be_local_closure(Leds_animator_set_bri, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(running),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str_weak(animators),
|
||||
/* K3 */ be_nested_str_weak(is_running),
|
||||
/* K4 */ be_nested_str_weak(animate),
|
||||
/* K5 */ be_const_int(1),
|
||||
/* K6 */ be_nested_str_weak(remove),
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(bri),
|
||||
}),
|
||||
be_str_weak(every_50ms),
|
||||
be_str_weak(set_bri),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060015, // 0001 JMPF R1 #0018
|
||||
0x58040001, // 0002 LDCONST R1 K1
|
||||
0x6008000C, // 0003 GETGBL R2 G12
|
||||
0x880C0102, // 0004 GETMBR R3 R0 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x14080202, // 0006 LT R2 R1 R2
|
||||
0x780A000D, // 0007 JMPF R2 #0016
|
||||
0x88080102, // 0008 GETMBR R2 R0 K2
|
||||
0x94080401, // 0009 GETIDX R2 R2 R1
|
||||
0x8C0C0503, // 000A GETMET R3 R2 K3
|
||||
0x7C0C0200, // 000B CALL R3 1
|
||||
0x780E0003, // 000C JMPF R3 #0011
|
||||
0x8C0C0504, // 000D GETMET R3 R2 K4
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x00040305, // 000F ADD R1 R1 K5
|
||||
0x70020003, // 0010 JMP #0015
|
||||
0x880C0102, // 0011 GETMBR R3 R0 K2
|
||||
0x8C0C0706, // 0012 GETMET R3 R3 K6
|
||||
0x5C140200, // 0013 MOVE R5 R1
|
||||
0x7C0C0400, // 0014 CALL R3 2
|
||||
0x7001FFEC, // 0015 JMP #0003
|
||||
0x8C080104, // 0016 GETMET R2 R0 K4
|
||||
0x7C080200, // 0017 CALL R2 1
|
||||
0x80000000, // 0018 RET 0
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -275,40 +334,6 @@ be_local_closure(Leds_animator_start, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: add_anim
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_add_anim, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(animators),
|
||||
/* K1 */ be_nested_str_weak(push),
|
||||
/* K2 */ be_nested_str_weak(run),
|
||||
}),
|
||||
be_str_weak(add_anim),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x5C100200, // 0002 MOVE R4 R1
|
||||
0x7C080400, // 0003 CALL R2 2
|
||||
0x8C080302, // 0004 GETMET R2 R1 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear
|
||||
********************************************************************/
|
||||
@ -352,18 +377,18 @@ be_local_class(Leds_animator,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(init, 12), be_const_closure(Leds_animator_init_closure) },
|
||||
{ be_const_key_weak(clear, -1), be_const_closure(Leds_animator_clear_closure) },
|
||||
{ be_const_key_weak(stop, -1), be_const_closure(Leds_animator_stop_closure) },
|
||||
{ be_const_key_weak(strip, 4), be_const_var(0) },
|
||||
{ be_const_key_weak(stop, 13), be_const_closure(Leds_animator_stop_closure) },
|
||||
{ be_const_key_weak(add_anim, 4), be_const_closure(Leds_animator_add_anim_closure) },
|
||||
{ be_const_key_weak(pixel_count, 6), be_const_var(1) },
|
||||
{ be_const_key_weak(animate, -1), be_const_closure(Leds_animator_animate_closure) },
|
||||
{ be_const_key_weak(add_anim, 13), be_const_closure(Leds_animator_add_anim_closure) },
|
||||
{ be_const_key_weak(animators, 7), be_const_var(4) },
|
||||
{ be_const_key_weak(strip, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(bri, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(every_50ms, -1), be_const_closure(Leds_animator_every_50ms_closure) },
|
||||
{ be_const_key_weak(remove, 7), be_const_closure(Leds_animator_remove_closure) },
|
||||
{ be_const_key_weak(remove, 8), be_const_closure(Leds_animator_remove_closure) },
|
||||
{ be_const_key_weak(get_bri, -1), be_const_closure(Leds_animator_get_bri_closure) },
|
||||
{ be_const_key_weak(start, -1), be_const_closure(Leds_animator_start_closure) },
|
||||
{ be_const_key_weak(running, -1), be_const_var(3) },
|
||||
{ be_const_key_weak(animators, -1), be_const_var(4) },
|
||||
{ be_const_key_weak(fast_loop, -1), be_const_closure(Leds_animator_fast_loop_closure) },
|
||||
{ be_const_key_weak(set_bri, 1), be_const_closure(Leds_animator_set_bri_closure) },
|
||||
})),
|
||||
be_str_weak(Leds_animator)
|
||||
|
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,368 +0,0 @@
|
||||
# ESP32 Camera Driver
|
||||
|
||||
[](https://github.com/espressif/esp32-camera/actions/workflows/build.yml)
|
||||
## General Information
|
||||
|
||||
This repository hosts ESP32 series Soc compatible driver for image sensors. Additionally it provides a few tools, which allow converting the captured frame data to the more common BMP and JPEG formats.
|
||||
|
||||
### Supported Soc
|
||||
|
||||
- ESP32
|
||||
- ESP32-S2
|
||||
- ESP32-S3
|
||||
|
||||
### Supported Sensor
|
||||
|
||||
| model | max resolution | color type | output format | Len Size |
|
||||
| ------- | -------------- | ---------- | ------------------------------------------------------------ | -------- |
|
||||
| OV2640 | 1600 x 1200 | color | YUV(422/420)/YCbCr422<br>RGB565/555<br>8-bit compressed data<br>8/10-bit Raw RGB data | 1/4" |
|
||||
| OV3660 | 2048 x 1536 | color | raw RGB data<br/>RGB565/555/444<br/>CCIR656<br/>YCbCr422<br/>compression | 1/5" |
|
||||
| OV5640 | 2592 x 1944 | color | RAW RGB<br/>RGB565/555/444<br/>CCIR656<br/>YUV422/420<br/>YCbCr422<br/>compression | 1/4" |
|
||||
| OV7670 | 640 x 480 | color | Raw Bayer RGB<br/>Processed Bayer RGB<br>YUV/YCbCr422<br>GRB422<br>RGB565/555 | 1/6" |
|
||||
| OV7725 | 640 x 480 | color | Raw RGB<br/>GRB 422<br/>RGB565/555/444<br/>YCbCr 422 | 1/4" |
|
||||
| NT99141 | 1280 x 720 | color | YCbCr 422<br/>RGB565/555/444<br/>Raw<br/>CCIR656<br/>JPEG compression | 1/4" |
|
||||
| GC032A | 640 x 480 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/10" |
|
||||
| GC0308 | 640 x 480 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/6.5" |
|
||||
| GC2145 | 1600 x 1200 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/5" |
|
||||
|
||||
## Important to Remember
|
||||
|
||||
- Except when using CIF or lower resolution with JPEG, the driver requires PSRAM to be installed and activated.
|
||||
- Using YUV or RGB puts a lot of strain on the chip because writing to PSRAM is not particularly fast. The result is that image data might be missing. This is particularly true if WiFi is enabled. If you need RGB data, it is recommended that JPEG is captured and then turned into RGB using `fmt2rgb888` or `fmt2bmp`/`frame2bmp`.
|
||||
- When 1 frame buffer is used, the driver will wait for the current frame to finish (VSYNC) and start I2S DMA. After the frame is acquired, I2S will be stopped and the frame buffer returned to the application. This approach gives more control over the system, but results in longer time to get the frame.
|
||||
- When 2 or more frame bufers are used, I2S is running in continuous mode and each frame is pushed to a queue that the application can access. This approach puts more strain on the CPU/Memory, but allows for double the frame rate. Please use only with JPEG.
|
||||
|
||||
## Installation Instructions
|
||||
|
||||
|
||||
### Using esp-idf
|
||||
|
||||
- Clone or download and extract the repository to the components folder of your ESP-IDF project
|
||||
- Enable PSRAM in `menuconfig` (also set Flash and PSRAM frequiencies to 80MHz)
|
||||
- Include `esp_camera.h` in your code
|
||||
|
||||
### Using PlatformIO
|
||||
|
||||
The easy way -- on the `env` section of `platformio.ini`, add the following:
|
||||
|
||||
```ini
|
||||
[env]
|
||||
lib_deps =
|
||||
esp32-camera
|
||||
```
|
||||
|
||||
Now the `esp_camera.h` is available to be included:
|
||||
|
||||
```c
|
||||
#include "esp_camera.h"
|
||||
```
|
||||
|
||||
Enable PSRAM on `menuconfig` or type it direclty on `sdkconfig`. Check the [official doc](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-esp32-spiram-support) for more info.
|
||||
|
||||
```
|
||||
CONFIG_ESP32_SPIRAM_SUPPORT=y
|
||||
```
|
||||
|
||||
***Arduino*** The easy-way (content above) only seems to work if you're using `framework=arduino` which seems to take a bunch of the guesswork out (thanks Arduino!) but also suck up a lot more memory and flash, almost crippling the performance. If you plan to use the `framework=espidf` then read the sections below carefully!!
|
||||
|
||||
## Platform.io lib/submodule (for framework=espidf)
|
||||
|
||||
It's probably easier to just skip the platform.io library registry version and link the git repo as a submodule. (i.e. using code outside the platform.io library management). In this example we will install this as a submodule inside the platform.io $project/lib folder:
|
||||
```
|
||||
cd $project\lib
|
||||
git submodule add -b master https://github.com/espressif/esp32-camera.git
|
||||
```
|
||||
|
||||
Then in `platformio.ini` file
|
||||
```
|
||||
build_flags =
|
||||
-I../lib/esp32-camera
|
||||
```
|
||||
After that `#include "esp_camera.h"` statement will be available. Now the module is included, and you're hopefully back to the same place as the easy-Arduino way.
|
||||
|
||||
**Warning about platform.io/espidf and fresh (not initialized) git repos**
|
||||
There is a sharp-edge on you'll discover in the platform.io build process (in espidf v3.3 & 4.0.1) where a project which has only had `git init` but nothing committed will crash platform.io build process with highly non-useful output. The cause is due to lack of a version (making you think you did something wrong, when you didn't at all) - the output is horribly non-descript. Solution: the devs want you to create a file called version.txt with a number in it, or simply commit any file to the projects git repo and use git. This happens because platform.io build process tries to be too clever and determine the build version number from the git repo - it's a sharp edge you'll only encounter if you're experimenting on a new project with no commits .. like wtf is my camera not working let's try a 'clean project'?! </rant>
|
||||
|
||||
## Platform.io Kconfig
|
||||
Kconfig is used by the platform.io menuconfig (accessed by running: `pio run -t menuconfig`) to interactively manage the various #ifdef statements throughout the espidf and supporting libraries (i.e. this repo: esp32-camera and arduino-esp32.git). The menuconfig process generates the `sdkconfig` file which is ultimately used behind the scenes by espidf compile+build process.
|
||||
|
||||
**Make sure to append or symlink** [this `Kconfig`](./Kconfig) content into the `Kconfig` of your project.
|
||||
|
||||
You symlink (or copy) the included Kconfig into your platform.io projects src directory. The file should be named `Kconfig.projbuild` in your projects src\ directory or you could also add the library path to a CMakefile.txt and hope the `Kconfig` (or `Kconfig.projbuild`) gets discovered by the menuconfig process, though this unpredictable for me.
|
||||
|
||||
The unpredictable wonky behavior in platform.io build process around Kconfig naming (Kconfig vs. Kconfig.projbuild) occurs between espidf versions 3.3 and 4.0 - but if you don't see "Camera configuration" in your `pio run -t menuconfig` then there is no point trying to test camera code (it may compile, but it probably won't work!) and it seems the platform.io devs (when they built their wrapper around the espidf menuconfig) didn't implement it properly. You've probably already figured out you can't use the espidf build tools since the files are in totally different locations and also different versions with sometimes different syntax. This is one of those times you might consider changing the `platformio.ini` from `platform=espressif32` to `platform=https://github.com/platformio/platform-espressif32.git#develop` to get a more recent version of the espidf 4.0 tools.
|
||||
|
||||
However with a bit of patience and experimenting you'll figure the Kconfig out. Once Kconfig (or Kconfig.projbuild) is working then you will be able to choose the configurations according to your setup or the camera libraries will be compiled. Although you might also need to delete your .pio/build directory before the options appear .. again, the `pio run -t menuconfig` doens't always notice the new Kconfig files!
|
||||
|
||||
If you miss-skip-ignore this critical step the camera module will compile but camera logic inside the library will be 'empty' because the Kconfig sets the proper #ifdef statements during the build process to initialize the selected cameras. It's very not optional!
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
### Initialization
|
||||
|
||||
```c
|
||||
#include "esp_camera.h"
|
||||
|
||||
//WROVER-KIT PIN Map
|
||||
#define CAM_PIN_PWDN -1 //power down is not used
|
||||
#define CAM_PIN_RESET -1 //software reset will be performed
|
||||
#define CAM_PIN_XCLK 21
|
||||
#define CAM_PIN_SIOD 26
|
||||
#define CAM_PIN_SIOC 27
|
||||
|
||||
#define CAM_PIN_D7 35
|
||||
#define CAM_PIN_D6 34
|
||||
#define CAM_PIN_D5 39
|
||||
#define CAM_PIN_D4 36
|
||||
#define CAM_PIN_D3 19
|
||||
#define CAM_PIN_D2 18
|
||||
#define CAM_PIN_D1 5
|
||||
#define CAM_PIN_D0 4
|
||||
#define CAM_PIN_VSYNC 25
|
||||
#define CAM_PIN_HREF 23
|
||||
#define CAM_PIN_PCLK 22
|
||||
|
||||
static camera_config_t camera_config = {
|
||||
.pin_pwdn = CAM_PIN_PWDN,
|
||||
.pin_reset = CAM_PIN_RESET,
|
||||
.pin_xclk = CAM_PIN_XCLK,
|
||||
.pin_sscb_sda = CAM_PIN_SIOD,
|
||||
.pin_sscb_scl = CAM_PIN_SIOC,
|
||||
|
||||
.pin_d7 = CAM_PIN_D7,
|
||||
.pin_d6 = CAM_PIN_D6,
|
||||
.pin_d5 = CAM_PIN_D5,
|
||||
.pin_d4 = CAM_PIN_D4,
|
||||
.pin_d3 = CAM_PIN_D3,
|
||||
.pin_d2 = CAM_PIN_D2,
|
||||
.pin_d1 = CAM_PIN_D1,
|
||||
.pin_d0 = CAM_PIN_D0,
|
||||
.pin_vsync = CAM_PIN_VSYNC,
|
||||
.pin_href = CAM_PIN_HREF,
|
||||
.pin_pclk = CAM_PIN_PCLK,
|
||||
|
||||
.xclk_freq_hz = 20000000,//EXPERIMENTAL: Set to 16MHz on ESP32-S2 or ESP32-S3 to enable EDMA mode
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
|
||||
.pixel_format = PIXFORMAT_JPEG,//YUV422,GRAYSCALE,RGB565,JPEG
|
||||
.frame_size = FRAMESIZE_UXGA,//QQVGA-QXGA Do not use sizes above QVGA when not JPEG
|
||||
|
||||
.jpeg_quality = 12, //0-63 lower number means higher quality
|
||||
.fb_count = 1, //if more than one, i2s runs in continuous mode. Use only with JPEG
|
||||
.grab_mode = CAMERA_GRAB_WHEN_EMPTY//CAMERA_GRAB_LATEST. Sets when buffers should be filled
|
||||
};
|
||||
|
||||
esp_err_t camera_init(){
|
||||
//power up the camera if PWDN pin is defined
|
||||
if(CAM_PIN_PWDN != -1){
|
||||
pinMode(CAM_PIN_PWDN, OUTPUT);
|
||||
digitalWrite(CAM_PIN_PWDN, LOW);
|
||||
}
|
||||
|
||||
//initialize the camera
|
||||
esp_err_t err = esp_camera_init(&camera_config);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Camera Init Failed");
|
||||
return err;
|
||||
}
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t camera_capture(){
|
||||
//acquire a frame
|
||||
camera_fb_t * fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Camera Capture Failed");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
//replace this with your own function
|
||||
process_image(fb->width, fb->height, fb->format, fb->buf, fb->len);
|
||||
|
||||
//return the frame buffer back to the driver for reuse
|
||||
esp_camera_fb_return(fb);
|
||||
return ESP_OK;
|
||||
}
|
||||
```
|
||||
|
||||
### JPEG HTTP Capture
|
||||
|
||||
```c
|
||||
#include "esp_camera.h"
|
||||
#include "esp_http_server.h"
|
||||
#include "esp_timer.h"
|
||||
|
||||
typedef struct {
|
||||
httpd_req_t *req;
|
||||
size_t len;
|
||||
} jpg_chunking_t;
|
||||
|
||||
static size_t jpg_encode_stream(void * arg, size_t index, const void* data, size_t len){
|
||||
jpg_chunking_t *j = (jpg_chunking_t *)arg;
|
||||
if(!index){
|
||||
j->len = 0;
|
||||
}
|
||||
if(httpd_resp_send_chunk(j->req, (const char *)data, len) != ESP_OK){
|
||||
return 0;
|
||||
}
|
||||
j->len += len;
|
||||
return len;
|
||||
}
|
||||
|
||||
esp_err_t jpg_httpd_handler(httpd_req_t *req){
|
||||
camera_fb_t * fb = NULL;
|
||||
esp_err_t res = ESP_OK;
|
||||
size_t fb_len = 0;
|
||||
int64_t fr_start = esp_timer_get_time();
|
||||
|
||||
fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Camera capture failed");
|
||||
httpd_resp_send_500(req);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
res = httpd_resp_set_type(req, "image/jpeg");
|
||||
if(res == ESP_OK){
|
||||
res = httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg");
|
||||
}
|
||||
|
||||
if(res == ESP_OK){
|
||||
if(fb->format == PIXFORMAT_JPEG){
|
||||
fb_len = fb->len;
|
||||
res = httpd_resp_send(req, (const char *)fb->buf, fb->len);
|
||||
} else {
|
||||
jpg_chunking_t jchunk = {req, 0};
|
||||
res = frame2jpg_cb(fb, 80, jpg_encode_stream, &jchunk)?ESP_OK:ESP_FAIL;
|
||||
httpd_resp_send_chunk(req, NULL, 0);
|
||||
fb_len = jchunk.len;
|
||||
}
|
||||
}
|
||||
esp_camera_fb_return(fb);
|
||||
int64_t fr_end = esp_timer_get_time();
|
||||
ESP_LOGI(TAG, "JPG: %uKB %ums", (uint32_t)(fb_len/1024), (uint32_t)((fr_end - fr_start)/1000));
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### JPEG HTTP Stream
|
||||
|
||||
```c
|
||||
#include "esp_camera.h"
|
||||
#include "esp_http_server.h"
|
||||
#include "esp_timer.h"
|
||||
|
||||
#define PART_BOUNDARY "123456789000000000000987654321"
|
||||
static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
|
||||
static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
|
||||
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";
|
||||
|
||||
esp_err_t jpg_stream_httpd_handler(httpd_req_t *req){
|
||||
camera_fb_t * fb = NULL;
|
||||
esp_err_t res = ESP_OK;
|
||||
size_t _jpg_buf_len;
|
||||
uint8_t * _jpg_buf;
|
||||
char * part_buf[64];
|
||||
static int64_t last_frame = 0;
|
||||
if(!last_frame) {
|
||||
last_frame = esp_timer_get_time();
|
||||
}
|
||||
|
||||
res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
|
||||
if(res != ESP_OK){
|
||||
return res;
|
||||
}
|
||||
|
||||
while(true){
|
||||
fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Camera capture failed");
|
||||
res = ESP_FAIL;
|
||||
break;
|
||||
}
|
||||
if(fb->format != PIXFORMAT_JPEG){
|
||||
bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
|
||||
if(!jpeg_converted){
|
||||
ESP_LOGE(TAG, "JPEG compression failed");
|
||||
esp_camera_fb_return(fb);
|
||||
res = ESP_FAIL;
|
||||
}
|
||||
} else {
|
||||
_jpg_buf_len = fb->len;
|
||||
_jpg_buf = fb->buf;
|
||||
}
|
||||
|
||||
if(res == ESP_OK){
|
||||
res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
|
||||
}
|
||||
if(res == ESP_OK){
|
||||
size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
|
||||
|
||||
res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
|
||||
}
|
||||
if(res == ESP_OK){
|
||||
res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
|
||||
}
|
||||
if(fb->format != PIXFORMAT_JPEG){
|
||||
free(_jpg_buf);
|
||||
}
|
||||
esp_camera_fb_return(fb);
|
||||
if(res != ESP_OK){
|
||||
break;
|
||||
}
|
||||
int64_t fr_end = esp_timer_get_time();
|
||||
int64_t frame_time = fr_end - last_frame;
|
||||
last_frame = fr_end;
|
||||
frame_time /= 1000;
|
||||
ESP_LOGI(TAG, "MJPG: %uKB %ums (%.1ffps)",
|
||||
(uint32_t)(_jpg_buf_len/1024),
|
||||
(uint32_t)frame_time, 1000.0 / (uint32_t)frame_time);
|
||||
}
|
||||
|
||||
last_frame = 0;
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### BMP HTTP Capture
|
||||
|
||||
```c
|
||||
#include "esp_camera.h"
|
||||
#include "esp_http_server.h"
|
||||
#include "esp_timer.h"
|
||||
|
||||
esp_err_t bmp_httpd_handler(httpd_req_t *req){
|
||||
camera_fb_t * fb = NULL;
|
||||
esp_err_t res = ESP_OK;
|
||||
int64_t fr_start = esp_timer_get_time();
|
||||
|
||||
fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Camera capture failed");
|
||||
httpd_resp_send_500(req);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
uint8_t * buf = NULL;
|
||||
size_t buf_len = 0;
|
||||
bool converted = frame2bmp(fb, &buf, &buf_len);
|
||||
esp_camera_fb_return(fb);
|
||||
if(!converted){
|
||||
ESP_LOGE(TAG, "BMP conversion failed");
|
||||
httpd_resp_send_500(req);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
res = httpd_resp_set_type(req, "image/x-windows-bmp")
|
||||
|| httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.bmp")
|
||||
|| httpd_resp_send(req, (const char *)buf, buf_len);
|
||||
free(buf);
|
||||
int64_t fr_end = esp_timer_get_time();
|
||||
ESP_LOGI(TAG, "BMP: %uKB %ums", (uint32_t)(buf_len/1024), (uint32_t)((fr_end - fr_start)/1000));
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
@ -1,60 +0,0 @@
|
||||
// Copyright 2010-2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_camera.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Uninitialize the lcd_cam module
|
||||
*
|
||||
* @param handle Provide handle pointer to release resources
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_FAIL Uninitialize fail
|
||||
*/
|
||||
esp_err_t cam_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Initialize the lcd_cam module
|
||||
*
|
||||
* @param config Configurations - see lcd_cam_config_t struct
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_ERR_INVALID_ARG Parameter error
|
||||
* - ESP_ERR_NO_MEM No memory to initialize lcd_cam
|
||||
* - ESP_FAIL Initialize fail
|
||||
*/
|
||||
esp_err_t cam_init(const camera_config_t *config);
|
||||
|
||||
esp_err_t cam_config(const camera_config_t *config, framesize_t frame_size, uint16_t sensor_pid);
|
||||
|
||||
void cam_stop(void);
|
||||
|
||||
void cam_start(void);
|
||||
|
||||
camera_fb_t *cam_take(TickType_t timeout);
|
||||
|
||||
void cam_give(camera_fb_t *dma_buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,214 +0,0 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* Example Use
|
||||
*
|
||||
static camera_config_t camera_example_config = {
|
||||
.pin_pwdn = PIN_PWDN,
|
||||
.pin_reset = PIN_RESET,
|
||||
.pin_xclk = PIN_XCLK,
|
||||
.pin_sscb_sda = PIN_SIOD,
|
||||
.pin_sscb_scl = PIN_SIOC,
|
||||
.pin_d7 = PIN_D7,
|
||||
.pin_d6 = PIN_D6,
|
||||
.pin_d5 = PIN_D5,
|
||||
.pin_d4 = PIN_D4,
|
||||
.pin_d3 = PIN_D3,
|
||||
.pin_d2 = PIN_D2,
|
||||
.pin_d1 = PIN_D1,
|
||||
.pin_d0 = PIN_D0,
|
||||
.pin_vsync = PIN_VSYNC,
|
||||
.pin_href = PIN_HREF,
|
||||
.pin_pclk = PIN_PCLK,
|
||||
|
||||
.xclk_freq_hz = 20000000,
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
.pixel_format = PIXFORMAT_JPEG,
|
||||
.frame_size = FRAMESIZE_SVGA,
|
||||
.jpeg_quality = 10,
|
||||
.fb_count = 2,
|
||||
.grab_mode = CAMERA_GRAB_WHEN_EMPTY
|
||||
};
|
||||
|
||||
esp_err_t camera_example_init(){
|
||||
return esp_camera_init(&camera_example_config);
|
||||
}
|
||||
|
||||
esp_err_t camera_example_capture(){
|
||||
//capture a frame
|
||||
camera_fb_t * fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Frame buffer could not be acquired");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
//replace this with your own function
|
||||
display_image(fb->width, fb->height, fb->pixformat, fb->buf, fb->len);
|
||||
|
||||
//return the frame buffer back to be reused
|
||||
esp_camera_fb_return(fb);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "driver/ledc.h"
|
||||
#include "sensor.h"
|
||||
#include "sys/time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Configuration structure for camera initialization
|
||||
*/
|
||||
typedef enum {
|
||||
CAMERA_GRAB_WHEN_EMPTY, /*!< Fills buffers when they are empty. Less resources but first 'fb_count' frames might be old */
|
||||
CAMERA_GRAB_LATEST /*!< Except when 1 frame buffer is used, queue will always contain the last 'fb_count' frames */
|
||||
} camera_grab_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Camera frame buffer location
|
||||
*/
|
||||
typedef enum {
|
||||
CAMERA_FB_IN_PSRAM, /*!< Frame buffer is placed in external PSRAM */
|
||||
CAMERA_FB_IN_DRAM /*!< Frame buffer is placed in internal DRAM */
|
||||
} camera_fb_location_t;
|
||||
|
||||
/**
|
||||
* @brief Configuration structure for camera initialization
|
||||
*/
|
||||
typedef struct {
|
||||
int pin_pwdn; /*!< GPIO pin for camera power down line */
|
||||
int pin_reset; /*!< GPIO pin for camera reset line */
|
||||
int pin_xclk; /*!< GPIO pin for camera XCLK line */
|
||||
int pin_sscb_sda; /*!< GPIO pin for camera SDA line */
|
||||
int pin_sscb_scl; /*!< GPIO pin for camera SCL line */
|
||||
int pin_d7; /*!< GPIO pin for camera D7 line */
|
||||
int pin_d6; /*!< GPIO pin for camera D6 line */
|
||||
int pin_d5; /*!< GPIO pin for camera D5 line */
|
||||
int pin_d4; /*!< GPIO pin for camera D4 line */
|
||||
int pin_d3; /*!< GPIO pin for camera D3 line */
|
||||
int pin_d2; /*!< GPIO pin for camera D2 line */
|
||||
int pin_d1; /*!< GPIO pin for camera D1 line */
|
||||
int pin_d0; /*!< GPIO pin for camera D0 line */
|
||||
int pin_vsync; /*!< GPIO pin for camera VSYNC line */
|
||||
int pin_href; /*!< GPIO pin for camera HREF line */
|
||||
int pin_pclk; /*!< GPIO pin for camera PCLK line */
|
||||
|
||||
int xclk_freq_hz; /*!< Frequency of XCLK signal, in Hz. EXPERIMENTAL: Set to 16MHz on ESP32-S2 or ESP32-S3 to enable EDMA mode */
|
||||
|
||||
ledc_timer_t ledc_timer; /*!< LEDC timer to be used for generating XCLK */
|
||||
ledc_channel_t ledc_channel; /*!< LEDC channel to be used for generating XCLK */
|
||||
|
||||
pixformat_t pixel_format; /*!< Format of the pixel data: PIXFORMAT_ + YUV422|GRAYSCALE|RGB565|JPEG */
|
||||
framesize_t frame_size; /*!< Size of the output image: FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA */
|
||||
|
||||
int jpeg_quality; /*!< Quality of JPEG output. 0-63 lower means higher quality */
|
||||
size_t fb_count; /*!< Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed) */
|
||||
camera_fb_location_t fb_location; /*!< The location where the frame buffer will be allocated */
|
||||
camera_grab_mode_t grab_mode; /*!< When buffers should be filled */
|
||||
} camera_config_t;
|
||||
|
||||
/**
|
||||
* @brief Data structure of camera frame buffer
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t * buf; /*!< Pointer to the pixel data */
|
||||
size_t len; /*!< Length of the buffer in bytes */
|
||||
size_t width; /*!< Width of the buffer in pixels */
|
||||
size_t height; /*!< Height of the buffer in pixels */
|
||||
pixformat_t format; /*!< Format of the pixel data */
|
||||
struct timeval timestamp; /*!< Timestamp since boot of the first DMA buffer of the frame */
|
||||
} camera_fb_t;
|
||||
|
||||
#define ESP_ERR_CAMERA_BASE 0x20000
|
||||
#define ESP_ERR_CAMERA_NOT_DETECTED (ESP_ERR_CAMERA_BASE + 1)
|
||||
#define ESP_ERR_CAMERA_FAILED_TO_SET_FRAME_SIZE (ESP_ERR_CAMERA_BASE + 2)
|
||||
#define ESP_ERR_CAMERA_FAILED_TO_SET_OUT_FORMAT (ESP_ERR_CAMERA_BASE + 3)
|
||||
#define ESP_ERR_CAMERA_NOT_SUPPORTED (ESP_ERR_CAMERA_BASE + 4)
|
||||
|
||||
/**
|
||||
* @brief Initialize the camera driver
|
||||
*
|
||||
* @note call camera_probe before calling this function
|
||||
*
|
||||
* This function detects and configures camera over I2C interface,
|
||||
* allocates framebuffer and DMA buffers,
|
||||
* initializes parallel I2S input, and sets up DMA descriptors.
|
||||
*
|
||||
* Currently this function can only be called once and there is
|
||||
* no way to de-initialize this module.
|
||||
*
|
||||
* @param config Camera configuration parameters
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_camera_init(const camera_config_t* config);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize the camera driver
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_STATE if the driver hasn't been initialized yet
|
||||
*/
|
||||
esp_err_t esp_camera_deinit();
|
||||
|
||||
/**
|
||||
* @brief Obtain pointer to a frame buffer.
|
||||
*
|
||||
* @return pointer to the frame buffer
|
||||
*/
|
||||
camera_fb_t* esp_camera_fb_get();
|
||||
|
||||
/**
|
||||
* @brief Return the frame buffer to be reused again.
|
||||
*
|
||||
* @param fb Pointer to the frame buffer
|
||||
*/
|
||||
void esp_camera_fb_return(camera_fb_t * fb);
|
||||
|
||||
/**
|
||||
* @brief Get a pointer to the image sensor control structure
|
||||
*
|
||||
* @return pointer to the sensor
|
||||
*/
|
||||
sensor_t * esp_camera_sensor_get();
|
||||
|
||||
/**
|
||||
* @brief Save camera settings to non-volatile-storage (NVS)
|
||||
*
|
||||
* @param key A unique nvs key name for the camera settings
|
||||
*/
|
||||
esp_err_t esp_camera_save_to_nvs(const char *key);
|
||||
|
||||
/**
|
||||
* @brief Load camera settings from non-volatile-storage (NVS)
|
||||
*
|
||||
* @param key A unique nvs key name for the camera settings
|
||||
*/
|
||||
esp_err_t esp_camera_load_from_nvs(const char *key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "img_converters.h"
|
||||
|
@ -1,245 +0,0 @@
|
||||
/*
|
||||
* This file is part of the OpenMV project.
|
||||
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
|
||||
* This work is licensed under the MIT license, see the file LICENSE for details.
|
||||
*
|
||||
* Sensor abstraction layer.
|
||||
*
|
||||
*/
|
||||
#ifndef __SENSOR_H__
|
||||
#define __SENSOR_H__
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
OV9650_PID = 0x96,
|
||||
OV7725_PID = 0x77,
|
||||
OV2640_PID = 0x26,
|
||||
OV3660_PID = 0x3660,
|
||||
OV5640_PID = 0x5640,
|
||||
OV7670_PID = 0x76,
|
||||
NT99141_PID = 0x1410,
|
||||
GC2145_PID = 0x2145,
|
||||
GC032A_PID = 0x232a,
|
||||
GC0308_PID = 0x9b,
|
||||
} camera_pid_t;
|
||||
|
||||
typedef enum {
|
||||
CAMERA_OV7725,
|
||||
CAMERA_OV2640,
|
||||
CAMERA_OV3660,
|
||||
CAMERA_OV5640,
|
||||
CAMERA_OV7670,
|
||||
CAMERA_NT99141,
|
||||
CAMERA_GC2145,
|
||||
CAMERA_GC032A,
|
||||
CAMERA_GC0308,
|
||||
CAMERA_MODEL_MAX,
|
||||
CAMERA_NONE,
|
||||
} camera_model_t;
|
||||
|
||||
typedef enum {
|
||||
OV2640_SCCB_ADDR = 0x30,// 0x60 >> 1
|
||||
OV5640_SCCB_ADDR = 0x3C,// 0x78 >> 1
|
||||
OV3660_SCCB_ADDR = 0x3C,// 0x78 >> 1
|
||||
OV7725_SCCB_ADDR = 0x21,// 0x42 >> 1
|
||||
OV7670_SCCB_ADDR = 0x21,// 0x42 >> 1
|
||||
NT99141_SCCB_ADDR = 0x2A,// 0x54 >> 1
|
||||
GC2145_SCCB_ADDR = 0x3C,// 0x78 >> 1
|
||||
GC032A_SCCB_ADDR = 0x21,// 0x42 >> 1
|
||||
GC0308_SCCB_ADDR = 0x21,// 0x42 >> 1
|
||||
} camera_sccb_addr_t;
|
||||
|
||||
typedef enum {
|
||||
PIXFORMAT_RGB565, // 2BPP/RGB565
|
||||
PIXFORMAT_YUV422, // 2BPP/YUV422
|
||||
PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE
|
||||
PIXFORMAT_JPEG, // JPEG/COMPRESSED
|
||||
PIXFORMAT_RGB888, // 3BPP/RGB888
|
||||
PIXFORMAT_RAW, // RAW
|
||||
PIXFORMAT_RGB444, // 3BP2P/RGB444
|
||||
PIXFORMAT_RGB555, // 3BP2P/RGB555
|
||||
} pixformat_t;
|
||||
|
||||
typedef enum {
|
||||
FRAMESIZE_96X96, // 96x96
|
||||
FRAMESIZE_QQVGA, // 160x120
|
||||
FRAMESIZE_QCIF, // 176x144
|
||||
FRAMESIZE_HQVGA, // 240x176
|
||||
FRAMESIZE_240X240, // 240x240
|
||||
FRAMESIZE_QVGA, // 320x240
|
||||
FRAMESIZE_CIF, // 400x296
|
||||
FRAMESIZE_HVGA, // 480x320
|
||||
FRAMESIZE_VGA, // 640x480
|
||||
FRAMESIZE_SVGA, // 800x600
|
||||
FRAMESIZE_XGA, // 1024x768
|
||||
FRAMESIZE_HD, // 1280x720
|
||||
FRAMESIZE_SXGA, // 1280x1024
|
||||
FRAMESIZE_UXGA, // 1600x1200
|
||||
// 3MP Sensors
|
||||
FRAMESIZE_FHD, // 1920x1080
|
||||
FRAMESIZE_P_HD, // 720x1280
|
||||
FRAMESIZE_P_3MP, // 864x1536
|
||||
FRAMESIZE_QXGA, // 2048x1536
|
||||
// 5MP Sensors
|
||||
FRAMESIZE_QHD, // 2560x1440
|
||||
FRAMESIZE_WQXGA, // 2560x1600
|
||||
FRAMESIZE_P_FHD, // 1080x1920
|
||||
FRAMESIZE_QSXGA, // 2560x1920
|
||||
FRAMESIZE_INVALID
|
||||
} framesize_t;
|
||||
|
||||
typedef struct {
|
||||
const camera_model_t model;
|
||||
const char *name;
|
||||
const camera_sccb_addr_t sccb_addr;
|
||||
const camera_pid_t pid;
|
||||
const framesize_t max_size;
|
||||
const bool support_jpeg;
|
||||
} camera_sensor_info_t;
|
||||
|
||||
typedef enum {
|
||||
ASPECT_RATIO_4X3,
|
||||
ASPECT_RATIO_3X2,
|
||||
ASPECT_RATIO_16X10,
|
||||
ASPECT_RATIO_5X3,
|
||||
ASPECT_RATIO_16X9,
|
||||
ASPECT_RATIO_21X9,
|
||||
ASPECT_RATIO_5X4,
|
||||
ASPECT_RATIO_1X1,
|
||||
ASPECT_RATIO_9X16
|
||||
} aspect_ratio_t;
|
||||
|
||||
typedef enum {
|
||||
GAINCEILING_2X,
|
||||
GAINCEILING_4X,
|
||||
GAINCEILING_8X,
|
||||
GAINCEILING_16X,
|
||||
GAINCEILING_32X,
|
||||
GAINCEILING_64X,
|
||||
GAINCEILING_128X,
|
||||
} gainceiling_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t max_width;
|
||||
uint16_t max_height;
|
||||
uint16_t start_x;
|
||||
uint16_t start_y;
|
||||
uint16_t end_x;
|
||||
uint16_t end_y;
|
||||
uint16_t offset_x;
|
||||
uint16_t offset_y;
|
||||
uint16_t total_x;
|
||||
uint16_t total_y;
|
||||
} ratio_settings_t;
|
||||
|
||||
typedef struct {
|
||||
const uint16_t width;
|
||||
const uint16_t height;
|
||||
const aspect_ratio_t aspect_ratio;
|
||||
} resolution_info_t;
|
||||
|
||||
// Resolution table (in sensor.c)
|
||||
extern const resolution_info_t resolution[];
|
||||
// camera sensor table (in sensor.c)
|
||||
extern const camera_sensor_info_t camera_sensor[];
|
||||
|
||||
typedef struct {
|
||||
uint8_t MIDH;
|
||||
uint8_t MIDL;
|
||||
uint16_t PID;
|
||||
uint8_t VER;
|
||||
} sensor_id_t;
|
||||
|
||||
typedef struct {
|
||||
framesize_t framesize;//0 - 10
|
||||
bool scale;
|
||||
bool binning;
|
||||
uint8_t quality;//0 - 63
|
||||
int8_t brightness;//-2 - 2
|
||||
int8_t contrast;//-2 - 2
|
||||
int8_t saturation;//-2 - 2
|
||||
int8_t sharpness;//-2 - 2
|
||||
uint8_t denoise;
|
||||
uint8_t special_effect;//0 - 6
|
||||
uint8_t wb_mode;//0 - 4
|
||||
uint8_t awb;
|
||||
uint8_t awb_gain;
|
||||
uint8_t aec;
|
||||
uint8_t aec2;
|
||||
int8_t ae_level;//-2 - 2
|
||||
uint16_t aec_value;//0 - 1200
|
||||
uint8_t agc;
|
||||
uint8_t agc_gain;//0 - 30
|
||||
uint8_t gainceiling;//0 - 6
|
||||
uint8_t bpc;
|
||||
uint8_t wpc;
|
||||
uint8_t raw_gma;
|
||||
uint8_t lenc;
|
||||
uint8_t hmirror;
|
||||
uint8_t vflip;
|
||||
uint8_t dcw;
|
||||
uint8_t colorbar;
|
||||
} camera_status_t;
|
||||
|
||||
typedef struct _sensor sensor_t;
|
||||
typedef struct _sensor {
|
||||
sensor_id_t id; // Sensor ID.
|
||||
uint8_t slv_addr; // Sensor I2C slave address.
|
||||
pixformat_t pixformat;
|
||||
camera_status_t status;
|
||||
int xclk_freq_hz;
|
||||
|
||||
// Sensor function pointers
|
||||
int (*init_status) (sensor_t *sensor);
|
||||
int (*reset) (sensor_t *sensor);
|
||||
int (*set_pixformat) (sensor_t *sensor, pixformat_t pixformat);
|
||||
int (*set_framesize) (sensor_t *sensor, framesize_t framesize);
|
||||
int (*set_contrast) (sensor_t *sensor, int level);
|
||||
int (*set_brightness) (sensor_t *sensor, int level);
|
||||
int (*set_saturation) (sensor_t *sensor, int level);
|
||||
int (*set_sharpness) (sensor_t *sensor, int level);
|
||||
int (*set_denoise) (sensor_t *sensor, int level);
|
||||
int (*set_gainceiling) (sensor_t *sensor, gainceiling_t gainceiling);
|
||||
int (*set_quality) (sensor_t *sensor, int quality);
|
||||
int (*set_colorbar) (sensor_t *sensor, int enable);
|
||||
int (*set_whitebal) (sensor_t *sensor, int enable);
|
||||
int (*set_gain_ctrl) (sensor_t *sensor, int enable);
|
||||
int (*set_exposure_ctrl) (sensor_t *sensor, int enable);
|
||||
int (*set_hmirror) (sensor_t *sensor, int enable);
|
||||
int (*set_vflip) (sensor_t *sensor, int enable);
|
||||
|
||||
int (*set_aec2) (sensor_t *sensor, int enable);
|
||||
int (*set_awb_gain) (sensor_t *sensor, int enable);
|
||||
int (*set_agc_gain) (sensor_t *sensor, int gain);
|
||||
int (*set_aec_value) (sensor_t *sensor, int gain);
|
||||
|
||||
int (*set_special_effect) (sensor_t *sensor, int effect);
|
||||
int (*set_wb_mode) (sensor_t *sensor, int mode);
|
||||
int (*set_ae_level) (sensor_t *sensor, int level);
|
||||
|
||||
int (*set_dcw) (sensor_t *sensor, int enable);
|
||||
int (*set_bpc) (sensor_t *sensor, int enable);
|
||||
int (*set_wpc) (sensor_t *sensor, int enable);
|
||||
|
||||
int (*set_raw_gma) (sensor_t *sensor, int enable);
|
||||
int (*set_lenc) (sensor_t *sensor, int enable);
|
||||
|
||||
int (*get_reg) (sensor_t *sensor, int reg, int mask);
|
||||
int (*set_reg) (sensor_t *sensor, int reg, int mask, int value);
|
||||
int (*set_res_raw) (sensor_t *sensor, int startX, int startY, int endX, int endY, int offsetX, int offsetY, int totalX, int totalY, int outputX, int outputY, bool scale, bool binning);
|
||||
int (*set_pll) (sensor_t *sensor, int bypass, int mul, int sys, int root, int pre, int seld5, int pclken, int pclk);
|
||||
int (*set_xclk) (sensor_t *sensor, int timer, int xclk);
|
||||
} sensor_t;
|
||||
|
||||
camera_sensor_info_t *esp_camera_sensor_get_info(sensor_id_t *id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SENSOR_H__ */
|
@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_system.h"
|
||||
|
||||
esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz);
|
||||
|
||||
esp_err_t camera_enable_out_clock();
|
||||
|
||||
void camera_disable_out_clock();
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "esp32-camera-header",
|
||||
"version": "1.0.0",
|
||||
"keywords": "esp32, camera, espressif, esp32-cam",
|
||||
"description": "ESP32 camera header files",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/espressif/esp32-camera"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": "espressif32",
|
||||
"build": {
|
||||
"flags": [
|
||||
"-Idriver/include"
|
||||
],
|
||||
"includeDir": ".",
|
||||
"srcDir": ".",
|
||||
"srcFilter": ["-<*>", "+<driver>"]
|
||||
}
|
||||
}
|
@ -2,6 +2,22 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.4.1] - 2022-10-23
|
||||
|
||||
### Fixed
|
||||
- Compile warning removed for esp32c3
|
||||
- NimBLEDevice::getPower incorrect value when power level is -3db.
|
||||
- Failed pairing when already in progress.
|
||||
|
||||
### Changed
|
||||
- Revert previous change that forced writing with response when subscribing in favor of allowing the application to decide.
|
||||
|
||||
### Added
|
||||
- Added NimBLEHIDDevice::batteryLevel.
|
||||
- Added NimBLEDevice::setDeviceName allowing for changing the device name while the BLE stack is active.
|
||||
- CI build tests.
|
||||
- Missing items in CHANGELOG that were not recorded correctly
|
||||
|
||||
## [1.4.0] - 2022-07-10
|
||||
|
||||
### Fixed
|
||||
@ -11,6 +27,9 @@ All notable changes to this project will be documented in this file.
|
||||
### Changed
|
||||
- Updated NimBLE core to use the v1.4.0 branch of esp-nimble.
|
||||
- AD flags are no longer set in the advertisements of non-connectable beacons, freeing up 3 bytes of advertisement room.
|
||||
- Config option CONFIG_BT_NIMBLE_DEBUG replaced with CONFIG_BT_NIMBLE_LOG_LEVEL (see src/nimconfig.h for usage)
|
||||
- Config option CONFIG_NIMBLE_CPP_ENABLE_ADVERTISMENT_TYPE_TEXT renamed to CONFIG_NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT
|
||||
- Config option CONFIG_BT_NIMBLE_TASK_STACK_SIZE renamed to CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE
|
||||
|
||||
### Added
|
||||
- Preliminary support for non-esp devices, NRF51 and NRF52 devices supported with [n-able arduino core](https://github.com/h2zero/n-able-Arduino)
|
||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = NimBLE-Arduino
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.4.0
|
||||
PROJECT_NUMBER = 1.4.1
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
OUTPUT_DIRECTORY = doxydocs
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
@ -836,7 +836,7 @@ WARN_NO_PARAMDOC = NO
|
||||
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = FAIL_ON_WARNINGS
|
||||
WARN_AS_ERROR = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=NimBLE-Arduino
|
||||
version=1.4.0
|
||||
version=1.4.1
|
||||
author=h2zero
|
||||
maintainer=h2zero <powellperalta@gmail.com>
|
||||
sentence=Bluetooth low energy (BLE) library for arduino-esp32 based on NimBLE.
|
||||
|
@ -336,6 +336,7 @@ bool NimBLEClient::connect(const NimBLEAddress &address, bool deleteAttributes)
|
||||
* @return True on success.
|
||||
*/
|
||||
bool NimBLEClient::secureConnection() {
|
||||
NIMBLE_LOGD(LOG_TAG, ">> secureConnection()");
|
||||
TaskHandle_t cur_task = xTaskGetCurrentTaskHandle();
|
||||
ble_task_data_t taskData = {this, cur_task, 0, nullptr};
|
||||
|
||||
@ -345,7 +346,7 @@ bool NimBLEClient::secureConnection() {
|
||||
m_pTaskData = &taskData;
|
||||
|
||||
int rc = NimBLEDevice::startSecurity(m_conn_id);
|
||||
if(rc != 0){
|
||||
if(rc != 0 && rc != BLE_HS_EALREADY){
|
||||
m_lastErr = rc;
|
||||
m_pTaskData = nullptr;
|
||||
return false;
|
||||
@ -360,9 +361,11 @@ bool NimBLEClient::secureConnection() {
|
||||
|
||||
if(taskData.rc != 0){
|
||||
m_lastErr = taskData.rc;
|
||||
NIMBLE_LOGE(LOG_TAG, "secureConnection: failed rc=%d", taskData.rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
NIMBLE_LOGD(LOG_TAG, "<< secureConnection: success");
|
||||
return true;
|
||||
} // secureConnection
|
||||
|
||||
|
@ -971,6 +971,15 @@ void NimBLEDevice::deinit(bool clearAll) {
|
||||
}
|
||||
} // deinit
|
||||
|
||||
/**
|
||||
* @brief Set the BLEDevice's name
|
||||
* @param [in] deviceName The device name of the device.
|
||||
*/
|
||||
/* STATIC */
|
||||
void NimBLEDevice::setDeviceName(const std::string &deviceName) {
|
||||
ble_svc_gap_device_name_set(deviceName.c_str());
|
||||
} // setDeviceName
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check if the initialization is complete.
|
||||
|
@ -97,6 +97,7 @@ class NimBLEDevice {
|
||||
public:
|
||||
static void init(const std::string &deviceName);
|
||||
static void deinit(bool clearAll = false);
|
||||
static void setDeviceName(const std::string &deviceName);
|
||||
static bool getInitialized();
|
||||
static NimBLEAddress getAddress();
|
||||
static std::string toString();
|
||||
@ -150,7 +151,8 @@ public:
|
||||
int max_events = 0);
|
||||
static bool stopAdvertising(uint8_t inst_id);
|
||||
static bool stopAdvertising();
|
||||
# else
|
||||
# endif
|
||||
# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
|
||||
static NimBLEAdvertising* getAdvertising();
|
||||
static bool startAdvertising();
|
||||
static bool stopAdvertising();
|
||||
|
@ -203,12 +203,12 @@ void NimBLEHIDDevice::setBatteryLevel(uint8_t level) {
|
||||
/*
|
||||
* @brief Returns battery level characteristic
|
||||
* @ return battery level characteristic
|
||||
*//*
|
||||
BLECharacteristic* BLEHIDDevice::batteryLevel() {
|
||||
*/
|
||||
NimBLECharacteristic* NimBLEHIDDevice::batteryLevel() {
|
||||
return m_batteryLevelCharacteristic;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
BLECharacteristic* BLEHIDDevice::reportMap() {
|
||||
return m_reportMapCharacteristic;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
void pnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version);
|
||||
//NimBLECharacteristic* hidInfo();
|
||||
void hidInfo(uint8_t country, uint8_t flags);
|
||||
//NimBLECharacteristic* batteryLevel();
|
||||
NimBLECharacteristic* batteryLevel();
|
||||
void setBatteryLevel(uint8_t level);
|
||||
|
||||
|
||||
|
@ -616,7 +616,6 @@ bool NimBLERemoteCharacteristic::setNotify(uint16_t val, notify_callback notifyC
|
||||
|
||||
NIMBLE_LOGD(LOG_TAG, "<< setNotify()");
|
||||
|
||||
response = true; // Always write with response as per Bluetooth core specification.
|
||||
return desc->writeValue((uint8_t *)&val, 2, response);
|
||||
} // setNotify
|
||||
|
||||
|
@ -73,8 +73,8 @@ public:
|
||||
|
||||
bool subscribe(bool notifications = true,
|
||||
notify_callback notifyCallback = nullptr,
|
||||
bool response = true);
|
||||
bool unsubscribe(bool response = true);
|
||||
bool response = false);
|
||||
bool unsubscribe(bool response = false);
|
||||
bool registerForNotify(notify_callback notifyCallback,
|
||||
bool notifications = true,
|
||||
bool response = true)
|
||||
|
@ -58,7 +58,8 @@ public:
|
||||
int duration = 0,
|
||||
int max_events = 0);
|
||||
bool stopAdvertising(uint8_t inst_id);
|
||||
#else
|
||||
#endif
|
||||
#if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
|
||||
NimBLEAdvertising* getAdvertising();
|
||||
bool startAdvertising();
|
||||
#endif
|
||||
|
@ -899,7 +899,7 @@ const be_ntv_func_def_t lv_label_func[] = {
|
||||
{ "get_letter_pos", { (const void*) &lv_label_get_letter_pos, "", "(lv.lv_obj)i(lv.lv_point)" } },
|
||||
{ "get_long_mode", { (const void*) &lv_label_get_long_mode, "i", "(lv.lv_obj)" } },
|
||||
{ "get_recolor", { (const void*) &lv_label_get_recolor, "b", "(lv.lv_obj)" } },
|
||||
{ "get_text", { (const void*) &lv_label_get_text, "c", "(lv.lv_obj)" } },
|
||||
{ "get_text", { (const void*) &lv_label_get_text, "s", "(lv.lv_obj)" } },
|
||||
{ "get_text_selection_end", { (const void*) &lv_label_get_text_selection_end, "i", "(lv.lv_obj)" } },
|
||||
{ "get_text_selection_start", { (const void*) &lv_label_get_text_selection_start, "i", "(lv.lv_obj)" } },
|
||||
{ "ins_text", { (const void*) &lv_label_ins_text, "", "(lv.lv_obj)is" } },
|
||||
|
@ -38,6 +38,7 @@ return_types = {
|
||||
"char *": "c",
|
||||
"uint8_t *": "c",
|
||||
"const char *": "s",
|
||||
"retchar *": "s",
|
||||
"constchar *": "s", # special construct
|
||||
"lv_obj_user_data_t": "i",
|
||||
|
||||
@ -245,6 +246,7 @@ with open(lv_widgets_file) as f:
|
||||
l_raw = re.sub('static ', '', l_raw)
|
||||
l_raw = re.sub('inline ', '', l_raw)
|
||||
l_raw = re.sub('const\s+char\s*\*', 'constchar *', l_raw)
|
||||
l_raw = re.sub('^char\s*\*', 'retchar *', l_raw) # special case for returning a char*
|
||||
l_raw = re.sub('const ', '', l_raw)
|
||||
l_raw = re.sub('struct ', '', l_raw)
|
||||
if (len(l_raw) == 0): continue
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lvgl",
|
||||
"version": "8.3.2",
|
||||
"version": "8.3.3",
|
||||
"keywords": "graphics, gui, embedded, tft, lvgl",
|
||||
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
|
||||
"repository": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=lvgl
|
||||
version=8.3.2
|
||||
version=8.3.3
|
||||
author=kisvegabor
|
||||
maintainer=kisvegabor,embeddedt,pete-pjb
|
||||
sentence=Full-featured Graphics Library for Embedded Systems
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file lv_conf.h
|
||||
* Configuration file for v8.3.2
|
||||
* Configuration file for v8.3.3
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -15,7 +15,7 @@ extern "C" {
|
||||
***************************/
|
||||
#define LVGL_VERSION_MAJOR 8
|
||||
#define LVGL_VERSION_MINOR 3
|
||||
#define LVGL_VERSION_PATCH 1
|
||||
#define LVGL_VERSION_PATCH 3
|
||||
#define LVGL_VERSION_INFO ""
|
||||
|
||||
/*********************
|
||||
|
@ -1,11 +1,9 @@
|
||||
Import("env")
|
||||
import os
|
||||
import shutil
|
||||
import gzip
|
||||
import pathlib
|
||||
|
||||
import tasmotapiolib
|
||||
|
||||
import gzip
|
||||
|
||||
def map_gzip(source, target, env):
|
||||
# create string with location and file names based on variant
|
||||
@ -33,7 +31,7 @@ if not tasmotapiolib.is_env_set(tasmotapiolib.DISABLE_MAP_GZ, env):
|
||||
|
||||
# gzip only for ESP8266
|
||||
if env["PIOPLATFORM"] != "espressif32":
|
||||
|
||||
from zopfli.gzip import compress
|
||||
def bin_gzip(source, target, env):
|
||||
# create string with location and file names based on variant
|
||||
bin_file = tasmotapiolib.get_final_bin_path(env)
|
||||
@ -45,8 +43,9 @@ if env["PIOPLATFORM"] != "espressif32":
|
||||
|
||||
# write gzip firmware file
|
||||
with open(bin_file, "rb") as fp:
|
||||
with gzip.open(gzip_file, "wb", compresslevel=9) as f:
|
||||
shutil.copyfileobj(fp, f)
|
||||
with open(gzip_file, "wb") as f:
|
||||
zopfli_gz = compress(fp.read())
|
||||
f.write(zopfli_gz)
|
||||
|
||||
ORG_FIRMWARE_SIZE = bin_file.stat().st_size
|
||||
GZ_FIRMWARE_SIZE = gzip_file.stat().st_size
|
||||
|
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