SHAAS (Secure Home Automation and Access System) is a comprehensive IoT security solution designed for home automation and access control. The system offers RFID-based authentication, secure data transmission using Protocol Buffers, and remote management through MQTT.
- Secure Authentication: RFID-based access control with whitelist management
- Efficient Communication: Protocol Buffers (nanopb) for efficient, structured data serialization
- MQTT Integration: Lightweight publish-subscribe architecture for device communication
- Environmental Monitoring: Temperature, humidity, air quality, and light sensors
- Access Control: Secure whitelist management for authorized users
- Remote Configuration: Modify system parameters securely over the network
- Relay Control: Secure management of connected devices with state persistence
- Modular Architecture: Clean separation of concerns for maintainability
- Arduino UNO R4 WiFi (or compatible)
- MFRC522 RFID reader
- DHT22 temperature/humidity sensor
- MQ135 air quality sensor
- Light sensors (LDR)
- PIR motion sensors
- 4-channel relay module
- CD74HC4067 multiplexer (for sensor expansion)
-
include: Header files defining component interfaces/communication: WiFi, Bluetooth, MQTT, and Serial interfaces/devices: Relay control and other hardware interfaces/modules: Hardware abstraction for sensors/services: Core system services and management/utils: Utility functions and helpers
-
src: Implementation files/communication: Network and protocol implementations/devices: Hardware control implementations/modules: Sensor drivers and interfaces/services: Core service implementations/utils: Utility implementations
-
lib: External libraries/transporter: Protocol buffer definitions and generated code
The central controller that orchestrates all system activities and manages state transitions.
Provides RFID authentication and manages the whitelist of authorized users.
Handles system configuration via EEPROM with support for multiple sensor types.
Manages connected devices with state persistence across power cycles.
Monitors environmental conditions using various sensors.
arduino/{device_uid}/rfid: Authentication messagesarduino/{device_uid}/config: Configuration commandsarduino/{device_uid}/relay: Device controlarduino/{device_uid}/{sensor_type}: Sensor data publication
-
Clone the repository:
git clone https://github.com/yourusername/shaas.git cd shaas -
Install dependencies:
- PlatformIO (recommended) or Arduino IDE
- Required libraries: MQTT, RFID, DHT sensor, etc.
-
Configure the system:
- Update
config.hwith your network credentials - Adjust pin definitions in hardware configuration files
- Update
-
Build and upload:
- Using PlatformIO:
pio run -t upload - Using Arduino IDE: Open the project and click Upload
- Using PlatformIO:
-
Initial setup:
- Connect via Bluetooth to configure WiFi settings
- Register the first RFID card to serve as administrator
- The system implements a multi-layered security approach
- RFID cards can be added/removed via secure MQTT messages
- All configuration changes require authentication
- Physical access to the microcontroller should be restricted
- Communication can be encrypted using TLS for MQTT
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.
- Nanopb team for the excellent Protocol Buffers implementation
- Arduino community for libraries and examples
- MQTT and PubSubClient developers
- Mohit Sharma (Roll No. 38, Reg. No. 12300115)
This project was developed as part of an academic course on Arduino For Beginners. The goal was to create a secure and efficient home automation system that can be easily extended and maintained.