First, you can disable the MQTT bridge if you do not need it.
To configure MQTT Modbus Gateway to send data to you your private instance of MQTT broker in HiveMQ cloud, please, do the following:
Download a CA file from the HiveMQ page. Login to your HiveMQ cloud and navigate to getting started -> mosquitto. Scroll down the page until you find the link to the CA certificate. It may be positioned within the text discussing older versions of Mosquitto. Please note that even though we are using a newer version of Mosquitto, obtaining the CA file is still required in our case.
Go to your TRB device and navigate to System -> Administration -> Certificates and generate 'Simple' certificates. This will take some time to generate. On the top of the same page, go to the certificates manager tab and download client.cert.pem and client.key.pem. Then, in the Modbus -> MQTT gateway:
- Set your connection string
- port 8883
- Other specific information such as topics, username and password.
- Enable 'use TLS/SSL'
- Enable 'TLS insecure'
- CA file -> Upload CA file downloaded from HiveMQ cloud as mentioned previously.
- Certificates file -> upload client.cert.pem generated from the router.
- Key file -> client.key.pem generated from the router.
In this case, the client.cert.pem and the client.key.pem are simply dummy certificates (key) needed for the service. However, CA file needs to be a valid CA file from the broker.