繁体   English   中英

访问 thingsboard 共享属性

[英]Acces to thingsboard shared attribute

我正在尝试使用规则链调用设备 (thingbsoard) 的共享属性,以便我可以在其上应用 if 语句,但我不知道该怎么做,无论如何是否允许我调用规则链中的属性请?

这是我使用的示例,但我确定 get function 是错误的。

var shared_att = global.getSharedAttributeValue("threshold");
if (shared_att > 50) {
// Trigger an alarm
var alarm = {
    type: "Temperature",
    severity: "Critical",
    description: "Temperature has exceeded the threshold of 50 degrees.",
    status: "Active"
};

使用Originator attributes规则节点来获取任何类型的属性。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM