際際滷

際際滷Share a Scribd company logo
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Lets start:
IoT
What IoT means?
IoT scenarios
Windows 10 IoT Core
.NET Core on Linux
.NET Core 3
Azure Sphere
IoT Solution Architecture
on Azure
IoT Solution Architecture
IoT Solution Architecture
Connect devices
Device Identity, Provisioning and Store
Data processing and analytics
Storage
UX e App Backend
UX e App Backend
Business Integration
IoT + Azure =
Azure IoT Suite
Securely connect
millions of devices
Over a secure
Internet connection
To Microsoft Azure  build with
security from the ground up
Device Security Connection Security Connection SecurityCloud Security
X.509/TSL-Based
Handshake and Encryption
Device provisioning
And Authorization
Azure Active Directory
Key Vault
Policy-Based Access Control
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Checklist
GPIO Scheme on Raspberry Pi
Connection scheme on Raspberry Pi
Azure Cognitive Services
Azure LUIS
Visual Studio: new UWP solution
MainPage.xaml.cs
private void InitGPIO()
{
var gpio = GpioController.GetDefault();
pinGreen = gpio.OpenPin(LED_GREEN_PIN);
pinYellow = gpio.OpenPin(LED_YELLOW_PIN);
pinGreen.SetDriveMode(GpioPinDriveMode.Output);
pinYellow.SetDriveMode(GpioPinDriveMode.Output);
}
MainPage.xaml.cs
private GpioPin[] SelectedPin(Entity entity)
{
var result = new List<GpioPin>();
switch (entity)
{
case Entity.Green:
LightAccess(result, entity, pinGreen);
break;
case Entity.Yellow:
LightAccess(result, entity, pinYellow);
break;
case Entity.AllLights:
LightAccess(result, Entity.Green, pinGreen);
LightAccess(result, Entity.Yellow, pinYellow);
break;
default:
break;
}
Analyzer.cs public class Analyzer
{
public Intent Intent { get; set; }
public Entity Entity { get; set; }
}
public enum Entity
{
Green,
Yellow,
AllLights
}
public enum Intent
{
LightOn,
LightOff,
None
}
WebClinetLuis.cs
... switch (entityLight)
{
case "AllLight":
result.Entity = Entity.AllLights;
break;
case "Green":
result.Entity = Entity.Green;
break;
case "Yellow":
result.Entity = Entity.Yellow;
break;
default:
break;
}
JsonObject obj = JsonObject.Parse(resultJson);
... switch (intent)
{
case "LightOn":
result.Intent = Intent.LightOn;
break;
case "LightOff":
result.Intent = Intent.LightOff;
break;
default:
break;
}
private const string LuisUrl = " YOUR_KEY "
https://<region>.api.cognitive.microsoft.com/luis/v2.0/apps/<appID>
?subscription-key=<YOUR-KEY>&q=<user-utterance>
Setup LUIS
Setup LUIS: new app
Setup LUIS: new app
Setup LUIS: new intent
Setup LUIS: new intent
Setup LUIS: new intent
Setup LUIS: new entity
Setup LUIS: new entity
Setup LUIS: new entity
Setup LUIS: lets train and test the model
Setup LUIS: lets train and test the model
Setup LUIS: final steps
LUIS: JSON response structure
{
"query": "switch off all lights",
"topScoringIntent": {
"intent": "HomeAutomation.TurnOff",
"score": 0.97520715
},
"intents": [
{
"intent": "HomeAutomation.TurnOff",
"score": 0.97520715
},
{
"intent": "HomeAutomation.TurnOn",
"score": 0.04457553
},
{
"intent": "None",
"score": 0.00627107872
} ],
"entities": [
{
"entity": "all",
"type": "AllLights",
"startIndex": 11,
"endIndex": 13,
"score": 0.6425568
},
{
"entity": "lights",
"type": "AllLights",
"startIndex": 15,
"endIndex": 20,
"score": 0.7956683
},
{
"entity": "off",
"type":
"HomeAutomation.Operation",
"startIndex": 7,
"endIndex": 9,
"score": 0.613482
}
],
"compositeEntities": [
{
"parentType": "AllLights",
"value": "all",
"children": []
},
{
"parentType": "AllLights",
"value": "lights",
"children": []
} ] }
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Contact details & recap
Resources & Links
https://developer.microsoft.com/en-us/windows/iot
https://azure.microsoft.com/en-us/overview/iot/
https://www.microsoft.com/en-us/azure-sphere/
https://azure.microsoft.com/en-us/services/cognitive-services/
https://www.luis.ai/
https://docs.microsoft.com/en-us/windows/iot-core/manage-your-device/deviceportal
Resources & Links
http://aka.ms/iotrefarchpdf
https://channel9.msdn.com/Events/Build/2016/B815
https://channel9.msdn.com/Events/Build/2016/B844
https://myignite.microsoft.com/videos/2905
http://aka.ms/iotSuiteDoc
https://www.azureiotsuite.com
Resources & Links
http://angelusgi.azurewebsites.net/2018/09/14/dotnet-
conf-2018-internet-of-everything-lets-talk-about-iot-
and-azure/
https://channel9.msdn.com/Events/dotnetConf/2018/S
308
Thats all!
Q&A

More Related Content

Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018

Editor's Notes

  • #3: Use of the internet is now common-place, with bits flowing all day long. Lets 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. Well learn how to use Azure services with some of these devices and how Internet of Things (IoT) services can be managed.
  • #30: It provides and example of Languge understand for automation in iot scenarios
  • #47: La reference architecture fornisce linee guida che debbono essere adattate allo scenario specifico. La componibilit dei servizi offerti da Azure (anche di terze parti) 竪 la carta vincente per implementare soluzioni che si evolvono nel tempo. Azure IoT Suite 竪 un ottimo modo per capire e sperimentare una soluzione IoT chiavi in mano che pu嘆 essere facilmente adattata ad una soluzione reale.