AWS TwinMaker - Change Icon Tag

0

I would like to know how to change in real time, based on the response of the lambda associated with the component, the type of icon of an associated TAG in the 3D model.

This is my component:

{
  "operationStatus": {
    "definition": {
      "dataType": {
        "type": "STRING"
      },
      "isTimeSeries": false,
      "isRequiredInEntity": false,
      "isExternalId": false,
      "isStoredExternally": true,
      "isImported": false,
      "isFinal": false,
      "isInherited": false
    }
  }
}

This is lambda response:

Response
{
  "propertyValues": {
    "operationStatus": {
      "propertyReference": {
        "propertyName": "operationStatus",
        "entityId": "sandbox-entity",
        "componentName": "sandbox-component",
        "externalIdProperty": {
          "operationStatus": "WARNING"
        }
      },
      "propertyValue": {
        "stringValue": "WARNING"
      }
    }
  }
}

this is tag config and rule

Enter image description here

Enter image description here

Tag in my Grafana TwinMaker plugin never change icon: Enter image description here

Enter image description here

Thank you.

asked a year ago265 views
1 Answer
0

Hello,

Tags can only change with rules defined for time series properties. This means that in the componentType definition the isTimeSeries field would be set to true. In your lambda you would upload values for your property with a timestamp.

You can retrieve time series values for this property by adding a "Get Property Value History by Entity" query on the Scene Viewer panel. Pass the entity ID, component name, and property name to the query, and set the time range to a range with data for your property.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions