Skip to content

Commit eb8351e

Browse files
Merge pull request #33 from Valar-Systems/rewire/valar-core
Consume valar-core + scheduling as remote packages (retire self-contained core)
2 parents 7372735 + 082b9b0 commit eb8351e

8 files changed

Lines changed: 571 additions & 1878 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Build the Ropener firmware for every board and, on a tag, attach the factory
2+
# + OTA binaries (and the .ota.bin.md5 the on-device "Update Firmware" button
3+
# needs) to the GitHub release. Field units self-update by asset name, so keep
4+
# the Ropener-VAL3000 / Ropener-VAL3100 names stable.
5+
name: Build firmware
6+
7+
on:
8+
push:
9+
branches: [main, 'rewire/valar-core'] # rewire/* verifies the branch pre-merge; remove after merge
10+
tags: ['v*']
11+
pull_request:
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- config: firmware/VAL3000/Ropener-VAL3000.yml
22+
asset: Ropener-VAL3000
23+
- config: firmware/VAL3100/Ropener-VAL3100.yml
24+
asset: Ropener-VAL3100
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
- name: Install ESPHome
31+
run: pip install esphome
32+
33+
# On a tag build, stamp the release version (strip a leading "v") so the
34+
# on-device "Firmware Version" matches the release the unit is running.
35+
- name: Compile ${{ matrix.asset }}
36+
run: |
37+
if [ "${{ github.ref_type }}" = "tag" ]; then
38+
V="${{ github.ref_name }}"; V="${V#v}"
39+
esphome -s fw_version "$V" compile "${{ matrix.config }}"
40+
else
41+
esphome compile "${{ matrix.config }}"
42+
fi
43+
44+
- name: Collect binaries + md5
45+
run: |
46+
mkdir -p dist
47+
F=$(find . -path "*/.pioenvs/*/firmware.factory.bin" | head -1)
48+
O=$(find . -path "*/.pioenvs/*/firmware.ota.bin" | head -1)
49+
cp "$F" "dist/${{ matrix.asset }}.factory.bin"
50+
cp "$O" "dist/${{ matrix.asset }}.ota.bin"
51+
md5sum "dist/${{ matrix.asset }}.ota.bin" | cut -d' ' -f1 > "dist/${{ matrix.asset }}.ota.bin.md5"
52+
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ matrix.asset }}
56+
path: dist/*
57+
58+
- name: Attach to release
59+
if: startsWith(github.ref, 'refs/tags/')
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
files: dist/*

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ docs/dist/
1616
# Python bytecode cache
1717
__pycache__/
1818
*.pyc
19+
secrets.yaml

‎firmware/VAL3000/Ropener-VAL3000-2.6.4.yml‎

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# =============================================================================
2+
# Ropener — VAL3000 (ESP32-C3)
3+
# =============================================================================
4+
# Board wrapper: pulls valar-core + scheduling from Valar-Systems/valar-motion
5+
# as remote packages and layers the Ropener product on top. No status LED.
6+
# =============================================================================
7+
substitutions:
8+
device_name: "ropener"
9+
friendly_name: "Ropener Curtain"
10+
board_id: "VAL3000 (ESP32-C3)"
11+
esp_board: "esp32-c3-devkitm-1"
12+
log_uart: "USB_SERIAL_JTAG"
13+
ota_repo: "Valar-Systems/Ropener"
14+
ota_asset: "Ropener-VAL3000"
15+
fw_version: "2.7.0"
16+
pin_uart_tx: "6"
17+
pin_uart_rx: "5"
18+
pin_enn: "8"
19+
pin_index: "0"
20+
pin_diag: "1"
21+
pin_btn1: "4"
22+
pin_btn2: "3"
23+
pin_btn_wifi: "7"
24+
25+
esphome:
26+
project:
27+
name: "valar-systems.ropener"
28+
version: "${fw_version}"
29+
30+
packages:
31+
valar_core:
32+
url: https://github.com/Valar-Systems/valar-motion
33+
ref: v0.2.0
34+
files: [common/valar-core.yaml]
35+
refresh: 1d
36+
scheduling:
37+
url: https://github.com/Valar-Systems/valar-motion
38+
ref: v0.2.0
39+
files: [common/scheduling.yaml]
40+
refresh: 1d
41+
product: !include ../common/ropener-product.yaml

‎firmware/VAL3100/Ropener-VAL3100-2.6.4.yml‎

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# =============================================================================
2+
# Ropener — VAL3100 (ESP32-C6)
3+
# =============================================================================
4+
# Board wrapper: sets this board's chip, GPIO map, and OTA identity, then pulls
5+
# in the shared valar-core + scheduling from Valar-Systems/valar-motion as remote
6+
# packages and layers the Ropener product on top. No board firmware is copied.
7+
# =============================================================================
8+
substitutions:
9+
device_name: "ropener"
10+
friendly_name: "Ropener Curtain"
11+
board_id: "VAL3100 (ESP32-C6)"
12+
esp_board: "esp32-c6-devkitc-1"
13+
log_uart: "USB_SERIAL_JTAG"
14+
ota_repo: "Valar-Systems/Ropener" # field units self-update from Ropener's own releases
15+
ota_asset: "Ropener-VAL3100"
16+
fw_version: "2.7.0"
17+
pin_uart_tx: "0"
18+
pin_uart_rx: "1"
19+
pin_enn: "5"
20+
pin_index: "7"
21+
pin_diag: "6"
22+
pin_btn1: "3"
23+
pin_btn2: "19"
24+
pin_btn_wifi: "4"
25+
26+
esphome:
27+
project:
28+
name: "valar-systems.ropener"
29+
version: "${fw_version}"
30+
31+
packages:
32+
valar_core:
33+
url: https://github.com/Valar-Systems/valar-motion
34+
ref: v0.2.0
35+
files: [common/valar-core.yaml]
36+
refresh: 1d
37+
scheduling:
38+
url: https://github.com/Valar-Systems/valar-motion
39+
ref: v0.2.0
40+
files: [common/scheduling.yaml]
41+
refresh: 1d
42+
product: !include ../common/ropener-product.yaml
43+
44+
light:
45+
- platform: status_led
46+
name: "Status LED"
47+
id: status_led_light
48+
web_server: { sorting_weight: 5, sorting_group_id: group_diagnostics }
49+
pin:
50+
number: GPIO23
51+
inverted: false

0 commit comments

Comments
 (0)