Skip to content

Commit

Permalink
Wall display with ESP-IDF v4.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Dec 17, 2024
1 parent 22f5893 commit 2b9a845
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 59 deletions.
117 changes: 58 additions & 59 deletions .github/workflows/validate_esphome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,79 +473,78 @@ jobs:
cp ${{ steps.build_nspanel_fw.outputs.name }}/${{ steps.build_nspanel_fw.outputs.name }}.factory.bin prebuilt/nspanel_esphome_prebuilt.factory.bin || true
cp ${{ steps.build_nspanel_fw.outputs.name }}/manifest.json prebuilt/nspanel_esphome_prebuilt.manifest.json || true
# - name: Build ESPHome Prebuilt Wall Display Firmware
# id: build_wall_display_fw
# uses: esphome/build-action@main
# with:
# yaml-file: prebuilt/wall_display.yaml
# version: beta

# - name: Update manifest.json - name
# uses: jossef/action-set-json-field@v2.2
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# with:
# file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
# field: name
# value: Wall Display

# - name: Update manifest.json - version
# uses: jossef/action-set-json-field@v2.2
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# with:
# file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
# field: version
# value: ${{ steps.extract_version.outputs.version }}

# - name: Update manifest.json - builds.chipFamily
# uses: jossef/action-set-json-field@v2.2
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# with:
# file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
# field: builds.chipFamily
# value: ESP32

# - name: Update manifest.json - builds.ota.path
# uses: jossef/action-set-json-field@v2.2
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# with:
# file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
# field: builds.ota.path
# value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin"

# - name: Update manifest.json - builds.ota.release_url
# uses: jossef/action-set-json-field@v2.2
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# with:
# file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
# field: builds.ota.release_url
# value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}"

# - name: Move and Rename Firmware File - wall_display
# if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
# run: |
# mkdir -p prebuilt
# cp -R ${{ steps.build_wall_display_fw.outputs.name }}/. prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/
# cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.ota.bin prebuilt/wall_display.bin || true
# cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.factory.bin prebuilt/wall_display.factory.bin || true
# cp ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json prebuilt/wall_display.manifest.json || true
- name: Build ESPHome Prebuilt Wall Display Firmware
id: build_wall_display_fw
uses: esphome/build-action@main
with:
yaml-file: prebuilt/wall_display.yaml
version: beta

- name: Update manifest.json - name
uses: jossef/action-set-json-field@v2.2
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: name
value: Wall Display

- name: Update manifest.json - version
uses: jossef/action-set-json-field@v2.2
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: version
value: ${{ steps.extract_version.outputs.version }}

- name: Update manifest.json - builds.chipFamily
uses: jossef/action-set-json-field@v2.2
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: builds.chipFamily
value: ESP32

- name: Update manifest.json - builds.ota.path
uses: jossef/action-set-json-field@v2.2
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: builds.ota.path
value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin"

- name: Update manifest.json - builds.ota.release_url
uses: jossef/action-set-json-field@v2.2
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: builds.ota.release_url
value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}"

- name: Move and Rename Firmware File - wall_display
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
run: |
mkdir -p prebuilt
cp -R ${{ steps.build_wall_display_fw.outputs.name }}/. prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/
cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.ota.bin prebuilt/wall_display.bin || true
cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.factory.bin prebuilt/wall_display.factory.bin || true
cp ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json prebuilt/wall_display.manifest.json || true
- name: Generate checksum for Firmware Files
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
run: |
md5sum prebuilt/nspanel_esphome_prebuilt.bin > prebuilt/nspanel_esphome_prebuilt.bin.md5
md5sum prebuilt/nspanel_esphome_prebuilt.factory.bin > prebuilt/nspanel_esphome_prebuilt.factory.bin.md5
# md5sum prebuilt/wall_display.bin > prebuilt/wall_display.bin.md5
# md5sum prebuilt/wall_display.factory.bin > prebuilt/wall_display.factory.bin.md5
md5sum prebuilt/wall_display.bin > prebuilt/wall_display.bin.md5
md5sum prebuilt/wall_display.factory.bin > prebuilt/wall_display.factory.bin.md5
- name: Commit and Push Firmware Files
if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.*
git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.* prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/*.*
git commit -m "Pre-built firmware update: ${{ github.run_id }}"
git push
# git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.* prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/*.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
...
6 changes: 6 additions & 0 deletions prebuilt/wall_display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ dashboard_import:
package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/wall_display.yaml@main
import_full_config: false

esp32:
framework:
type: esp-idf
version: 4.4.8
platform_version: 5.4.0

esp32_ble:
id: ble

Expand Down

0 comments on commit 2b9a845

Please sign in to comment.