Closed DevAZK closed 2 weeks ago
Apologies, the feature of adding units to the measurements hasn't been implemented yet. The documentation does describe how the feature is intended to work, but as of thin-edge.io 1.3.1, the tedge-mapper-c8y does not read this information when converting the tedge measurements to Cumulocity measurements.
I've created a PR to remove it from the public documentation. We already have an issue with tracks the feature to add support for publishing measurements with units in this ticket: https://github.com/thin-edge/thin-edge.io/issues/982
@DevAZK though technically when the feature is implemented, you should be using the tavg
property in the /meta
message, as that property should match the property you're using when publishing the message, otherwise thin-edge.io has no idea that tavg
is actually a temperature value.
So in your example meta message should be:
tedge mqtt pub -r 'te/device/test///m/environment/meta' '{
"units": {
"tavg": "°C"
}
}'
But again, this is not yet implemented by thin-edge.io.
Oh, I see, all clear. I’ll wait until the feature is implemented then. Yes, obviously the attribute should be "tavg" and not "temperature"—my bad. Thanks for clarifying!
Describe the bug Sending measurements with units does not work correctly for Cumulocity. The measurement is transmitted and displayed in Cumulocity, but the units do not appear on the graph.
To Reproduce
The temperature value is displayed as expected, but without any units.
Expected behavior The units should be displayed alongside the data.