Connect devices from other IoT clouds to Azure IoT Central



today on the IRT show we are bringing perk list from the IRT central team to talk about how to connect devices IOT devices that might not be IP based or might not be directly connected to the Internet but are using a network such as Laura the sings network SiC fox or others up to azure IOT and azure IOT central hi everyone this is olivier on the IOT show thanks for watching today we have Proclus with us hi fretless how you doing hi I'm doing good ok so Paris is in the azure IOT team and he's here to demo something new which is a bridge for some of this devices connect with these weird technologies like Sig Fox Laura and so forth into IT central in a very simple way first how about you introduce yourself to reviewers were you were you doing people know you're an actor central team but they might want to have some more details yeah so I'm Pericles and I work in the azure IOT team more specifically I'm a soft engineer on IOT central and yeah today I'm here to talk about device bridge ok device bridge that's the name of this that's what an open source project right yeah correct that's a fully open source project and it's completely as I'll show later it's completely deployed to your subscription and you have total control over it so what kind of network should we expect so we have IOT devices out there some of them are connected directly to the internet using Wi-Fi or GSM chips whatnot but more of these IOT devices are connected using a low consumption lower energy you know technology such as Laura SiC Fox or other ones right and so I think the goal of this project as I understand it is to make it super simple to connect these existing solutions into Artie Central right yeah exactly so you have many of these IOT platforms of these IOT clouds that they have big sets of devices in the allow you to transmit device data through HTTP calls so every time a device message gets into their cloud they transmit which was meet that message to some endpoint in the web and in this case what device bridge does it it gets collects these messages and transmits them to your IOT Center application ok and so you're saying cloud to cloud basically right yeah ouch whoa so what are the solutions that we can breach today with that open source project yeah so today you can reach like us had any IOT cloud that supports transmitting device data through HTTP okay or any other device that supports transmitting data through a okay but these should them expose data in a specific format of theirs right so that's the thing so we deploy so what is device bridge device bridge is an azure function completely deployed deployed through your subscription and where you have total control so we accept data in a specific format and a fixed format and you can change the code of the I should function a little bit to accept whatever format you need okay and we have like kind of a already pre-baked samples for people to understand what these transformation our data looks like yeah actually let's go through the whole place of how will you get from zero to running let's do it so we have here the repository for device bridge which you can find the link in the video description yeah so when you come to the repository first thing you're gonna see is a deploy treasure but okay as I said this solution lives entirely in your subscription I have total control over it okay right so if you click that button we should be taking to the edge report okay and the template will load in a few seconds so what this is loading is a preset template that's gonna deploy the whole solution into your subscription okay and the goal is to make it very simple for you to do it it's like very quick a couple minutes you should be able to set it up so when you come here to the deployment page you have to fill this form to get the solution deploy tree or so okay so you're gonna use a new resource group okay so I'm gonna call it it could be a good practice to host it in the same so like resource group as your archie central application exactly so you can group things together and have them together so it makes easier for you to manage okay definitely so let's call it let's give it a name for this resource group now the true important pieces of data here are scoped ID and IOT central Sask okay right so what this does is it this piece of information allows you to allows your devices to connect your IOT Center obligation okay needs to resemble the device provisioning service informations basically we will be leveraging what's behind it is central to provision these devices which are in that network yeah exactly so under the hood what device breach that is it is it gets this information there's the disaster and the scope ID uses the device provisioning services API it's okay to actually register the device in a transparent way for you you don't need to worry about it as long as you give us the info we do it for you in a transparent way so then does that mean it's gonna map every single of your devices in your realm of IOT network into a device UNITA Central exactly so what exactly you don't need to manually create devices you don't need to manually provision them we're gonna do everything transparently for you okay love it yeah so this information can be easily found so we have all the instructions on the repository you can find everything on the readme and this information this connection information you can find new right IOT Center application okay so here we have an application that we set up earlier and you can find this information under administration section device connection got it alright so okay so here in the base connection we have outing if we need to connect your devices to IOT central ok so first this cope ID is enough we can copy it over okay then we have our primary SAS key okay and don't try and read this text on the screen here because we're gonna kill that app anyways just after that exactly okay and there you go there we go so it's deploying the resources through your Azure subscription as I said yeah and I noticed one thing you know I already did use this way of deploying arm templates through the portal there's this button at the bottom it says purchace so the funny thing is that it's gonna deploy the services but then you're gonna pay depending on what these services are doing in your consumption right so sometimes it's free some of these services are but I guess here we're using an azure function so you know it's gonna be pay as you go on that function yeah so we're gonna start with our consumption plan yeah but we described in the repository we can describe how you can change it for your needs you can add it this template for your need so one thing one of the things we can do you you can run on consumption plan yes charge as you go yeah and it supports like a bunch of executions for free but you may want to depend on your scaling needs you mean you may want to change to an app service plan okay wait which has dedicated computer sources so you were sure that you'll be sure that you can scale that that solution as much as you need okay right but we have like a big session on the repository on how to do it how to customize the template to do that and to have an estimate of the costs okay right that's always yes so it's being deployed let's see what's been deployed here so our resources should show up in a second okay so it's deploying a couple things under the hood so first thing gets that playing a key ball and that is to make sure that we keep the key that the device connection key that you're giving us we keep it safe okay right so only this actual function you have access to this key so okay it's completely protected and again completely transparent you can each worry about where it's going to be stored or where it's gonna be managed and the second thing as we already mentioned it deploys energy functions okay which is the core of device bridge right so these are your function what it does is it gets these HTTP calls as the HTTP messages containing device telemetry or device measurements from articles like cig Vox particle yeah things that work and they transmit it right your IOT Center obligations okay so this as your function is the core of the solution okay right so it's not it's deployed we can look up the resources that there are now in our subscription so as I said we have here key Vogue and we have our actual function yeah right any of the storage it always comes the function exactly yeah exactly so if you look now under functions you should have a newly created IOT C integration function okay so okay so this is the code for the solution and as I said what you see is what you get and you can change the code on the screen if ya change it choose to donate okay so one one interesting thing is this is an a JavaScript function and for that to run one quick step that we need to do is to install the packages that don't work yes the NPM install yeah so you have to do an NPM install and again these structures in the repository cover all that so you can complete all steps yeah but yeah so once that is done you have like your solution ready to go you can even test it from the portal if you want right okay so what does deploy is what we just done here the plus a generic version of device bridge so it in the repository we have the format of data that we accept so if your sender in this format we are going to transmit your right oh the default function is just like a path through of the data right exactly if you send the right format from the get-go in your HTTP request to trigger the function that's what's gonna be sent exactly you've got it sometimes as you said you have a different data format your hand different needs and that's okay so when your app will store you have included many samples on how to connect different clouds using device but how to do small changes to connect different cloud so here we have an example for part of what you need to add like this is mouth snippet okay then we have how to connect sig Fox devices and my last what we are going to be using today we have instructions on how to use the things that work devices yes right we have some of the hardware there and so I've noticed that all of these networks usually they have a web hook right connection exactly so basically on there on our side you deployed a bridge you have your IT central application on their sign the other side you basically just have to just have to connect the web hook to the edge of function trigger right exactly and I'll show you in a second how that is easy to do okay I'm jumping so as I said we have all the instructions you need to customize the Vice Bridge you connect to the things that work and it's as much as copying this code snippet sugar as your function and we have a pretty boy – your function here pretty deployed instance of device beach that we already change – to connect to the things that work and we are gonna be using it today to connect this small things okay no so what do we have here so this is a device to connect you the things that work okay and it's a node and it's connecting for this gateway so for this we don't know the things network so between device and the gateway it's lower right so that is like low low consumption low energy super popular network for connecting devices so this is a lower gateway there's internet lower to the device okay exactly okay so the device is very low power the heavily things being done in the cloud okay and here we have on Arduino device on uno device that is also connected to the things network okay so as I said we have these instance of device bridge that we set up or let me use the things that were yeah so we here we have the same measure function that is going to load in a second and some we also have here is a things that work application alright so that's the order and of the pipes so we have things that work application where these devices are transmitting to okay and we want to connect this device when devices that show up in these are things that were obligation to show up in our IOT central ok so as you said all you need to do is many other clouds like this one have this integration section where you can create a new integration right and today we as we said we are going to be using an HTTP integration okay so I would expect in the future so we'll talk a bit more about what exactly support it today but it would expect maybe to have a bit more than just the web book in the future right yeah we are actually exploiting or title so connection yeah but right now web hook is let's say what we started with and it's missed cause yeah it was so widely supported right even if you are not connected to one of those clouds if you want just a quick start to our area T central you can as I said test on the port oh yeah and Sam a post message yes I switch and get in see your data on IOT Sam that makes sense interesting user Jeff yeah okay so how I need to do is give it a unique name okay to this integration and the most important important piece of data here is this URL so this is where URL is where is the data from the device gonna be sent you once it arrives in the things that yeah yeah right and the URL you're going to use is the azure function yeah right incense so this is the URL that triggers are as your function for device bridge we're gonna place it here then yeah we're gonna send a post request we need no authorization and that's because the actual function in point the URL is already protected by a function key so everything is secure here okay and so we don't need any custom headers and by last we select which device keys we want to use and that's at contains Network cost so okay right then we hit create and it should start working yes so now let's bring up the logs into our yeah okay so that is starting showing up and at this point we should already see this device is showing up now are at the center of Legation as in populating new device except you have to have a device type or how does that work from here exactly so why ot Centro has never seen these devices correct so he doesn't know the the template that they use yeah so for that we have the section called and associated devices right okay so this is an Associated devices are any devices that IOT Centro so they showed up charity Centro they have the right credentials okay but you still don't know the template okay so you cannot actually translate what they're telling you into the graphs and the maps and so on and to you exactly so you can see your measurements in a nice format your events your states and everything so yeah so how easy to do now is associate this device ok template right I like the name Hockman yeah so here we have already have things that work template and you created just before we created just before this demo and we just associated this device true ok and you get a message saying Association was successful ok and now when you come to this device template you can see that the new device there ok all you needed to do was push a button to associate it yes that's pretty straight for yeah so now if you go into the device so here you can see all the measurements it has the states and the events okay and in a few seconds we should be see data coming in from the things that work into our oh there we go so we got to the metric from this device here into your at accenture obligation okay so we're saying that I was actually saying earlier on that we'll see more features coming right now what we're seeing is telemetry flowing into RT Central right exactly there's more than just telemetry in the future you'll be able to actually do the the setting the configuration your your devices from IT Central and will definitely depend on you know the type of network using because they're using different ways of interacting with the devices in their network right yeah so this is it's to something we're exploring yeah so that's a very important point this today device bridges are one-way communication it comes fruit whatever cloud you are using into IOT Central Elementary you've got say it's an event and you can build rows and analytics on top of that data yeah but today settings and commands are not work and we are exploring how to do that in the future yeah right you're exporting a solution for us I like that and as a matter of fact because the the the bridge is actually a github repo people can just you know chime in I file an issue propose a solution contribute code as well right they have new examples you have new way of doing it that these think are good they can actually go and get having collaborate with you guys exactly like I said this deploy is a generic version of device bridge in the repository you have many structures how to connect this three networks but if you have a good sample or the dosage or steps you use and not a network that you were using your feel free to submit it to us like not an issue we are open to suggestions and feedback on the code love it well you guys know what you have to do check out the links down there go to the gear up repo talk to Pierre class down there and the other devs were working on that bridge for it7 yeah and devices and thanks for watching the IOT show hope to see you soon again for more demos ok thanks for having thanks guys bye

4 Comments

  1. SRITAM PALTASINGH said:

    Excellent presentation demonstrating the creation of device bridge. I was able to do it. One problem that I faced is that the device name only allows alphanumeric lowercase and hyphens. I had underscore in my device id. So, the azure function was complaining about my deviceId and I could not see the device in the IOT Central Application. So, make sure you have an acceptable device Id while you are registering your device in the TTN console. Thanks for the video and the github repository πŸ™‚

    May 22, 2019
    Reply
  2. Guilherme spillere said:

    How can I make the connection to sigfox?

    May 22, 2019
    Reply
  3. Ana Rocha said:

    He is so handsome 😏

    May 22, 2019
    Reply
  4. Derrick Thomas said:

    That afro is niceπŸ˜€

    May 22, 2019
    Reply

Leave a Reply

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