Skip to content

firmware: security add-on (valar-motion v0.4.0) with 15–30 s reset hold - #55

Merged
daniel-frenkel merged 3 commits into
mainfrom
feature/security
Nov 17, 2026
Merged

daniel-frenkel merged 3 commits into
mainfrom
feature/security

Conversation

@daniel-frenkel

Copy link
Copy Markdown
Member

Ropener adopts valar-motion's security add-on (Valar-Systems/valar-motion#13, v0.4.0), as approved on valar-motion #8.

Changes

  • Add-on included (v0.4.0; core and scheduling also move to v0.4.0):
    • API encryption that Home Assistant keys by itself.
    • Optional web login (Digest) that also sets the native OTA password.
    • Security reset.
  • Wi-Fi button, 15–30 s hold → security reset.
    • Clears the API key, the web login and Wi-Fi; calibration and settings are kept.
    • A short motor buzz at 15 s via the driver's VACTUAL register. Equal time each way, the final stop is written twice, and it's skipped while moving. The position count is unchanged.
    • The 3–10 s Wi-Fi-only hold is unchanged (byte-identical in the gate).
  • MQTT: the two Web Login texts are kept off it (state_topic: null, which makes them internal to MQTT: no state, no command subscription), so the broker can't set the login or the OTA password.
  • "Updating…" status: from core v0.4.0 (valar-motion#12).
  • Docs:
    • User Guide: Section 9 now covers both holds; Section 11 covers the automatic HA encryption, the optional login (and that it is what protects uploads), and the HA card after a reset. Troubleshooting and Quick Reference updated.
    • Firmware README: security section, plus a note for DIY uploads.

Regression gate (fixed gate; v2.12.2 = ESPHome 2026.6.5 + v0.3.1 vs this PR)

Both boards are identical.

  • Entities: 0 removed, 4 added (Web Login Username, Web Login Password, Web Login, API Encryption).
  • Behaviour: 5 changed, 13 new. All intended:
    • WiFi Reset:
      • on_click: the 15–30 s window was added; the 3–10 s body is identical.
      • on_press / on_release (new): the 15 s hold watch.
    • Update Firmware (GitHub) on_press: "Updating…" before the download.
    • on_boot:
      • 600: the login is applied before the web server.
      • -100: timezone script, and the security status refresh.
    • Timezone set_action: the on-device parser (v0.3.2).
    • New scripts: apply_timezone, sec_login_changed, security_factory_reset, recovery_hold_watch, recovery_buzz. Bodies for the four new entities.

Verified on hardware

Full results are on valar-motion#13. In short:

  • HA re-keys after the 15–30 s hold with one confirm.
  • The 3–10 s hold keeps the key.
  • 63 of 66 entities are unchanged across the reset.
  • The buzz is audible, with no motion.
  • Web and OTA bench checks: 27/27.
  • Bad usernames are refused.

Flash (ESPHome 2026.10.2)

Board main this PR Δ
VAL3000 1,212,432 B ~1,267,400 B (69.1 %) ≈ +55.0 KB
VAL3100 1,290,860 B ~1,346,000 B (73.4 %) ≈ +55.1 KB

Released as v2.13.0 after merge.

🤖 Generated with Claude Code

daniel-frenkel and others added 3 commits November 17, 2026 14:51
- Include valar-motion's security add-on (v0.4.0): API encryption that
  Home Assistant keys on its own, optional web login (digest) that also
  sets the OTA password, security reset. Core/scheduling also move to
  v0.4.0 ("Updating…" status on a GitHub update).
- Wi-Fi button: 15–30 s hold runs the security reset (API key, web login,
  Wi-Fi; calibration and settings kept), with a short motor buzz at 15 s
  via the driver's VACTUAL register (no motion, position count unchanged).
  The 3–10 s Wi-Fi-only hold is unchanged.
- Keep the Web Login texts off MQTT (state_topic: null), so the broker
  can't set the login or the OTA password.
- User Guide and firmware README: security section, both holds, the HA
  card after a reset, "Updating…".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daniel-frenkel
daniel-frenkel merged commit 5ba4d7d into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant