Core component : xplgw

Purpose

The xplgw component (xPL gateway) is the gateway between Domogik and xPL world. This component is listening the xPL network for sensor values and send xPL commands over xPL when needed.

How are sensor values caught ?

For each device feature a listener is created based on the content of the tables core_xplstat and core_xplstat_param. When the listener catch a message, it will extract the values from it, apply some transformations (history cleanup, round, ...) and store them in database. Some conversions may be applied depending on the device features.

How a xPL command is sent ?

When a user interface (or scenario, ...) need to send a xPL command, the following actions are done:

  • the REST url /cmd is called with the appropriate parameters (for user interfaces).
  • REST send a message on the MQ about the command request.
  • xplgw catch the message on the MQ and build the xPL message to send from the parameters it get over the MQ and the contant of the tables core_xplcommand and core_xplcommand_param*.