You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0c97dd7
Browse filesBrowse the repository at this point in the historyBrowse files
Restore Ropener stall handling lost in the valar-core rewire (v2.7.0 regression) (#34)
* fix(firmware): restore Ropener stall handling lost in the valar-core rewire
v2.7.0 rewired onto valar-core as a remote package. The entity list came
through clean, so it shipped -- but the product's on_stall handler had been
silently replaced by core's default, which zeroes the stepper position on
EVERY stall.
Two live bugs resulted:
* The device wedged in HOMING. start_homing sets global_state=3 and nothing
cleared it, so after any home the State sensor read HOMING forever, the
cover stayed CLOSING, every button gesture died (all guard on state==0)
and the schedule refused to run (guards on state!=3). Only the manual
Start-Stop Homing button recovered it.
* Any stall corrupted the position reference. A curtain snagging mid-travel
silently redefined that point as home, poisoning the cover percentage and
the persisted position.
!extend APPENDS to core's action list rather than replacing it, so extending
alone would have left core's unconditional zeroing firing alongside the fix.
Remove core's handler first, then install the product's -- verified against
the resolved config: exactly one on_stall survives, byte-identical to v2.6.4
including the non-homing else branch.
Also in this change:
* Restore the "Reversed ↺" Motor Direction option. Core had dropped the
glyph; the string is what Home Assistant automations select by, and
existing units hold it as their persisted state.
* fw_version defaults to "dev" instead of a hardcoded "2.7.0", so local and
branch builds stop misreporting themselves. Release builds still get the
real version injected by the workflow via -s fw_version.
* Add tools/regression-gate -- an entity diff AND a behavioural diff of the
resolved config (on_stall, on_press, script bodies, on_boot, intervals,
*_action, lambdas). The entity gate alone passed v2.7.0 clean; the
behavioural gate is what catches this class of regression, and it is what
caught the Motor Direction glyph and a missing else branch in the first
draft of this very fix.
Verified on both boards: esphome config clean, entity gate shows only the 7
intended valar-core diagnostics, behavioural gate shows only the documented
scheduling/on_boot refactors and nothing dropped. VAL3100 compiles to a full
factory.bin. OTA asset names and the GitHub-OTA button URL are unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(firmware): mark the cover as device_class curtain
The cover had no device_class, so Home Assistant fell back to generic up/down
arrow controls. A Ropener draws sideways; "curtain" gets the horizontal
open/close controls, the right icon, and better voice-assistant phrasing.
Note this does NOT change the device's own web UI: web_server v3 hardcodes
the cover glyphs ("up", "stop", "down" in render_cover) and never reads
device_class. Home Assistant only.
Both gates clean -- entity list and all automation bodies identical; the
resolved config differs by exactly this one line. Included in v2.7.1 because
the bench-tested build had it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(firmware): stop rebooting every 15 min without a Home Assistant client
The API reboot_timeout defaults to 15 minutes: with no *API* client connected
the device reboots. It counts native-API clients only -- a browser sitting on
the web UI is not one.
The Ropener is sold as working without Home Assistant, so any customer driving
it from the browser had a controller that silently rebooted every 15 minutes,
stopping the curtain mid-travel if it happened to be moving at the time.
Observed on the bench unit: "[E][api:127] No clients; rebooting", uptime
resetting on a 15 minute cycle.
Not a rewire regression -- v2.6.4 resolves the same 15min default. It is
pre-existing in every Ropener release; the bench session just made it visible.
Set at the product layer rather than in valar-core: core declares a bare
`api:`, so the option merges in cleanly with no !remove needed, and this ships
without a valar-motion retag. It should move into valar-core later, since the
whole family is sold as HA-optional.
Trade-off: this also removes the watchdog that recovers a wedged API
connection. Acceptable -- the users it was rebooting are precisely the ones not
using the API -- and safe_mode still covers boot loops.
Both gates clean; the resolved config differs by exactly one line
(reboot_timeout 15min -> 0s).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments