Description
Features
- Seamless Connectivity: Effortlessly bridges the digital and physical worlds by connecting to your Wi-Fi network, ensuring a smooth and uninterrupted flow of data.
- MQTT Integration: Harnesses the power of MQTT protocol to establish a robust communication channel with a home assistant mosquito broker, empowering users with remote control capabilities and real-time monitoring from anywhere in the world.
- Web Server Accessibility: Unveils a user-friendly web interface that serves as the gateway to your smart home, facilitating effortless remote access and hassle-free firmware updates at your fingertips.
- Sensor Intelligence: Elevates your awareness of environmental conditions with precise readings of temperature and humidity, enabling informed decision-making and proactive adjustments.
- Dynamic Device Control: Commands relay switches and modulates LED brightness with unparalleled precision, responding swiftly and decisively to MQTT directives with finesse.
- Auto-discovery Integration: Seamlessly integrates with Home Assistant through auto-discovery mechanisms, streamlining the setup process and enhancing compatibility with existing smart home ecosystems.
Dependencies
- WiFi.h
- ArduinoMqttClient.h
- ArduinoJson.h
- WebServer.h
- ESPmDNS.h
- Update.h
- DHT.h
- creds.h (Secure storage for sensitive credentials)
- style.h (Custom UI styling)
- FreeRTOS.h
- Task.h
Setup
- Library Inclusion: Enrich your Arduino IDE environment with essential libraries and headers that lay the groundwork for seamless operation.
- Configuration Update: Personalize the
creds.h
file with critical details such as your Wi-Fi credentials and MQTT broker information, ensuring a secure and personalized experience. - Pin Configuration: Tailor pin assignments and settings within the code to harmonize with your unique hardware setup, ensuring optimal performance and compatibility.
- Upload Process: Engage in a seamless transfer of meticulously crafted code to your ESP32 device, igniting a cascade of possibilities with a simple upload.
Usage
- Power On Elegance: Witness the magic unfold as the device springs to life, gracefully initiating connection to your designated Wi-Fi network and MQTT broker with unparalleled efficiency.
- Command Central: Assume complete control over your connected devices through intuitive MQTT topics, orchestrating a symphony of actions with effortless precision.
- Sensor Insights: Immerse yourself in a world of data-driven decisions as temperature and humidity readings are elegantly published to MQTT topics at regular intervals, empowering you with invaluable insights into your environment.
- Web Interface Accessibility: Immerse yourself in the immersive web server hosted on the ESP32, offering seamless access to firmware updates and remote manipulation from the comfort of your favorite device.
Tasks
Embark on a journey of unparalleled multitasking prowess with FreeRTOS, where each task serves as a vital cog in the intricate machinery of your smart home:
connectToWiFi
: Establish a secure and reliable connection to your designated Wi-Fi network, laying the foundation for seamless communication.connectToMQTTBroker
: Initiate communication with the MQTT broker, forging a robust link that serves as the lifeblood of your smart home ecosystem.handleMQTTMessages
: Masterfully process incoming MQTT messages, orchestrating a delicate dance of device states and directives with grace and precision.handleWebServer
: Seamlessly manage HTTP requests from the web interface, ensuring an intuitive and immersive user experience that transcends boundaries.readSensors
: Delve into the depths of your environment with unparalleled sensor data collection, empowering you with insights that drive informed decision-making and proactive adjustments.KeepMeAlive
: Safeguard the vitality of your MQTT connection with unwavering vigilance, ensuring uninterrupted communication that forms the cornerstone of your smart home experience.
License
Unlock the full potential of innovation and creativity, as this project is licensed under the MIT License, fostering a collaborative and open-source environment where ideas flourish and boundaries fade away.
Details
- Date: April 27, 2024
- Categories: Firmware
- FILES ESP32-Home-Control-MQTT