1
00:00:00,690 --> 00:00:07,050
In this lecture, I'll show you how to use the trigger alert, which you can find right here on the

2
00:00:07,110 --> 00:00:17,850
function with the trigger note, you can repeat or you can send a message in an arbitrary period.

3
00:00:18,120 --> 00:00:23,460
So the way they're configured, the trigger in this example is that it's going to take the message object

4
00:00:23,460 --> 00:00:26,810
and then resend it to its output every one second.

5
00:00:26,820 --> 00:00:31,620
And of course, you can choose whatever period you'd like to set here yourself.

6
00:00:32,040 --> 00:00:38,910
You can also reset the trigger essentially to turn it off by sending it a message, not reset, just

7
00:00:38,910 --> 00:00:41,850
set it that into whatever value you want.

8
00:00:42,060 --> 00:00:45,700
And that is going to return the trigger back to its original state.

9
00:00:45,720 --> 00:00:47,880
I'm going to demonstrate how that works.

10
00:00:49,170 --> 00:00:58,740
So to trigger the trigger node, I just use the inject note and I'm passing a small string in the payload.

11
00:01:00,930 --> 00:01:08,650
And then to stop it, I'm just setting the message, don't reset property into something industrial,

12
00:01:08,650 --> 00:01:11,900
no matter what I put here, I just chose to put in the time stamp.

13
00:01:12,210 --> 00:01:19,860
But as long as the reset attribute of the object is set, that is going to reset the trigger node.

14
00:01:20,760 --> 00:01:26,460
So let's deploy this flow, go into the debug window and.

15
00:01:27,560 --> 00:01:30,640
Start the trigger every one second.

16
00:01:31,780 --> 00:01:39,940
The tap string, which is contained in message payload, is sent again into the trigger output and then

17
00:01:39,940 --> 00:01:46,120
to stop it, just delete this, OK, up and you can see the messages are still coming through.

18
00:01:46,420 --> 00:01:47,410
That is stop that.

19
00:01:47,410 --> 00:01:50,190
I need to reset the trigger node.

20
00:01:50,230 --> 00:01:57,160
I just set the reset parameter of the message object and the trigger stopped.

21
00:01:58,120 --> 00:01:58,960
This started again.

22
00:02:01,790 --> 00:02:02,780
And then to stop it.

23
00:02:05,760 --> 00:02:06,260
There you go.

24
00:02:09,470 --> 00:02:20,030
If you remember, this is the note that we used back in the DHT 22 example to trigger that the 22 noted

25
00:02:20,030 --> 00:02:24,110
take a measurement from the sensor, we did the exact same thing here.
