Skip to content

config add: random UUIDs + NextObj/NextMem not bumped (deviates from Loxone scheme) #11

Description

@tobsch

Observation (not a crash — a deviation worth confirming)

Added blocks don't follow Loxone Config's UUID/counter scheme.

Repro

grep -oE 'NextObj="[0-9]+"[^>]*NextMem="[0-9]+"' config.Loxone   # e.g. NextObj="109928" NextMem="49"
lox-cli config add --type And --title "probe" copy.Loxone
# new block UUID: e07fec7b-4206-eefc-ffffed57184a04d2  (serial suffix preserved, first 3 groups RANDOM)
grep -oE 'NextObj="[0-9]+"[^>]*NextMem="[0-9]+"' copy.Loxone   # UNCHANGED: NextObj="109928" NextMem="49"

Loxone's own UUIDs increment (15ea0aa4-0243- -> -0244- -> -0245-, same serial suffix) and the editor bumps NextObj/NextMem.

Why it may matter

Random prefixes won't collide, so uniqueness is fine. But the file is no longer numbered the way Loxone Config would, and NextObj/NextMem no longer reflect the real object count. Unclear whether the editor/Miniserver relies on that on round-trip.

Suggestion

Mint UUIDs from NextObj/NextMem in Loxone's incremental scheme and bump the counters, so a lox-cli-written file is indistinguishable from an editor-written one and round-trips cleanly. If random is intentional, a short doc note (+ a validate check that counters are >= max index) would help.


Found during an agent-driven analysis session (Claude Code) building multi-room logic on a real config.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions