You can select websockets as transport method if your MQTT broker supports it. Make sure the private key has no password set. Only a PEM encoded client certificates together with a PEM encoded private key can be uploaded. To set the client certificate and private key turn on the option Use a client certificate and click “Next” to show the controls to upload the files. With a secure broker connection it is possible to use a client certificate for authentication. If your MQTT broker supports MQTT version 5 you can set the protocol setting to 5. The MQTT protocol setting defaults to version 3.1.1. To allow a connection without the verification of the hostname, turn the Ignore broker certificate validation switch on. If the server certificate does not match the hostname then validation will fail. Click NEXT to show the control to upload the CA certificate. A custom PEM encoded CA-certificate can be uploaded. If a self-signed certificate is used, select Custom. This will allow validation against certifite CAs bundled certificates. If your broker uses a trusted certificate then choose Auto. To enable a secure the broker certificate should be validated.
The keep alive setting should be minimal 15 seconds. The time in seconds between sending keep alive messages for this client. Leave this settings default if you want Home Assistant to generate a unique ID. You can set a custom MQTT client ID, this can help when debugging. Select Configure, then Re-configure MQTT.Īdvanced broker options are accessible only when advanced mode is enabled (see user settings), or when advanced broker settings are configured already.To change the settings later, follow these steps: MQTT broker settings are configured when the MQTT integration is first set up and can be changed later if needed.Īdd the MQTT integration, then provide your broker’s hostname (or IP address) and port and (if required) the username and password that Home Assistant should use. To use the public mosquitto broker, configure the MQTT integration to connect to broker on port 1883 or 8883. Use this only for testing purposes and not for real tracking of your devices or controlling your home. This is the easiest to set up, but there is no privacy as all messages are public. The Mosquitto project runs a public broker. There are at least two issues with the ActiveMQ MQTT broker which break MQTT message retention. Neither ActiveMQ MQTT broker nor the RabbitMQ MQTT Plugin are supported, use a known working broker like Mosquitto instead.