Azure IoT Hub and Azure Event Grid



so the integration between a Zarate hub and event grades is now GA and Ishita is joining me on the show to tell us everything about higher integrate these events that can be generated by a T hub into the event grid flow thanks for watching the IT show I'm Molly a host and I'm here with oh yeah hi I'm doing great how are you great fine awesome I'm splendid we are here to talk about the integration of azure IOT hub was event grids yes what so and that's now GA because it's been in public preview for some time yes and us GA yes so what can you tell us about it what's new and why we're doing that and I'm gonna interrupt you awesome so we've been in preview for six months now I've got great feedback from customers and we are going GA with four events so device created device deleted device connected and device disconnected okay what this means is that our T hub is now publisher an event grid so anytime any of these events occur customers can choose what they want to do with they can automate server let's applications and trigger workflows or send this fan this event out to anything they want and so to survive event gird is actually fully managed eventing service which is connecting Azure services with even third-party application as well as services like pop subsystem right yes on Azure oh yeah lots of the azure services are actually whether publisher or whether subscribers where the both right absolutely so that's you and then we basically want to ensure that customers are easily able to integrate these events and they don't have to create polling mechanisms and services maintain them which adds complexity and cost for them and the goal is to simplify IOT for customers awesome can you like tell me a couple of examples of like concrete scenarios like from agency what will that integration to help you do yeah so think about security and compliance so if I'm a monitoring a bunch of hotel buildings around the world and I want to make sure that fire sensors are in compliance yeah any somebody adds a fire sensor and registered that that to my auntie hub I want to make sure that I send an email out guiding that person on the compliance checklist that we have to ensure that they're always you know true to the word when we're audited so that's one and then also if a device is reaching end-of-life same scenario let's say fire sensors reaching end-of-life I want to make sure that I'm able to immediately send an event out to you know text my engineer or update my operations manager in the building to ensure that they can take action to replace the device got it and another one is people really want to debug an issue and troubleshoot what when their devices are disconnected and if an grenouille helps you find that event out and also it's near real-time so it's really quickly learning people about a malfunctioning device or been aware device up stop sending data okay so that integration being GA yeah you can show us how that looks like and how we get things done with them in Greece sure so let me quickly walk through the event schema so we actually have four events now schema for two events device connected and disconnected very similar so maybe you shoot and when we're here so some people might not be super familiar xiety hub so we might want to remind people what is different types of things are coming from devices into our table and then in terms of messages and then what's coming at RIT out that we were actually talking about the events and telemetry and things like that so basically there's telemetry coming out but also we have events coming out so we have message routing which helps sending telemetry out to different endpoints like service bus topic service for SKU event hubs and WAP storage and event really helps you find that just the events out we don't have telemetry on event grid yeah so you can it's more for low latency low frequency type events today which is like when you think about IOT scenarios telemetry is the thing you imagine like a boat load of data coming in and and now do you have to deal with in real-time yes and then wrap correctly and so on so we have specific features for that natty hub yes Vann grids is really very much about you know these events are like more not sporadic but less frequent and in smaller volumes yes exactly and it's really the the key is you know triggering something right so we want to accelerate that time to action and time to value your customers but it's not on hey have a have a telemetry data that is temperature and when the temperature goes above a certain level do something it's not that type of thing yeah not yet yeah and you can do that in routing today you can have rich queries that say you know good query on the message body and then sent that data but with events event grid allows filtering on device ID today so you can actually say if my temperature are your device is like type temperature or more named temperature then you can set that event I don't need it yeah okay great so this here is the schema for device connected and every event that comes out of event grid has wrapped in this envelope that event grid puts so basically we have an ID every event will have a unique ID a topic which is the arm parts to the resource group that is in this case it's going to be your outer hub subject is you know who's publishing the event so it's gonna be our devices event type is the type of event so unique identifier again so device connected us this event event times when the interent occurred data is something that the publisher sets now in this case we have set the data to be sequence number so we've we've noticed that cut some customers actually want to know the sequence of device connecting disconnect it's really important when if it's too frequent you know they need to know that they may be taking actions and they want to ensure that the action is you know a device is connected before it shows disconnected so what people do you have a collection of devices and you unlike device a to be all before device yes yes so it helps you maintain a latest state you know connection state of the device and what this is is a simple string which is uniquely and strictly increasing okay so every next event will actually have a heart so people just have to do a simple string compare you know then they have the latest semantic sense we've also added the hub name and the device ID and the module ID keeps things unique and then the schema for device created and deleted same thing on the table topic subjective entire event time data here will have the twin of the device oh nice and then we have also simply added the hub name and the device ID Oh so let's believe it this now so what I want to show here quickly is I'm gonna send myself an email anytime devices created or deleted and this is just playing with the security and compliance Mario so here's a logic app that I've created I simply have an HTTP request and I have added the schema for my device created event to be parsed by this logic app okay so that I can grab all that and add an action of sending an email that email I have put details from my schema like device ID this event occurred at this time as you recall typical logic apps exactly okay and then here's my email I want to show that it's all empty no nothing in the in the magic happens soon so so this is my ID hub now left ok is click on events and then create an event subscription yes that's the actual integration language right exactly so this is extremely simple hero all I have to do is say what is the type of event endpoint type I have okay I'm gonna have a met poke actually let me scroll up here a little bit so here's where I'm saying I want to choose all type of events so I can have all four different events and triggers as logic app anytime that housing and then I want to select an endpoint and my endpoint is going to be the HDP all of my logic app got it and then we paste that here so all that are featur this is a feature of Venn grid right defining the endpoint type and and and the actual endpoint is yes some things that are exposed through that plate but that's that pure pure language exactly this is owned by event grid and then so basically giving the subscription my name my ran schema is event grid schema you can actually choose different things and then the filter so here this is I just let's say I'm gonna pick every time a device is on floor 1 only then I want to you know filter this so I'm just you can have a prefix and a suffix on the device ID here so boom Here I am now creating my event subscription and great so now let's test this so we will create a device add a new device yeah and I'm gonna name it device temp building 3 floor 1 so I'm adding floor one because that's the filter that we added and I want to get notified works only when floor 1 has a new device ok so as soon as I save this now we can see that we have our device here yeah I'm expecting an email awesome and so the flow is being that you've been according that device I have created the device in the device registry because we have the event grid integration it will actually trigger the webhook that has been hooked up you know as in in in the event grid plate right and now you have the email and it's near real-time so I want to make sure that you know floor 2 is when a Florida device is deleted I do not get this email so I'm gonna do two things I'm going to actually delete a floor one and a floor 2 device ok and you will notice that I only get filter really one yeah ok one you email about this first device for a big one get refresh one you know so we only deleted floor one so that's how easy easy it is to use well we hope people use it and they can go to a catered event slash IOT hub events for more information perfect and we'll add the link in the comments awesome thanks for xie xie and hope to see you soon for more on the event grades another indication into a table yeah thank you thanks for watching the show and don't forget to subscribe thanks

4 Comments

  1. Jyotiranjan Rout said:

    Can we have some videos on IoT hub upgrade please?

    June 26, 2019
    Reply
  2. 河端善博 said:

    Nice,
    and I hope to talk the mean of this integration of Azure IoT Hub and Azure Event Hubs to citizen developers with no-code.
    The citizen developers use the Azure IoT Central and Microsoft Flow, instead of Azure Functions, Azure LogicApps and some programming codes, for achieve more business.
    Now, Azure IoT devices connect Azure IoT Central with no-code, Azure IoT Central include Azure IoT Hub with no-code, Azure IoT Central run the Microsoft Flow at some events with no-code.

    June 26, 2019
    Reply
  3. Azure Steve said:

    Thank you Olivier Bloch and Ashita Rastogi for bringing this to GA

    June 26, 2019
    Reply
  4. Sandeep Solanki said:

    This is cool ! What will happen if i uncheck the checkbox "Subscribe to all event types" . Do i get the option to select the predefined events? What if i've to create a custom event to be triggered.

    June 26, 2019
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *