How we can store additional data in measurements

Product/components used and version/fix level are you on:

Free trial

Detailed explanation of the problem:

How to add status information of sensor along with readings in measurements.

{

  • “source”:{

    • “id”: “”},
  • “time”: “”,

  • “type”: “c8y_TemperatureMeasurement”,

  • “c8y_Steam”:{

    • “Temperature”:{
      • “unit”: “C”,

      • “value”: 100}}

}

Error messages / full error message screenshot / log fileL

Is your question related to the free trial, or to a production (customer) instance?

Have you installed all the latest fixes for the products and systems you are using?

Hi Singh,
which kind of status information do you mean?

You can always add more series or fragments to add more dynamic numeric measurement data. You can also enrich your measurement with additional metadata. A complex measurement may look like this:

{
    "source": {
        "id": "251982"
    },
    "time": "2023-04-12T16:57:37.469Z",
    "type": "c8y_SteamMachineMeasurement",
    "c8y_Steam": {
        "Temperature": {
            "unit": "C",
            "value": 100
        },
        "Pressure": {
            "unit": "bar",
            "value": 12.3
        }
    },
    "c8y_Valve": {
        "OpeningAngle": {
            "unit": "°",
            "value": 45
        }
    },
    "MeasurementContext": {
        "trigger": "MANUAL",
        "output": "OPEN"
    }
}

Please be aware that adding additional data to measurements that is repeated in many measurements will require additional data transfer volume and also storage space on the platform. Depending on your use case it may be more beneficial to communicate device status in other ways. The current device status is typically represented by its managed object. If you need to trace a status over time you could use events or alarms.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.