feat: publish properties along tedge measurements#3774
feat: publish properties along tedge measurements#3774didier-wenzek merged 3 commits intothin-edge:mainfrom
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Robot Results
|
18c96f5 to
91dee11
Compare
albinsuresh
left a comment
There was a problem hiding this comment.
The feature is working fine. Happy to approve once a few queries are clarified. Just noticed a few quirks:
- I could publish a measurement with only metadata and no measurement values as follows
which got converted to
tedge mqtt pub 'te/device/main///m/ac_temp' '{"unit": "C"}'Can we prevent this?[c8y/measurement/measurements/create] {"unit":"C","time":"2025-09-03T10:27:20.724717441Z","type":"ac_temp"} - Unable to use numeric metadata even when there are other non-numeric metadata fields as follows:
This is just the extension of the same rule that mandates metadata values to be non-numeric. Just wondering if this could be relaxed at least when combined with other non-numeric values in a group.
{"temp": 22, "meta" : { "unit": "C", "min": 50 }}
I can confirm that this isn't a regression but the existing behaviour. The existing logic ignores the |
This has been discussed here: #3768 (comment). This could be done, but at the cost of a whole refactoring because the current implementation transforms the message on the fly translating the group as metadata as soon as a text value is seen, or as measurements when the first value is numeric. Hence, this compromise: #3768 (comment) Not ideal, I agree. |
|
Marking this PR as draft, waiting for approval/reject of #3768 |
thin-edge#3768 Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
b18c973 to
bb9c972
Compare
reubenmiller
left a comment
There was a problem hiding this comment.
Docs and system tests look good.
Proposed changes
Allow meta properties to be published along tedge measurements, and forward these properties unchanged to Cumulocity.
Types of changes
Paste Link to the issue
#3768
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments