Skip to content

Commit

Permalink
New repository format
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz committed Aug 2, 2024
1 parent e4ff067 commit 6dce088
Show file tree
Hide file tree
Showing 27 changed files with 400 additions and 225 deletions.
115 changes: 30 additions & 85 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,36 @@
name: Build

Check warning on line 1 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

1:1 [document-start] missing document start "---"

on:

Check warning on line 3 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

3:1 [truthy] truthy value should be one of [false, true]
push:
branches:
- main
pull_request:
workflow_dispatch:
release:
types: [published]

jobs:
build:
name: Build ${{ matrix.firmware.name }}
runs-on: ubuntu-latest
strategy:
matrix:
firmware:
- file: m5stack-atom-lite.yaml
name: M5Stack Atom Lite
manifest_filename: m5stack-atom-lite-manifest.json
- file: esp32-generic.yaml
name: ESP32 Generic
manifest_filename: esp32-generic-manifest.json
- file: olimex-esp32-poe-iso.yaml
name: Olimex PoE ISO
manifest_filename: olimex-esp32-poe-iso-manifest.json
- file: wt32-eth01.yaml
name: Wireless-Tag WT32-ETH01
manifest_filename: wt32-eth01-manifest.json
- file: gl-s10.yaml
name: GL.iNet GL-S10
manifest_filename: gl-s10-manifest.json
- file: lilygo-t-eth-poe.yaml
name: LilyGO T-ETH-POE
manifest_filename: lilygo-t-eth-poe-manifest.json
fail-fast: false
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build firmware
uses: esphome/[email protected]
id: esphome-build
with:
yaml_file: ${{ matrix.firmware.file }}
version: latest
- name: Copy firmware and manifest
run: |
mkdir output
mv ${{ steps.esphome-build.outputs.name }} output/
jq -s '{"name": "${{ matrix.firmware.name }}", "version": "${{ steps.esphome-build.outputs.version }}", "home_assistant_domain": "esphome", "new_install_prompt_erase": false, "builds":.}' output/${{ steps.esphome-build.outputs.name }}/manifest.json > output/${{ matrix.firmware.manifest_filename }}
- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ matrix.firmware.name }}
path: output
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

Check failure on line 13 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

13:81 [line-length] line too long (85 > 80 characters)
cancel-in-progress: true

consolidate:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
name: Consolidate firmwares
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Download built firmwares
uses: actions/download-artifact@v3
with:
path: firmwares
- name: Copy files
run: |-
mkdir output
cp -R static/* output/
cp -R firmwares/*/* output/
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: output

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: consolidate
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
jobs:
build-firmware:
name: Build Firmware
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
esp32-generic/esp32-generic.factory.yaml
esp32-generic/esp32-generic-c3.factory.yaml
gl-inet/gl-s10.factory.yaml
lilygo/lilygo-t-eth-poe.factory.yaml
m5stack/m5stack-atom-lite.factory.yaml
m5stack/m5stack-atom-s3.factory.yaml
olimex/olimex-esp32-poe-iso.factory.yaml
wt32/wt32-eth01.factory.yaml
name: bluetooth-proxy
esphome-version: 2024.7.3
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}

Check failure on line 32 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

32:81 [line-length] line too long (95 > 80 characters)
release-url: ${{ github.event_name == 'release' && github.event.release.url || '' }}

Check failure on line 33 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

33:81 [line-length] line too long (90 > 80 characters)
upload: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}

Check failure on line 34 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

34:81 [line-length] line too long (132 > 80 characters)
release-version: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}

Check failure on line 35 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

35:81 [line-length] line too long (99 > 80 characters)
secrets: inherit
22 changes: 22 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: YAML lint

Check warning on line 1 in .github/workflows/yaml-lint.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

1:1 [document-start] missing document start "---"

on:

Check warning on line 3 in .github/workflows/yaml-lint.yml

View workflow job for this annotation

GitHub Actions / 🧹 yamllint

3:1 [truthy] truthy value should be one of [false, true]
push:
branches: [main]
paths:
- "**.yaml"
- "**.yml"
pull_request:
paths:
- "**.yaml"
- "**.yml"

jobs:
yamllint:
name: 🧹 yamllint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out configuration from GitHub
uses: actions/[email protected]
- name: 🚀 Run yamllint
run: yamllint --strict .
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This repository is deprecated

We have copied the source files to https://github.com/esphome/firmware/tree/main/bluetooth-proxy and the firmware is generated there.

# ESPHome Bluetooth Proxies

This repo hosts YAML configurations for a curated selection of known, tested devices that can serve as Bluetooth proxies for Home Assistant.
Expand Down
24 changes: 24 additions & 0 deletions esp32-generic/esp32-generic-c3.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
packages:
esp32-generic-c3: !include esp32-generic-c3.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

improv_serial:

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/esp32-generic/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic-c3.yaml@main
46 changes: 46 additions & 0 deletions esp32-generic/esp32-generic-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
esphome:
name: esp32-bluetooth-proxy
friendly_name: Bluetooth Proxy
min_version: 2024.6.0
name_add_mac_suffix: true
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB

esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: n

wifi:
ap:

api:
logger:

ota:
- platform: esphome
id: ota_esphome

esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true

bluetooth_proxy:
active: true

button:
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot

- platform: factory_reset
id: factory_reset_btn
name: Factory reset
24 changes: 24 additions & 0 deletions esp32-generic/esp32-generic.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
packages:
esp32-generic: !include esp32-generic.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

improv_serial:

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/esp32-generic/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic.yaml@main
27 changes: 12 additions & 15 deletions esp32-generic.yaml → esp32-generic/esp32-generic.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
substitutions:
esphome:
name: esp32-bluetooth-proxy
friendly_name: Bluetooth Proxy

esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: true
project:
name: esphome.bluetooth-proxy
version: "1.0"

esp32:
board: esp32dev
Expand All @@ -20,11 +14,10 @@ wifi:

api:
logger:
ota:
improv_serial:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
ota:
- platform: esphome
id: ota_esphome

esp32_ble_tracker:
scan_parameters:
Expand All @@ -37,6 +30,10 @@ bluetooth_proxy:
active: true

button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot

- platform: factory_reset
id: factory_reset_btn
name: Factory reset
22 changes: 22 additions & 0 deletions gl-inet/gl-s10.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
packages:
gl-s10: !include gl-s10.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/gl-s10/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/gl-inet/gl-s10.yaml@main
40 changes: 19 additions & 21 deletions gl-s10.yaml → gl-inet/gl-s10.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Instructions on opening and wiring for flashing on https://blakadder.com/gl-s10

substitutions:
esphome:
name: gl-s10-bt-proxy
friendly_name: Bluetooth Proxy

esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: true
project:
name: esphome.bluetooth-proxy
version: "1.0"
# turn on Power LED when esphome boots
# turn on Power LED when esphome boots
on_boot:
then:
- output.turn_on: power_led
Expand Down Expand Up @@ -41,9 +34,8 @@ ethernet:
api:
logger:
ota:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/gl-s10.yaml@main
- platform: esphome
id: ota_esphome

esp32_ble_tracker:
scan_parameters:
Expand All @@ -67,9 +59,13 @@ bluetooth_proxy:
active: true

button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot

- platform: factory_reset
id: factory_reset_btn
name: Factory reset

## DEVICE SPECIFIC CONFIGURATION
# network LED (white one) configured as status led
Expand All @@ -85,10 +81,11 @@ binary_sensor:
number: GPIO33
inverted: true
name: "Reset Button"
id: binary_sensor_reset_button

# output settings for LED's marked Power and Bluetooth
# power LED use: see code line 12
# bluetooth LED use: see code line 41
# power LED use: see code line 15
# bluetooth LED use: see code line 60
output:
- platform: gpio
pin: GPIO14
Expand All @@ -101,6 +98,7 @@ output:

# since these pins are broken out inside and labeled as I2C pins they're configured here
i2c:
sda: 15
scl: 13
scan: true
- id: i2c_bus
sda: 15
scl: 13
scan: true
Loading

0 comments on commit 6dce088

Please sign in to comment.