diff --git a/.github/workflows/Tasmota_build.yml b/.github/workflows/Tasmota_build.yml index 7f6d09b99..b0044da28 100644 --- a/.github/workflows/Tasmota_build.yml +++ b/.github/workflows/Tasmota_build.yml @@ -1,1548 +1,1550 @@ -name: Build_firmware - -on: - push: - branches: development - -jobs: - tasmota_pull: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Use latest Tasmota development - run: | - git config --local user.name "Platformio BUILD" - git switch -c master - git remote add -f Tasmota "https://github.com/arendst/Tasmota.git" - git merge Tasmota/development --allow-unrelated-histories - - name: Push Tasmota # Push updates of latest Tasmota development to repo - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: 'development' - force: true - - - tasmota: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-minimal: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-minimal - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-lite: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-lite - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-knx: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-knx - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-sensors: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-sensors - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-display: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-ir: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-ircustom: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-ircustom - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-zbbridge: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-zbbridge - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - tasmota-BG: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-BR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-CN: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-CZ: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-DE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-ES: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-FR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-GR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-HE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-HU: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-IT: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-KO: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-NL: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-PL: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-PT: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-RO: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-RU: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-SE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-SK: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-TR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-TW: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-UK: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota-VN: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-minimal: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-minimal - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-lite: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-lite - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-webcam: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-webcam - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-knx: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-knx - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-sensors: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-sensors - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-display: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-ir: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-ircustom: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ircustom - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-BG: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-BR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-CN: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-CZ: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-DE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-ES: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-FR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-GR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-HE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-HU: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-IT: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-KO: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-NL: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-PL: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-PT: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-RO: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-RU: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-SE: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-SK: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-TR: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-TW: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-UK: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - tasmota32-VN: - needs: tasmota_pull - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio upgrade --dev - platformio update - - name: Run PlatformIO - run: | - platformio run -e tasmota32-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output/firmware - - - Upload: - needs: [tasmota-VN, tasmota32-ircustom, tasmota32-VN, tasmota32-TW, tasmota32-TR] - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v1 - - uses: actions/download-artifact@v2 - with: - name: firmware - path: ./mv_firmware - - name: Display structure of downloaded files - run: ls -R - working-directory: ./mv_firmware - - name: Move firmware files in sub-folders - run: | - mkdir -p ./firmware/tasmota/languages - mkdir -p ./firmware/tasmota32/languages - mkdir -p ./firmware/tasmota32/ESP32_needed_files/ - [ ! -f ./mv_firmware/tasmota.* ] || mv ./mv_firmware/tasmota.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-sensors.* ] || mv ./mv_firmware/tasmota-sensors.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-minimal.* ] || mv ./mv_firmware/tasmota-minimal.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-lite.* ] || mv ./mv_firmware/tasmota-lite.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-ir*.* ] || mv ./mv_firmware/tasmota-ir*.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-display.* ] || mv ./mv_firmware/tasmota-display.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-knx.* ] || mv ./mv_firmware/tasmota-knx.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/tasmota-zbbridge.* ./firmware/tasmota/ - [ ! -f ./mv_firmware/tasmota32.* ] || mv ./mv_firmware/tasmota32.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-sensors.* ] || mv ./mv_firmware/tasmota32-sensors.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-minimal.* ] || mv ./mv_firmware/tasmota32-minimal.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-lite.* ] || mv ./mv_firmware/tasmota32-lite.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-ir*.* ] || mv ./mv_firmware/tasmota32-ir*.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-display.* ] || mv ./mv_firmware/tasmota32-display.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-web*.* ] || mv ./mv_firmware/tasmota32-web*.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32-knx.* ] || mv ./mv_firmware/tasmota32-knx.* ./firmware/tasmota32/ - [ ! -f ./mv_firmware/tasmota32* ] || mv ./mv_firmware/tasmota32* ./firmware/tasmota32/languages/ - [ ! -f ./mv_firmware/* ] || mv ./mv_firmware/* ./firmware/tasmota/languages/ - [ ! -f ./tools/Esptool/ESP32/*.* ] || mv ./tools/Esptool/ESP32/*.* ./firmware/tasmota32/ESP32_needed_files/ - [ ! -f ./FIRMWARE.md ] || mv -f ./FIRMWARE.md ./README.md - - name: Commit files # transfer the new binaries back into the repository - run: | - git config --local user.name "Platformio BUILD" - git rm -r --cached . - git add ./README.md - git add -f ./firmware/*.* - git commit -m "Tasmota ESP Binaries http://tasmota.com" - - name: Push changes # push the firmware files to branch firmware - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: 'firmware' - force: true +name: Build_firmware + +on: + push: + branches: development + +jobs: + tasmota_pull: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Use latest Tasmota development + run: | + git config --local user.name "Platformio BUILD" + git switch -c work + git remote add -f Tasmota "https://github.com/arendst/Tasmota.git" + git merge Tasmota/development --allow-unrelated-histories + - name: Push Tasmota # Push updates of latest Tasmota development to repo + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: 'development' + force: true + + + tasmota: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-minimal: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-minimal + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-lite: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-lite + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-knx: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-knx + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-sensors: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-sensors + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-display: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-display + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ir: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ir + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ircustom: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ircustom + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-zbbridge: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-zbbridge + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + tasmota-BG: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-BG + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-BR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-BR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-CN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-CN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-CZ: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-CZ + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-DE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-DE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ES: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ES + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-FR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-FR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-GR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-GR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-HE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-HE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-HU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-HU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-IT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-IT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-KO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-KO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-NL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-NL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-PL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-PL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-PT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-PT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-RO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-RO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-RU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-RU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-SE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-SE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-SK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-SK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-TR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-TR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-TW: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-TW + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-UK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-UK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-VN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-VN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32 + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-minimal: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-minimal + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-lite: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-lite + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-webcam: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-webcam + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-knx: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-knx + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-sensors: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-sensors + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-display: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-display + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ir: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ir + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ircustom: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ircustom + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-BG: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-BG + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-BR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-BR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-CN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-CN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-CZ: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-CZ + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-DE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-DE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ES: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ES + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-FR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-FR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-GR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-GR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-HE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-HE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-HU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-HU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-IT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-IT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-KO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-KO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-NL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-NL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-PL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-PL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-PT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-PT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-RO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-RO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-RU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-RU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-SE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-SE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-SK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-SK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-TR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-TR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-TW: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-TW + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-UK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-UK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-VN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-VN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + Upload: + needs: [tasmota-VN, tasmota32-ircustom, tasmota32-VN, tasmota32-TW, tasmota32-TR] + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - uses: actions/download-artifact@v2 + with: + name: firmware + path: ./mv_firmware + - name: Display structure of downloaded files + run: ls -R + working-directory: ./mv_firmware + - name: Move firmware files in sub-folders + run: | + mkdir -p ./firmware/tasmota/languages + mkdir -p ./firmware/tasmota32/languages + mkdir -p ./firmware/tasmota32/ESP32_needed_files/ + [ ! -f ./mv_firmware/tasmota.* ] || mv ./mv_firmware/tasmota.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-sensors.* ] || mv ./mv_firmware/tasmota-sensors.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-minimal.* ] || mv ./mv_firmware/tasmota-minimal.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-lite.* ] || mv ./mv_firmware/tasmota-lite.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-ir*.* ] || mv ./mv_firmware/tasmota-ir*.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-display.* ] || mv ./mv_firmware/tasmota-display.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-knx.* ] || mv ./mv_firmware/tasmota-knx.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/tasmota-zbbridge.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota32.* ] || mv ./mv_firmware/tasmota32.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-sensors.* ] || mv ./mv_firmware/tasmota32-sensors.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-minimal.* ] || mv ./mv_firmware/tasmota32-minimal.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-lite.* ] || mv ./mv_firmware/tasmota32-lite.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-ir*.* ] || mv ./mv_firmware/tasmota32-ir*.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-display.* ] || mv ./mv_firmware/tasmota32-display.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-web*.* ] || mv ./mv_firmware/tasmota32-web*.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-knx.* ] || mv ./mv_firmware/tasmota32-knx.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32* ] || mv ./mv_firmware/tasmota32* ./firmware/tasmota32/languages/ + [ ! -f ./mv_firmware/* ] || mv ./mv_firmware/* ./firmware/tasmota/languages/ + rm ./firmware/tasmota32/*.gz + rm ./firmware/tasmota32/languages/*.gz + [ ! -f ./tools/Esptool/ESP32/*.* ] || mv ./tools/Esptool/ESP32/*.* ./firmware/tasmota32/ESP32_needed_files/ + [ ! -f ./FIRMWARE.md ] || mv -f ./FIRMWARE.md ./README.md + - name: Commit files # transfer the new binaries back into the repository + run: | + git config --local user.name "Platformio BUILD" + git rm -r --cached . + git add ./README.md + git add -f ./firmware/*.* + git commit -m "Tasmota ESP Binaries http://tasmota.com" + - name: Push changes # push the firmware files to branch firmware + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: 'firmware' + force: true diff --git a/.github/workflows/Tasmota_build_master.yml b/.github/workflows/Tasmota_build_master.yml new file mode 100644 index 000000000..244bfe8ce --- /dev/null +++ b/.github/workflows/Tasmota_build_master.yml @@ -0,0 +1,1550 @@ +name: Build_firmware + +on: + push: + branches: master + +jobs: + tasmota_pull: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Use Tasmota master + run: | + git config --local user.name "Platformio BUILD" + git switch -c work + git remote add -f Tasmota "https://github.com/arendst/Tasmota.git" + git merge Tasmota/master --allow-unrelated-histories + - name: Push Tasmota # Push updates of latest Tasmota master to repo + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: 'master' + force: true + + + tasmota: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-minimal: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-minimal + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-lite: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-lite + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-knx: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-knx + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-sensors: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-sensors + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-display: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-display + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ir: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ir + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ircustom: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ircustom + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-zbbridge: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-zbbridge + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + tasmota-BG: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-BG + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-BR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-BR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-CN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-CN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-CZ: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-CZ + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-DE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-DE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-ES: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-ES + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-FR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-FR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-GR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-GR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-HE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-HE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-HU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-HU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-IT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-IT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-KO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-KO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-NL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-NL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-PL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-PL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-PT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-PT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-RO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-RO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-RU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-RU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-SE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-SE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-SK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-SK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-TR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-TR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-TW: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-TW + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-UK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-UK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota-VN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota-VN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32 + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-minimal: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-minimal + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-lite: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-lite + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-webcam: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-webcam + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-knx: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-knx + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-sensors: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-sensors + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-display: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-display + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ir: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ir + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ircustom: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ircustom + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-BG: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-BG + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-BR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-BR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-CN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-CN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-CZ: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-CZ + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-DE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-DE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-ES: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-ES + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-FR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-FR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-GR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-GR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-HE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-HE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-HU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-HU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-IT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-IT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-KO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-KO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-NL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-NL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-PL: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-PL + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-PT: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-PT + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-RO: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-RO + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-RU: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-RU + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-SE: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-SE + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-SK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-SK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-TR: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-TR + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-TW: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-TW + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-UK: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-UK + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + tasmota32-VN: + needs: tasmota_pull + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade --dev + platformio update + - name: Run PlatformIO + run: | + platformio run -e tasmota32-VN + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output/firmware + + + Upload: + needs: [tasmota-VN, tasmota32-ircustom, tasmota32-VN, tasmota32-TW, tasmota32-TR] + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v1 + - uses: actions/download-artifact@v2 + with: + name: firmware + path: ./mv_firmware + - name: Display structure of downloaded files + run: ls -R + working-directory: ./mv_firmware + - name: Move firmware files in sub-folders + run: | + mkdir -p ./firmware/tasmota/languages + mkdir -p ./firmware/tasmota32/languages + mkdir -p ./firmware/tasmota32/ESP32_needed_files/ + [ ! -f ./mv_firmware/tasmota.* ] || mv ./mv_firmware/tasmota.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-sensors.* ] || mv ./mv_firmware/tasmota-sensors.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-minimal.* ] || mv ./mv_firmware/tasmota-minimal.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-lite.* ] || mv ./mv_firmware/tasmota-lite.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-ir*.* ] || mv ./mv_firmware/tasmota-ir*.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-display.* ] || mv ./mv_firmware/tasmota-display.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-knx.* ] || mv ./mv_firmware/tasmota-knx.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/tasmota-zbbridge.* ./firmware/tasmota/ + [ ! -f ./mv_firmware/tasmota32.* ] || mv ./mv_firmware/tasmota32.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-sensors.* ] || mv ./mv_firmware/tasmota32-sensors.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-minimal.* ] || mv ./mv_firmware/tasmota32-minimal.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-lite.* ] || mv ./mv_firmware/tasmota32-lite.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-ir*.* ] || mv ./mv_firmware/tasmota32-ir*.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-display.* ] || mv ./mv_firmware/tasmota32-display.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-web*.* ] || mv ./mv_firmware/tasmota32-web*.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32-knx.* ] || mv ./mv_firmware/tasmota32-knx.* ./firmware/tasmota32/ + [ ! -f ./mv_firmware/tasmota32* ] || mv ./mv_firmware/tasmota32* ./firmware/tasmota32/languages/ + [ ! -f ./mv_firmware/* ] || mv ./mv_firmware/* ./firmware/tasmota/languages/ + rm ./firmware/tasmota32/*.gz + rm ./firmware/tasmota32/languages/*.gz + [ ! -f ./tools/Esptool/ESP32/*.* ] || mv ./tools/Esptool/ESP32/*.* ./firmware/tasmota32/ESP32_needed_files/ + [ ! -f ./FIRMWARE.md ] || mv -f ./RELEASENOTES.md ./README.md + - name: Commit files # transfer the new binaries back into the repository + run: | + git config --local user.name "Platformio BUILD" + git rm -r --cached . + git add ./README.md + git add -f ./firmware/*.* + git commit -m "Tasmota ESP Binaries http://tasmota.com" + - name: Push changes # push the firmware files to branch firmware + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: 'release-firmware' + force: true diff --git a/tasmota/i18n.h b/tasmota/i18n.h index b84ce4265..17cd2fe53 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -797,8 +797,4 @@ const char HTTP_SNS_COLOR_BLUE[] PROGMEM = "{s}%s " D_COLOR_BLUE "{ const char HTTP_SNS_MILLILITERS[] PROGMEM = "{s}%s " D_VOLUME "{m}%s " D_UNIT_MILLILITERS "{e}"; #endif // USE_WEBSERVER -const uint32_t MARKER_START = 0x5AA55AA5; -const uint32_t MARKER_END = 0xA55AA55A; -const uint32_t VERSION_MARKER[] PROGMEM = { MARKER_START, VERSION, MARKER_END }; - #endif // _I18N_H_ diff --git a/tasmota/support.ino b/tasmota/support.ino index 85840fb8a..2697e257a 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1896,48 +1896,41 @@ void SetSyslog(uint32_t loglevel) TasmotaGlobal.syslog_timer = 0; } -void Syslog(void) -{ +void SyslogAsync(bool refresh) { static IPAddress syslog_host_addr; // Syslog host IP address static uint32_t syslog_host_hash = 0; // Syslog host name hash - - // Destroys TasmotaGlobal.log_data - - uint32_t current_hash = GetHash(SettingsText(SET_SYSLOG_HOST), strlen(SettingsText(SET_SYSLOG_HOST))); - if (syslog_host_hash != current_hash) { - syslog_host_hash = current_hash; - WiFi.hostByName(SettingsText(SET_SYSLOG_HOST), syslog_host_addr); // If sleep enabled this might result in exception so try to do it once using hash - } - if (PortUdp.beginPacket(syslog_host_addr, Settings.syslog_port)) { - char syslog_preamble[64]; // Hostname + Id - snprintf_P(syslog_preamble, sizeof(syslog_preamble), PSTR("%s ESP-"), NetworkHostname()); - memmove(TasmotaGlobal.log_data + strlen(syslog_preamble), TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data) - strlen(syslog_preamble)); - TasmotaGlobal.log_data[sizeof(TasmotaGlobal.log_data) -1] = '\0'; - memcpy(TasmotaGlobal.log_data, syslog_preamble, strlen(syslog_preamble)); - PortUdp_write(TasmotaGlobal.log_data, strlen(TasmotaGlobal.log_data)); - PortUdp.endPacket(); - delay(1); // Add time for UDP handling (#5512) - } else { - TasmotaGlobal.syslog_level = 0; - TasmotaGlobal.syslog_timer = SYSLOG_TIMER; - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_APPLICATION D_SYSLOG_HOST_NOT_FOUND ". " D_RETRY_IN " %d " D_UNIT_SECOND), SYSLOG_TIMER); - } -} - -void SyslogAsync(bool refresh) { static uint32_t index = 1; + if (!TasmotaGlobal.syslog_level) { return; } if (refresh && !NeedLogRefresh(TasmotaGlobal.syslog_level, index)) { return; } char* line; size_t len; while (GetLog(TasmotaGlobal.syslog_level, &index, &line, &len)) { - // 00:00:00.110 Project tasmota Wemos5 Version 9.2.0.1(theo)-2_7_4_9(2020-12-20T17:09:26) - // Project tasmota Wemos5 Version 9.2.0.1(theo)-2_7_4_9(2020-12-20T17:09:26) + // 00:00:02.096 HTP: Web server active on wemos5 with IP address 192.168.2.172 + // HTP: Web server active on wemos5 with IP address 192.168.2.172 uint32_t mxtime = strchr(line, ' ') - line +1; // Remove mxtime if (mxtime > 0) { - strlcpy(TasmotaGlobal.log_data, line +mxtime, len -mxtime); - Syslog(); + uint32_t current_hash = GetHash(SettingsText(SET_SYSLOG_HOST), strlen(SettingsText(SET_SYSLOG_HOST))); + if (syslog_host_hash != current_hash) { + syslog_host_hash = current_hash; + WiFi.hostByName(SettingsText(SET_SYSLOG_HOST), syslog_host_addr); // If sleep enabled this might result in exception so try to do it once using hash + } + if (PortUdp.beginPacket(syslog_host_addr, Settings.syslog_port)) { + char log_data[len +72]; // Hostname + Id + log data + snprintf_P(log_data, sizeof(log_data), PSTR("%s ESP-"), NetworkHostname()); + uint32_t preamble_len = strlen(log_data); + len -= mxtime; + strlcpy(log_data +preamble_len, line +mxtime, len); + // wemos5 ESP-HTP: Web server active on wemos5 with IP address 192.168.2.172 + PortUdp_write(log_data, preamble_len + len); + PortUdp.endPacket(); + delay(1); // Add time for UDP handling (#5512) + } else { + TasmotaGlobal.syslog_level = 0; + TasmotaGlobal.syslog_timer = SYSLOG_TIMER; + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_APPLICATION D_SYSLOG_HOST_NOT_FOUND ". " D_RETRY_IN " %d " D_UNIT_SECOND), SYSLOG_TIMER); + } } } } @@ -1994,7 +1987,7 @@ bool GetLog(uint32_t req_loglevel, uint32_t* index_p, char** entry_pp, size_t* l return false; } -void AddLog(uint32_t loglevel) { +void AddLogData(uint32_t loglevel, const char* log_data) { // char mxtime[10]; // "13:45:21 " // snprintf_P(mxtime, sizeof(mxtime), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d "), RtcTime.hour, RtcTime.minute, RtcTime.second); char mxtime[14]; // "13:45:21.999 " @@ -2002,7 +1995,7 @@ void AddLog(uint32_t loglevel) { if ((loglevel <= TasmotaGlobal.seriallog_level) && (TasmotaGlobal.masterlog_level <= TasmotaGlobal.seriallog_level)) { - Serial.printf("%s%s\r\n", mxtime, TasmotaGlobal.log_data); + Serial.printf("%s%s\r\n", mxtime, log_data); } uint32_t highest_loglevel = Settings.weblog_level; @@ -2019,7 +2012,7 @@ void AddLog(uint32_t loglevel) { TasmotaGlobal.log_buffer_pointer++; // Index 0 is not allowed as it is the end of char string } while (TasmotaGlobal.log_buffer_pointer == TasmotaGlobal.log_buffer[0] || // If log already holds the next index, remove it - strlen(TasmotaGlobal.log_buffer) + strlen(TasmotaGlobal.log_data) + strlen(mxtime) + 4 > LOG_BUFFER_SIZE) // 4 = log_buffer_pointer + '\1' + '\0' + strlen(TasmotaGlobal.log_buffer) + strlen(log_data) + strlen(mxtime) + 4 > LOG_BUFFER_SIZE) // 4 = log_buffer_pointer + '\1' + '\0' { char* it = TasmotaGlobal.log_buffer; it++; // Skip log_buffer_pointer @@ -2028,64 +2021,40 @@ void AddLog(uint32_t loglevel) { memmove(TasmotaGlobal.log_buffer, it, LOG_BUFFER_SIZE -(it-TasmotaGlobal.log_buffer)); // Move buffer forward to remove oldest log line } snprintf_P(TasmotaGlobal.log_buffer, sizeof(TasmotaGlobal.log_buffer), PSTR("%s%c%c%s%s\1"), - TasmotaGlobal.log_buffer, TasmotaGlobal.log_buffer_pointer++, '0'+loglevel, mxtime, TasmotaGlobal.log_data); + TasmotaGlobal.log_buffer, TasmotaGlobal.log_buffer_pointer++, '0'+loglevel, mxtime, log_data); TasmotaGlobal.log_buffer_pointer &= 0xFF; if (!TasmotaGlobal.log_buffer_pointer) { TasmotaGlobal.log_buffer_pointer++; // Index 0 is not allowed as it is the end of char string } } -// TasmotaGlobal.prepped_loglevel = 0; } -/* -void PrepLog_P(uint32_t loglevel, PGM_P formatP, ...) -{ - va_list arg; - va_start(arg, formatP); - vsnprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), formatP, arg); - va_end(arg); - TasmotaGlobal.prepped_loglevel = loglevel; -} -*/ void AddLog_P(uint32_t loglevel, PGM_P formatP, ...) { -/* - if (TasmotaGlobal.prepped_loglevel) { - AddLog(TasmotaGlobal.prepped_loglevel); - } -*/ + char log_data[LOGSZ]; + va_list arg; va_start(arg, formatP); - vsnprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), formatP, arg); + vsnprintf_P(log_data, sizeof(log_data), formatP, arg); va_end(arg); - AddLog(loglevel); + AddLogData(loglevel, log_data); } void AddLog_Debug(PGM_P formatP, ...) { + char log_data[LOGSZ]; + va_list arg; va_start(arg, formatP); - vsnprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), formatP, arg); + vsnprintf_P(log_data, sizeof(log_data), formatP, arg); va_end(arg); - AddLog(LOG_LEVEL_DEBUG); + AddLogData(LOG_LEVEL_DEBUG, log_data); } void AddLogBuffer(uint32_t loglevel, uint8_t *buffer, uint32_t count) { -/* - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("DMP:")); - for (uint32_t i = 0; i < count; i++) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, *(buffer++)); - } - AddLog(loglevel); -*/ -/* - strcpy_P(TasmotaGlobal.log_data, PSTR("DMP: ")); - ToHex_P(buffer, count, TasmotaGlobal.log_data + strlen(TasmotaGlobal.log_data), sizeof(TasmotaGlobal.log_data) - strlen(TasmotaGlobal.log_data), ' '); - AddLog(loglevel); -*/ char hex_char[(count * 3) + 2]; AddLog_P(loglevel, PSTR("DMP: %s"), ToHex_P(buffer, count, hex_char, sizeof(hex_char), ' ')); } @@ -2101,16 +2070,18 @@ void AddLogMissed(const char *sensor, uint32_t misses) } void AddLogBufferSize(uint32_t loglevel, uint8_t *buffer, uint32_t count, uint32_t size) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("DMP:")); + char log_data[LOGSZ]; + + snprintf_P(log_data, sizeof(log_data), PSTR("DMP:")); for (uint32_t i = 0; i < count; i++) { if (1 == size) { // uint8_t - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, *(buffer)); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X"), log_data, *(buffer)); } else { // uint16_t - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X%02X"), TasmotaGlobal.log_data, *(buffer +1), *(buffer)); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X%02X"), log_data, *(buffer +1), *(buffer)); } buffer += size; } - AddLog(loglevel); + AddLogData(loglevel, log_data); } /*********************************************************************************************\ diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index 099d4f468..a226f8312 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -245,7 +245,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) DEBUG_CORE_LOG(PSTR("CMD: Payload %d"), payload); // TasmotaGlobal.backlog_timer = millis() + (100 * MIN_BACKLOG_DELAY); - TasmotaGlobal.backlog_timer = millis() + Settings.param[P_BACKLOG_DELAY]; + TasmotaGlobal.backlog_timer = millis() + Settings.param[P_BACKLOG_DELAY]; // SetOption34 char command[CMDSZ] = { 0 }; XdrvMailbox.command = command; @@ -1188,7 +1188,7 @@ void CmndGpio(void) } char stemp1[TOPSZ]; if ((ResponseAppend_P(PSTR("\"" D_CMND_GPIO "%d\":{\"%d\":\"%s%s\"}"), i, sensor_type, GetTextIndexed(stemp1, sizeof(stemp1), sensor_name_idx, sensor_names), sindex) > (LOGSZ - TOPSZ)) || (i == ARRAY_SIZE(Settings.my_gp.io) -1)) { - ResponseJsonEndEnd(); + ResponseJsonEnd(); MqttPublishPrefixTopic_P(RESULT_OR_STAT, XdrvMailbox.command); jsflg2 = true; jsflg = false; diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 98da69ee2..bd92688f6 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -897,11 +897,6 @@ void Every100mSeconds(void) // As the max amount of sleep = 250 mSec this loop will shift in time... power_t power_now; -/* - if (TasmotaGlobal.prepped_loglevel) { - AddLog(TasmotaGlobal.prepped_loglevel); - } -*/ if (TasmotaGlobal.latching_relay_pulse) { TasmotaGlobal.latching_relay_pulse--; if (!TasmotaGlobal.latching_relay_pulse) SetLatchingRelay(0, 0); @@ -1019,7 +1014,8 @@ void Every250mSeconds(void) ota_result = 0; ota_retry_counter--; if (ota_retry_counter) { - strlcpy(TasmotaGlobal.mqtt_data, GetOtaUrl(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data)), sizeof(TasmotaGlobal.mqtt_data)); + char ota_url[TOPSZ]; + strlcpy(TasmotaGlobal.mqtt_data, GetOtaUrl(ota_url, sizeof(ota_url)), sizeof(TasmotaGlobal.mqtt_data)); #ifndef FIRMWARE_MINIMAL if (RtcSettings.ota_loader) { // OTA File too large so try OTA minimal version diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 5befb1a68..b70bd4637 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -170,7 +170,6 @@ struct { char mqtt_client[99]; // Composed MQTT Clientname char mqtt_topic[TOPSZ]; // Composed MQTT topic char mqtt_data[MESSZ]; // MQTT publish buffer and web page ajax buffer - char log_data[LOGSZ]; // Logging char log_buffer[LOG_BUFFER_SIZE]; // Web log buffer } TasmotaGlobal; @@ -320,8 +319,6 @@ void setup(void) { AddLog_P(LOG_LEVEL_INFO, PSTR(D_WARNING_MINIMAL_VERSION)); #endif // FIRMWARE_MINIMAL - memcpy_P(TasmotaGlobal.log_data, VERSION_MARKER, 1); // Dummy for compiler saving VERSION_MARKER - RtcInit(); #ifdef USE_ARDUINO_OTA diff --git a/tasmota/xdrv_02_mqtt.ino b/tasmota/xdrv_02_mqtt.ino index a91e801e2..5baba474f 100644 --- a/tasmota/xdrv_02_mqtt.ino +++ b/tasmota/xdrv_02_mqtt.ino @@ -294,7 +294,7 @@ void MqttUnsubscribe(const char *topic) void MqttPublishLoggingAsync(bool refresh) { static uint32_t index = 1; - if (!Settings.flag.mqtt_enabled) { return; } // SetOption3 - Enable MQTT + if (!Settings.mqttlog_level || !Settings.flag.mqtt_enabled) { return; } // SetOption3 - Enable MQTT if (refresh && !NeedLogRefresh(Settings.mqttlog_level, index)) { return; } char* line; @@ -331,13 +331,14 @@ void MqttPublish(const char* topic, bool retained) } } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%s = %s"), slog_type, (Settings.flag.mqtt_enabled) ? topic : strrchr(topic,'/')+1, TasmotaGlobal.mqtt_data); // SetOption3 - Enable MQTT - if (strlen(TasmotaGlobal.log_data) >= (sizeof(TasmotaGlobal.log_data) - strlen(sretained) -1)) { - TasmotaGlobal.log_data[sizeof(TasmotaGlobal.log_data) - strlen(sretained) -5] = '\0'; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s ..."), TasmotaGlobal.log_data); + char log_data[LOGSZ]; + snprintf_P(log_data, sizeof(log_data), PSTR("%s%s = %s"), slog_type, (Settings.flag.mqtt_enabled) ? topic : strrchr(topic,'/')+1, TasmotaGlobal.mqtt_data); // SetOption3 - Enable MQTT + if (strlen(log_data) >= (sizeof(log_data) - strlen(sretained) -1)) { + log_data[sizeof(log_data) - strlen(sretained) -5] = '\0'; + snprintf_P(log_data, sizeof(log_data), PSTR("%s ..."), log_data); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%s"), TasmotaGlobal.log_data, sretained); - AddLog(LOG_LEVEL_INFO); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%s"), log_data, sretained); + AddLogData(LOG_LEVEL_INFO, log_data); if (Settings.ledstate &0x04) { TasmotaGlobal.blinks++; diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index d91fb5cce..c43f47826 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -3622,7 +3622,8 @@ void toLogN(const char *cp, uint8_t len) { void toLogEOL(const char *s1,const char *str) { if (!str) return; uint8_t index = 0; - char *cp = TasmotaGlobal.log_data; + char log_data[LOGSZ]; + char *cp = log_data; strcpy(cp, s1); cp += strlen(s1); while (*str) { @@ -3630,7 +3631,7 @@ void toLogEOL(const char *s1,const char *str) { *cp++ = *str++; } *cp = 0; - AddLog(LOG_LEVEL_INFO); + AddLogData(LOG_LEVEL_INFO, log_data); } diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 5636eeceb..cd92e2e32 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -370,8 +370,9 @@ void TryResponseAppend_P(const char *format, ...) { AddLog_P(LOG_LEVEL_ERROR, PSTR("%s (%u/%u):"), kHAssError1, dlen, slen); va_start(args, format); - vsnprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), format, args); - AddLog(LOG_LEVEL_ERROR); + char log_data[LOGSZ]; + vsnprintf_P(log_data, sizeof(log_data), format, args); + AddLogData(LOG_LEVEL_ERROR, log_data); } else { diff --git a/tasmota/xdrv_16_tuyamcu.ino b/tasmota/xdrv_16_tuyamcu.ino index 033fd3380..13a7864c5 100644 --- a/tasmota/xdrv_16_tuyamcu.ino +++ b/tasmota/xdrv_16_tuyamcu.ino @@ -404,16 +404,17 @@ void TuyaSendCmd(uint8_t cmd, uint8_t payload[] = nullptr, uint16_t payload_len TuyaSerial->write(cmd); // Tuya command TuyaSerial->write(payload_len >> 8); // following data length (Hi) TuyaSerial->write(payload_len & 0xFF); // following data length (Lo) - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("TYA: Send \"55aa00%02x%02x%02x"), cmd, payload_len >> 8, payload_len & 0xFF); + char log_data[LOGSZ]; + snprintf_P(log_data, sizeof(log_data), PSTR("TYA: Send \"55aa00%02x%02x%02x"), cmd, payload_len >> 8, payload_len & 0xFF); for (uint32_t i = 0; i < payload_len; ++i) { TuyaSerial->write(payload[i]); checksum += payload[i]; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x"), TasmotaGlobal.log_data, payload[i]); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%02x"), log_data, payload[i]); } TuyaSerial->write(checksum); TuyaSerial->flush(); - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x\""), TasmotaGlobal.log_data, checksum); - AddLog(LOG_LEVEL_DEBUG); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%02x\""), log_data, checksum); + AddLogData(LOG_LEVEL_DEBUG, log_data); } void TuyaSendState(uint8_t id, uint8_t type, uint8_t* value) diff --git a/tasmota/xdrv_23_zigbee_2a_devices_impl.ino b/tasmota/xdrv_23_zigbee_2a_devices_impl.ino index 396f8ec06..b54f2aff1 100644 --- a/tasmota/xdrv_23_zigbee_2a_devices_impl.ino +++ b/tasmota/xdrv_23_zigbee_2a_devices_impl.ino @@ -534,20 +534,19 @@ void Z_Device::jsonPublishAttrList(const char * json_prefix, const Z_attribute_l } if (Settings.flag4.zigbee_distinct_topics) { - if (Settings.flag4.zb_topic_fname && friendlyName) { - //Clean special characters and check size of friendly name + char subtopic[TOPSZ]; + if (Settings.flag4.zb_topic_fname && friendlyName && strlen(friendlyName)) { + // Clean special characters char stemp[TOPSZ]; - strlcpy(stemp, (!strlen(friendlyName)) ? MQTT_TOPIC : friendlyName, sizeof(stemp)); + strlcpy(stemp, friendlyName, sizeof(stemp)); MakeValidMqtt(0, stemp); - //Create topic with Prefix3 and cleaned up friendly name - char frtopic[TOPSZ]; - snprintf_P(frtopic, sizeof(frtopic), PSTR("%s/%s/" D_RSLT_SENSOR), SettingsText(SET_MQTTPREFIX3), stemp); - MqttPublish(frtopic, Settings.flag.mqtt_sensor_retain); + snprintf_P(subtopic, sizeof(subtopic), PSTR("%s/%s"), TasmotaGlobal.mqtt_topic, stemp); } else { - char subtopic[16]; - snprintf_P(subtopic, sizeof(subtopic), PSTR("%04X/" D_RSLT_SENSOR), shortaddr); - MqttPublishPrefixTopic_P(TELE, subtopic, Settings.flag.mqtt_sensor_retain); + snprintf_P(subtopic, sizeof(subtopic), PSTR("%s/%04X"), TasmotaGlobal.mqtt_topic, shortaddr); } + char stopic[TOPSZ]; + GetTopic_P(stopic, TELE, subtopic, D_RSLT_SENSOR); + MqttPublish(stopic, Settings.flag.mqtt_sensor_retain); } else { MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_SENSOR), Settings.flag.mqtt_sensor_retain); } @@ -624,10 +623,10 @@ Z_Device & Z_Devices::parseDeviceFromName(const char * param, uint16_t * parsed_ } /*********************************************************************************************\ - * + * * Methods below build a JSON representation of device data * Used by: ZbLight, ZbStatus, ZbInfo - * + * \*********************************************************************************************/ // Add "Device":"0x1234","Name":"FrienflyName" diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 174871c44..d2a1c328f 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -725,15 +725,19 @@ public: char hex_char[_payload.len()*2+2]; ToHex_P((unsigned char*)_payload.getBuffer(), _payload.len(), hex_char, sizeof(hex_char)); Response_P(PSTR("{\"" D_JSON_ZIGBEEZCL_RECEIVED "\":{" - "\"groupid\":%d," "\"clusterid\":%d," "\"srcaddr\":\"0x%04X\"," + "\"groupid\":%d," "\"clusterid\":\"0x%04X\"," "\"srcaddr\":\"0x%04X\"," "\"srcendpoint\":%d," "\"dstendpoint\":%d," "\"wasbroadcast\":%d," "\"" D_CMND_ZIGBEE_LINKQUALITY "\":%d," "\"securityuse\":%d," "\"seqnumber\":%d," - "\"fc\":\"0x%02X\",\"manuf\":\"0x%04X\",\"transact\":%d," + "\"fc\":\"0x%02X\"," + "\"frametype\":%d,\"direction\":%d,\"disableresp\":%d," + "\"manuf\":\"0x%04X\",\"transact\":%d," "\"cmdid\":\"0x%02X\",\"payload\":\"%s\"}}"), _groupaddr, _cluster_id, _srcaddr, _srcendpoint, _dstendpoint, _wasbroadcast, _linkquality, _securityuse, _seqnumber, - _frame_control, _manuf_code, _transact_seq, _cmd_id, + _frame_control, + _frame_control.b.frame_type, _frame_control.b.direction, _frame_control.b.disable_def_resp, + _manuf_code, _transact_seq, _cmd_id, hex_char); if (Settings.flag3.tuya_serial_mqtt_publish) { MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_SENSOR)); diff --git a/tasmota/xdrv_30_exs_dimmer.ino b/tasmota/xdrv_30_exs_dimmer.ino index df32b6109..84b051c68 100644 --- a/tasmota/xdrv_30_exs_dimmer.ino +++ b/tasmota/xdrv_30_exs_dimmer.ino @@ -124,13 +124,8 @@ void ExsSerialSend(const uint8_t data[] = nullptr, uint16_t len = 0) char rc; #ifdef EXS_DEBUG - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("EXS: Tx Packet: \"")); - for (uint32_t i = 0; i < len; i++) - { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x"), TasmotaGlobal.log_data, data[i]); - } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s\""), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR("EXS: Tx Packet:")); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t *)data, len); #endif while (retries) @@ -368,13 +363,8 @@ bool ExsModuleSelected(void) bool ExsSetChannels(void) { #ifdef EXS_DEBUG - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("EXS: SetChannels: \"")); - for (int i = 0; i < XdrvMailbox.data_len; i++) - { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x"), TasmotaGlobal.log_data, ((uint8_t *)XdrvMailbox.data)[i]); - } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s\""), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR("EXS: SetChannels:")); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t *)XdrvMailbox.data, XdrvMailbox.data_len); #endif Exs.dimm[0] = ((uint8_t *)XdrvMailbox.data)[0]; @@ -466,13 +456,8 @@ void ExsSerialInput(void) Exs.cmd_status = 0; #ifdef EXS_DEBUG - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("EXS: RX Packet: \"")); - for (uint32_t i = 0; i < Exs.byte_counter; i++) - { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x"), TasmotaGlobal.log_data, Exs.buffer[i]); - } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s\", CRC: 0x%02x"), TasmotaGlobal.log_data, crc); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR("EXS: CRC: 0x%02x, RX Packet:"), crc); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t *)Exs.buffer, Exs.byte_counter); #endif if (Exs.buffer[0] == crc) diff --git a/tasmota/xdrv_45_shelly_dimmer.ino b/tasmota/xdrv_45_shelly_dimmer.ino index ab5743bfa..b4785291e 100644 --- a/tasmota/xdrv_45_shelly_dimmer.ino +++ b/tasmota/xdrv_45_shelly_dimmer.ino @@ -267,10 +267,8 @@ bool ShdSerialSend(const uint8_t data[] = nullptr, uint16_t len = 0) int retries = 3; #ifdef SHELLY_DIMMER_DEBUG - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR(SHD_LOGNAME "Tx Packet:")); - for (uint32_t i = 0; i < len; i++) - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02x"), TasmotaGlobal.log_data, data[i]); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR(SHD_LOGNAME "Tx Packet:")); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t*)data, len); #endif // SHELLY_DIMMER_DEBUG while (retries--) @@ -696,10 +694,8 @@ bool ShdSerialInput(void) // finished #ifdef SHELLY_DIMMER_DEBUG Shd.byte_counter++; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR(SHD_LOGNAME "RX Packet:")); - for (uint32_t i = 0; i < Shd.byte_counter; i++) - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02x"), TasmotaGlobal.log_data, Shd.buffer[i]); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR(SHD_LOGNAME "Rx Packet:")); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, Shd.buffer, Shd.byte_counter); #endif // SHELLY_DIMMER_DEBUG Shd.byte_counter = 0; @@ -711,12 +707,9 @@ bool ShdSerialInput(void) { // wrong data #ifdef SHELLY_DIMMER_DEBUG - AddLog_P(LOG_LEVEL_DEBUG, PSTR(SHD_LOGNAME "Byte %i of received data frame is invalid"), Shd.byte_counter); + AddLog_P(LOG_LEVEL_DEBUG, PSTR(SHD_LOGNAME "Byte %i of received data frame is invalid. Rx Packet:"), Shd.byte_counter); Shd.byte_counter++; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR(SHD_LOGNAME "RX Packet:")); - for (uint32_t i = 0; i < Shd.byte_counter; i++) - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02x"), TasmotaGlobal.log_data, Shd.buffer[i]); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, Shd.buffer, Shd.byte_counter); #endif // SHELLY_DIMMER_DEBUG Shd.byte_counter = 0; } @@ -746,11 +739,8 @@ bool ShdModuleSelected(void) { bool ShdSetChannels(void) { #ifdef SHELLY_DIMMER_DEBUG - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR(SHD_LOGNAME "SetChannels: \"")); - for (int i = 0; i < XdrvMailbox.data_len; i++) - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%02x"), TasmotaGlobal.log_data, ((uint8_t *)XdrvMailbox.data)[i]); - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s\""), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_DEBUG_MORE); + AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR(SHD_LOGNAME "SetChannels:")); + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t *)XdrvMailbox.data, XdrvMailbox.data_len); #endif // SHELLY_DIMMER_DEBUG uint16_t brightness = ((uint32_t *)XdrvMailbox.data)[0]; diff --git a/tasmota/xdrv_47_ftc532.ino b/tasmota/xdrv_47_ftc532.ino index 4c978cf43..82c1e9272 100644 --- a/tasmota/xdrv_47_ftc532.ino +++ b/tasmota/xdrv_47_ftc532.ino @@ -55,8 +55,8 @@ #define FTC532_KEYS_MAX 8 -#define FTC532_STATE_WAITING 0x01 -#define FTC532_STATE_READING 0x02 +#define FTC532_STATE_WAITING false +#define FTC532_STATE_READING true // Rising edge timing in microseconds #define FTC532_BIT 377 @@ -67,14 +67,16 @@ struct FTC532 { volatile uint32_t rxtime; // ISR timer memory - volatile uint16_t errors; // error counter volatile uint16_t sample = 0xF0F0; // buffer for bit-coded time samples volatile uint16_t rxbit; // ISR bit counter - uint16_t keys = 0; // bitmap of active keys - uint16_t old_keys = 0; // previously active keys - volatile uint8_t state; // ISR state - volatile uint8_t valid; // did we ever receive valid data? + uint8_t keys = 0; // bitmap of active keys + uint8_t old_keys = 0; // previously active keys + volatile bool state; // ISR state bool present = false; +#ifdef DEBUG_TASMOTA_DRIVER + volatile uint16_t errors; // error counter + volatile bool valid; // did we ever receive valid data? +#endif // DEBUG_TASMOTA_DRIVER } Ftc532; const char ftc532_json[] PROGMEM = "\"FTC532\":{\"KEYS\":\""; @@ -92,7 +94,9 @@ void ICACHE_RAM_ATTR ftc532_ISR(void) { // Hardware interrupt routine, trigger return; } // FTC532_STATE_READING starts here if (time_diff > FTC532_LONG + FTC532_BIT) { +#ifdef DEBUG_TASMOTA_DRIVER ++Ftc532.errors; // frame error +#endif // DEBUG_TASMOTA_DRIVER Ftc532.state = FTC532_STATE_WAITING; return; } @@ -104,16 +108,19 @@ void ICACHE_RAM_ATTR ftc532_ISR(void) { // Hardware interrupt routine, trigger ++Ftc532.rxbit; if (Ftc532.rxbit == FTC532_KEYS_MAX * 2) { // frame complete Ftc532.rxbit = 0; - Ftc532.valid = 1; +#ifdef DEBUG_TASMOTA_DRIVER + Ftc532.valid = true; +#endif // DEBUG_TASMOTA_DRIVER Ftc532.state = FTC532_STATE_WAITING; } } void ftc532_init(void) { // Initialize if (!PinUsed(GPIO_FTC532)) { return; } - +#ifdef DEBUG_TASMOTA_DRIVER Ftc532.errors = 0; - Ftc532.valid = 0; + Ftc532.valid = false; +#endif // DEBUG_TASMOTA_DRIVER Ftc532.state = FTC532_STATE_WAITING; Ftc532.rxtime = micros(); pinMode(Pin(GPIO_FTC532), INPUT_PULLUP); @@ -122,15 +129,19 @@ void ftc532_init(void) { // Initialize } void ftc532_update(void) { // Usually called every 50 ms -// // WARNING: Reduce callback frequency if this code is enabled +#ifdef DEBUG_TASMOTA_DRIVER +// WARNING: Reduce callback frequency if this code is enabled // if ((Ftc532.sample & 0xF) != ((~Ftc532.sample >> 4) & 0xF) || ((Ftc532.sample >> 8) & 0xF) != ((~Ftc532.sample >> 12) & 0xF)) { -// AddLog_P(LOG_LEVEL_ERROR, PSTR("FTC: inverted sample does not match %x %x %x %x"), +// AddLog_P(LOG_LEVEL_DEBUG, PSTR("FTC: inverted sample does not match %x %x %x %x"), // Ftc532.sample & 0xF, (~Ftc532.sample >> 4) & 0xF, (Ftc532.sample >> 8) & 0xF, (~Ftc532.sample >> 12) & 0xF); // } +#endif // DEBUG_TASMOTA_DRIVER Ftc532.keys = (Ftc532.sample & 0xF) | ((Ftc532.sample >> 4) & 0xF0); if (Ftc532.keys != Ftc532.old_keys) { -// AddLog_P(LOG_LEVEL_DEBUG, PSTR("FTC: SAM=%04X KEY=%02X OLD=%02X ERR=%u OK=%u TIME=%lu Pin=%u"), -// Ftc532.sample, Ftc532.keys, Ftc532.old_keys, Ftc532.errors, Ftc532.valid, Ftc532.rxtime, Pin(GPIO_FTC532)); +#ifdef DEBUG_TASMOTA_DRIVER + AddLog_P(LOG_LEVEL_DEBUG, PSTR("FTC: SAM=%04X KEY=%02X OLD=%02X ERR=%u OK=%u TIME=%lu Pin=%u"), + Ftc532.sample, Ftc532.keys, Ftc532.old_keys, Ftc532.errors, Ftc532.valid, Ftc532.rxtime, Pin(GPIO_FTC532)); +#endif // DEBUG_TASMOTA_DRIVER ftc532_publish(); Ftc532.old_keys = Ftc532.keys; } @@ -171,4 +182,4 @@ bool Xdrv47(uint8_t function) { return result; } -#endif // USE_FTC532 \ No newline at end of file +#endif // USE_FTC532 diff --git a/tasmota/xdrv_99_debug.ino b/tasmota/xdrv_99_debug.ino index 06dccf8e5..e4f00cec2 100644 --- a/tasmota/xdrv_99_debug.ino +++ b/tasmota/xdrv_99_debug.ino @@ -222,7 +222,7 @@ void DebugFreeMem(void) void DebugRtcDump(char* parms) { #ifdef ESP8266 - #define CFG_COLS 16 + uint32_t CFG_COLS = 16; uint16_t idx; uint16_t maxrow; @@ -258,24 +258,25 @@ void DebugRtcDump(char* parms) maxrow = srow + mrow; } + char log_data[LOGSZ]; for (row = srow; row < maxrow; row++) { idx = row * CFG_COLS; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%03X:"), idx); + snprintf_P(log_data, sizeof(log_data), PSTR("%03X:"), idx); for (col = 0; col < CFG_COLS; col++) { if (!(col%4)) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, buffer[idx + col]); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X"), log_data, buffer[idx + col]); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s |"), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s |"), log_data); for (col = 0; col < CFG_COLS; col++) { // if (!(col%4)) { -// snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); +// snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); // } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%c"), TasmotaGlobal.log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%c"), log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s|"), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_INFO); + snprintf_P(log_data, sizeof(log_data), PSTR("%s|"), log_data); + AddLogData(LOG_LEVEL_INFO, log_data); } #endif // ESP8266 } @@ -309,34 +310,32 @@ void DebugDump(uint32_t start, uint32_t size) { maxrow = srow + mrow; } + char log_data[LOGSZ]; for (row = srow; row < maxrow; row++) { idx = row * CFG_COLS; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%03X:"), idx); + snprintf_P(log_data, sizeof(log_data), PSTR("%03X:"), idx); for (col = 0; col < CFG_COLS; col++) { if (!(col%4)) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, buffer[idx + col]); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X"), log_data, buffer[idx + col]); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s |"), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s |"), log_data); for (col = 0; col < CFG_COLS; col++) { // if (!(col%4)) { -// snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); +// snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); // } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%c"), TasmotaGlobal.log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%c"), log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s|"), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_INFO); + snprintf_P(log_data, sizeof(log_data), PSTR("%s|"), log_data); + AddLogData(LOG_LEVEL_INFO, log_data); delay(1); } } - - - void DebugCfgDump(char* parms) { - #define CFG_COLS 16 + uint32_t CFG_COLS = 16; uint16_t idx; uint16_t maxrow; @@ -362,24 +361,25 @@ void DebugCfgDump(char* parms) maxrow = srow + mrow; } + char log_data[LOGSZ]; for (row = srow; row < maxrow; row++) { idx = row * CFG_COLS; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%03X:"), idx); + snprintf_P(log_data, sizeof(log_data), PSTR("%03X:"), idx); for (col = 0; col < CFG_COLS; col++) { if (!(col%4)) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, buffer[idx + col]); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X"), log_data, buffer[idx + col]); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s |"), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s |"), log_data); for (col = 0; col < CFG_COLS; col++) { // if (!(col%4)) { -// snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s "), TasmotaGlobal.log_data); +// snprintf_P(log_data, sizeof(log_data), PSTR("%s "), log_data); // } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%c"), TasmotaGlobal.log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%c"), log_data, ((buffer[idx + col] > 0x20) && (buffer[idx + col] < 0x7F)) ? (char)buffer[idx + col] : ' '); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s|"), TasmotaGlobal.log_data); - AddLog(LOG_LEVEL_INFO); + snprintf_P(log_data, sizeof(log_data), PSTR("%s|"), log_data); + AddLogData(LOG_LEVEL_INFO, log_data); delay(1); } } @@ -397,16 +397,17 @@ void DebugCfgPeek(char* parms) uint16_t data16 = (buffer[address +1] << 8) + buffer[address]; uint32_t data32 = (buffer[address +3] << 24) + (buffer[address +2] << 16) + data16; - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%03X:"), address); + char log_data[LOGSZ]; + snprintf_P(log_data, sizeof(log_data), PSTR("%03X:"), address); for (uint32_t i = 0; i < 4; i++) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s %02X"), TasmotaGlobal.log_data, buffer[address +i]); + snprintf_P(log_data, sizeof(log_data), PSTR("%s %02X"), log_data, buffer[address +i]); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s |"), TasmotaGlobal.log_data); + snprintf_P(log_data, sizeof(log_data), PSTR("%s |"), log_data); for (uint32_t i = 0; i < 4; i++) { - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s%c"), TasmotaGlobal.log_data, ((buffer[address +i] > 0x20) && (buffer[address +i] < 0x7F)) ? (char)buffer[address +i] : ' '); + snprintf_P(log_data, sizeof(log_data), PSTR("%s%c"), log_data, ((buffer[address +i] > 0x20) && (buffer[address +i] < 0x7F)) ? (char)buffer[address +i] : ' '); } - snprintf_P(TasmotaGlobal.log_data, sizeof(TasmotaGlobal.log_data), PSTR("%s| 0x%02X (%d), 0x%04X (%d), 0x%0LX (%lu)"), TasmotaGlobal.log_data, data8, data8, data16, data16, data32, data32); - AddLog(LOG_LEVEL_INFO); + snprintf_P(log_data, sizeof(log_data), PSTR("%s| 0x%02X (%d), 0x%04X (%d), 0x%0LX (%lu)"), log_data, data8, data8, data16, data16, data32, data32); + AddLogData(LOG_LEVEL_INFO, log_data); } void DebugCfgPoke(char* parms) diff --git a/tasmota/xsns_53_sml.ino b/tasmota/xsns_53_sml.ino index 93040dedb..804eb1859 100755 --- a/tasmota/xsns_53_sml.ino +++ b/tasmota/xsns_53_sml.ino @@ -821,40 +821,41 @@ uint8_t sml_logindex; void Dump2log(void) { -int16_t index=0,hcnt=0; -uint32_t d_lastms; -uint8_t dchars[16]; + int16_t index=0,hcnt=0; + uint32_t d_lastms; + uint8_t dchars[16]; + char log_data[LOGSZ]; // May be a lot smaller... //if (!SML_SAVAILABLE) return; if (dump2log&8) { // combo mode while (SML_SAVAILABLE) { - TasmotaGlobal.log_data[index]=':'; + log_data[index]=':'; index++; - TasmotaGlobal.log_data[index]=' '; + log_data[index]=' '; index++; d_lastms=millis(); while ((millis()-d_lastms)<40) { if (SML_SAVAILABLE) { uint8_t c=SML_SREAD; - sprintf(&TasmotaGlobal.log_data[index],"%02x ",c); + sprintf(&log_data[index],"%02x ",c); dchars[hcnt]=c; index+=3; hcnt++; if (hcnt>15) { // line complete, build asci chars - TasmotaGlobal.log_data[index]='='; + log_data[index]='='; index++; - TasmotaGlobal.log_data[index]='>'; + log_data[index]='>'; index++; - TasmotaGlobal.log_data[index]=' '; + log_data[index]=' '; index++; for (uint8_t ccnt=0; ccnt<16; ccnt++) { if (isprint(dchars[ccnt])) { - TasmotaGlobal.log_data[index]=dchars[ccnt]; + log_data[index]=dchars[ccnt]; } else { - TasmotaGlobal.log_data[index]=' '; + log_data[index]=' '; } index++; } @@ -863,8 +864,8 @@ uint8_t dchars[16]; } } if (index>0) { - TasmotaGlobal.log_data[index]=0; - AddLog(LOG_LEVEL_INFO); + log_data[index]=0; + AddLogData(LOG_LEVEL_INFO, log_data); index=0; hcnt=0; } @@ -875,24 +876,24 @@ uint8_t dchars[16]; while (SML_SAVAILABLE) { char c=SML_SREAD&0x7f; if (c=='\n' || c=='\r') { - TasmotaGlobal.log_data[sml_logindex]=0; + log_data[sml_logindex]=0; AddLog(LOG_LEVEL_INFO); sml_logindex=2; - TasmotaGlobal.log_data[0]=':'; - TasmotaGlobal.log_data[1]=' '; + log_data[0]=':'; + log_data[1]=' '; break; } - TasmotaGlobal.log_data[sml_logindex]=c; - if (sml_logindex2) { - TasmotaGlobal.log_data[index]=0; - AddLog(LOG_LEVEL_INFO); + log_data[index]=0; + AddLogData(LOG_LEVEL_INFO, log_data); } } }