In the previous lecture, we extended the THC 22 examples were to include the two and kitted out notes
so that we can publish temperature and humidity information to the broker.
In this lecture, we are going to add to immunity in notes, in the same flow so we can grab this information
first, will send the information out to a debug node so we can see it in the debug window, but then
will use dashboard widgets to visually present this information to the user.
All right.
So let's start with the quiddity in notes.
So we need two of those and get the info, the temperature and get it in for the humidity and of course,
we need the bug.
We'll do one debugged for each and keep it in.
All right.
I'm going to extend the at the left so we can have more real estate to work with.
Now let's set up our quiddity in our notes for the first one will be reading data from the temperature
topic.
So this is temperature.
And set them critically and let's make that a zero and give it a name, get temperature.
All right.
And connect that straight to the Dipankar note for the second one or the humidity, Sopchoppy, the
humidity topic and set that topic to be the same, I it's true.
And then get humidity.
All right, and connect that as well to each department there, they're just going to give them names
so we can see where the data's coming from in the department do.
All right, let's try this out, deploy and.
Clean up and Tamiflu will show us the temperature, actually, we know what I'll do is I'm only going
to take output from selected nodes.
I want to undo all of them and just show us.
And DHT, twenty two example, humidity.
Oh, sorry if I made a mistake that confused me, sir.
The first one should be temperature, not humidity.
OK, there you go.
That's better because I was confused about how come I'm not saying humidity here or temperature.
So there is humidity and there is temperature.
That's what I want to see.
All right.
So let's trigger the sensor.
That comes out and there you go, the terror comes through to the humidity and the.
What a mistake here.
Humility and humility, I needed to redeploy this way.
All right, so the names confused me again, because if you remember, I had a name today, the first
note as humidity mistakenly.
All right.
So let's clean up and then trigger.
The sensor got temperature and humidity perfect.
Now let's take this one step further, and instead of just printing out to the back window, I would
like to use a dashboard gauge.
Let's see this one here.
I'll take two of those.
And one is going to be the temperature and the other one is going to be the humidity.
So I'm going to.
Assign this to a new group.
Which is going to be also in a new tab.
Which is called IMPORTUNITY.
And for the property of this group, let's call it DHT 22.
And let's make this three by three, which it hurts to gauge there's the value, enough with the value,
what I'd like to do is to format it a little so that it only has a single decimal point.
So that would look like this.
You still get the value, but we round it to a single decimal point, and I want to also show the degree
Celsius units like this for the range, maybe just something reasonable in here.
So say between zero to 50 degrees would be OK.
And let's name this we should call it temperature.
All right.
I'm going to say that a little bit of time, instead of redoing all this configuration, I'm just going
to copy and paste the temperature gauge and just change its name to humidity, which can change the
unit to percentage like this.
And the gauge is going to be called humidity.
So change the label here as well.
So this is the name of the node?
Well, where this is the name that appears on the widget in the dashboard and same size three by three
is OK.
We can always change it later if needed.
All right.
Done, connected.
To the kitty in note, I just realized that I needed to also label the temperature gauge appropriately.
All right, that should do it.
Now, let's deploy this flu.
Have a look at the dashboard.
There is my integrity tab and the temperature and humidity just waiting to get some data, so let's
trigger the sensor and there's the data, right.
We'll probably need to increase the humidity range a bit and just make that one 100.
And deploy, all right, much better, so that actually looks pretty good.
There's one more thing that I'd like to do here, and that is to add another widget that captures historical
information from the temperature and humidity values.
So show us how temperature and humidity fluctuates over time.
So to do that, I'm going to pick, let's say, the chart node.
And connected to the humidity.
Node or the community immediately out node going to place that in the same group.
Actually, I'm going to create a new group just to keep things tidy.
A new group that belongs to the market tab and I'm going to call it charts.
Make it give it a width of six enough.
All right.
So now this is inside charts, I'm going to make it larger, so I'm going to make it six by six and
this is going to be humidity of time.
I'm going to keep, say, the last 10 minutes of humidity datapoints.
I'm going to leave the y axis empty so that the chart itself can decide what the y axis should look
like based on the data that is coming in.
And for the name, let's call this historical humidity.
OK, so that should be OK now I'm going to make a copy of historical humidity and rename it to Temperature.
And of course, this is historical temperature.
And I will leave the rest as it is.
Connected.
Just move things to the side a little below, just to increase the separation between them makes it
easier to read.
All right.
And that should be ready to work, deploy and have a look at dashboard.
So this humidity over time, in temperature over time.
And this is the previous data points that temperature and humidity had.
That's why they show data.
But let's trigger.
The workflow or the sensor to see what is happening with a temperature and humidity over time.
Let's give it a few more seconds so you can see.
The chart being formed because you remember that this is sending a new data point or triggers the sensor
every 10 seconds.
So you go first value was set for humidity, it was at forty seven point five percent, then the next
one at forty seven point seven and so on.
So there's a bit of fluctuation here, but we are now starting to see that are coming in.
And this whole range will contain data over 10 minutes eventually.
So we can leave this alone and move on to the next and final lecture in this section, we are going
to give you another example of using the entity in and out nodes alongside dashboard widgets to create
an interesting dashboard.