mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 22:36:12 +00:00
.
This commit is contained in:
@@ -45,4 +45,13 @@ keyfile /mosquitto/config/certs/esp32.key
|
|||||||
allow_anonymous true
|
allow_anonymous true
|
||||||
persistence true
|
persistence true
|
||||||
persistence_location /srv/dev-disk-by-label/docker/columes/mosquitto/data/
|
persistence_location /srv/dev-disk-by-label/docker/columes/mosquitto/data/
|
||||||
|
```
|
||||||
|
|
||||||
|
## ESP32 MQTT Client
|
||||||
|
|
||||||
|
<p>The two lines of code shown below are most crucial as they are responsible for connecting ESP32 to the MQTT broker.</p>
|
||||||
|
|
||||||
|
```C
|
||||||
|
espClientSSL.setCACert(NODE_CERT_CA);
|
||||||
|
connection.setServer(mqtt_server, 8883);
|
||||||
```
|
```
|
Reference in New Issue
Block a user