I'm now a developer at Contoso HVAC Company
and what I'm been tasked to do is actually look into
Azure IoT Solutions and products and my execs told me,
hey look into this IoT Suite preconfigured solution
to remote monitoring WAN.
We've been already deploying WAN and configuring WAN.
We need to now check out if that's
going to work with our data model,
with our real machines and
telemetry coming from our real machines.
And then, we need to actually test
a real device and we want to also
test like some of
the functionalities of managing devices.
So, I need to check if I can do a
over the air firmware update on one of my machines.
And once I've done that eventually I'm going to look into
connecting to our ERP to dynamics in our case,
in order to trigger some process
for a device that needs maintenance for example.
And last but not least,
I'm going investigate how I can customize
further that preconfigured solution,
that remote monitoring preconfigured solutions.
So, my starting point here is that
our remote monitoring solution has been deployed and
first thing I want to do is leverage
a service which is a Device Simulator Service.
And that service is pretty straightforward.
The idea is to simulate data coming from
actual devices to stimulate
what's going on, on a solution.
And what I did initially,
I configured that service,
the Simulated Device Service to connect to
the same Azure IoT Hub which is
the back-end service for the Suite to
connect these simulated devices
into my preconfigured solution.
And this is going to be a custom device.
I'm going to have a couple of sensors.
I'm going to have a "Temperature" one that's going to
act in a random way and it is
going to actually send temperature between
20 and let's say 45 degrees Celsius
which is the nominal values
for this kind of sensors on my actual machine.
Then, I will also monitor the "Pressure" and I will do
a random here and I will have
a pressure that will go from 30 to 40 psi.
And this is pretty
much what I need to do in terms of defining what kind
of "Telemetry" did I want
these simulators to start sending and
put my IoT Solution in a real life situation.
I'm going to simulate four
devices but you can see that I can go
up to 1000 devices which
is more close to what
it's going to be at the end of the day.
For my simulation to work well,
I want a data to be sent from each of
the devices every three seconds and to never stop.
So here, on my Remote Monitoring Solution,
I see the initially created simulated devices but
what is going to happen is when I start that simulation,
the Simulation Device Service will connect to the IoT Hub
behind my Remote Monitoring Solution
and will create these new devices.
And so, I can refresh the list and I can
see that these new devices
just appeared here and they are connected.
They're already like sending
the telemetry data into my solution,
that this simulated device
appear in here and if I look at
my "Temperature" and my
"Pressure" and I see that these simulated devices,
four of them are actually,
these new simulated devices sending their data
real time to that preconfigured solution.
So, I can start simulating the real situation of
my actual hardware into the IoT Solution in the cloud,
thanks to that device simulated service.
So that was the first stage but now,
what I want to do is actually go to a real device.
So here, I have a ST Microdevice
running an ST 32 chip in there.
And so, the actual device here has real time OS that
I was able to program using
one of the opensource SDKs that we have for Azure IoT,
and it's running a piece of software that it connects to
IoT Hub and then to
the Remote Monitoring Solution providing metadata,
providing sensor data but also offering the option to
an operator to do firmware update
and configuration of that device.
So, let's see how it looks like in my solution.
So that device is actually identified down here as
the STmicro1 and it's
connected and is sending telemetry data here.
So, I can see "Temperature",
I can see "Pressure" for that device in real time.
I can also, because this is actual code,
show you that this guy is actually sending
data through serial port is connected to
my Dev Machine and it's sending that data
directly into IoT Hub.
What I want to do right now is test
that firmware update from the Remote Monitoring Solution.
I have this device, I selected it,
I'm going to schedule
a particular maintenance which
is called "Firmware Update".
I'm going to call that task "Firmware Update".
As a matter of fact, I could have
selected several simulated devices,
to update a bunch of them at the same time.
I'm going to paste the URI to
the binary firmware version so that the device,
once it's going to receive the command to update
its firmware will actually download that firmware,
install it, reboot and indicate
which version it's now running as a firmware.
So here, I'm running version 3.1 of that firmware.
As soon as I'm going to hit "Apply",
I'm going to switch back to the traces
into my terminal to visualize what's going on.
And we see that the device received the command,
actually downloaded the package and will reboot after
flashing the device and after a few seconds or minutes,
it will reboot, reattached to the IoT Hub,
reconnect to the Remote Monitoring Solution and I will
see that firmware version change in that view here.
So because the actual firmware
update like we are doing right now,
the device takes a couple of minutes,
we will fast forward here that sequence.
The download of that firmware has been finished now.
The device actually was sending
regular updates on what it was
doing and now what it's doing is actually rebooting.
And the first thing it's doing is connecting
to the Wi-Fi and then it is actually
connecting to the IoT Hub and
will be able to then share its new state
to the Remote Monitoring Solution for me to verify
that this firmware update was actually successful.
So, now if I go back to my view of the devices,
I can refresh these devices here, list.
So then when I refreshed the view here,
I can see that the firmware version has been updated.
So my STmicro device
now has a new firmware version that has been deployed.
All of that, through
the Azure IoT Suite Remote Monitoring Solution.
So, I had nothing more than just like
indicate which binary to download and
that device has been fully integrated
both in terms of sending telemetry,
but also in terms of device management features.
So, Remote Monitoring seems to be
fitting my needs pretty well.
One more thing I need to look into
before I look at customizing all that UI thing,
is actually to connect that
to our request process to our ERP solutions.
We are using Dynamics for that.
And what I want to do right now
to test if things are going well,
I want to have a simulated device,
I'm going to use a node application for
that that will indicate through
its telemetry that it needs to have
a new set of parts ordered and installed.
And so that device has its own intelligence,
it's able to say, hey,
now I need to have this maintenance or someone
press the button on that device or something like that.
And the idea is to write
the message all the way up to some logic
that will trigger that creation
of a requisition into Dynamics.
So, the first thing I need to do is
on "IoT Hub" to set up a "Route".
So, basically I'm going to,
from my "IoT Hub" perspective,
look at the telemetry messages arriving from
all the devices and within all these devices,
I will detect the one that
has a particular setting in there.
And in our case, we're looking at
a particular value of
one of the parameters of these messages.
And, if there is a dynamic action value in there,
what I'm going to do is actually route
this message to a specific
endpoint which is beyond "IoT Hub."
And this endpoint is a "Service Bus" queue.
Then, what I did is I created a "Logic App",
a job that is monitoring
that "Service Bus" queue
and each time a new message arrives in there,
it's going to create a new record into "Dynamics",
and is going to also send an email in order to update
whoever should be notified
of that new requisition has been sent.
So, in order to do that,
so we have this "Logic App" ready to go.
We have the "Route" that's been set up,
and now we have a little "Node
Application" that I'm going to just start.
And, as soon as I'm starting it,
I'm going to go back into "Logic Apps",
And I'm going to check what's going on in there because
that one actually is been triggered,
hopefully if everything is okay.
So, device has been sending the message,
"IoT Hub" had detected the message,
started routing the message into the "Event Hub" queue,
"Logic App" has been triggered.
And, after I was not fast enough,
after only three seconds,
I had everything all the way up to dynamics,
which actually I'm going to refresh here,
and what I'm going to see is that, boom,
there is that new record
that has been created in "Dynamics".
So, the flow has been pretty much seamless
from my remote monitoring solution.
I was able to have a device connecting.
I created a "Route" that route sent
that message to a "Service Bus" queue
triggered a "Logic App".
"Logic App" actually can do plenty of things
interacting with "CRPs" in line of business application.
So, it was pretty straightforward to actually
have a filter applied to
that message stream and then
implement a business logic just behind that.
So, one more thing that I want to show you is
that "Remote Monitoring" as
a solution has this nice dashboard,
all these functionalities but
actually what you can do is fully customize,
not only the "UI" but also the behavior.
And, we have that in two versions.
We have a "dot.net' version and
a "Java" version today of this "Remote "Monitoring".
Everything is open source on
"GitHub" and what you will see
in that "GitHub" page is
introduction of what the "Remote Monitoring Solution" is,
but also and more interestingly,
you have an architecture overview.
And, the idea here is to have everything implemented as
"Microservices" so that you can go and adapt
every single parts of that "Remote Monitoring
Solution" to your own needs.
So, that means like for example,
if I want to play around with
my own version of the "Device Simulator",
I can go and create my own "Microservice" here,
that does "Device Simulation" that
integrates into that "Remote Monitoring Solution".
So, this is fully customizable.
Your choice of "dot.net" or "Java" in order to implement
that back end and
the front end of that "Remote Monitoring Dashboard".
So, we've seen how it was like,
super easy to look
into what the capabilities of "Azure IT"
are through "Remote Monitoring
Solution" using the "Device Simulator Service",
in order to create a situation which is
a real life situation
to stimulate that "Remote Monitoring Solution".
Then, we were able to connect a real device
and leveraging the "Open Source"
as the case for "Azure IoT".
And, we also were able to implement
a reached device measurement scenario which is updating
a firmware over the air onto
my device through the "Azure IoT" services.
Last but not least, we connected
all that "Remote Monitoring IT
Solution" into that "ERP Solution Dynamics" in our case,
but we could actually also connect into other solutions.
So, I will say that as a developer,
I'm pretty happy with my evaluation of everything.