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
The firmware config parser (parseRuntimeConfigJson in ESP32-Firmware/src/RuntimeConfig.cpp) and the host provisioning example (host/example.md) disagree on the config schema. Running the example service against the real firmware would get every config rejected — three separate fields fail validation independently.
Field
Host example sends
Firmware expects
Result
enabled
not sent at all
required true by isValid()
rejected
unit_id
"unit01"
rack_id
empty rack ID → rejected
role
"controllerA" / "controllerB"
"Primary" / "Standby"
Unknown role → rejected
MAC format
AA-BB-CC-DD-EE-FF (dashes)
A1B2C3D4E5F6 (compact) in topics/payload
registry lookup misses → unknown_mac path
The example also sends config_version and timing{} which the firmware currently ignores.
Scope
Pick one canonical config schema and make both sides match it. The firmware side works today, so the smaller change is probably updating the host example — but the naming decisions (rack_id vs unit_id, role names, MAC format) should be made deliberately since they end up in the database schema too (device_map.mac, rack_id).
Implementation notes
Decide MAC format once: compact (A1B2C3D4E5F6) is what the firmware embeds in topics and hello payloads today.
Decide role vocabulary: firmware parseRole() accepts Primary/Standby.
Context
The firmware config parser (
parseRuntimeConfigJsoninESP32-Firmware/src/RuntimeConfig.cpp) and the host provisioning example (host/example.md) disagree on the config schema. Running the example service against the real firmware would get every config rejected — three separate fields fail validation independently.enabledtruebyisValid()unit_id"unit01"rack_idrole"controllerA"/"controllerB""Primary"/"Standby"AA-BB-CC-DD-EE-FF(dashes)A1B2C3D4E5F6(compact) in topics/payloadunknown_macpathThe example also sends
config_versionandtiming{}which the firmware currently ignores.Scope
Pick one canonical config schema and make both sides match it. The firmware side works today, so the smaller change is probably updating the host example — but the naming decisions (
rack_idvsunit_id, role names, MAC format) should be made deliberately since they end up in the database schema too (device_map.mac,rack_id).Implementation notes
A1B2C3D4E5F6) is what the firmware embeds in topics and hello payloads today.parseRole()acceptsPrimary/Standby.enabledis required in every config or defaults to true when omitted (relates to Fix RuntimeConfig validation for required topics #6).config_versionandtiming{}are part of v1 or dropped from the example.host/example.md(note: currently untracked — root.gitignoreline 7 ignoresexample.md, likely by accident).Acceptance criteria
Relates to #6 and #7.