ThingsBoard Tutorial (36): Rule node analysis check relation node check relation, entity type node entity type

foreword

In this article, we will learn two nodes together, check relation node check relation and entity type node entity type.

check relation

Checks if a relationship exists between the originator of the message and another entity. If "check relation to specific entity" is selected, a related entity must be specified. Otherwise, the rule node checks to see if a relationship exists to any entity that meets the criteria for direction and relationship type.

configuration

  • The "check relation to specific entity" checkbox allows configuration of specific entities for checking relations.

  • Direction - The direction of the configured relationship. It can be From (from) or To (to). This value corresponds to the direction of the relationship from specific/any entity to the originator. See example.

  • Relation type - Any relation type. The default relationship types are "Contains" and "Manages", but you can create any type of relationship.
    insert image description here

output

The output value can be "True" or "False".

example

Let's say you have temperature sensors in your office and warehouse. During data processing, you might want to know where the sensor is located in the office or warehouse. To achieve this, an "OfficeToDevice" relationship should be provided from the Office asset to the sensor device located in the office.

See screenshot above&#x

Guess you like

Origin blog.csdn.net/github_35631540/article/details/130286819