mqtt
Establishes connectivity with an MQTT broker.
When the connection is active, evcc automatically pushes all internal values to the specified topic via the MQTT broker and also receives changes there.
For more information, refer to the MQTT API documentation.
MQTT without Encryption
Section titled “MQTT without Encryption”For example:
mqtt: broker: localhost:1883 topic: evcc # root topic for publishing, set empty to disable publishing # clientid: foo # user: # password:MQTT with TLS Encryption
Section titled “MQTT with TLS Encryption”For example:
# mqtt message brokermqtt: broker: tls://localhost:8883 topic: evcc # root topic for publishing, set empty to disable publishing # clientid: foo # user: # password:When using TLS encryption (tls://), the broker’s TLS certificate is verified by default.
If you’re using a self-signed certificate, there are two options:
- Install the certificate system-wide (e.g. on Linux in
/etc/ssl/certs) so that evcc uses it automatically - Disable certificate verification with
insecure: true(see below)
Required Parameters
Section titled “Required Parameters”broker
Section titled “broker”Connection details (hostname/IP and port) of the MQTT broker to which evcc should connect as a client.
Specifies the root topic that evcc uses. If not specified here, no MQTT communication can take place!
Optional Parameters
Section titled “Optional Parameters”The username for authentication to the MQTT broker.
password
Section titled “password”The authentication password for the MQTT broker.
clientid
Section titled “clientid”Specifies a fixed MQTT client ID. By default, it will be assigned dynamically.
insecure
Section titled “insecure”Disables TLS certificate verification when using tls://.
For example:
mqtt: broker: tls://broker.example.com:8883 topic: evcc insecure: truecaCert
Section titled “caCert”CA certificate for broker certificate verification (certificate content).
For example:
mqtt: broker: tls://broker.example.com:8883 topic: evcc caCert: | -----BEGIN CERTIFICATE----- MIIDXTCCAkWgAwIBAgIJAKZm... ... -----END CERTIFICATE-----clientCert
Section titled “clientCert”Client certificate for mutual TLS authentication (certificate content).
Must be used together with clientKey.
For example:
mqtt: broker: tls://broker.example.com:8883 topic: evcc clientCert: | -----BEGIN CERTIFICATE----- MIIDXTCCAkWgAwIBAgIJAKZm... ... -----END CERTIFICATE----- clientKey: | -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0B... ... -----END PRIVATE KEY-----clientKey
Section titled “clientKey”Private key of the client certificate (key content).
Must be used together with clientCert.