/blog

A JSON payload that ages wellA payload is a contract between a machine and a platform. Most are written in a hurry and then maintained for years. Ten keys, chosen carefully, age better than sixty chosen fast.

JSON is flexible, which is why payloads become inconsistent. One unit sends oil_pressure, another sends oilPressure, and the platform ends up with two series and one empty chart. The fix is not a schema language; it is a small, written dictionary.

Start with ten keys, not sixty

A first machine needs enough to prove the chain: a state (on/off), a counter (hours), one process value with a unit, a position pair, and the unit's own health. If those render correctly and survive a coverage gap, the rest is a mapping exercise. Starting at sixty usually ships a dashboard nobody has validated.

Rules that keep a payload readable

  • One name per value, lowercase with underscores - not camelCase in one project and Hungarian notation in the next.
  • Units in the name or in a companion field: pressure_kpa is unambiguous; pressure is a guess.
  • A timestamp per record, in UTC, plus the device's own clock offset so a gap can be reconstructed.
  • A defined "missing" shape - null, or the key absent - decided once and written down.

What makes it a contract

The payload is a document agreed with the platform team: key, type, unit, interval, and what a missing reading looks like. If the mapping is a unit configuration rather than firmware, adding a key later is a parameter change - and that is the difference between a pilot and a rollout.

Next

payload contract · DTU hardware · ThingsBoard · MQTT topic design.

Data sheet, interface list and a payload example on request — contact us (ralph@gz-can.com · +86 130 7692 2278).