werty1st / esp32-simple-mqtt

Simple cloud based mqtt example with esp32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro

This Project is meant to be build with https://platformio.org/install/ide?install=atom

If your on MacOS/Windows your may need to install EPS32 drivers. https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers

Preview

Video Preview

Clone Repo

git clone https://github.com/werty1st/esp32-simple-mqtt.git

Setup Project

 cp src/dist-mySecrets.h src/mySecrets.h

Prepate mqtt Service

If you don't want to host your own mqtt server, you can use a free service at: customer.cloudmqtt.com

Add Credentials

  • modify src/mySecrets.h
#define SSID "WIFI-Name"
#define PSK "wifipassword"
#define MQTTSERVER "m2x.cloudmqtt.com"
#define MQTTPORT 12345
#define MQTTUSER "aaaaaa"
#define MQTTPASSWORD "bbbbbb"

Compile and Run

After having PlatformIO install the Firmware on the ESP32 you are ready to setup the Android App.

home view:

adding server:

setup push button widget:

setup push button widget:

setup magnet switch state widget:

About

Simple cloud based mqtt example with esp32


Languages

Language:C++ 93.6%Language:C 6.4%