Skip to content

fix: reconcile ValueSelector sidecars during config repack - #21

Open
therealb4n4na wants to merge 1 commit into
eisber:mainfrom
therealb4n4na:fix/issue20-valueselector-sidecars
Open

therealb4n4na wants to merge 1 commit into
eisber:mainfrom
therealb4n4na:fix/issue20-valueselector-sidecars

Conversation

@therealb4n4na

@therealb4n4na therealb4n4na commented Oct 6, 2026 •

Copy link
Copy Markdown

Fixes #20.
This PR adds a narrowly scoped, independently verified reconciliation path for visualization sidecars during config push.

What it fixes

When a visualized V178 PushButton2Sel is added, changed, or removed, config push no longer leaves the corresponding LoxAPP3.json and permissions.bin data stale.
The implementation reconciles:

  • the native ValueSelector entry in LoxAPP3.json
  • uuidAction
  • states jLocked, min, max, step, and value
  • restrictions = 0 for the explicitly visualized selector
  • the exact 176-byte permissions.bin record:
    action, FE, jLocked, min, max, step, value, FC, room RightGroup, category RightGroup, FF

Verification
The mapping was independently reproduced from a genuine Loxone Config-authored V178 PushButton2Sel and verified on an isolated development Miniserver.
Verification included:

  • genuine Loxone Config write/activation
  • runtime HTTP 200
  • setting selector value 6 and reading back value 6
  • verification of the live served /data/LoxAPP3.json
  • exact before/after comparison of permissions.bin
  • permissions.bin increased by exactly 176 bytes
  • removing exactly that record restored the previous file byte-for-byte
  • complete restoration of the pre-test Miniserver backup afterward

Safety / scope
This implementation is intentionally limited to the independently verified V178 PushButton2Sel -> ValueSelector case.
It does not:

  • infer sidecar layouts for unrelated control types
  • invent missing room/category/RightGroup metadata
  • infer a generic permissions.bin ordering algorithm
  • treat XML/runtime success alone as proof of a complete app deployment
    Unknown or unsupported layouts are not rewritten heuristically.
    The percentage-format example from config push preserves stale LoxAPP3.json, leaving new visible controls absent from app #20 is also not generalized here. Our independently Config-authored fixture verifies XML -> LoxAPP3 format %.0f; other display-format mappings need their own evidence.

Tests
The patch adds tests for:

  • ValueSelector creation
  • exact permission-record generation
  • idempotent repeated reconciliation
  • removal
  • non-visualized selectors
  • rejection of unverified selector versions
    Before submission, the same patch passed:
  • cargo fmt --check
  • clippy -D warnings
  • coverage
  • Linux build/tests
  • macOS build/tests
  • Windows build/tests

This branch has not been deployed

No deployments
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.

config push preserves stale LoxAPP3.json, leaving new visible controls absent from app

1 participant