blob: a3c667ee77cf1877847c114b84dda45be3020014 [file] [log] [blame]
<!DOCTYPE html>
<html data-n-head="" data-n-head-ssr>
<head>
<meta data-n-head="true" charset="utf-8"><meta data-n-head="true" content="width=device-width,initial-scale=1" name="viewport"><meta data-n-head="true" content="Eclipse Unide: Understand Industry devices" name="description" data-hid="description"><title data-n-head="true">Eclipse unide - PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed</title><link href="/unide/favicon.ico" rel="icon" data-n-head="true" type="image/x-icon"><base href="/unide/"><link href="/unide/files/app.ce93f25ec8e6cdcb172e2896599524df.css" rel="stylesheet"><style data-vue-ssr-id="771fc815:0">body .sidebar div{margin-bottom:2em;font-size:.875em}body .sidebar div .subtitle{margin-bottom:.5rem}</style><style data-vue-ssr-id="d5b0f30e:0">@keyframes spinAround{0%{transform:rotate(0)}to{transform:rotate(359deg)}}header.nav-header{box-shadow:0 3px 5px 0 #ddd;margin-bottom:2em;padding-bottom:0}header.nav-header nav.navbar{display:flex;align-items:flex-end;border-bottom:5px solid #50237f}header.nav-header nav.navbar .navbar-burger{margin-left:0;height:auto}header.nav-header nav.navbar .navbar-burger span{height:2px;width:25px}header.nav-header nav.navbar .navbar-burger span:first-child{margin-top:-9px}header.nav-header nav.navbar .navbar-burger span:nth-child(3){margin-top:7px}header.nav-header nav.navbar .navbar-brand{align-self:stretch}header.nav-header nav.navbar .navbar-brand .navbar-item img{max-height:none;width:240px}header.nav-header nav.navbar .navbar-item,header.nav-header nav.navbar .navbar-link,header.nav-header nav.navbar .navbar-link a{color:#a7a7a7}header.nav-header nav.navbar .navbar-item.is-active,header.nav-header nav.navbar .navbar-item:hover,header.nav-header nav.navbar .navbar-link a.is-active,header.nav-header nav.navbar .navbar-link a:hover,header.nav-header nav.navbar .navbar-link.is-active,header.nav-header nav.navbar .navbar-link:hover{color:#78be20}header.nav-header nav.navbar .navbar-item:hover,header.nav-header nav.navbar .navbar-link a:hover,header.nav-header nav.navbar .navbar-link:hover{background-color:transparent;text-decoration:none;font-weight:700}header.nav-header nav.navbar .navbar-item .dropdown-trigger,header.nav-header nav.navbar .navbar-link .dropdown-trigger,header.nav-header nav.navbar .navbar-link a .dropdown-trigger{display:flex}@media screen and (min-width:1024px){.nav-header .container>.navbar .navbar-menu{margin-right:1rem}}@media screen and (max-width:1007px){header.nav-header nav.navbar{flex-direction:column;align-items:stretch}header.nav-header nav.navbar .navbar-menu{order:1;box-shadow:none}}@media screen and (min-width:1008px){nav.navbar .container .navbar-menu{height:40px}}</style><style data-vue-ssr-id="73fc20d4:0">@keyframes spinAround{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.article h1{font-weight:400}.article h2,.article h3,.article h4{color:#a7a7a7}.article .card{border-radius:5px}.article .card .card-header{border-radius:5px 5px 0 0}.article .card .card-header.is-primary{background-color:#50237f}.article .card .card-header.is-primary .card-header-title{color:#fff}.article .card.figure{margin-bottom:1rem;text-align:center}@media screen and (min-width:415px){.article .card.figure.is-pulled-left,.article .card.figure.is-pulled-right{max-width:33%}.article .card.figure.is-pulled-left{margin-right:1rem;text-align:left}.article .card.figure.is-pulled-right{margin-left:1rem}.article .card.figure.is-pulled-right .card-content{text-align:right}}.article .card.figure .card-content{padding:.5rem;font-size:.75rem}.article .card.figure figure{margin:0}.article>.columns.pageNav{margin-top:2em}.article>.columns.pageNav .column a.button{font-size:.9em;padding:1.3rem}.article pre[class*=language-]{max-height:400px}</style><style data-vue-ssr-id="fc44206e:0">.recentPosts ul{list-style:none}</style><style data-vue-ssr-id="3dafb0ac:0">.blogArchives ul{list-style:none}</style><style data-vue-ssr-id="3fcbd066:0">@keyframes spinAround{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.footer{font-size:.875em;border-top:1px solid #dbdbdb;padding-top:1.25rem;margin-top:1rem;padding:2rem 0}</style>
</head>
<body data-n-head="">
<div id="__nuxt" data-server-rendered="true"><div class="nuxt-progress" style="width:0%;height:2px;background-color:#50237f;opacity:0"></div><div id="__layout"><div><header class="nav-header"><div class="container"><nav class="navbar"><div class="navbar-menu" id="navMenu"><div class="navbar-start"><a href="/unide/" class="navbar-item">
Home
</a><a href="/unide/proposal" class="navbar-item">
Proposal
</a><a href="/unide/specification" class="navbar-item">
Specification
</a><a href="/unide/blog" class="navbar-item is-active">
Blog Archives
</a><a href="/unide/faq" class="navbar-item">
FAQ
</a></div></div><div class="navbar-brand"><div class="navbar-burger burger"><span></span><span></span><span></span></div><a href="/unide/" class="navbar-item nuxt-link-active"><img src="logo.svg"></a></div></nav></div></header><div class="container"><div class="header clearfix"></div><div class="columns"><div class="article column is-8"><h1 class="title is-3">
PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed
</h1><h2 class="subtitle is-6"><i class="fa fa-calendar"></i>  
02/13/18
</h2><div class="content"><div><h2>Abstract</h2>
<p>In this blog post we present a real world condition monitoring scenario used in<br>
the <a href="https://iot.eclipse.org/testbeds/production-performance-management/#">Eclipse Production Performance Management Testbed</a>, where Unide and<br>
PPMP plays a crucial role. Moreover, we also provide a code repository and<br>
instructions so that you can recreate the scenario in your own computer and<br>
learn about its components and the communication with each other.</p>
<h2>Introduction</h2>
<p>In the context of the <a href="https://iot.eclipse.org/testbeds/production-performance-management/#">Eclipse Production Performance Management Testbed</a>, a<br>
real world condition monitoring scenario has been recreated, in which a<br>
grinding machine is being continuously monitored allowing to have real time<br>
health checks and prevent unexpected failures.</p>
<p>This scenario consists of the following building blocks: device, gateway,<br>
backend. The communication between them happens seamlessly thanks to the<br>
Production Performance management Protocol (PPMP).</p>
<ul>
<li>
<p>The device, i.e. the grinding machine, has been retrofitted with an<br>
acceleration sensor attached to one of its critical components. The data<br>
provided by this sensor is routed to the gateway in the form of a <a href="https://www.eclipse.org/unide/specification/measurement-message#messageDetail">PPMP<br>
Measurement Message</a>.</p>
</li>
<li>
<p>The gateway receives the raw acceleration measurements, calculates some<br>
statistical characteristics and and applies some machine learning techniques<br>
to them in order to evaluate the condition of the grinding machine. Then both<br>
the statistical values and the condition are routed to the backend, again in<br>
the form of a PPMP Measurement Message.</p>
</li>
<li>
<p>The backend, usually in the cloud, is any component that "speaks PPMP" and<br>
performs meaningful operations on the incoming messages. Most frequently it<br>
is responsible for storing the arriving data and making it available to apps<br>
that want to consume it. Common responsibilities of these apps are the<br>
representation or display of the data (e.g. dashboards), or workflows<br>
management (e.g. the grinding machine is in bad condition and an inspection<br>
must be carried out).</p>
<p>The backend can be swapped effortless with any entity adhering to PPMP standard.<br>
In the Eclipse PPM Testbed at least two different backends have been used:</p>
<ul>
<li>One directly based on <a href="https://github.com/eclipse/unide">Unide</a></li>
<li>One based on <a href="https://www.contact-software.com/en/products/elements-for-iot/">CONTACT Elements for IoT</a>.</li>
</ul>
</li>
</ul>
<h2>Hands-on demonstration</h2>
<p>In order to make this scenario more hands-on and interesting, within the<br>
<a href="https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement">Production Performance Management Testbed repository</a> project in Github, we<br>
have set up a <a href="https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement/tree/master/grinding-machine">subproject for the grinding machine scenario</a>. There you can<br>
find a thorough description and code to simulate the device and the gateway,<br>
and route messages to a given backend. The only requirements are git and conda<br>
(the easiest way to get conda is to <a href="https://conda.io/miniconda.html">install miniconda</a>).</p>
<p>So, let's get started! First of all, open your terminal and clone the<br>
repository:</p>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">git</span> clone https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement eclipse-testbed-ppm
$ <span class="token function">cd</span> eclipse-testbed-ppm/grinding-machine
</code></pre>
<p>Then move to the grinding machine subproject directory:</p>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">cd</span> eclipse-testbed-ppm/grinding-machine
</code></pre>
<p>In that folder you will see two subfolders. The first one<br>
<code>unide-grinding-machine</code> contains a Python program that simulates grinding<br>
machine and the second one <code>unide-grinding-machine-gateway</code> simulates the<br>
gateway.</p>
<h3>Grinding Machine simulator</h3>
<p>Let's start with the first component. First <code>cd</code> to <code>unide-grinding-machine</code><br>
and then create the conda environment:</p>
<pre class="language-bash"><code class="language-bash">$ conda <span class="token function">env</span> create --prefix<span class="token operator">=</span>env
</code></pre>
<p>And then in order to use this environment, we need to activate it.</p>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">source</span> activate <span class="token function">env</span> <span class="token comment"># or in windows: activate env </span>
</code></pre>
<p>Run <code>unide-grinding-machine -h</code> to get familiar with the CLI. With this<br>
executable we can generate some machine grinding data, and (for the moment)<br>
print messages to the console. To do so, run <code>unide-grinding-machine send random</code> and you should get a large message on the console. This is the PPMP<br>
message ought to be sent to the gateway.</p>
<p>We don't have a gateway so far, but don't worry, we will get to that in a<br>
minute. Don't close this console!</p>
<h3>Gateway simulator</h3>
<p>Open a new console, and similarly to the previous point, first <code>cd</code> to<br>
<code>unide-grinding-machine-gateway</code>, create the environment (<code>conda env create --prefix=env</code>) and activate it (<code>source activate env</code>).</p>
<p>The run the command <code>unide-grinding-machine-gateway -h</code> to test that everything<br>
is in place. You should get the CLI documentation.</p>
<p>Now, let's fire up the gateway by calling <code>unide-grinding-machine-gateway start_server</code>, and a message like this should show up:</p>
<pre class="language-bash"><code class="language-bash">Running <span class="token operator">&lt;</span>unide_grinding_machine_gateway.server.App object at 0x<span class="token punctuation">..</span><span class="token punctuation">..</span>.<span class="token operator">></span>
Listening on http://127.0.0.1:5000
Press Ctrl-C to stop<span class="token punctuation">..</span>.
</code></pre>
<p>We are getting closer. Leave the gateway running.</p>
<h3>Communication Device-Gateway</h3>
<p>Let's go back to the previous console where we had the <code>unide-grinding-machine</code><br>
environment and call again the <code>unide-grinding-machine</code> program, but this time<br>
passing the as an argument where the gateway is listening to messages.</p>
<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine send random --endpoint<span class="token operator">=</span>http://127.0.0.1:5000
</code></pre>
<p>If you take peek at the gateway output, you should see new information printed<br>
out, which is a PPMP message containing the result of the classification<br>
algorithms applied to the device data we just sent to it.</p>
<p>We are getting somewhere! But still, it is not extremely useful to print some<br>
characters into a console, is it?</p>
<h3>Communication Device-Gateway-Backend</h3>
<p>There is only a small but relevant point missing: the routing from the gateway<br>
to the backend. We need a backend and the Unide project provides a service that<br>
can be used as a playground for these purposes. So let's restart the gateway,<br>
this time passing the Unide endpoint:</p>
<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine-gateway start_server --endpoint<span class="token operator">=</span>https://unide.eclipse.org/rest/v2
</code></pre>
<p>Now we can use the <code>unide-grinding-machine</code> to send raw data to the gateway<br>
which in turn sends its results to the backend. In order to be able to<br>
identify this data later, we are going to define a proper device ID (argument<br>
<code>--device-id</code>), and also tell it to send data once each 10 seconds (argument<br>
<code>--period</code>):</p>
<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine send random --endpoint<span class="token operator">=</span>http://127.0.0.1:5000 --device-id<span class="token operator">=</span>IoT-000028--3 --period<span class="token operator">=</span>10
</code></pre>
<p>Once started, a continuous flow of data is pumped through each component until<br>
it reaches the backend, allowing us to use the applications that consume this<br>
data. For instance, the basic backend provided by Unide offers a <a href="https://grafana.com/">Grafana</a> based<br>
dashboard that offers live monitoring of the statistical values calculated in the<br>
gateway:</p>
<p><img src="/unide/images/blog/grinding-machine-grafana-dashboard.png" alt="Grafana based dashboard monitoring grinding machine"></p>
<p>If instead of that we use the the <a href="https://www.contact-software.com/en/products/elements-for-iot/">CONTACT Elements for IoT</a> based backend,<br>
we can see a different and richer dashboard: charts, 3D models, list of<br>
maintenance events, device master data and the Activity Stream, a place where<br>
different parties can exchange information related to the grinding machine:</p>
<p><img src="/unide/images/blog/grinding-machine-ce4iot-dashboard.png" alt="CONTACT Elements for IoT Dashboard"></p>
</div></div><div class="columns pageNav"><div class="column"><a href="/unide/blog/2018/2/11/Transform-PPMP-with-camel" class="button is-fullwidth"><span class="icon"><i class="fa fa-chevron-left"></i></span><span>PPMP Use Cases: Simple Transformation with Apache Camel</span></a></div><div class="column"><a href="/unide/blog/2018/3/26/Release-0.2.0" class="button is-fullwidth"><span>Unide 0.2.0 released</span><span class="icon"><i class="fa fa-chevron-right"></i></span></a></div></div></div><div class="sidebar column is-3 is-offset-1"><div class="recentPosts"><h4 class="subtitle is-5">
Recent Posts
</h4><ul><li><a href="/unide/blog/2018/9/4/Template-for-PPMP-transformation">
PPMP Use Cases: Template for PPMP transformation
</a><li><a href="/unide/blog/2018/3/26/Release-0.2.0">
Unide 0.2.0 released
</a><li><a href="/unide/blog/2018/2/13/grinding-machine-scenario" class="nuxt-link-exact-active nuxt-link-active">
PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed
</a><li><a href="/unide/blog/2018/2/11/Transform-PPMP-with-camel">
PPMP Use Cases: Simple Transformation with Apache Camel
</a><li><a href="/unide/blog/2018/1/26/New-website">
Updated Website
</a></ul></div><div class="blogArchives"><h4 class="subtitle is-5">
Blog Archives
</h4><ul><li><a href="/unide/blog/2018/9">
October 2018
</a>
(1)
<li><a href="/unide/blog/2018/3">
April 2018
</a>
(1)
<li><a href="/unide/blog/2018/2" class="nuxt-link-active">
March 2018
</a>
(2)
<li><a href="/unide/blog/2018/1">
February 2018
</a>
(1)
<li><a href="/unide/blog/2017/10">
November 2017
</a>
(2)
<li><a href="/unide/blog/2017/6">
July 2017
</a>
(2)
<li><a href="/unide/blog/2017/3">
April 2017
</a>
(1)
<li><a href="/unide/blog/2016/9">
October 2016
</a>
(4)
</ul></div></div></div></div><footer class="footer"><div class="container"><div class="columns is-mobile is-multiline is-centered"><div class="column is-narrow"><a href="http://www.eclipse.org">Eclipse Foundation</a></div><div class="column is-narrow"><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></div><div class="column is-narrow"><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></div><div class="column is-narrow"><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></div><div class="column is-narrow"><a href="https://eclipse.org/security/">Security reports</a></div><div class="column is-narrow"><a href="http://www.eclipse.org/legal/">Legal</a></div></div></div></footer></div></div></div><script type="text/javascript">window.__NUXT__={layout:"sidebar",data:[{post:{name:"grinding-machine-scenario",content:'<h2>Abstract</h2>\n<p>In this blog post we present a real world condition monitoring scenario used in<br>\nthe <a href="https://iot.eclipse.org/testbeds/production-performance-management/#">Eclipse Production Performance Management Testbed</a>, where Unide and<br>\nPPMP plays a crucial role. Moreover, we also provide a code repository and<br>\ninstructions so that you can recreate the scenario in your own computer and<br>\nlearn about its components and the communication with each other.</p>\n<h2>Introduction</h2>\n<p>In the context of the <a href="https://iot.eclipse.org/testbeds/production-performance-management/#">Eclipse Production Performance Management Testbed</a>, a<br>\nreal world condition monitoring scenario has been recreated, in which a<br>\ngrinding machine is being continuously monitored allowing to have real time<br>\nhealth checks and prevent unexpected failures.</p>\n<p>This scenario consists of the following building blocks: device, gateway,<br>\nbackend. The communication between them happens seamlessly thanks to the<br>\nProduction Performance management Protocol (PPMP).</p>\n<ul>\n<li>\n<p>The device, i.e. the grinding machine, has been retrofitted with an<br>\nacceleration sensor attached to one of its critical components. The data<br>\nprovided by this sensor is routed to the gateway in the form of a <a href="https://www.eclipse.org/unide/specification/measurement-message#messageDetail">PPMP<br>\nMeasurement Message</a>.</p>\n</li>\n<li>\n<p>The gateway receives the raw acceleration measurements, calculates some<br>\nstatistical characteristics and and applies some machine learning techniques<br>\nto them in order to evaluate the condition of the grinding machine. Then both<br>\nthe statistical values and the condition are routed to the backend, again in<br>\nthe form of a PPMP Measurement Message.</p>\n</li>\n<li>\n<p>The backend, usually in the cloud, is any component that &quot;speaks PPMP&quot; and<br>\nperforms meaningful operations on the incoming messages. Most frequently it<br>\nis responsible for storing the arriving data and making it available to apps<br>\nthat want to consume it. Common responsibilities of these apps are the<br>\nrepresentation or display of the data (e.g. dashboards), or workflows<br>\nmanagement (e.g. the grinding machine is in bad condition and an inspection<br>\nmust be carried out).</p>\n<p>The backend can be swapped effortless with any entity adhering to PPMP standard.<br>\nIn the Eclipse PPM Testbed at least two different backends have been used:</p>\n<ul>\n<li>One directly based on <a href="https://github.com/eclipse/unide">Unide</a></li>\n<li>One based on <a href="https://www.contact-software.com/en/products/elements-for-iot/">CONTACT Elements for IoT</a>.</li>\n</ul>\n</li>\n</ul>\n<h2>Hands-on demonstration</h2>\n<p>In order to make this scenario more hands-on and interesting, within the<br>\n<a href="https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement">Production Performance Management Testbed repository</a> project in Github, we<br>\nhave set up a <a href="https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement/tree/master/grinding-machine">subproject for the grinding machine scenario</a>. There you can<br>\nfind a thorough description and code to simulate the device and the gateway,<br>\nand route messages to a given backend. The only requirements are git and conda<br>\n(the easiest way to get conda is to <a href="https://conda.io/miniconda.html">install miniconda</a>).</p>\n<p>So, let\'s get started! First of all, open your terminal and clone the<br>\nrepository:</p>\n<pre class="language-bash"><code class="language-bash">$ <span class="token function">git</span> clone https://github.com/eclipselabs/eclipseiot-testbed-productionperformancemanagement eclipse-testbed-ppm\n$ <span class="token function">cd</span> eclipse-testbed-ppm/grinding-machine\n</code></pre>\n<p>Then move to the grinding machine subproject directory:</p>\n<pre class="language-bash"><code class="language-bash">$ <span class="token function">cd</span> eclipse-testbed-ppm/grinding-machine\n</code></pre>\n<p>In that folder you will see two subfolders. The first one<br>\n<code>unide-grinding-machine</code> contains a Python program that simulates grinding<br>\nmachine and the second one <code>unide-grinding-machine-gateway</code> simulates the<br>\ngateway.</p>\n<h3>Grinding Machine simulator</h3>\n<p>Let\'s start with the first component. First <code>cd</code> to <code>unide-grinding-machine</code><br>\nand then create the conda environment:</p>\n<pre class="language-bash"><code class="language-bash">$ conda <span class="token function">env</span> create --prefix<span class="token operator">=</span>env\n</code></pre>\n<p>And then in order to use this environment, we need to activate it.</p>\n<pre class="language-bash"><code class="language-bash">$ <span class="token function">source</span> activate <span class="token function">env</span> <span class="token comment"># or in windows: activate env </span>\n</code></pre>\n<p>Run <code>unide-grinding-machine -h</code> to get familiar with the CLI. With this<br>\nexecutable we can generate some machine grinding data, and (for the moment)<br>\nprint messages to the console. To do so, run <code>unide-grinding-machine send random</code> and you should get a large message on the console. This is the PPMP<br>\nmessage ought to be sent to the gateway.</p>\n<p>We don\'t have a gateway so far, but don\'t worry, we will get to that in a<br>\nminute. Don\'t close this console!</p>\n<h3>Gateway simulator</h3>\n<p>Open a new console, and similarly to the previous point, first <code>cd</code> to<br>\n<code>unide-grinding-machine-gateway</code>, create the environment (<code>conda env create --prefix=env</code>) and activate it (<code>source activate env</code>).</p>\n<p>The run the command <code>unide-grinding-machine-gateway -h</code> to test that everything<br>\nis in place. You should get the CLI documentation.</p>\n<p>Now, let\'s fire up the gateway by calling <code>unide-grinding-machine-gateway start_server</code>, and a message like this should show up:</p>\n<pre class="language-bash"><code class="language-bash">Running <span class="token operator">&lt;</span>unide_grinding_machine_gateway.server.App object at 0x<span class="token punctuation">..</span><span class="token punctuation">..</span>.<span class="token operator">></span>\nListening on http://127.0.0.1:5000\nPress Ctrl-C to stop<span class="token punctuation">..</span>.\n</code></pre>\n<p>We are getting closer. Leave the gateway running.</p>\n<h3>Communication Device-Gateway</h3>\n<p>Let\'s go back to the previous console where we had the <code>unide-grinding-machine</code><br>\nenvironment and call again the <code>unide-grinding-machine</code> program, but this time<br>\npassing the as an argument where the gateway is listening to messages.</p>\n<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine send random --endpoint<span class="token operator">=</span>http://127.0.0.1:5000\n</code></pre>\n<p>If you take peek at the gateway output, you should see new information printed<br>\nout, which is a PPMP message containing the result of the classification<br>\nalgorithms applied to the device data we just sent to it.</p>\n<p>We are getting somewhere! But still, it is not extremely useful to print some<br>\ncharacters into a console, is it?</p>\n<h3>Communication Device-Gateway-Backend</h3>\n<p>There is only a small but relevant point missing: the routing from the gateway<br>\nto the backend. We need a backend and the Unide project provides a service that<br>\ncan be used as a playground for these purposes. So let\'s restart the gateway,<br>\nthis time passing the Unide endpoint:</p>\n<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine-gateway start_server --endpoint<span class="token operator">=</span>https://unide.eclipse.org/rest/v2\n</code></pre>\n<p>Now we can use the <code>unide-grinding-machine</code> to send raw data to the gateway<br>\nwhich in turn sends its results to the backend. In order to be able to<br>\nidentify this data later, we are going to define a proper device ID (argument<br>\n<code>--device-id</code>), and also tell it to send data once each 10 seconds (argument<br>\n<code>--period</code>):</p>\n<pre class="language-bash"><code class="language-bash">$ unide-grinding-machine send random --endpoint<span class="token operator">=</span>http://127.0.0.1:5000 --device-id<span class="token operator">=</span>IoT-000028--3 --period<span class="token operator">=</span>10\n</code></pre>\n<p>Once started, a continuous flow of data is pumped through each component until<br>\nit reaches the backend, allowing us to use the applications that consume this<br>\ndata. For instance, the basic backend provided by Unide offers a <a href="https://grafana.com/">Grafana</a> based<br>\ndashboard that offers live monitoring of the statistical values calculated in the<br>\ngateway:</p>\n<p><img src="/unide/images/blog/grinding-machine-grafana-dashboard.png" alt="Grafana based dashboard monitoring grinding machine"></p>\n<p>If instead of that we use the the <a href="https://www.contact-software.com/en/products/elements-for-iot/">CONTACT Elements for IoT</a> based backend,<br>\nwe can see a different and richer dashboard: charts, 3D models, list of<br>\nmaintenance events, device master data and the Activity Stream, a place where<br>\ndifferent parties can exchange information related to the grinding machine:</p>\n<p><img src="/unide/images/blog/grinding-machine-ce4iot-dashboard.png" alt="CONTACT Elements for IoT Dashboard"></p>\n',url:"/blog/2018/2/13/grinding-machine-scenario",title:"PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed",date:"2018-02-13T00:00:00.000Z",tags:["use cases"],prev:{url:"/blog/2018/2/11/Transform-PPMP-with-camel",title:"PPMP Use Cases: Simple Transformation with Apache Camel"},next:{url:"/blog/2018/3/26/Release-0.2.0",title:"Unide 0.2.0 released"}}}],error:null,state:{},serverRendered:!0}</script><script defer src="/unide/files/manifest.743e36ec1ba98716cc6a.js"></script><script defer src="/unide/files/layouts_sidebar.d45435715b520199379d.js"></script><script defer src="/unide/files/pages_article.dfd7fcb83848670d21b1.js"></script><script defer src="/unide/files/vendor.3960437a749191406982.js"></script><script defer src="/unide/files/app.45b9891348f7e815e8b8.js"></script>