Introduction
TODO:
- change the labels to match your content in "Related Articles" below
- add labels to your article
Related pages:
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 |
---|---|---|---|---|
Module name | Service name (internal) | Description | Listens from MQTT topics | Publishes to MQTT topics |
Config Provider | ConfigProvider | It 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 | RawResultDeMux | It 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 | CalibResultsEvaluator | It 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% |
Cloud connector | cloudConnector | 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 deliver any event to the cloud immediately and get any command (like action execution) from the cloud to the internal broker. | events/%SYSID%/#
| (external) events/%SYSID%/%SensorName% (external) events/%SYSID%/cloud_connected |
Watchdog | Watchdog | The 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 | JobProcessor | This 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% |
Historical Data to Cloud Exporter | HD2CloudExporter | This module is in charge of collecting the calibrated results from the broker, compress them and publishing it in order that they can be shown in the cloud. | calibrated_result/# | (external)hd/%SYSID% |
Access Control | VS_access_control | This 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 daemon | ModbusMaster | This 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 daemon | trapd | This 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 daemon | snmpgetd | This 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% |
Persistor daemon | persistord | This module has several roles in our solution. It is in charge of saving the latest status and values of sensors. It is also the module in charge of the command line interface tool for the Site Controller. It can track and provide values and status of sensors for troubleshooting with the cli. It is also used by some modules to store important information, like the access list for the Access Control. | raw_result/# calibrated_result/# events/# | commandresult/persistord/# cloud/%SYSID%/exec_action/%ActionName% |
Automation Controller | AutomationController | This 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