thingsboard icon indicating copy to clipboard operation
thingsboard copied to clipboard

[Question] Does using the "Save time series" rule node in a non-root rule chain cause the message to propagate through the root rule chain again?

Open OzyOzk opened this issue 3 years ago • 2 comments

Component

  • Rule Engine

Description If I were to have a rule chain A, which was used in the root rule chain, would a "save time series" rule node in rule chain A cause the message that's been passed to rule chain A to be propagated through the root rule chain again? The reason I'm asking is because I've been having duplicate telemetries come into rule chain A from the root rule chain.

Environment

  • OS: AWS-Linux
  • ThingsBoard: 3.3.4.1PE-1
  • Browser: FireFox

OzyOzk avatar Sep 14 '22 14:09 OzyOzk

This can happen if you have a branching to "save telemetry" and "go to rule chain A". You have several options if you want only rule chain "A" to be used:

  • set a filter before the branching, which will forward the messages
  • create a device profile, assign a rule chain to it and add the device profile to the device. So the messages will not go to the root rule chain but will be processed immediately in the "A" rule chain.

pon0marev avatar Sep 16 '22 11:09 pon0marev

This can happen if you have a branching to "save telemetry" and "go to rule chain A". You have several options if you want only rule chain "A" to be used:

* set a filter before the branching, which will forward the messages

* create a device profile, assign a rule chain to it and add the device profile to the device. So the messages will not go to the root rule chain but will be processed immediately in the "A" rule chain.

Rule chain A is fed from the save tiemseries attribute of the root rule chain. I was under the impression that this would not cause telemtery duplication as all incoming messages have a unique message ID, so any save-timeseries node in rule chain A would just overwrite the original saved timeseries from the root rule chain.

Is there a safe way of doing this? I need to edit and save additional telemetries in rule chain A so that I can send alarms correctly. The telemetry duplication is causing rule chain A to raise duplicate alarms.

OzyOzk avatar Sep 19 '22 21:09 OzyOzk

If your issue is still relevant, export your rule chains and attach them to a request. So i can investigate the logic of your rule chains.

pon0marev avatar May 15 '24 13:05 pon0marev

The issue has been closed due to inactivity. If you have additional questions or comments, you can reopen it.

pon0marev avatar May 27 '24 08:05 pon0marev