MQTT settings

MQTT is a standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth.

Image 5318


Use internal broker = True, the bOS Controller becomes the broker or server for MQTT communication.
Use internal broker = False, we will be using another machine as the MQTT broker so we need to set the correct ip/port and login credentials for MQTT communication.

If external broker requires additional remote certification, use the Import functions to import the required certificates.

Import function will open file browsers, where we navigate to our certificate and import it into bOS for secure connection.

Also make sure to enter the remote IP and port for External broker.

CA Certificate (Certificate Authority Certificate)
Purpose: Verifies the identity of the MQTT broker.

Details: This is a public certificate issued by a trusted Certificate Authority (CA). The MQTT client uses this to ensure it's connecting to a legitimate server.

File type: Often .crt or .pem

 

Client Certificate
Purpose: Identifies the client to the broker.

Details: This is a certificate issued to the client by a CA. The MQTT broker checks this certificate to authenticate the client.

Used in: Mutual TLS (mTLS), where both sides (client and broker) verify each other.

File type: Often .crt or .pem

Client Key
Purpose: Proves that the client certificate really belongs to the client.

Details: This is the private key corresponding to the client certificate. It's used to sign data and authenticate the client securely.

Important: Must be kept private and safe.

File type: Often .key or .pem

If remote broker server has additional SSL/TLS certificates, we need to enable SSL/TLS. Make sure you sort out the certificates on the server.

Once SSL/TLS function is enabled, certification options will open, allowing us to import certificates.

If the broker has set authentication, enable Broker Authentication to True and fill out the Username and Password below.

Internal broker settings

Use Client ID restriction = sets the minimum lenght of the Client's ID (e.g device name).
Store retained messages = every new client connecting to the MQTT receives the last message sent to the MQTT.

Step by step integration of a Shelly device that allows us to control and receive feedback to bOS is available in the video below:

Youtube video