SensorHub

PoC application and counterpart to. You will be able to fetch multiple MaM-based streams, read, store and plot data, map the sensors location, and more.

Possible use-cases might be:

  • Monitoring of supply chains

  • Monitoring in agriculture and farming

  • Monitoring of vehicle conditions (aircrafts, trucks, trains, cars etc.)

  • Tracking of personal property (bikes, mobile computers etc.)

  • Environmental measurements (weather, earthquakes etc.)

Installation

$ cd XDK110-Bosch/C/IOTA-XDK110-MAM/SensorHub/
$ npm install
$ cd node_modules
$ git clone https://github.com/rckey/mam.node.js.git

Now we need to modify the code to adapt to xdk payload.

We need to modify:

We need to modify this file to add the line of what data we want to present. In this case was Luminosity,Noise,etc.

..

        <div id="stream_data">
      <div style="position: relative; width: 100%; padding: 5px; text-align: center; margin-top: 10px; "><h4 id="title">Select a device.</h4><div>
          <div style="position: relative; width: 100%; padding: 5px; text-align: center;"><h6 id="loc"></h6></div>

          <div class="row" style="margin-top: 20px;">
            <div class="col-xs-6" style="text-align: center;"><h4>Temperature:</h4><h5 id="temp"></h5></div>
            <div class="col-xs-6" id="temp_ctx"></div>
          </div>
          <hr>
          <div class="row" style="margin-top: 20px;">
            <div class="col-xs-6" style="text-align: center;"><h4>Pressure:</h4><h5 id="press"></h5></div>
            <div class="col-xs-6" id="press_ctx"></div>
          </div>
          <hr>
          <div class="row" style="margin-top: 20px;">
            <div class="col-xs-6" style="text-align: center;"><h4>Humidity:</h4><h5 id="hum"></h5></div>
            <div class="col-xs-6" id="hum_ctx"></div>
          </div>
          <hr>
          <div class="row" style="margin-top: 20px;">
            <div class="col-xs-6" style="text-align: center;"><h4>Luminosity:</h4><h5 id="lig"></h5></div>
            <div class="col-xs-6" id="lig_ctx"></div>
          </div>
          <hr>
          <div class="row" style="margin-top: 20px;">
            <div class="col-xs-6" style="text-align: center;"><h4>Noise:</h4><h5 id="noi"></h5></div>
            <div class="col-xs-6" id="noi_ctx"></div>
          </div>
          <hr>


          ..

This javascript file would help us to receive the information that is on the tangle process and embedded on HTML File. See the comments that are on the file.

Last updated

Was this helpful?