mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2024-10-05 20:47:50 -04:00
.. | ||
.vscode | ||
assets | ||
include | ||
lib | ||
src | ||
test | ||
.gitignore | ||
ESP32_Temperture-Node.code-workspace | ||
platformio.ini | ||
README.md |
ESP32 MQTT SSL Temperature Node
MQTT Mosquito Broker
Mosquitto broker can be easily deployed using Docker compose file shown below. In the example below, MQTT broker listens to the ports 1883 (unecrypted) and 8883 (encrypted SSL).
Note
Compose file below declares two volumes (config and data) to persistantly store Mosquitto configuration and data.
version: "3.8"
services:
mosquitto-esp32:
image: eclipse-mosquitto:latest
volumes:
- /srv/dev-disk-by-label/docker/volumes/mosquitto/config:/mosquitto/config
- /srv/dev-disk-by-label/docker/volumes/mosquitto/data:/mosquitto/data
networks:
- IoT
ports:
- 1883:1883
- 8883:8883
- 9001:9001
restart: unless-stopped
networks:
IoT:
external: true
mosquitto.conf
Note
If you are using IP addresses, then issue certificates and keys to the corresponding IP address of MQTT brocker
## List ports listen to
listener 1883
listener 8883
cafile /mosquitto/config/certs/esp32_ca.crt
certfile /mosquitto/config/certs/esp32.crt
keyfile /mosquitto/config/certs/esp32.key
allow_anonymous true
persistence true
persistence_location /srv/dev-disk-by-label/docker/columes/mosquitto/data/