POC - esp32 mqtt pubsub

Turns the led on and off by pub/sub events.

Requirements

sudo apt install mosquitto-clients

Set WIFI Credentials

  • wifi_ssid
  • wifi_password

ON

mosquitto_pub -h broker.hivemq.com -t test-esp32/led -m "on"

OFF

mosquitto_pub -h broker.hivemq.com -t test-esp32/led -m "off"

Subscribe test

mosquitto_sub -h broker.hivemq.com -t test-esp32/led