You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a message count node to count the number of messages coming from the devices, and I want to create a threshold-based alarm after that. However, when I look at the data output of the message count node, I realize that the output is unique to each device (except with the same prefix "messageCount"), and I have also lost information such as the device name after this node:
# message count node#-------------------------------# input for device 1 and device 2 #-------------------------------
{
"deviceName": "Device1",
"eventDetection": "true"
}
{
"deviceName": "Device2",
"eventDetection": "true"
}
#-------------------------------# output for device 1 and device 2#-------------------------------"messageCount_tb-rule-engine-0": 1
}
{
"messageCount_tb-rule-engine-1": 0
}
In the next script node I then wrote a function to generalize all message count output to "messageCount": xxx
After that, there is a filter script to return msg.messageCount > 1;.
But then I realized that now the rule chain can't tell which device the messageCount is coming from, so even though there is an alarm raised, it can't be assigned to a particular device.
Is there a way to fix this?
The only reason I want to use the message count is that I want to count the number of messages every day, and after that, the counter should reset to 0. I can't find a way to do that except for using the message count node.
The text was updated successfully, but these errors were encountered:
I implemented a message count node to count the number of messages coming from the devices, and I want to create a threshold-based alarm after that. However, when I look at the data output of the message count node, I realize that the output is unique to each device (except with the same prefix "messageCount"), and I have also lost information such as the device name after this node:
In the next script node I then wrote a function to generalize all message count output to "messageCount": xxx
After that, there is a filter script to
return msg.messageCount > 1
;.But then I realized that now the rule chain can't tell which device the
messageCount
is coming from, so even though there is an alarm raised, it can't be assigned to a particular device.Is there a way to fix this?
The only reason I want to use the message count is that I want to count the number of messages every day, and after that, the counter should reset to 0. I can't find a way to do that except for using the message count node.
The text was updated successfully, but these errors were encountered: