Skip to content

OhioIoT-MQTT-Examples/ESP32-Unique-Device-ID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT: ESP32 Unique Device ID

Overview

This code adds a storage library that you can use to get or create a unique device ID for your device. This is especially relevant for MQTT, where brokers typically required devices to have unique device IDs. The code is explained in the YouTube video MQTT - ESP32 Unique Device IDs with Preferences.h.

👉 Subscribe to the OhioIoT YouTube Channel for more on "All Things IoT": hardware, firmware, connectivity, cloud computing, and dev toolkit.

Getting Started

git clone https://github.com/OhioIoT-MQTT-Examples/ESP32-Unique-Device-ID

PlatformIO

  • Change lib/credentials/credentials_template to lib/credentials/credentials.h, and edit the credentials
  • Compile and upload your code

Arduino IDE

Option 1

  • Copy all folders in lib/ to your Arduino libraries/ folder
  • Copy credentials/credentials_template to credentials/credentials.h, and edit the credentials
  • Create a project folder, and copy src/main.cpp into that folder with a name that matches, ending in *.ino
  • Download PubSubClient.h using the Arduino IDE Library Manager

Option 2

  • Copy all of the files from the subfolders inside lib/ into the same project folder created above, and keep all of the files, including the *.ino, together

About

OhioIoT is an IoT platform designed for small-scale IoT projects (https://www.ohioiot.com).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages