Relayz is a DIY smart home automation system that allows you to control up to four electrical devices remotely using your smartphone. Built with an ESP32 microcontroller, Blynk IoT platform, and a custom Flutter mobile app, Relayz brings the power of IoT to your fingertips.
- Control four relays individually
- Retain relay states after power outage
- User-friendly mobile app interface
- Real-time device status monitoring
- Secure communication with Blynk server
Components used:
- ESP32 DevKit board
- 4-channel Relay Module
- 5V Power Supply
- Jumper Wires
Connections:
- Relay 1 -> ESP32 D2
- Relay 2 -> ESP32 D4
- Relay 3 -> ESP32 D5
- Relay 4 -> ESP32 D18
- Arduino IDE
- Blynk IoT account
- Flutter SDK
-
Clone this repository:
git clone https://github.com/yourusername/relayz.git -
Set up the Arduino IDE:
- Install ESP32 board support
- Install required libraries: Blynk, ArduinoJson
-
Configure the Blynk project:
- Create a new project in Blynk.Console
- Note down the Auth Token
-
Update the ESP32 code:
- Open
esp32_code/relayz_controller.ino - Replace placeholder values with your WiFi credentials and Blynk Auth Token
- Open
-
Flash the ESP32:
- Connect your ESP32 to your computer
- Upload the code using Arduino IDE
-
Set up the Flutter app:
- Navigate to the
relayzdirectory - Run
flutter pub getto install dependencies - Update the Blynk Auth Token in
lib/config.dart
- Navigate to the
-
Build and run the Flutter app:
- For Android:
flutter build apk - For iOS:
flutter build ios
- For Android:
relay-app-demo.mp4
- Power on your ESP32 setup
- Launch the Relayz app on your smartphone
- The app will automatically connect to your device
- Use the toggle switches to control your connected devices
- Ensure your ESP32 and smartphone are connected to internet
- Check the serial monitor in Arduino IDE for any connection issues
- Verify that your Blynk Auth Token is correct in both the ESP32 code and Flutter app
- Login Authentication
- Add scheduling functionality
- Expand to support more relays/devices
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Blynk team for their excellent IoT platform
- ESP32 community for their extensive libraries and support
- Flutter team for making cross-platform app development a breeze



