Basic modules overview

In the IIoT Platform, data is organized as tables, which can be classified according to the main data representation modules.

These modules describe how raw measurements, the devices that produce them, the communication sessions during which they are collected, and the reference data that categorizes them all fit together. The tables below detail the key fields of each module and the foreign keys that link them.

Data archives

Data archives store historical information such as IoT device metrics, equipment data, and other measurements. The main table for storing archive data is channel_data.

FieldTypeDescription
idbigintUnique record identifier (primary key).
equipment_idbigintReference to equipment (equipment.id).
seance_idbigintReference to session (seances.id).
channel_idbigintReference to channel (channels.id).
unit_idbigintReference to unit of measurement (units.id).
archive_type_idintegerArchive type reference (referenceparameters.id).
event_timeintegerThe time of the event (eg timestamp).
valuecharacter varying(100)The value received from the channel.
created_attimestamp(6) without time zoneTime when the record was created.
updated_attimestamp(6) without time zoneTime when the record was last updated.

This table stores data received from equipment channels and associates each record with equipment, sessions, channels, and units through foreign keys. This lets the data be classified by the specified attributes for further analysis and processing.

  • equipment_id refers to the equipment table.
  • seance_id refers to the seances table.
  • channel_id refers to the channels table.
  • unit_id refers to the units table.
  • archive_type_id refers to the referenceparameters table.

Metering units

The equipment table stores information about the equipment used in the system. This module is key to managing data associated with physical devices such as meters, sensors, controllers, and other types of equipment.

FieldTypeDescription
idbigintUnique identifier of the record (primary key).
equipment_type_idbigintReference to the equipment type.
serial_numbercharacter varying(25)Serial number of the equipment.
manufacture_datetimestamp(6) without time zoneThe date of manufacture of the equipment.
installation_datetimestamp(6) without time zoneInstallation date of the equipment.
program_versioncharacter varying(100)Software version of the equipment.
created_attimestamp(6) without time zoneTime when the record was created.
updated_attimestamp(6) without time zoneTime when the record was last updated.

The equipment table:

  • stores basic data about the equipment, such as serial number and the dates of manufacture and installation;
  • uses the program_version field to track the version of the software installed on the equipment;
  • uses the created_at and updated_at fields to track changes in equipment data;
  • is linked to other tables, such as equipment_types, channel_data, and channels, through foreign keys;
  • lets you add, update, and retrieve information about equipment in the system.

The data view module based on the equipment table enables efficient management of equipment information in the system.

It provides:

  • storage of basic equipment data;
  • software version management;
  • communication with other entities in the system.

Communication sessions

The seances table stores information about communication sessions and equipment activity. Sessions represent periods of activity during which data is exchanged between the equipment and the system. This module is key to managing and analyzing data associated with communication sessions.

Let’s take a closer look at this module.

FieldTypeDescription
idbigintUnique identifier of the record (primary key).
telemetry_idbigintReference to telemetry (telemetry.id).
event_timeintegerThe time of the event.
evtidsmallintThe identifier of the event.
trycntsmallintThe number of attempts.
tryflcharacter varying(12)The flag of the attempt.
statesmallintSession status.
btmintegerBattery charge.
rssiintegerSignal strength (if used).
created_attimestamp(6) without time zoneTime when the record was created.
updated_attimestamp(6) without time zoneTime when the record was last updated.

The seances module is used for:

  • storing information about communication sessions and equipment operation;
  • managing session-related data (for example, event time, session status, signal strength, and battery power);
  • analyzing sessions to identify problems or optimize system performance;
  • session status management: the state field lets you monitor the session status (for example, successful, error, and so on);
  • session analysis: the duration_session and session_traffic fields let you analyze the duration and volume of session traffic;
  • change tracking: the created_at and updated_at fields let you track changes in session data.

Archive types

The archive_type_id attribute categorizes data in the channel_data table by archive type. This lets data be organized into different categories, such as hourly, daily, monthly, abnormal situations, and other archive types. The referenceparameters table stores reference information about archive types.

This module is built on the relationship between the channel_data and referenceparameters tables.

FieldTypeDescription
idbigintUnique identifier of the record (primary key).
namecharacter varying(30)The name of the archive type.
varnamecharacter varying(30)Short variable name for the archive type.
descriptioncharacter varying(100)Description of the archive type.
parent_idintegerA reference to the parent parameter (hierarchy).
referencemodel_idintegerReference to the directory model.
created_attimestamp(6) without time zoneTime when the record was created.
updated_attimestamp(6) without time zoneTime when the record was last updated.
deleted_attimestamp(6) without time zoneTime when the record was deleted (soft delete).

The archive_type_id field in the channel_data table lets you categorize data by archive type.

For example:

ruby
[ 'Archive types', 'archive_types', 'Archive types (hourly, daily, monthly)',
  [
    ['Hourly readings archive', 'hourly'],
    ['Daily readings archive', 'daily'],
    ['Monthly readings archive', 'monthly'],
    ['Emergency situations archive', 'nesht'],
    ['Events archive', 'event'],
    ['Valve status', 'valve'],
    ['Current state', 'current_state'],
    ['Updated firmware', 'update_app'],
    ['Send SMS', 'send_sms'],
    ['Send JSON', 'send_json'],
    ...
  ]
]

If necessary, these archives can be organized into groups:

  • current data (current_state) — readings at the moment of the communication session;
  • aggregated data (hourly, daily, monthly) — summary readings for a certain period of time;
  • events and abnormal situations (nesht, event) — records of significant changes or occurrences in the system. They may be related to equipment, users, or external factors;
  • valve status (valve) — the state and control of the meter valve, if any;
  • control actions (update_app, send_sms, send_json) — records of commands or actions performed to control the system or equipment;
  • and so on.

The archive_type_id data representation module lets you efficiently categorize data into archive types and manage reference information. It provides:

  • classification of data in the channel_data table;
  • management of reference information about archive types;
  • analysis of data by archive type.

Related topics

Last updated on

Was this page helpful?