1
00:00:00,660 --> 00:00:08,700
In the previous lecture, we extended the THC 22 examples were to include the two and kitted out notes

2
00:00:08,700 --> 00:00:13,710
so that we can publish temperature and humidity information to the broker.

3
00:00:14,100 --> 00:00:21,030
In this lecture, we are going to add to immunity in notes, in the same flow so we can grab this information

4
00:00:21,360 --> 00:00:28,080
first, will send the information out to a debug node so we can see it in the debug window, but then

5
00:00:28,590 --> 00:00:33,210
will use dashboard widgets to visually present this information to the user.

6
00:00:33,810 --> 00:00:34,260
All right.

7
00:00:34,260 --> 00:00:41,010
So let's start with the quiddity in notes.

8
00:00:43,710 --> 00:00:52,440
So we need two of those and get the info, the temperature and get it in for the humidity and of course,

9
00:00:52,440 --> 00:00:53,370
we need the bug.

10
00:00:56,310 --> 00:00:59,670
We'll do one debugged for each and keep it in.

11
00:01:06,100 --> 00:01:06,760
All right.

12
00:01:07,950 --> 00:01:13,180
I'm going to extend the at the left so we can have more real estate to work with.

13
00:01:13,440 --> 00:01:22,560
Now let's set up our quiddity in our notes for the first one will be reading data from the temperature

14
00:01:23,370 --> 00:01:23,950
topic.

15
00:01:24,120 --> 00:01:25,500
So this is temperature.

16
00:01:27,110 --> 00:01:33,650
And set them critically and let's make that a zero and give it a name, get temperature.

17
00:01:36,880 --> 00:01:37,570
All right.

18
00:01:38,390 --> 00:01:45,290
And connect that straight to the Dipankar note for the second one or the humidity, Sopchoppy, the

19
00:01:45,290 --> 00:01:53,060
humidity topic and set that topic to be the same, I it's true.

20
00:01:53,240 --> 00:01:56,060
And then get humidity.

21
00:01:57,590 --> 00:02:03,200
All right, and connect that as well to each department there, they're just going to give them names

22
00:02:04,220 --> 00:02:08,270
so we can see where the data's coming from in the department do.

23
00:02:11,780 --> 00:02:16,040
All right, let's try this out, deploy and.

24
00:02:18,600 --> 00:02:26,580
Clean up and Tamiflu will show us the temperature, actually, we know what I'll do is I'm only going

25
00:02:26,580 --> 00:02:29,620
to take output from selected nodes.

26
00:02:30,770 --> 00:02:34,350
I want to undo all of them and just show us.

27
00:02:38,560 --> 00:02:43,030
And DHT, twenty two example, humidity.

28
00:02:46,330 --> 00:02:48,620
Oh, sorry if I made a mistake that confused me, sir.

29
00:02:48,940 --> 00:02:50,950
The first one should be temperature, not humidity.

30
00:02:53,320 --> 00:02:54,250
OK, there you go.

31
00:02:54,850 --> 00:02:59,760
That's better because I was confused about how come I'm not saying humidity here or temperature.

32
00:02:59,770 --> 00:03:02,770
So there is humidity and there is temperature.

33
00:03:02,800 --> 00:03:03,610
That's what I want to see.

34
00:03:04,720 --> 00:03:05,230
All right.

35
00:03:06,040 --> 00:03:07,720
So let's trigger the sensor.

36
00:03:09,080 --> 00:03:15,740
That comes out and there you go, the terror comes through to the humidity and the.

37
00:03:17,270 --> 00:03:18,220
What a mistake here.

38
00:03:20,480 --> 00:03:23,270
Humility and humility, I needed to redeploy this way.

39
00:03:23,480 --> 00:03:30,860
All right, so the names confused me again, because if you remember, I had a name today, the first

40
00:03:32,060 --> 00:03:33,800
note as humidity mistakenly.

41
00:03:33,830 --> 00:03:34,280
All right.

42
00:03:34,290 --> 00:03:36,350
So let's clean up and then trigger.

43
00:03:37,620 --> 00:03:41,820
The sensor got temperature and humidity perfect.

44
00:03:42,120 --> 00:03:49,050
Now let's take this one step further, and instead of just printing out to the back window, I would

45
00:03:49,050 --> 00:03:52,110
like to use a dashboard gauge.

46
00:03:54,160 --> 00:03:57,090
Let's see this one here.

47
00:03:59,490 --> 00:04:00,810
I'll take two of those.

48
00:04:02,210 --> 00:04:06,350
And one is going to be the temperature and the other one is going to be the humidity.

49
00:04:08,030 --> 00:04:10,430
So I'm going to.

50
00:04:11,460 --> 00:04:14,510
Assign this to a new group.

51
00:04:18,780 --> 00:04:22,620
Which is going to be also in a new tab.

52
00:04:24,150 --> 00:04:26,940
Which is called IMPORTUNITY.

53
00:04:30,040 --> 00:04:36,580
And for the property of this group, let's call it DHT 22.

54
00:04:38,820 --> 00:04:48,180
And let's make this three by three, which it hurts to gauge there's the value, enough with the value,

55
00:04:48,720 --> 00:04:55,420
what I'd like to do is to format it a little so that it only has a single decimal point.

56
00:04:56,310 --> 00:04:57,720
So that would look like this.

57
00:04:59,030 --> 00:05:06,680
You still get the value, but we round it to a single decimal point, and I want to also show the degree

58
00:05:06,680 --> 00:05:15,100
Celsius units like this for the range, maybe just something reasonable in here.

59
00:05:15,110 --> 00:05:19,990
So say between zero to 50 degrees would be OK.

60
00:05:21,410 --> 00:05:24,110
And let's name this we should call it temperature.

61
00:05:25,060 --> 00:05:25,780
All right.

62
00:05:27,710 --> 00:05:31,910
I'm going to say that a little bit of time, instead of redoing all this configuration, I'm just going

63
00:05:31,910 --> 00:05:45,020
to copy and paste the temperature gauge and just change its name to humidity, which can change the

64
00:05:45,020 --> 00:05:47,720
unit to percentage like this.

65
00:05:47,720 --> 00:05:51,140
And the gauge is going to be called humidity.

66
00:05:51,140 --> 00:05:52,980
So change the label here as well.

67
00:05:53,000 --> 00:05:54,850
So this is the name of the node?

68
00:05:54,860 --> 00:06:02,780
Well, where this is the name that appears on the widget in the dashboard and same size three by three

69
00:06:02,780 --> 00:06:03,490
is OK.

70
00:06:03,500 --> 00:06:05,600
We can always change it later if needed.

71
00:06:06,230 --> 00:06:06,890
All right.

72
00:06:06,890 --> 00:06:08,660
Done, connected.

73
00:06:09,850 --> 00:06:20,230
To the kitty in note, I just realized that I needed to also label the temperature gauge appropriately.

74
00:06:21,190 --> 00:06:22,730
All right, that should do it.

75
00:06:22,750 --> 00:06:24,720
Now, let's deploy this flu.

76
00:06:25,390 --> 00:06:27,250
Have a look at the dashboard.

77
00:06:29,010 --> 00:06:35,580
There is my integrity tab and the temperature and humidity just waiting to get some data, so let's

78
00:06:36,390 --> 00:06:40,940
trigger the sensor and there's the data, right.

79
00:06:41,000 --> 00:06:47,790
We'll probably need to increase the humidity range a bit and just make that one 100.

80
00:06:50,300 --> 00:06:56,630
And deploy, all right, much better, so that actually looks pretty good.

81
00:06:57,740 --> 00:07:04,280
There's one more thing that I'd like to do here, and that is to add another widget that captures historical

82
00:07:04,280 --> 00:07:07,510
information from the temperature and humidity values.

83
00:07:08,270 --> 00:07:13,050
So show us how temperature and humidity fluctuates over time.

84
00:07:13,640 --> 00:07:21,740
So to do that, I'm going to pick, let's say, the chart node.

85
00:07:23,430 --> 00:07:26,390
And connected to the humidity.

86
00:07:28,250 --> 00:07:35,060
Node or the community immediately out node going to place that in the same group.

87
00:07:35,600 --> 00:07:38,450
Actually, I'm going to create a new group just to keep things tidy.

88
00:07:38,780 --> 00:07:44,980
A new group that belongs to the market tab and I'm going to call it charts.

89
00:07:45,890 --> 00:07:49,490
Make it give it a width of six enough.

90
00:07:50,320 --> 00:07:50,920
All right.

91
00:07:53,300 --> 00:08:00,920
So now this is inside charts, I'm going to make it larger, so I'm going to make it six by six and

92
00:08:00,920 --> 00:08:05,870
this is going to be humidity of time.

93
00:08:07,560 --> 00:08:13,880
I'm going to keep, say, the last 10 minutes of humidity datapoints.

94
00:08:14,510 --> 00:08:24,290
I'm going to leave the y axis empty so that the chart itself can decide what the y axis should look

95
00:08:24,290 --> 00:08:26,480
like based on the data that is coming in.

96
00:08:27,470 --> 00:08:31,520
And for the name, let's call this historical humidity.

97
00:08:33,410 --> 00:08:44,750
OK, so that should be OK now I'm going to make a copy of historical humidity and rename it to Temperature.

98
00:08:47,540 --> 00:08:49,970
And of course, this is historical temperature.

99
00:08:53,730 --> 00:08:56,010
And I will leave the rest as it is.

100
00:08:58,300 --> 00:08:58,980
Connected.

101
00:09:01,010 --> 00:09:07,310
Just move things to the side a little below, just to increase the separation between them makes it

102
00:09:07,310 --> 00:09:08,120
easier to read.

103
00:09:08,720 --> 00:09:09,160
All right.

104
00:09:09,170 --> 00:09:14,630
And that should be ready to work, deploy and have a look at dashboard.

105
00:09:15,140 --> 00:09:18,500
So this humidity over time, in temperature over time.

106
00:09:18,500 --> 00:09:22,600
And this is the previous data points that temperature and humidity had.

107
00:09:22,610 --> 00:09:24,580
That's why they show data.

108
00:09:25,040 --> 00:09:26,300
But let's trigger.

109
00:09:28,670 --> 00:09:34,610
The workflow or the sensor to see what is happening with a temperature and humidity over time.

110
00:09:39,500 --> 00:09:43,070
Let's give it a few more seconds so you can see.

111
00:09:45,580 --> 00:09:54,670
The chart being formed because you remember that this is sending a new data point or triggers the sensor

112
00:09:54,670 --> 00:09:55,690
every 10 seconds.

113
00:09:57,160 --> 00:10:04,180
So you go first value was set for humidity, it was at forty seven point five percent, then the next

114
00:10:04,180 --> 00:10:06,700
one at forty seven point seven and so on.

115
00:10:06,730 --> 00:10:12,310
So there's a bit of fluctuation here, but we are now starting to see that are coming in.

116
00:10:12,310 --> 00:10:17,620
And this whole range will contain data over 10 minutes eventually.

117
00:10:20,780 --> 00:10:27,260
So we can leave this alone and move on to the next and final lecture in this section, we are going

118
00:10:27,260 --> 00:10:36,710
to give you another example of using the entity in and out nodes alongside dashboard widgets to create

119
00:10:36,710 --> 00:10:37,940
an interesting dashboard.
