Repository navigation
Expand file tree
/
Copy pathGlasscalibur-esphome.yml
More file actions
71 lines (66 loc) · 3.18 KB
/
Copy pathGlasscalibur-esphome.yml
File metadata and controls
71 lines (66 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# =============================================================================
# Glasscalibur — board wrapper (ESP32-C6)
# =============================================================================
# Sets this board's chip, GPIO map, OTA identity, and hardware constants, then
# pulls the shared valar-core + scheduling from Valar-Systems/valar-motion as
# packages and layers the Glasscalibur product (window cover, limit switches,
# accelerometer tamper/stall, buzzer, auto-calibration) on top.
#
# Glasscalibur differs from the VAL30xx reference boards in hardware: a 220 mOhm
# sense resistor, immediate-stop deceleration, and a fixed counter-clockwise
# motor direction with no runtime direction select. Those are expressed through
# the stepper_* / motor_direction_default substitutions that core v0.3.0 added.
# =============================================================================
substitutions:
device_name: "glasscalibur"
friendly_name: "Glasscalibur"
board_id: "Glasscalibur (ESP32-C6)"
esp_board: "esp32-c6-devkitc-1"
log_uart: "USB_SERIAL_JTAG"
ota_repo: "Valar-Systems/Glasscalibur" # field units self-update from Glasscalibur's own releases
ota_asset: "Glasscalibur"
# "dev" for local/branch builds; the release workflow overrides it with the
# git tag (-s fw_version) so shipped units report the version they run.
fw_version: "dev"
# --- GPIO map -------------------------------------------------------------
pin_uart_tx: "1"
pin_uart_rx: "0"
pin_enn: "8"
pin_index: "6"
pin_diag: "14"
pin_btn1: "23" # Button 1
pin_btn2: "2" # UNUSED — core's Button 2 is !removed in the product
# layer (Glasscalibur has no second button); this only
# exists so the substitution resolves before removal.
pin_btn_wifi: "21" # Wi-Fi / Calibrate button
# --- Stepper hardware (overrides core v0.3.0 defaults) --------------------
stepper_rsense: "220 mOhm"
stepper_vsense: "false"
stepper_deceleration: "inf" # immediate stop
stepper_max_speed: "5500 steps/s"
stepper_acceleration: "100 steps/s^2"
stepper_config_dump: "false"
motor_direction_default: "COUNTERCLOCKWISE"
# --- Mechanical constants (product) ---------------------------------------
steps_per_revolution: "1600" # 200 full steps × 8 microsteps
max_distance_revs: "213.3669" # informational; = max_distance_steps / steps_per_revolution
max_distance_steps: "341387" # close-end limit (pos 0) → open-end limit
cal_sg_floor: "80" # min acceptable SG_RESULT during a clean calibration travel
cal_vib_backstop: "0.45" # vibration threshold floor held during calibration probes
stall_release_steps: "24500" # stall auto-release back-off (~8 mm sash travel)
esphome:
project:
name: "valar-systems.glasscalibur"
version: "${fw_version}"
packages:
valar_core:
url: https://github.com/Valar-Systems/valar-motion
ref: v0.3.0
files: [common/valar-core.yaml]
refresh: 1d
scheduling:
url: https://github.com/Valar-Systems/valar-motion
ref: v0.3.0
files: [common/scheduling.yaml]
refresh: 1d
product: !include ./glasscalibur-product.yaml