Merge pull request #12857 from dskarzh/save-strategies/node-details-update

Save strategies: update node details
This commit is contained in:
Viacheslav Klimov 2025-03-07 15:37:00 +02:00 committed by GitHub
commit 124ceaf1c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -67,10 +67,11 @@ import static org.thingsboard.server.common.data.msg.TbMsgType.POST_ATTRIBUTES_R
Saves attribute data with a configurable scope and according to configured processing strategies. Saves attribute data with a configurable scope and according to configured processing strategies.
""", """,
nodeDetails = """ nodeDetails = """
Node performs two <strong>actions:</strong> Node performs three <strong>actions:</strong>
<ul> <ul>
<li><strong>Attributes:</strong> save attribute data to a database.</li> <li><strong>Attributes:</strong> save attribute data to a database.</li>
<li><strong>WebSockets:</strong> notify WebSockets subscriptions about attribute data updates.</li> <li><strong>WebSockets:</strong> notify WebSockets subscriptions about attribute data updates.</li>
<li><strong>Calculated fields:</strong> notify calculated fields about attribute data updates.</li>
</ul> </ul>
For each <em>action</em>, three <strong>processing strategies</strong> are available: For each <em>action</em>, three <strong>processing strategies</strong> are available:
@ -86,12 +87,15 @@ import static org.thingsboard.server.common.data.msg.TbMsgType.POST_ATTRIBUTES_R
<ul> <ul>
<li><strong>On every message:</strong> applies the "On every message" strategy to all actions.</li> <li><strong>On every message:</strong> applies the "On every message" strategy to all actions.</li>
<li><strong>Deduplicate:</strong> applies the "Deduplicate" strategy (with a specified interval) to all actions.</li> <li><strong>Deduplicate:</strong> applies the "Deduplicate" strategy (with a specified interval) to all actions.</li>
<li><strong>WebSockets only:</strong> applies the "Skip" strategy to Attributes, and the "On every message" strategy to WebSockets.</li> <li><strong>WebSockets only:</strong> for all actions except WebSocket notifications, the "Skip" strategy is applied, while WebSocket notifications use the "On every message" strategy.</li>
</ul> </ul>
</li> </li>
<li><strong>Advanced:</strong> configure each actions strategy independently.</li> <li><strong>Advanced:</strong> configure each actions strategy independently.</li>
</ul> </ul>
The node supports three attribute scopes: <strong>Client attributes</strong>, <strong>Shared attributes</strong>, and <strong>Server attributes</strong>.
You can set the default scope in the node configuration, or override it by specifying a valid <code>scope</code> property in the message metadata.
<br><br>
Additionally: Additionally:
<ul> <ul>
<li>If <b>Save attributes only if the value changes</b> is enabled, the rule node compares the received attribute value with the current stored value and skips the save operation if they match.</li> <li>If <b>Save attributes only if the value changes</b> is enabled, the rule node compares the received attribute value with the current stored value and skips the save operation if they match.</li>

View File

@ -61,7 +61,7 @@ import static org.thingsboard.server.common.data.msg.TbMsgType.POST_TELEMETRY_RE
Saves time series data with a configurable TTL and according to configured processing strategies. Saves time series data with a configurable TTL and according to configured processing strategies.
""", """,
nodeDetails = """ nodeDetails = """
Node performs three <strong>actions:</strong> Node performs four <strong>actions:</strong>
<ul> <ul>
<li><strong>Time series:</strong> save time series data to a <code>ts_kv</code> table in a DB.</li> <li><strong>Time series:</strong> save time series data to a <code>ts_kv</code> table in a DB.</li>
<li><strong>Latest values:</strong> save time series data to a <code>ts_kv_latest</code> table in a DB.</li> <li><strong>Latest values:</strong> save time series data to a <code>ts_kv_latest</code> table in a DB.</li>
@ -82,7 +82,7 @@ import static org.thingsboard.server.common.data.msg.TbMsgType.POST_TELEMETRY_RE
<ul> <ul>
<li><strong>On every message:</strong> applies the "On every message" strategy to all actions.</li> <li><strong>On every message:</strong> applies the "On every message" strategy to all actions.</li>
<li><strong>Deduplicate:</strong> applies the "Deduplicate" strategy (with a specified interval) to all actions.</li> <li><strong>Deduplicate:</strong> applies the "Deduplicate" strategy (with a specified interval) to all actions.</li>
<li><strong>WebSockets only:</strong> applies the "Skip" strategy to Time series and Latest values, and the "On every message" strategy to WebSockets.</li> <li><strong>WebSockets only:</strong> for all actions except WebSocket notifications, the "Skip" strategy is applied, while WebSocket notifications use the "On every message" strategy.</li>
</ul> </ul>
</li> </li>
<li><strong>Advanced:</strong> configure each actions strategy independently.</li> <li><strong>Advanced:</strong> configure each actions strategy independently.</li>