mqtt to kronometrix concepts
Created by: sparvu
Core Concepts
Kronometrix MQTT Databus (MQTT KBUS)
A1. Kronometrix SID, TID, DSID, DEVID are all MQTT KBUS concepts. They have nothing to do with MQTT nor be part of any MQTT topics
A2. We should keep apart MQTT communication and not force to change, create or alter MQTT topics based on SID, TID, DEVICEID etc. which are Kronometrix internal concepts.
A3. MQTT KBUS must deploy its own version of the MQTT client, preferable async non-blocking capable to submit to one or many topics to a MQTT broker
A4. The MQTT KBUS must be capable to receive via MQTT other client's topics as soon as the other clients are publishing something on the TCP line
A5. The MQTT KBUS could theoretical publish some topics too or at this stage it simple just receive data from the other clients, when available.
MQTT to Kronometrix Data Mapping
B1. MQTT KBUS must have a way to define and configure, the following items:
-
the MQTT broker address, IP and port number
-
the MQTT authentication settings, if the MQTT broker is using authentication or SSL
-
the Kronometrix platform, SID, TID where the MQTT data shall be published
B2. The Kronometrix DSID, DEVICEID must be detected from the MQTT clients or overwritten by the MQTT KBUS itself. There can be the following cases
-
For each MQTT client we generate a new DSID to be used on the K platform . This is the default mode
-
For each MQTT client, we can ask the IP via MQTT and based on that compute the DSID
-
As long as we know the DSID we can decide if there are devices associated with the MQTT client or not. In general a MQTT client has many topics and contains many physical devices