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.

已提問 1 年前檢視次數 272 次
1 個回答
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南