In this lecture, I'll show you how to use the trigger alert, which you can find right here on the
function with the trigger note, you can repeat or you can send a message in an arbitrary period.
So the way they're configured, the trigger in this example is that it's going to take the message object
and then resend it to its output every one second.
And of course, you can choose whatever period you'd like to set here yourself.
You can also reset the trigger essentially to turn it off by sending it a message, not reset, just
set it that into whatever value you want.
And that is going to return the trigger back to its original state.
I'm going to demonstrate how that works.
So to trigger the trigger node, I just use the inject note and I'm passing a small string in the payload.
And then to stop it, I'm just setting the message, don't reset property into something industrial,
no matter what I put here, I just chose to put in the time stamp.
But as long as the reset attribute of the object is set, that is going to reset the trigger node.
So let's deploy this flow, go into the debug window and.
Start the trigger every one second.
The tap string, which is contained in message payload, is sent again into the trigger output and then
to stop it, just delete this, OK, up and you can see the messages are still coming through.
That is stop that.
I need to reset the trigger node.
I just set the reset parameter of the message object and the trigger stopped.
This started again.
And then to stop it.
There you go.
If you remember, this is the note that we used back in the DHT 22 example to trigger that the 22 noted
take a measurement from the sensor, we did the exact same thing here.