Skip to content

Commit fafe4c7

Browse files
Merge pull request #5 from Valar-Systems/feature/valar-core-rewire
v2.0.0 — rewire onto shared valar-core v0.3.0 + scheduling packages
2 parents f9b0109 + 24ac94c commit fafe4c7

6 files changed

Lines changed: 2762 additions & 2936 deletions

File tree

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

‎CHANGELOG.md‎

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
11
# Changelog
22

3-
All notable changes to the Glasscalibur firmware are documented here. The
4-
version number is the `firmware_version` substitution in
5-
[`firmware/esphome/Glasscalibur-esphome.yml`](firmware/esphome/Glasscalibur-esphome.yml),
6-
which feeds `project.version` (reported to Home Assistant / the ESPHome
7-
dashboard) and the "Firmware Version" diagnostic sensor on the web UI.
3+
All notable changes to the Glasscalibur firmware are documented here. As of
4+
v2.0.0 the version number comes from the release git tag: the build workflow
5+
stamps it into the `fw_version` substitution (feeding `project.version` reported
6+
to Home Assistant / the ESPHome dashboard and the "Firmware Version" diagnostic
7+
sensor). Local/branch builds report `dev`.
88

99
This project adheres to [Semantic Versioning](https://semver.org/) and the
1010
format is based on [Keep a Changelog](https://keepachangelog.com/).
1111

12+
## [2.0.0] - 2026-07-22
13+
14+
Major architectural change: the firmware is now built on the shared
15+
**valar-core** + **scheduling** packages (from `Valar-Systems/valar-motion`,
16+
pinned at `v0.3.0`) rather than a single monolithic config. Board infrastructure
17+
(Wi-Fi, API, OTA, web UI, diagnostics, the TMC2209 driver, and the daily/sun
18+
schedule) comes from core; only Glasscalibur's product hardware and logic (cover,
19+
limit switches, LIS2DH12 tamper/vibration, TMP1075, buzzer, child lock, and the
20+
auto-calibration sequence) live in the product layer.
21+
22+
### Added
23+
- **Auto-calibration** (double-click the Wi-Fi/Calibrate button, or the
24+
"Auto-Calibrate" entity): a 3-phase sequence that homes on the limit switches,
25+
searches for the minimum viable motor current, and tunes StallGuard (SGTHRS /
26+
TCOOLTHRS) and the vibration threshold from the measured travel. Result is
27+
shown in "Calibration Status" and persisted. Includes a stall auto-release
28+
back-off and a thermal guard.
29+
- **Board** diagnostic sensor (from core), reporting the board identity.
30+
31+
### Changed
32+
- **BREAKING — tuning entity names** now match the shared core across the Valar
33+
product line. Home Assistant `entity_id`s change accordingly:
34+
`max_speed` → **Speed**, `acceleration` → **Acceleration**,
35+
`irun` → **IRUN (motor current)**, `SGTHRS` → **SGTHRS (stall threshold)**,
36+
and the `TSTEP Sensor` / `SG_RESULT Sensor` diagnostics → **TSTEP** / **SG_RESULT**.
37+
Motor-current entries are still capped at IRUN 19 (rated 0.6 A).
38+
- Firmware version now comes from the release tag (see note above) instead of a
39+
hardcoded `firmware_version` substitution.
40+
- The GitHub-OTA "Update Firmware" button, the Restart button, and the
41+
Firmware Version / network-info diagnostics are now provided by core (the OTA
42+
asset URL — `Glasscalibur.ota.bin` from the latest release — is unchanged).
43+
1244
## [1.2.0] - 2026-06-30
1345

1446
### Added
@@ -54,6 +86,7 @@ format is based on [Keep a Changelog](https://keepachangelog.com/).
5486
- Wi-Fi provisioning with no hardcoded credentials (fallback hotspot + captive
5587
portal, Improv over USB serial).
5688

89+
[2.0.0]: https://github.com/Valar-Systems/Glasscalibur/releases/tag/v2.0.0
5790
[1.2.0]: https://github.com/Valar-Systems/Glasscalibur/releases/tag/v1.2.0
5891
[1.1.0]: https://github.com/Valar-Systems/Glasscalibur/releases/tag/v1.1.0
5992
[1.0.0]: https://github.com/Valar-Systems/Glasscalibur/releases/tag/v1.0.0

0 commit comments

Comments
 (0)