Skip to content

Commit

Permalink
Cleanup and re-organize config files by model and version
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisisnate committed Dec 26, 2023
1 parent a45599b commit 7258576
Show file tree
Hide file tree
Showing 16 changed files with 780 additions and 393 deletions.
110 changes: 64 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,70 +37,88 @@ jobs:
file: './packages/alarm-panel-esp8266-base.yaml'
key-path: '["substitutions", "project_version"]'

- id: alarm-panel-esp32-version
- id: alarm-panel-pro-wifi-version
uses: jbutcher5/read-yaml@main
with:
file: './packages/alarm-panel-esp32-base.yaml'
file: './alarm-panel-pro-esp32-wifi.yaml'
key-path: '["substitutions", "project_version"]'

- id: garage-door-esp8266-version
- id: alarm-panel-pro-ethernet-version
uses: jbutcher5/read-yaml@main
with:
file: './packages/garage-door-esp8266-base.yaml'
file: './alarm-panel-pro-esp32-ethernet.yaml'
key-path: '["substitutions", "project_version"]'

- id: alarm-panel-pro-v18-ethernet-version
uses: jbutcher5/read-yaml@main
with:
file: './alarm-panel-pro-v1.8-ethernet.yaml'
key-path: '["substitutions", "project_version"]'

- id: garage-door-gdov1-s-version
uses: jbutcher5/read-yaml@main
with:
file: './garage-door-GDOv1-S.yaml'
key-path: '["substitutions", "project_version"]'

- id: garage-door-esp32-version
- id: garage-door-gdov2-s-version
uses: jbutcher5/read-yaml@main
with:
file: './packages/garage-door-esp32-base.yaml'
file: './garage-door-GDOv2-S.yaml'
key-path: '["substitutions", "project_version"]'

- name: Build Alarm Panel ESP8266
id: build-alarm-panel-esp8266
run: |
esphome compile release/alarm-panel-esp8266.yaml
build_path=release/.esphome/build/alarm-panel/.pioenvs/alarm-panel
esphome compile alarm-panel-esp8266.yaml
build_path=.esphome/build/alarm-panel/.pioenvs/alarm-panel
fname=konnected-esphome-alarm-panel-esp8266-${{ steps.alarm-panel-esp8266-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- name: Build Alarm Panel ESP32 (WiFi)
- name: Build Alarm Panel Pro v1.x (WiFi)
id: build-alarm-panel-pro-esp32-wifi
run: |
esphome compile release/alarm-panel-pro-esp32-wifi.yaml
build_path=release/.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-esp32-wifi-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
esphome compile alarm-panel-pro-esp32-wifi.yaml
build_path=.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-pro-v1-wifi-${{ steps.alarm-panel-pro-wifi-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- name: Build Alarm Panel ESP32 (LAN8720)
- name: Build Alarm Panel Pro v1.x (Ethernet)
id: build-alarm-panel-pro-esp32-lan8720
run: |
esphome compile release/alarm-panel-pro-esp32-lan8720.yaml
build_path=release/.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-esp32-lan8720-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
esphome compile alarm-panel-pro-esp32-ethernet.yaml
build_path=.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-pro-v1-ethernet-${{ steps.alarm-panel-pro-ethernet-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- name: Build Alarm Panel ESP32 (RTL8201)
- name: Build Alarm Panel Pro v1.8 (Ethernet)
id: build-alarm-panel-pro-esp32-rtl8201
run: |
esphome compile release/alarm-panel-pro-esp32-rtl8201.yaml
build_path=release/.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-esp32-rtl8201-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
esphome compile alarm-panel-pro-v1.8-ethernet.yaml
build_path=.esphome/build/alarm-panel-pro/.pioenvs/alarm-panel-pro
fname=konnected-esphome-alarm-panel-pro-v1.8-ethernet-${{ steps.alarm-panel-pro-v18-ethernet-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- name: Build Garage Door ESP8266
id: build-garage-door-esp8266
- name: Build Garage Door GDOv1-S
id: build-garage-door-gdov1-s
run: |
esphome compile release/garage-door-esp8266.yaml
build_path=release/.esphome/build/garage-door/.pioenvs/garage-door
fname=konnected-esphome-garage-door-esp8266-${{ steps.garage-door-esp8266-version.outputs.data }}.bin
esphome compile garage-door-GDOv1-S.yaml
build_path=.esphome/build/garage-door/.pioenvs/garage-door
fname=konnected-esphome-garage-door-GDOv1-S-${{ steps.garage-door-gdov1-s-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- name: Build Garage Door ESP32
id: build-garage-door-esp32
- name: Build Garage Door GDOv2-S
id: build-garage-door-gdov2-s
run: |
esphome compile release/garage-door-esp32.yaml
build_path=release/.esphome/build/garage-door/.pioenvs/garage-door
fname=konnected-esphome-garage-door-esp32-${{ steps.garage-door-esp32-version.outputs.data }}.bin
esphome compile garage-door-GDOv2-S.yaml
build_path=.esphome/build/garage-door/.pioenvs/garage-door
fname=konnected-esphome-garage-door-GDOv2-S-${{ steps.garage-door-gdov2-s-version.outputs.data }}.bin
echo "fname=$(fname)" >> $GITHUB_OUTPUT
cp $build_path/firmware-factory.bin assets/$fname
- uses: keithweaver/[email protected]
Expand Down Expand Up @@ -138,42 +156,42 @@ jobs:
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel for ESPHome (WiFi)
MANIFEST_NAME: Konnected Alarm Panel / Alarm Panel Pro for ESPHome (WiFi)
MANIFEST_FNAME: esphome-alarm-panel-wifi.json
MANIFEST_VERSION: "${{ steps.alarm-panel-esp8266-version.outputs.data }} / ${{ steps.alarm-panel-esp32-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-alarm-panel-esp8266-${{ steps.alarm-panel-esp8266-version.outputs.data }}.bin
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-alarm-panel-esp32-wifi-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
MANIFEST_VERSION: "${{ steps.alarm-panel-esp8266-version.outputs.data }} / ${{ steps.alarm-panel-pro-wifi-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-alarm-panel-esp8266.outputs.fname }}
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-alarm-panel-pro-esp32-wifi.outputs.fname }}

- name: Build Manifest for Garage Door
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Garage Door for ESPHome (WiFi)
MANIFEST_NAME: Konnected GDO White (GDOv1-S / GDOv2-S) for ESPHome
MANIFEST_FNAME: esphome-garage-door-wifi.json
MANIFEST_VERSION: "${{ steps.garage-door-esp8266-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-garage-door-esp8266-${{ steps.garage-door-esp8266-version.outputs.data }}.bin
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-garage-door-esp32-${{ steps.garage-door-esp32-version.outputs.data }}.bin
MANIFEST_VERSION: "${{ steps.garage-door-gdov1-s-version.outputs.data }} / ${{ steps.garage-door-gdov2-s-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-garage-door-gdov1-s.outputs.fname }}
ESP32_S3_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-garage-door-gdov2-s.outputs.fname }}

- name: Build Manifest for Alarm Panel / LAN8720
- name: Build Manifest for Alarm Panel Pro v1.x / LAN8720
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel for ESPHome (LAN8720)
MANIFEST_NAME: Konnected Alarm Panel Pro v1.x for ESPHome (Ethernet)
MANIFEST_FNAME: esphome-alarm-panel-lan8720.json
MANIFEST_VERSION: "${{ steps.alarm-panel-esp32-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-alarm-panel-esp32-lan8720-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
MANIFEST_VERSION: "${{ steps.alarm-panel-pro-ethernet-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-alarm-panel-pro-esp32-lan8720.outputs.fname }}

- name: Build Manifest for Alarm Panel / RTL8201
- name: Build Manifest for Alarm Panel Pro v1.8 / RTL8201
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel for ESPHome (RTL8201)
MANIFEST_NAME: Konnected Alarm Panel Pro v1.8 for ESPHome (Ethernet)
MANIFEST_FNAME: esphome-alarm-panel-rtl8201.json
MANIFEST_VERSION: "${{ steps.alarm-panel-esp32-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/konnected-esphome-alarm-panel-esp32-rtl8201-${{ steps.alarm-panel-esp32-version.outputs.data }}.bin
MANIFEST_VERSION: "${{ steps.alarm-panel-pro-v18-ethernet-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ steps.build-alarm-panel-pro-esp32-rtl8201.outputs.fname }}

- name: Deploy
if: github.event.release
Expand Down
52 changes: 47 additions & 5 deletions alarm-panel-pro-esp32-ethernet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
####
##
## Konnected Alarm Panel Pro (ESP32)
## Konnected Alarm Panel Pro v1.5, v1.6, v1.7 (ESP32)
## Firmware configuration for ESPHome
##
## filename: alarm-panel-pro-esp32.yaml
Expand Down Expand Up @@ -29,10 +29,52 @@
# Customize these variables to your preferences and needs
# more: https://esphome.io/guides/configuration-types.html#substitutions
substitutions:

####
# NAME
# By default, the name of the ESPHome device is "alarm-panel-pro-xxxxxx" where xxxxxx is a unique identifier. The device's
# hostname on your network is also defined by the name, defaulting to "alarm-panel-pro-xxxxxx.local". Edit this variable to
# customize the name and hostname. Note: only lowercase characters, numbers and hyphen(-) are allowed.
name: alarm-panel-pro
friendly_name: Alarm Panel Pro
project_name: konnected.alarm-panel-pro-ethernet
project_version: "1.0.0"

# ETHERNET CONFIG
# Uncomment one of the two lines below depending on your hardware version.
ethernet_type: LAN8720 # Alarm Panel Pro up to 1.7
# ethernet_type: RTL8201 # Alarm Panel Pro 1.8 and up
# On the Alarm Panel Pro v1.5, v1.6 and v1.7 use LAN8720. On the v1.8 set this variable to RTL8201.
ethernet_type: LAN8720

sensor_debounce_time: 200ms
warning_beep_pulse_time: 100ms
warning_beep_pause_time: 130ms
warning_beep_internal_only: "false"
warning_beep_shared: "false"
blink_on_state: "true"

####
# ZONE MAPPING
# Do not edit this section.
zone1: GPIO4
zone2: GPIO2
zone3: GPIO15
zone4: GPIO13
zone5: GPIO18
zone6: GPIO14
zone7: GPIO33
zone8: GPIO32
zone9: GPIO36
zone10: GPIO39
zone11: GPIO34
zone12: GPIO35
alarm1: GPIO12
alarm2: GPIO5
out1: GPIO23
out2: GPIO5
status_led: GPIO3

####
# CONNECTION MAPPINGS
warning_beep_pin: $out1

####
# PACKAGES
Expand All @@ -50,7 +92,7 @@ packages:
####
# CORE
# This package is required and sets up core features.
- packages/alarm-panel-esp32-base.yaml
- packages/core-esp32.yaml

####
# ETHERNET
Expand Down
49 changes: 48 additions & 1 deletion alarm-panel-pro-esp32-wifi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,53 @@
##
####

####
# GENERAL SETTINGS
# Customize these variables to your preferences and needs
# more: https://esphome.io/guides/configuration-types.html#substitutions
substitutions:

####
# NAME
# By default, the name of the ESPHome device is "alarm-panel-pro-xxxxxx" where xxxxxx is a unique identifier. The device's
# hostname on your network is also defined by the name, defaulting to "alarm-panel-pro-xxxxxx.local". Edit this variable to
# customize the name and hostname. Note: only lowercase characters, numbers and hyphen(-) are allowed.
name: alarm-panel-pro
friendly_name: Alarm Panel Pro
project_name: konnected.alarm-panel-pro-wifi
project_version: "1.0.0"

sensor_debounce_time: 200ms
warning_beep_pulse_time: 100ms
warning_beep_pause_time: 130ms
warning_beep_internal_only: "false"
warning_beep_shared: "false"
blink_on_state: "true"

####
# ZONE MAPPING
# Do not edit this section.
zone1: GPIO4
zone2: GPIO2
zone3: GPIO15
zone4: GPIO13
zone5: GPIO18
zone6: GPIO14
zone7: GPIO33
zone8: GPIO32
zone9: GPIO36
zone10: GPIO39
zone11: GPIO34
zone12: GPIO35
alarm1: GPIO12
alarm2: GPIO5
out1: GPIO23
out2: GPIO5
status_led: GPIO3

####
# CONNECTION MAPPINGS
warning_beep_pin: $out1

####
# PACKAGES
Expand All @@ -41,7 +88,7 @@ packages:
####
# CORE
# This package is required and sets up core features.
- packages/alarm-panel-esp32-base.yaml
- packages/core-esp32.yaml

####
# WIFI
Expand Down
Loading

0 comments on commit 7258576

Please sign in to comment.