OpenGrowBox supports multiple independent grow rooms, each with its own complete set of sensors, devices, and control logic. This architecture enables users to manage complex grow operations with multiple rooms while maintaining complete isolation between them.
A "room" in OpenGrowBox represents a complete, independent grow environment with:
- Dedicated Sensors: Temperature, humidity, VPD, light sensors
- Independent Devices: Fans, heaters, humidifiers, lights, pumps
- Isolated Control Logic: Separate VPD calculations and action execution
- Premium Features: Individual premium subscriptions and feature access
- Data Isolation: Separate data stores and configuration
Room "GrowRoom1"
├── Sensors (temperature, humidity, VPD, light)
├── Devices (fans, heaters, humidifiers, lights)
├── Control Logic (VPD calculations, mode management)
├── Configuration (targets, tolerances, schedules)
├── Premium Features (analytics, AI control)
└── Data Store (state, history, settings)
Room "FlowerTent"
├── Sensors (temperature, humidity, VPD, light)
├── Devices (fans, heaters, humidifiers, lights)
├── Control Logic (VPD calculations, mode management)
├── Configuration (targets, tolerances, schedules)
├── Premium Features (analytics, AI control)
└── Data Store (state, history, settings)
Rooms are created through the Home Assistant configuration flow:
- User Input: Room name and basic configuration
- Entity Registration: HA entities are prefixed with room name
- Data Isolation: Separate data stores for each room
- Manager Initialization: Independent manager instances per room
All Home Assistant entities follow a consistent naming pattern:
sensor.ogb_{measurement}_{room}
switch.ogb_{device}_{room}
select.ogb_{setting}_{room}
climate.ogb_{room}
sensor.ogb_temperature_growroom1switch.ogb_exhaust_fan_growroom1select.ogb_tentmode_growroom1climate.ogb_growroom1
Users can switch between rooms using the room selector entity:
- Entity:
select.ogb_rooms - Function: Changes active room context for UI and controls
- Persistence: Room selection is maintained across sessions
- Premium Isolation: Each room has separate premium authentication
Within each room, OpenGrowBox supports multiple "zones" for different plant types or growth stages:
- Zone Types: Germination, EarlyVeg, MidVeg, LateVeg, EarlyFlower, MidFlower, LateFlower
- Independent Control: Each zone can have different environmental targets
- Shared Infrastructure: Zones share room-level devices and sensors
- Coordinated Operation: Room-level logic coordinates zone activities
Zones are implemented through:
- Plant Stage Configuration: Different targets per growth stage
- Device Assignment: Devices can be assigned to specific zones
- VPD Targets: Zone-specific VPD targets and tolerances
- Light Schedules: Zone-specific lighting requirements
Room Level
├── Zone 1 (EarlyVeg)
│ ├── VPD Target: 0.60-1.20 kPa
│ ├── Temperature: 22-26°C
│ ├── Humidity: 65-75%
│ └── Light Schedule: 18/6
├── Zone 2 (MidFlower)
│ ├── VPD Target: 0.90-1.70 kPa
│ ├── Temperature: 21-25°C
│ ├── Humidity: 48-62%
│ └── Light Schedule: 12/12
└── Shared Devices
├── Exhaust Fans (room-level control)
├── HVAC System (room-level control)
└── Sensors (room-level monitoring)
The room controller (OGBRoomController) manages the lifecycle of each room:
- Initialization: Set up all managers and components for the room
- Startup Sequence: Coordinate room startup and monitoring activation
- Event Routing: Route events to appropriate room-specific handlers
- Manager Coordination: Coordinate between different managers within the room
- Status Reporting: Provide comprehensive room status information
initialize_room(): Set up room componentsstart_room(): Begin room operation and monitoringstop_room(): Clean shutdown and resource cleanupcoordinate_managers(): Route actions between managers
Manages all configuration settings for a room:
- Control Options: Main control mode (HA/Premium), notifications
- VPD Settings: Targets, tolerances, dampening
- Plant Configuration: Stages, types, dates
- Light Settings: Schedules, DLI control, voltage limits
- Environmental Limits: Min/max temperatures, humidities
- Device Settings: Calibration, capabilities
Each room maintains complete data isolation:
- Separate DataStores: Independent configuration and state storage
- Isolated Event Managers: Room-specific event routing
- Premium Separation: Individual authentication per room
- Entity Namespacing: HA entities prefixed by room name
- Room-Level Authentication: Premium features require per-room login
- Data Access Control: Components can only access their room's data
- Event Isolation: Events are scoped to specific rooms
- Device Control: Devices are managed per-room basis
- HA Integration Setup: Coordinator creates room instance
- Manager Initialization: All managers initialized for the room
- Event Setup: Room-specific event listeners registered
- Data Loading: Configuration and calibration data loaded
- Device Discovery: Available devices detected and configured
- Monitoring Start: Background monitoring tasks activated
HA Config Entry
↓
Coordinator.startOGB()
↓
OGB.__init__(room)
↓
Room Controller.initialize_room()
↓
Managers Initialized
↓
Event Listeners Setup
↓
Room Controller.start_room()
↓
Monitoring Started
↓
Grow Plans Activated (Premium)
↓
Room Operational
- Graceful Stop: Room controller stops monitoring
- Resource Cleanup: Background tasks cancelled
- Data Persistence: Final state saved
- Event Cleanup: Listeners removed
- Manager Shutdown: All managers properly shut down
Each room can have its own premium subscription:
- Separate Authentication: Login required per room
- Feature Access: Room-specific feature enablement
- Data Isolation: Analytics and compliance per room
- Grow Plans: Room-specific automated growth schedules
- Analytics: Room-specific environmental data and trends
- Compliance: Individual compliance tracking per room
- AI Control: Room-specific AI model training and optimization
- Research: Room-specific data contribution to research programs
The system provides comprehensive room health monitoring:
def get_room_status(self) -> dict:
return {
"room": self.ogb.room,
"initialized": True/False,
"managers": {
"data_store": True/False,
"event_manager": True/False,
"device_manager": True/False,
"action_manager": True/False,
"premium_manager": True/False,
},
"monitoring": {
"fallback_active": True/False,
"cleanup_active": True/False,
},
}- Manager Status: All required managers properly initialized
- Monitoring Status: Background tasks running correctly
- Data Integrity: Configuration and state data valid
- Device Connectivity: All configured devices responding
- Premium Status: Authentication and feature access working
- Room Not Appearing: Check HA configuration and entity registration
- Data Cross-Contamination: Verify data store isolation
- Event Routing Issues: Check event manager scoping
- Premium Login Problems: Ensure room-specific authentication
- Device Conflicts: Verify device assignment to correct rooms
- Room Status API:
get_room_status()method for detailed diagnostics - Event Debugging: Enable room-specific event logging
- Data Store Inspection: Check data isolation between rooms
- Entity Verification: Confirm proper entity naming and registration
# Home Assistant configuration.yaml
opengrowbox:
- room_name: "GrowRoom"
host: "192.168.1.100"# Home Assistant configuration.yaml
opengrowbox:
- room_name: "Vegetative"
host: "192.168.1.100"
- room_name: "Flowering"
host: "192.168.1.101"
- room_name: "Cloning"
host: "192.168.1.102"# Room configuration in DataStore
{
"room": "GrowRoom1",
"mainControl": "Premium",
"tentMode": "VPD Perfection",
"plantStage": "gen", # germ, veg, or gen
"vpd": {
"target": 1.2,
"tolerance": 0.1,
"dampening": 0.05
},
"plantStages": {
"Germination": {"vpdRange": [0.35, 0.70], ...},
"EarlyVeg": {"vpdRange": [0.60, 1.20], ...},
"MidFlower": {"vpdRange": [0.90, 1.70], ...},
...
},
"plantStage": "MidFlower",
"plantDates": {
"growstartdate": "2025-01-15",
"bloomswitchdate": "2025-03-15"
}
}
}Last Updated: December 24, 2025 Architecture Version: 2.0 (Modular) Status: Production Ready