https://github.com/vistx/iot-box
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
https://github.com/vistx/iot-box
3d-design 3d-printing app arduino automation css electronics esp32 fusion360 hivemq html http-server iot mqtt project spiffs winforms-application
Last synced: about 1 month ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/vistx/iot-box
- Owner: Vistx
- Created: 2024-08-09T21:34:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-10T11:31:21.000Z (over 1 year ago)
- Last Synced: 2025-02-10T03:32:07.477Z (about 1 year ago)
- Topics: 3d-design, 3d-printing, app, arduino, automation, css, electronics, esp32, fusion360, hivemq, html, http-server, iot, mqtt, project, spiffs, winforms-application
- Language: C++
- Homepage:
- Size: 814 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IOT Box with HiveMQ

## 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 .

## Table of Contents
- [Installation](#installation)
- [Broker Setup](#broker-setup)
- [Usage](#usage)
- [Tweaking the design](#tweaking-the-design)
- [Electronics](#electronics)
- [Cad files and 3d printing](#cad-files-and-3d-printing)
## Installation
### Clone the repository
- git clone https://github.com/Vistx/IOT-Box.git
- go to project /IOT Box tasks
1. First : Build Filesystem Image
2. Then: Upload Filesystem Image

- Upload the code to your esp32

**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 .

## Broker Setup
This project uses HiveMQ as a broker , create an account [here](https://www.hivemq.com/) . The next step is to got to **Clusters**, in the top right corner **Create New Cluster**

and **Create a Serverless Cluster**.

After creating a Cluster enter **Manage Cluster** page

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

**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/

Provide Your Wifi and HiveMq Broker credentials
Windows :

Android / IOS:
I use this app

Setup IoT MQTT Panel app


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


### Setup button for IR codes

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



### 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:

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



### Assembly







# CAD files and 3D Printing
You can find Fusion 360 Files [here](https://grabcad.com/library/iot-box-1)


# References
https://randomnerdtutorials.com/
https://www.svgrepo.com/