In this quick tutorial, we will cover “Understanding the List Messages Node”. Catenis can be extremely informative and can provide information on various services it performs. The “List Messages” node is one of these informative nodes and retrieves all messages received, sent, or logged by a virtual device and allows you to set different filtering criteria for more granular results.
In this video we will cover:
Prerequisite
Thank you for watching Understanding the List Messages Node in the Catenis Flow tutorial series. Watch the next video, Working with the List Message Node in Run-Time Mode, to further expand your knowledge.
Links from this video for easy access:
To sign up for your free account, head to our website www.blockchainofthings.com.
Join our community forum for the quickest response time to all your questions and concerns. This forum is our customer support. https://forum.blockchainofthings.com/
[Music]
Hi, this is Clara for Blockchain of Things.
This tutorial will teach you about the List Messages Node
and how it’s used in Catenis Flow.
The List Messages Node retrieves all messages
received,
sent,
or logged
by a Virtual Device, and allows you to set different filtering criteria.
Filters can be set to list the messages based on a given time range or sent receive status.
Conversely, with no filters set the node will list all messages that have interacted with the Virtual Device.
As an example, you can use the List Messages Node
to retrieve all messages sent to your Virtual Device
within a date range.
Now, let’s dive into the properties panel and
see what fields are available in the List Message Node.
Node-RED specific fields include the name field and connection field.
Add a descriptive name of your choice to the name field that will help differentiate
this node from others of the same type on
the Node-RED workspace.
Set a previously configured Catenis Virtual Device
in the connection field, or configure a new Virtual Device.
In the action field, you can filter by the action performed by the Virtual Device that sent the message.
Which will either be
logged,
sent,
or any.
In the direction field, you can filter by the direction
of the message either inbound or outbound.
If the action field is set to logged,
this filter has no effect on the result returned.
To filter by origin, enter one or more comma-separated
device IDs of Virtual Devices
from which the messages were sent here
in the “from device IDs” field.
To filter by destination, enter one or more comma-separated device IDs of Virtual Devices
to which the messages were sent here, in the two device IDs field.
You can filter using your device’s name if your Virtual Device was configured to use a name in addition to its id.
By entering one or more comma-separated
names of Virtual Devices
from which the messages were sent into the
from device product unique IDs field.
If you want to filter by origin,
or in the two-device unique ids field, if you
want to filter by destination.
Use the red state field to filter by whether
the message status is “red” or “unread”.
Note, that the red state filter only applies if the message was sent with a request to receive a red confirmation.
Use the start date field, to set a lower-bound filter
for the date the message was logged, sent, or received.
And use the end date field to set an upper bound filter for the date the message was logged, sent, or received.
The limit field allows you to set an upper limit to how many messages you would like to have returned.
The skip field allows you to set the number of messages that should be skipped from the beginning of the returned messages list
Now that we’ve described the functions of each of the fields
in the List Messages Node properties panel,
let’s take a look at the example flow found at this link:
Copy the example flow.
Click the Node-RED hamburger menu,
and click import to display the import flow dialog box.
Paste the flow into the import box and click the import button.
This flow is a working example implementing
the List Messages Node.
Note, that after importing the example flow,
you will need to configure the List Messages Node to your own Virtual Device.
You can pause this tutorial now to explore this flow on your own, and in the next video,
you’ll learn how to create this flow from scratch.
Great!
Now, you should understand List Messages Nodes.
In our next video, you’ll learn how to use the List Messages Node in Run-Time Mode.
[Music]