August 27, 2025 - Strict validation of unit values in the measurement fragments

Context


Change Type: Announcement
Product area: Platform services
Component: Core platform

Technical details

Build artifact: cumulocity
Internal ID: MTM-64519

Description


In future releases, the Cumulocity platform will strictly validate unit values in measurement fragments.
If a measurement fragment contains a unit value that is null or an empty string, the platform will ignore such unit values and won’t persist them. The measurement itself will still be stored, but without the invalid unit.
This change improves data quality and consistency. Review your integrations and make sure that all measurement fragments use valid, non-empty unit values or omit the unit field entirely.

Just to be 100% certain I understand this correctly:

Allowed:
tedge mqtt pub ‘te/device/main///m/environment’ ‘{“Temperature”: { “value”: 42.7, “unit”: “°C” }}’
but also
tedge mqtt pub ‘te/device/main///m/environment’ ‘{ “Temperature”: 25}’

Not allowed:
tedge mqtt pub ‘te/device/main///m/environment’ ‘{“Temperature”: { “value”: 42.7, “unit”: “” }}’

This is a change for the platform APIs and you are using Thin Edge to illustrate the matter. While I am not sure exactly how Thin Edge behaves in these cases, your summary of the platform behavior is accurate. Though “not allowed” means only the unit is not stored. The measurement itself will be stored and there will be no error message.

thin-edge doesn’t currently support units.

So only the following is a valid thin-edge input:

tedge mqtt pub te/device/main///m/environment ‘{ “Temperature”: 25}’

leading to the following message sent to c8y:

{
“Temperature”:{“Temperature”:{“value”:25.0}},
“time”:“2025-09-02T07:21:55.521501557Z”,
“type”:“environment”
}

And as far as I understand this post, this message will be accepted by C8Y , the unit field being omitted entirely.

There is a plan for thin-edge to support units. Unfortunately this has not been implemented yet. See MQTT API | Thin-edge . We are open to discussion.

1 Like

Though “not allowed” means only the unit is not stored. The measurement itself will be stored and there will be no error message.

Thanks for that clarification.

I created a new topic for the thin edge measurement topic: Thin Edge and units