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.

demandé il y a un an272 vues
1 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions