originator telemetry
Last updated
Last updated
Adds Message Originator telemetry values from particular time range that was selected in node configuration to the Message Metadata.
Telemetry values added to Message Metadata without prefix.
The rule node has three fetch modes:
FIRST: retrieves telemetry from the database that is closest to the beginning of the time range
LAST: retrieves telemetry from the database that is closest to the end of the time range
ALL: retrieves all telemetry from the database, which is in the specified time range.
If selected fetch mode FIRST or LAST, Outbound Message Metadata would contain JSON elements(key/value)
Otherwise if the selected fetch mode ALL, telemetry would be fetched as an array.
The rule node can extract a limit size of records into array: 1000 records
This array will contain JSON objects with the timestamp and value.
End of the interval must always be less than the beginning of the interval.
If selected checkbox: Use metadata interval patterns, rule node will use Start Interval and End Interval patterns from metadata.
Patterns units sets in the milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC)
If any pattern will be absent in the Message metadata, the outbound message will be routed via failure chain.
In addition, if any pattern will have invalid data type, the outbound message will be also routed via failure chain.
Outbound Message Metadata will contain configured telemetry fields if they exist and belong to the selected range.
If attribute or telemetry was not found, it is not added into Message Metadata and still routed via Success chain.
To access fetched telemetry in other nodes you can use this template: JSON.parse(metadata.temperature)
Note: Since TB Version 2.3 the rule node has the ability to choose telemetry sampling order when selected Fetch mode: ALL.