We have set up a number of MQTT Agent assets in OR to connect with various brokers. In most cases we just need the Host and Port to connect.
We now need to connect to a MQTT broker hosted in AWS and need to use their credentials along the lines of this:
To connect to the AWS MQTT broker from OR using certificates:
Ensure you have the necessary certificates ready.
Create a new MQTT Agent in OR with the provided details.
Save the configuration.
This setup allows your MQTT Agent to authenticate with the AWS MQTT broker using the certificates provided.
I have created a new MQTT Agent with the Host address and Port and it goes into a waiting status.
Are there particular attributes etc to save the certificates and keys into?
To connect an MQTT Agent in OpenRemote (OR) to an AWS MQTT broker using certificate authentication, you can try below steps -
Ensure you have the following files: AmazonRootCA1.pem, device.pem.crt, private.pem.key.
Go to the OpenRemote Manager.
Navigate to the MQTT Agent asset configuration.
Upload or specify the paths for the certificate files.
Set up the MQTT Agent with these details:
{
“protocol”: “mqtts”,
“host”: “a1o1xxyyzz86k-ats.iot.us-east-1.amazonaws.com”,
“port”: 8883,
“caPath”: “/path/to/AmazonRootCA1.pem”,
“certPath”: “/path/to/device.pem.crt”,
“keyPath”: “/path/to/private.pem.key”
}
Adjust the paths to where your certificates are stored in OpenRemote.
Save the configuration and test the connection to ensure it works.