A vent control system application for controlling DIY IOT air vents.
project/ ├── webapp/ # Frontend React application ├── server/ # WebSocket server for device communication ├── firmware/ # ESP32 firmware for physical vent devices └── tools/ # Development tools and simulators
-
Frontend (webapp/)
- React-based web interface
- Real-time vent control
- Floor plan visualization
- Device management interface
- Dependencies: React, Konva, TailwindCSS
-
Backend (server/)
- WebSocket server
- Handles device connections
- Manages device state
- Dependencies: ws (WebSocket library)
-
Firmware (firmware/vent_controller/)
- ESP32-based controller code
- Servo motor control
- WiFi connectivity
- WebSocket client
- Dependencies: Arduino framework, ESP32Servo, WebSocketsClient, ArduinoJson
-
Tools (tools/)
- Device simulator for testing
- Simulates multiple virtual vent devices
- Useful for development without physical hardware
Prerequisites:
- Node.js (for webapp and server)
- Python 3.7+ (for simulator)
- PlatformIO (for firmware)
- websockets library (pip install websockets)
Installation:
-
Clone the repository: git clone https://github.com/mister923/VentController.git cd VentController
-
Install frontend dependencies: cd webapp npm install
-
Install backend dependencies: cd server npm install
-
Set up firmware (using PlatformIO):
- Open firmware/vent_controller in PlatformIO
- Configure WiFi credentials in main.cpp
- Flash to ESP32 device
Location: tools/simulator.py
python tools/simulator.py
python tools/simulator.py --devices 3
python tools/simulator.py --server ws://example.com:8081 --devices 2
--devices : Number of virtual vent devices to simulate (default: 1) --server : WebSocket server URI (default: ws://localhost:8081)
-
Start the WebSocket server: cd server npm start
-
Start the frontend: cd webapp npm start
-
(Optional) Start the simulator: python tools/simulator.py --devices 3
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request