# Understanding OpenGate IoT resources usage

To clearly understand usage of the concepts described above it is necessary to explain two differents IoT scenarios Smart metering scenario and eHealth scenario to know how resources can be used to support the requirements:

# Smart metering scenario

See ddetails

This example describes a scenario involving two basic parameters that are collected periodically from a device:

  • energy consumption
  • power consumption

# Basic use case

The simplest design is showed in the next figure:

Image

It will be implemented using:

  • Two datastreams of information
    • electricity.consumption
    • electricity.power
  • The device will be associated to the smart meter using as device identifier the unique number of the meter
  • Feed resource is not used because all measures can be collected and retrieved using device identifier only.

# Enhanced use case

In a more realistic scenario the device meter can be changed (due to a maintenance issue or other) but the new measures need to be associated to the same measurement point.

image

In this case it will be implemented using:

  • Two datastreams of information
    • electricity.consumption
    • electricity.power
  • The device will be associated to the smart meter using as device identifier the unique number of the meter
  • The feed resource is used to:
    • To identify the user
    • To group around it the measures of each datastream but taken from different devices as a same collection of datapoints
    • To group all the datastreams of the different sensor types
  • The measure-device association can be traced because for the collection of datapoints of a same datastream

# eHealth scenario

See ddetails

This example describes a scenario involving two basic parameters that are collected periodically from a device:

  • Weight
  • Heart Rate

To be more realistic, the user can take the measures in different medical centres

image

In this case it will be implemented using:

  • Two datastreams of information
    • health.weight
    • health.heart.rate
  • The device will be associated to the different health sensors using as device identifier (serial number or other) the unique number of each device
  • The feed resource is used to:
    • To identify the user
    • To group around it the measures of each datastream but taken from different devices as a same collection of datapoints
    • To group all the datastreams of the different sensor types
  • The measure-device association can be traced because for the collection of datapoints of a same datastream to know from which device was recovered each measure