Modules

Introduction

The SiteController is build modular, so that new modules can be added and even removed. In this article we have an overview of all the the modules currently running in the SiteController version 1.3.

On this page:

Overview of the modules

The following table gives you a list of the modules in the system, the name of the processes that run them (it will be useful for troubleshooting and logs inspection if you access directly the system) and a small description of their functionality. As a reference, we have added the most important topics of the MQTT broker that the modules listen and publishes to.


Module name
Service name (internal)
Description
Listens from MQTT topics
Publishes to MQTT topics

Config Provider

ConfigProviderIt receives the configuration XML file, parses it and when it is correct distributes it to the corresponding modules and saves it as the current configuration. It will store it as well in a file for future restarts of the system.config/complete_update

config/%ModuleName%

config/complete

Raw result demultiplexer

RawResultDeMuxIt receives raw results under the gateway name, parses them and delivers them to the corresponding sensors as calibrated results. It may use external modules for the calibration, like the module VS_access_control.

raw_result/%GatewayName%

calibrated_result/%SensorName%

Calibrated results evaluator

CalibResultsEvaluatorIt evaluates the calibrated results with their corresponding evaluation configuration, and generates events for the sensors when their state changes.calibrated_result/%SensorName%events/%SYSID%/%SensorName%
Data Storedata_store

It is in charge of managing the connection between our internal MQTT broker and the external cloud broker. It listens to the internal and external broker, and deliver messages among them. It is also in charge of compressing and delivering any calibrated results and events to the cloud immediately and get any command (like action execution) from the cloud to the internal broker.

events/%SYSID%/#


calibrated_result/#

(external) events/%SYSID%/%SensorName%

(external) events/%SYSID%/cloud_connected

(external)hd/%SYSID%

Watchdog

WatchdogThe watchdog is currently a sentinel that checks specially marked sensor gateways if they are providing data within regular intervals. Should no message be received until the configured time out is reached, the watchdog sends a raw_result with a special error code to the same topic it was listening for results. raw_result/%GatewayName%raw_result/%GatewayName%

Job Processor

JobProcessorThis module receives jobs from the cloud and executes them in the site controller. Typical jobs can be update and installation of modules, changes in configuration files, changes in access control lists, etc.cloud/%SYSID%/jobs/#sys_msg/%SYSID%
Access ControlVS_access_controlThis module controls the access to a facility by a code input in a keypad. It will read the code, compare it with a configured access list that he received from the cloud and publish the status of the access to the facility. It normally works in combination with rules from the Automation Controller that will take care of the actions that have to be taken when there is an authorized access to the facility.calibrated_result/%SensorName%events/%SYSID%/%SensorName%
Modbus daemonModbusMasterThis module deals with all communications with Modbus devices, including reading and writing values, and performing actions. There is an scheduling schema to perform the polling of the devices.It can perform polling using serial interfaces (Modbus RTU) or Modbus TCP.(polling modbus devices)raw_result/%GatewayName%
Trap daemontrapdThis module listens to traps sent to the Site Controller. The traps that are not defined in the XML configuration will be ignored. The configured ones will be sent to the mosquitto broker in order that the corresponding sensors will take action. There can also be actions configured to react at some traps.(Trap port)raw_result/%GatewayName%
SNMP daemonsnmpgetdThis module is in charge of the SNMPcommunication of the site controller. The sensors can be configured to make scheduled polling of SNMP devices. There can also be actions configured to perform writes through SNMP.(polling via SNMP)raw_result/%GatewayName%
Automation ControllerAutomationControllerThis module plays one of the most important roles in our solution, as it applies the "intelligence at the edge". It can be configured to perform actions, publish results, combine information, all of that based on the input from the devices/sensors, even if the system is not connected to the cloud. It will receive a group of rules and will perform automation on the Site Controller.

calibrated_result/#

events/#

calibrated_result/#

events/#

cloud/%SYSID%/exec_action/%ActionName%

(also internal state changes)


Notes about the table

%ModuleName% Is the name of the module involved. Normally it corresponds to the service name. 

%GatewayName% Is the name of the gateway in the configuration file.

%SensorName% Is the name of the corresponding sensor to which the module wants to send the information.

%SYSID% Is the serial ID of your system.

%ActionName% is the name of an action.

All modules (except the ConfigProvider) subscribe to the config/module/%ModuleName%/complete to gather they configuration from the ConfigProvider.

There are modules that are optional. Please the Site Controller Configuration document to decide which modules you want to include in your installation.

The modules cloudConnector, JobProcessor and HD2CloudExporter have been consolidated in the system and they appear just as cloudConnector in the list of processes. You can see the log of the three modules in the cloudConnector log file.



Next Steps

  • Link to a further read
  • Link to other articles
  • and more links