Zigbee Device Management & Garage Door Automation
A Spring Boot-based smart home server for managing Zigbee devices, with a focus on garage door automation and monitoring.
-
🚪 Garage Door Control & Monitoring
- Real-time state tracking (opening, closing, idle, stuck detection)
- Power consumption analysis to detect door movement and issues
- Tilt sensor integration for open/closed detection
- Vibration sensor for movement confirmation
- Progress estimation during operations
-
📱 Device Management
- Zigbee smart plug monitoring
- Vibration sensor integration
- Tilt sensor integration
- Cached device state for fast responses
-
👨💼 Admin Dashboard
- User management
- Activity logs (garage access, plug activity, door state changes)
- 24-hour statistics
- Super admin login notifications via email
- Java 21
- Spring Boot 4.0.2
- Spring Security
- Lombok
- JPA/Hibernate
- HiveMQ MQTT Client
- Zigbee2MQTT (device broker)
The system uses multiple sensors to accurately track garage door state:
-
⚡ Power Monitoring - Analyzes smart plug power consumption
-
📐 Tilt Sensor - Detects open/closed position
- Contact closed = door closed
- Contact open = door open
-
📳 Vibration Sensor - Confirms door movement
- Detects vibration during operation
- Angle tracking for movement validation
The system can detect when the door is stuck:
- No movement: Motor runs but sensors show no change
- Minimal movement: Brief power spike then drop, no sensor change
- Provides clear warnings for manual intervention
- Clone the repository
- Create
local.propertiesfile (see Configuration) - Build the project
mvn clean package- Run the application
mvn spring-boot:runCreate a local.properties file in src/main/resources/ (this file is automatically imported via spring.config.import=optional:classpath:local.properties):
# Garage RfCat Service Configuration
garage.rfcat-service-url=
garage.secret-token=
# MQTT Configuration (Zigbee2MQTT)
mqtt.broker.host=
mqtt.broker.port=
mqtt.username=
mqtt.password=
mqtt.connection.timeout=
# Mail Configuration
spring.mail.host=
spring.mail.port=
spring.mail.username=
spring.mail.password=
spring.mail.properties.mail.smtp.auth=
spring.mail.properties.mail.smtp.starttls.enable=
# Admin Notification Email (where alerts will be sent)
admin.notification.email=
# Error Redirect
error.redirect=- Spring Security for authentication
- Role-based access (SUPER_ADMIN, regular users)
- Session management
- IP tracking for super admin logins