Skip to content
/ IOT-Box Public

This project provides comprehensive functionality for an IoT device using ESP32. It supports Wi-Fi and MQTT for communication, has an asynchronous web server with webpage for configuration, handles OTA updates, reads sensor data, and controls relays and IR devices. The use of preferences and SPIFFS ensures that configuration data is stored persiste

Notifications You must be signed in to change notification settings

Vistx/IOT-Box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

IOT Box with HiveMQ

IOT Box

Description

This project provides comprehensive functionality for an IoT device using ESP32. It supports Wi-Fi and MQTT for communication, has an asynchronous web server with webpage for configuration, handles OTA updates, reads sensor data, and controls relays and IR devices. The use of preferences and SPIFFS ensures that configuration data is stored persistently across reboots. Additionally MQTT protocol makes this device accesible on all platforms such as Windows , Linux, IOS ,Android etc. using the publisher and subscriber model .

IOT Box  #description v2

Table of Contents

Installation

Clone the repository

2

Important! The first code uploaded to the board must be done via Serial connection , after you setup the parameters in the user setup page the code can be uploaded via OTA. You can find the devices IP address in your router, after the first upload via serial change the upload_port = ip_here in platform.ini file .

lan users ota edited

Broker Setup

This project uses HiveMQ as a broker , create an account here . The next step is to got to Clusters, in the top right corner Create New Cluster

cluster1edited

and Create a Serverless Cluster.

cluster2edited

After creating a Cluster enter Manage Cluster page

cluster3edited

then go to Access Management and create Credentials to connect to that cluster.

cluster4edited

Important: Give publish subscribe permissions to the created user.

Usage

User Setup: Connect to the "Setup IOT Box" access point Open your browser and follow the url: http://192.168.4.1/

user setupedited

Provide Your Wifi and HiveMq Broker credentials

Windows :

WINDOWSAPP1

Android / IOS:

I use this app

unnamed

Setup IoT MQTT Panel app

app setup

app setup1

Broker address(Use HiveMq credentials), username, password ,port(8883),protocol(TSL)

app setup2

app setup3

Setup button for IR codes

app setup4

Toggle Switch For relay controll 4 in toal (topics -> DO_1,DO_2,DO_3,DO_4)

app setup5

app setup6

app setup 7

Three gauges for gas, humidity and temperature topics

Tweaking the design

Drill a small hole to access the reset button on your PCB like so:

hole drill

This button resets your saved credentials and sends the device in setup mode.

Electronics

Parts used:

1x ESP-Wroom-32u

1x MQ-4 sensor

1x DHT 11

4x Relay module

1x IR transmitter and receiver module

1x Antenna with mount

1x Pair Male + Female 12v DC jack

1x Push button

2x Switches

1x Prototype PCB 6x8 breadboard

3x Leds (Red,Yellow,Blue)

3x Resistors 48 Ohm

Prototype PCB

schematics

PCB

pcb2

Assembly

electronics6

electronics1

electronics3

eelectronics2

electronics4

electronics5

final result

CAD files and 3D Printing

You can find Fusion 360 Files here

WhatsAppVideo2024-08-09at21 43 57-ezgif com-optimize

WhatsAppVideo2024-08-09at21 44 25-ezgif com-optimize

References

https://randomnerdtutorials.com/

https://www.svgrepo.com/

About

This project provides comprehensive functionality for an IoT device using ESP32. It supports Wi-Fi and MQTT for communication, has an asynchronous web server with webpage for configuration, handles OTA updates, reads sensor data, and controls relays and IR devices. The use of preferences and SPIFFS ensures that configuration data is stored persiste

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published