← All guides

Secure V2 · SDK 0.3.0

Schemas, precision and immutable slots

Updated October 11, 2026 · verified against repository implementation

Define exactly how firmware and the gateway agree on a reading.

Supported fields

Current optimized schema encoding supports boolean; signed and unsigned integers with 1..64-bit widths; Float16, Float32 and Float64; enums; fixed/range decimals; bitsets; bounded UTF-8 strings and bounded binary bytes. Timestamps can use unsigned 64-bit milliseconds with a documented epoch.

Float64 uses real IEEE binary64. Wide integers must retain exact decimal values, not JavaScript numbers beyond its safe integer range. Stored wide integers use tagged decimal strings, and binary fields use tagged hex. Nested structures, optional/null fields, variable-length arrays and generic repeated structures are not implemented.

Strings and binary fields require maxBytes 1..256. Their fixed record reserves two length bytes plus the declared capacity, with zero padding; this simplifies embedded buffers but can cost more than variable-length formats. Invalid UTF-8, excessive lengths and malformed padding are rejected.

Precision and generated serializers

Fixed-point fields require explicit minimum, maximum and step. Encoding rounds to that grid and fails outside the declared range unless clamping was explicitly selected. Generated serializers check buffers and ranges before transmitting. Do not interpret optimized as automatically lossless.

Publish only to unused slots. Download a new project after choosing a different slot. Previously published layouts and devices retain their original meaning. A schema version in historical firmware is different from a Secure V2 slot. Advanced copied historical layouts are a migration mechanism, not the recommended new-device flow.

Open device setup · Contact support