 Welcome, everybody. I'm Angelo and in this session, I will talk about the Internet Overtime of everything. Let's talk about IoT and Azure. But why is important to us to talk about IoT? The focus of this presentation is the Internet of Things because the use of Internet is now a common place with base following all day long. And in this session, we will review the use of Azure Cloud Technologies and how we can use those services with all of the gadgets, appliances and mobile devices available to us. We will learn how to use Azure services with some of these devices and how the Internet of Things service can be managed. The first part of this presentation is focused on the IoT. But what IoT means? IoT obviously means Internet of Things and is a more intelligent way to to collect data coming from every device that we can assume as things and bring this information to the cloud, to the Internet. And in this scenario, we can find a lot of examples from the simplest one that is the remote measuring temperature or more complex such as analysis on industrial machinery. And all this connection, all the moving of this data must be connected in a reliable and secure way to the cloud. But Microsoft has the loop, a custom version of its operating system called Windows 10 IoT in three addictions. The lowest one is the Windows 10 IoT Core. IoT Core is thinking to test our solution in chip boards such as Raspberry, MeNoBot and so on. And why could be important developer on Windows 10 IoT Core? Because we have access to the universal Windows platform with our familiar API and with our familiar IDE such as Visual Studio. We have other versions of Windows 10 IoT Core or Windows 10 IoT such as IoT for mobile devices that he has the all familiar user experience with the shell provided by Windows 10. And on it, we can run Windows 10 universal apps, drivers and mobile application. On the more complex version of Windows 10 IoT is called for industry devices. In this version, we have the desktop shell and we can run not only the universal Windows platform but the Win32 application too. And so why use it? Because we have, with a studio and the .NET framework running on the universal Windows platform. But we can we can use another way to run our C-sharp code or our C-sharp solution on the IoT devices. And this is .NET Core. With that net core, we can install all the tools, all the framework that we are confident with on the operating system based on Linux and Windows and Mac 2. But the very important thing for an IoT developer is to have a board running and Linux operating system such as Ubuntu or such as Debian, Raspbian and so on. Install on it .NET Core and execute all .NET code and in a way to recycle all our knowledge. But recently, Microsoft has presented another operating system, another way to access to the IoT world. This is called Azure Sphere. Azure Sphere is a new Microsoft operating system based on Linux. And this operating system has its focus on the security, on the efficiency, on the real-time processing unit and is a very secure operating system. Because in an IoT solution, security is one of the most important values that we can but the first device that is designed to support Azure Sphere operating system is the Mediatek MT3620 that we can see at the bottom of the slide. But the security is a very important point because we cannot we have to not take care about the hardware problem, hardware security issues such as meltdowns, backtracks and so on. Because the solutions are designed to be secure that you can imagine. Let's talk about the second part of this session that is focused on how to build an IoT solution on Azure. We have to think to an IoT solution in three fundamental parts. The first one is regards about the device connectivity. We have our board, our device, our sensor or whatever you want and we need to connect it in a secure way to the cloud. But to connect it, after connecting it, we had to process the data coming from this board that can be a temporary sensor or can be an industrial machinery or another kind of solution. This data can be processed, analyzed and managed by the cloud platform and we can manage the device too. We can manage the device identity, we can manage the update of the operating system, of the solution and so on. And the latest part is the final user, architect, is the latest part that we design in IoT solution and it is linked to the final user. And we have the business connectivity process and the presentation link. In this part we realize a system that can show to the final user all the data elaborated or analyzed by the cloud platform. As many of us know, Azure has a very, very enormous number of services. In this slide, we can find a part of these services dedicated to the IoT solution. As the first part, we have to manage the connectivity between the cloud and the devices and we have services such as the IoT app and even Tom. As the second part, we have the stream process and we have services on Azure such as the stream analytics that have to move all the data coming from the board to other services. Other services such as the storage one such as SQL DB, storage DB, storage table and so on. This data can be analyzed or in real time or after collecting it in services such as end up, inside or machine learning model. And we can provide some services to manage the identification of all devices. And so we can in every moment, we can know which device is connected to our solution, what it's doing and if we are running it out of program. After this, we have the backend part that realize the business logic of our solution. On the one of the latest part, we have the user experience presentation and we have services such as up service or way back or mobile application that provide a more human understanding model to represent the data coming from an IoT solution, IoT devices and so on. But see the connectivity devices part, I'm sorry. We have four way to connect our IoT solution to a cloud service provider. We have the cloud and the cloud gateway that is a direct connection between the device and the online service. And we can use this strategy when we have an IP capable devices can establish a secure connection across the network. And on the second way, we have a connection through the field gateway. The field gateway is another physical component that collect all the devices of our solution and connect all these devices to the cloud solution. Why we have to use it? We can use it in industrial scenario when we use high specific connection protocols such as OPC or COAP5 or when we have a short range connection between the devices such as Bluetooth or ZigBee or when our device cannot establish a secure connection to our online solution using protocols, secure protocol connections such as the TSL, TLS or the SSL. At the third way, we have a custom cloud gateway. We can use the custom cloud gateway when the protocol that we want to use to connect our solution to the cloud is not supported natively by the cloud service provider of the cloud service. And we can use the service to transform the protocol before that he is connected to the cloud. The latest one is the union of field gateway and a custom gateway. And we can use it to use the best of the both technology. And such as we have some devices connected to a field gateway that are connected by a custom VPN to the cloud gateway through the custom gateway. But the second part is the device identity and provisioning as store. At this part, we have a device identity authority. This authority stores all the information to validate the device that because we cannot admit that one unknown devices could be connected to our network or to our service. We have another service that is called the device registry store. In this store are collected all the metadata related to the devices such as the name, the version of the solution that is running, alert such as there's an alert on the space, there's an alert on the connection, there is an update and so on. But we can build some device provisioning API that are custom API that we create to allow to the device to present itself to the device identity provider to simplify our work. The device state store is another part of the architecture of an IoT solution. In this store we can collect all the data about a device. At the other part is the stream processor. The stream processor allows us to transport the data without applying any kind of transformation and bring this data to the other algorithms, other services that analyze and transform our data coming from the IoT solution such as the temperature or such as other kind of data. And on this data we can perform or a simple analysis or we can perform a machine learning model to have a prediction of the future data that we can receive from the IoT solution. The other part is the storage one. In the storage we can collect all the information that came in by the devices and we can use those to analyze and to perform a machine learning model on this data. At one of the latest parts we have the hub backend. We can assume the hub backend such as the implementation of the business logic, the business model of our solution and we can implement a layer abstraction of our devices or a group of devices to perform a more simple manage of the devices. We can manage the security of the user and of the devices. In this way I can say okay you are connecting to the user experience part of my solution. You are the final user of the solution. You can see only some data such as the the chart of the the start also some component. You are the IT admin of the solution. You can see more data than the latest the final user. As the part of user experience we can find one or more websites that show the information coming from the analytics or machine learning or from the storage. We can find Web API to represent all the data coming from the the solution to other applications such as desktop client, mobile client and so on. This is an example of the user experience that we can perform running an IoT solution. We have at the left part of the presentation the engines of the of N plane and on the left on the right part we can find some chart about the single component of this solution. We can find also other charts and other data information of our solution. The very latest is the business integration and connection engagement. In this part we can think to connect our solution with other business services such as CRM or ARP. We could have in our warehouse an IoT device to regulate the shipping status of the whole and this IoT solution is connected to a CRM to manage the warehouse. Let's talk with other services as a specifically think it to the IoT on Azure. I'm talking about the Azure IoT Suite. Azure IoT Suite is a collection of services of running on Azure and we have a pre-built model customised solution and we can easily integrate it in our existing business model or we simply can test it or learn how to build an IoT solution. All the examples provided on GitHub about the IoT Suite can be our solution, are ready to go solution and we can assume it as a remote monitoring, ready to maintain it and so on. The only thing you have to do to provide an example of how the Azure IoT Suite example is working is an IoT and an Azure subscription free or trial or an enterprise subscription and so on and Visual Studio or other tools that you can find in the reference of the project uploaded on GitHub. But after this part of presentation I want to introduce you to the demo that I will perform for this session. This is a very simple application of IoT solutions. We can use them, we understand IoT core and one of the services of Azure in this case one of the cognitive services to remote controlling the light in a room or in other contexts. But let's start with the checklist to build this solution. We need a Raspberry or a board suitable with Windows 10 IoT core and Internet connection to let's a breadboard for jump wire and to resistors. But first we have to see how Windows 10 IoT core named the GPIO pin on the Raspberry PI. We have this list of the GPIO that we will use in the solution to connect to the to the led or to other devices such as a temperature reader or a phone. And we will connect the led to this four pin to give energy to the to the diode and to to give the signal of switch on or switch off to the led. This is an example provided by freezing to how to connect the leds and the resistor to the Raspberry. But first let's talk about Azure cognitive services. Azure cognitive services is one of the parts of Azure services in the context of artificial intelligence. We have some services to integrate in our solution some cognitive capabilities such as the vision API that can perform an image and reconnection or a photo reconnection of the of what is happening in this picture. We have the speech reconnection that is a cool solution to talk with our solution our our example or what do you have to do with your code. And such as we can do a simple a simple sentence to our Raspberry and say hey switch off this light do something or do other good stuff. We have the language understanding API that provide the capability to our solution to really understand what we are saying. We have not to provide a couple of restricted sentences to realize our solution. But after training our model as we can see in the other slide we can say other way to to expose the same concept in our language that we have not predicted. We have the knowledge that is based on the that is based on the being power to receive information about an argument. Or we have the search API that we can perform very useful research in our solution. But the Azure Lewis means language understanding intelligence service and it can integrate a natural language understanding in our solution. As we can see in this demo we can say hey switch on switch on this switch off this in a very very different way that we have not predicted. But how we can do to create this solution. Obviously we have to run Visual Studio in Visual Studio a new UWP solution. We can open a blank universal windows app and at the first part of the building process of the solution we have to write some lines of code in the main page some of some of class. We have this method to to say to Windows 10 IoT core hey I am on an IoT devices and I want to I want to perform something like a GPIO that I will call lead green pin or yellow lead or lead yellow pin and I want to set this GPIO as the output because we are coming out as a signal from the Raspberry to the to the devices. In other cases such as a remote temperature monitoring we have to set it to GPIO pin driving mode with input because it has the capability to read some information coming from this sensor. After this we have to to introduce in our code all the entity that we will provide on the Lewis on the Lewis solution such as the entity that are the component that we want to assume in our solution such as the green lead and the yellow lead and the entity and all the entity that are a combination of the yellow and the green one. After this we have to create a new class that will that will parse the JSON coming from the Lewis and artificial intelligent application to see what is saying to our class. To do this we have to insert a new string with the connection string to the Lewis services as you can see an example of this in this slide and and the parse of the JSON. But now we can set up a new Lewis solution simply we have to go on Lewis dot a hey and go to my hacks. After this we have to create a new application we have to name the we have to provide the name of the solution and the language culture of our solution. The language culture can be can be selected so so we have to take care to take the good the the best choice that for our solution. After this we have to create the intents of our solution. In this case we can assume the switch off intent that is an intent to light off the lights and after this we have to say to Lewis hey I have tinkered to 456 a sample to sentence to explain to expose this concept in our language. The same thing we have to do to the other entity to the other intents the switch on one. After this we have to create the entities of our solution. We can assume the entity to which is the the thing that we want to control with this machine learning model and we have to create the first one that is a simple type of entity such as green light another one that is the yellow light and this is a simple type of entity and we have to create all entities because we could have the capability to switch off both the lights of all the lights connected to the solution and to do this we have to select the composite type. This is an example to how build this entity model and at the left part of the presentation we can find the green one with the entity type set it as simple and on the right part we can find the composite one all lights that is composed by two child the green light and the yellow light. After this we have to insert in this model some way to identify this concept such as green and other way to say green in our language and we have to do the same with the yellow and the all lights. After this we have to train our model so he can learn what we want to do with our solution and what we are saying in this text parsing. After this we can test our solution further integrate it in always a studio universal windows platform providing some example of sentences and we can see the score that we can that can be provided with this sentence. After this is almost done because we have to publish the solution and after this we receive a connection string the connection point that we that we have to insert in the parsing class of the JSON but the JSON structure that is provided by the lewis model is something like this we have the query at the first line and we can see what the lewis services as understand we have in a case of automation start off so and at the third line we have the score of this intent at the second part we have the score about the entities of this query we can find at the entities part that the lewis model as predicted that we can we want to switch off all the lights and it recognizes our intent using two keywords all and lights at the third part we can see the composite event the composite entities that is all lights but let's see on visual studio how to implement this as you can see we are on we are on visual studio and we have built the main page example we have built a simple user interface application with a text box a text box where we can type the sentence to send the to power i the i a lewis services at the second part we have the in GPIO initialization part with the the definition of the pin when we connected lights and the analyzer tool and the web client with the the connection string to the lewis and point to do this we have to connect to the roughberry i'm sorry we compile it distribution and i don't know why i'm sorry but i have a connection problem to my raspberry pi i will try to reboot it windows boot manager choose your language i think next i'm trying to reboot my raspberry oh yeah i am you can see okay i extend okay i was i'm trying to connect again to my raspberry pi i don't know why you don't want to connect i device is reboot again Angela we we're not seeing the screen where you're working we're seeing another screen oh i don't know why i'm trying to we got this you can see my screen i'm trying to connect to my raspberry pi but it's not responding let's sure again choose my screen okay but okay but yeah i'm trying to connect to the device portal of my raspberry pi but i can't see to the other display connected to it that the it's want to boot again it was working until 10 minutes ago cool them very cool them i'm trying again to reboot it try again i'm not client okay probably we are i really don't know why it's not responding i'm sorry but if you want to want to start i think that's the nature in my in my website that you can find on the latest slide you can see a post about this solution and you can find a video with this solution running correctly i'm i'm sorry folks hey that's okay that right this is the nature of live presentations and live content right these things happen and hey like you said you know for our folks that are interested want to see a little bit more there is a recorded video out there on the blog that you can check out we'll make sure that that we we get that link from you and we'll attach it to this video so that folks can follow up and learn more at this slide you can find some contact detail about me and this is the web my personal website and i think that the post will be available in a in about 10 minutes great that's perfect there are also the all right great stuff that was great stuff that's the nature of an iot presentation sometimes sometimes the devices are finicky right so cool all right so i i'm not seeing any questions in the chat room right now i see a lot of people saying thanks so much thanks for your efforts inspiring us to dive more into iot and no judgment here this is a very safe space they're they're saying so very cool but very polite from our friends in the in the chat room so awesome oh my gosh you have some great links there oh yeah awesome links thank you so much guys no worries all right