AWS re:Invent 2020: Managing industrial data at the edge with AWS IoT SiteWise

AWS re:Invent 2020: Managing industrial data at the edge with AWS IoT SiteWise

Show Video

hi my name is philip zacher and i am a specialist solutions architect for iot here at aws in this session i will talk about managing industrial data at the edge with aws iot sidewise what i'm going to cover is use cases for edge processing our new feature aws iot sidewise edge and also options for custom data processing and finally i will show you a demo how to set up sitewise edge what are common use cases for processing data at the edge for example you might want to reduce the latency for your local applications and also ensure business continuity even if the internet connection is not available or you want to consume your data already at the factory level so if you want to have a dashboard at the factory level you don't need to send the data up to the cloud and then look at the same dashboard that consumes the data from the cloud um so you want to have for example your dashboards available at the factory level in your facilities or you might also want to consume data from other data sources than the data sources that are provided out of the box from our services so um first of all let's uh take a look at aws iot sideways in general aws iot sidewise is a fully managed service and it has several components it has a gateway to collect data from industrial protocols like opc-a modbus tcp or ethernet ip then you can create models to model your physical assets your processes or your facilities and with sideways monitor um you can create fully managed web applications to visualize and analyze your equipment at reinvent 2020 we just launched aws iot sidewise edge in preview this is a new capability of aws iot sidewise um aws iot sidewise edge brings features of aws iot sideways to the edge so aws iot sidewise edge will be installed on a gateway which could be for example an industrial pc in your environment you can now process data at the gateway locally and visualize equipment data locally with a sidewise monitor that is also installed locally on your gateway for example you can compute metrics like the overall equipment effectiveness locally to use it in your production line um and create monitoring dashboards on the factory floor so with aws iot sidewise edge you don't need to do all the heavy lifting that you need to do if you want to install your own solution at the edge like maintaining and installing components like databases like software to create dashboards and so on so um let's look take a look at the services and components which are required here for edge processing first of all you have your data sources like industrial protocols then you need to have green grass running on a linux box for example it can also run on the snow family from aws or it can run on aws outposts you need to have greengrass version one and of course aws iot core is also involved in the setup because greengrass is connected to aws iot core to send data to the core or also to get deployment information for your greengrass setup then you need to have aws iot greengrass stream manager enabled for your greenbreath setup because that stream manager will be used by several gateway components then you might also bring your own lambda functions to interact with these streams what you also need to have is the aws iot sidewise connector and for sideways edge you need to have the aws iot sidewise data processor connector that is a component for processing data at the edge and for creating dashboards at the edge so if you want to set up edge capabilities as i mentioned already you need to have a box where we run aws iot greengrass then you need to install also java 8 on this box python 3.7 and you need to have docker and docker compose on this box then you need to add the iot sidewise data processor connector to your greengrass group this will deploy it also to your device running aws iot greengrass then you need to configure the gateway of aws iot sideways to process your data at the edge and finally you need also to configure your asset model for edge processing in the exit model you define which properties will be computed and processed at the edge and the results will then be sent up to the cloud for long-term storage so we have also a term that's called destinations so destinations are simply streams on aws iot greengrass and a destination lets you control where your incoming data from your data sources will be sent to um by default you have a stream that is called sidewise edge stream in this example here you can see two data sources two opc a servers one opc a server sends the data to the sitewise stream so that means not the opc ua server directly but the component from sitewise that gets the data from your server and sends them to the stream so in the case you want to do edge processing with aws iot sideways edge you send your data to the sidewise edge stream and now let's take a closer look at the architecture with streams and lambda functions lambda functions so the default option is you install the aws iot sideways connector it brings two lambda function a reader or a collector lambda function that gets data from your industrial protocols we supported obcua for a long time at reinvention we have launched also support for modbus tcp and ethernet ip protocols and the collector writes the data to the sidewise stream then you have another lambda function that is also part of the sideways connector that is a so-called publisher or writer lambda function and this lambda function reads data from the site by stream and transfers the data to the aws iot sitewise data store in the cloud another option is that you bring your own custom number function to write into the stream or to read out of a stream and with a custom lambda function you can support data sources that are not supported by aws out of the box might be you have an opc da server or you want to get data out of a database and send them also to the aws iot sidewise data store so next um let's take a look at the new custom option so we also launched a feature at reinvent so that you can send data to your custom stream you will still use the collector alumna function from the sideways connector but then you define a custom stream you can also use your own custom lambda function and write to the custom stream so what can you do with a custom stream for your own stream you can create a so-called export configuration and an export configuration defines where the stream sends your data to automatically you don't need to take care about this and an export configuration can be created for aws iot analytics for amazon kinesis data streams for aws iot site device or for amazon simple storage service for example if you want to send your data to your industrial data lake you can also bring your own lambda function also your own writer lambda function to write the data from your custom stream to an on-premise application or to another service which is not supported out of the box so in the next slide we will take a look at the architecture when you use aws iot sidewise edge so you still use the collector lambda function from the aws iot sideways connector and this function lambda function writes then into a stream that is called sidewise edge stream you can also bring again your custom lambda function to write into that stream and then you have the component our new capability aws iot sideways edge that reads out of a sideways edge edge stream and computes data at the edge processes data at the edge and writes results into the sideways stream and and at the cyber stream you still have the publisher lumber function that reads the data from the stream and sends the data to aws iot sideways in the cloud of course there's more functionality involved than reading from a stream computing data and writing them to a stream you have also the local dashboard the web application the site was monitor that runs also an aws iot site wise edge so if you want to interact with site by streams you're um you need to follow a certain message message structure like shown here so you need to provide an alias that's an alias for example machine sensor slash three slash temperature then you need um to provide your value that's a measurement it can be a boolean double s a string or an integer then you need to provide a timestamp in milliseconds and you need also to provide the quality which can be good bad or uncertain you can batch multiple messages together for efficiency because when you batch multiple messages together you need less api calls so for example you can send multiple messages with only one api call so and now i'm going to start a demo in this demo i will show you how you set up sidewise edge how you send data to the edge and compute data at the edge and you will also see how a local monitor that means a dashboard at the edge will look like so uh let's get started with the demo for the demo i have already installed greengrass on an aws cloud9 instance and you can see here my greengrass group it's called sideways edge group i am here in the connector section and you can see no connectors have been added to the greengrass group for sideways and sideways edge we need to have two connectors we can add them automatically by configuring the gateway and the sideways console so i will switch to the sideways console to the gateway section i have created already a gateway and now let's have a look at the details so first of all we need to enable edge capabilities but before we do that let's take a look at the configured sources you can see here two opcua servers configured for this gateway and here you can see the default destination as mentioned already in the architecture overview by default it's called sidewise stream so now let's enable edge capabilities so by enabling edge capabilities multiple things happened first of all you can see here that the destination has changed to sideways edge stream we also need to check if the destination options here are configured correctly that means they must be set to sidewise we're going here to edit and here you can see aws iot sidewise that's correct now let's switch back to our greengrass group i will reload the page to get the current connector configuration and you can see here two connectors have been added to my greengrass group so these connectors need also to be deployed to um the aws cloud9 instance where greengrass is running so i use actions and deploy and while the greengrass group is being deployed i will prepare my asset model for the edge so we will go to the model section here in the sideways console and you can see here a bunch of models already important are the models that contain edge in their name so i have here a generator model so this is a generator that produces energy and it's normally hosted in plants so let's go to the model you can see here a new point that's configure for the edge and you can see by default no edge configuration is enabled you have two options to enable compute the properties at the edge that is either compute all properties or the custom edge configuration that means you can decide which properties should be computed at the edge i will use compute all properties at the edge and save so in the next step we need then to create a project and a dashboard in a sitewise portal i have created a sitewas portal in the cloud already and i'm logged in into this portal and i need to create now a project and a dashboard and this will be synced then to the edge so that means first of all you need to create your resources here like dashboards and projects in the cloud so that they can be synced to the edge so i will use here the powerplant h1 for my project add asset to the project go to next and define a project name add asset to the project and we are ready to create a dashboard i will use uh some measurements from the generator one like the power output rpm and the temperature call it here generator er 1 and the dashboard will be named edge dash board i would save the dashboard we're done in the cloud we need to wait now some moments until the dashboard and the project has been synced to the edge what you can see here is the ops up for aws iot sidewise application this will be installed locally on windows machine or on your laptop and you can use it for monitoring and troubleshooting gateways entirely locally and you can also retrieve the url for your local monitor from op sub here you can see for example the address of your local gateway uh the software version which is running then you can see some metrics about the system like cpu utilization free memory and free storage and here you have some metrics about the streams on your local gateway and also the error rate so but we want to retrieve the url for our portal you can find the url here in this section sidewise monitor portals if you don't have offset available you still can construct the url yourself because it starts of course with https then you have your local ip address or your local dns name then portals and then the portal id of the portal from the cloud that has been synced to the edge you can find the portal id for example studio api for example with the aws cli with aws iot sidewise list portals so let's switch then to the local portal so um i logged in already before into that portal so therefore i will not be again prompted for credentials and what you can see here now it's the edge dashboard that is the dashboard that we have created in the cloud and that has been synced now to the edge so let's take a look at this dashboard and you can see here already some data in the dashboard so that means everything is working your data are consumed and computed at the edge and your dashboards are also at the edge so there's a total local monitoring application in the last part of the demo i want to show you how you can query the api at the edge so that is the same api like in the cloud but you need to use another end point your local endpoint first of all let's list the asset models what you can see here is i use the normal aws cli the service is called iot sideways edge i need to pre provide another endpoint in this case localhost and port 843 i need to define no verify ssl because we use a self-signed certificate here at the edge and now let's go you can see here all the asset models that have been created and in the next step i will show you how you can get an asset property from your assets we will also use of course the local endpoint and we will get the power output for our generator one here so you can see here um the value for the power that is currently generated so that is an option how you can consume your data also at the edge and this will also work even if you don't have a connection to the cloud so and with this i'm at the end of my demo okay now in the demo you have seen how you can set up aws iot sideways for the edge how you can compute data locally also how you can access data locally with the same apis that you use in the cloud and i hope you have learned in this session um different data processing options how to set up aws iot sidewise at the edge not only by the demo but also by the architecture architecture that i presented and you have also learned how to visualize your data at the edge yeah if you want to get started please examine our aws iot sideways resources at aws.amazon.com iot sidewise or simply go to the management console and start building your edge setup or your edge projects in case you have any questions please contact your aws account team or contact us under slash aws.amazon.com us yeah we are now at the end of the session i like to say thank you for your attention and we love also to hear your feedback so um please complete the session survey thank you again

2021-02-12 20:11

Show Video

Other news