Skip to content

OpenGrow-Box/OpenGrowBox-Dev-Enviorment

Repository files navigation

🌱 OpenGrowBox Dev Environment

GitHub stars GitHub issues License HA Version

A virtual development environment for OpenGrowBox HA integration testing. Simulate a complete grow box ecosystem without hardware, enabling safe prototyping of automations, dashboards, and integrations for the OpenGrowBox HA system.

📋 Purpose

This is a development-only simulator for the OpenGrowBox HA integration. It provides:

  • Physics-based environmental simulation (temperature, humidity, CO₂, soil parameters)
  • Virtual devices for control (lights, fans, heaters, pumps)
  • Full Home Assistant entity integration
  • Risk-free testing of grow automations and UI

Not for production use. For real grow room automation, install the main OpenGrowBox HA integration.

✨ Features

  • Environmental Simulation: Realistic model of air/soil conditions with seasonal effects, device interactions, and outside weather integration
  • Virtual Devices: 20+ simulated actuators (standard lights, special spectrum lights/IR/UV, climate control, irrigation, fans) and sensors
  • Home Assistant Integration: Exposes entities as sensors, switches, lights, fans, climate, etc., with proper labeling
  • Periodic Updates: Real-time simulation every 10 seconds
  • Multi-Zone Support: Assign devices to "Grow Room" area for organized control
  • No Hardware Required: Pure software simulation for development and testing

🔧 Installation

Via HACS (Recommended)

  1. Install HACS in Home Assistant
  2. Add this repository: https://github.com/OpenGrow-Box/OpenGrowBox-Dev-Enviorment
  3. Search for "OpenGrowBox Dev Environment" and install
  4. Restart Home Assistant

Manual Installation

cd /config
git clone https://github.com/OpenGrow-Box/OpenGrowBox-Dev-Enviorment.git
cp -r OpenGrowBox-Dev-Enviorment/custom_components/ogb-dev-env /config/custom_components/

Restart Home Assistant.

⚙️ Configuration

Add the integration in HA: Settings → Devices & Services → Add Integration → OpenGrowBox Dev Environment.

No YAML configuration needed. The simulator creates a "Grow Room" area and populates it with virtual devices.

📖 Usage

  1. Add Integration: Follow installation steps.
  2. Explore Devices: Check HA devices for simulated sensors (e.g., temperature, humidity) and controls (e.g., lights, fans).
  3. Test Automations: Create HA automations (e.g., "turn on lights at dawn") using virtual entities.
  4. View Dashboards: Build Lovelace dashboards with simulated data.
  5. Debug Integrations: Test how your setup interacts with OGB-HA features like VPD control.

Example: Toggle the virtual main light and observe temperature/humidity changes in the simulator. Special lights (IR, Red/Blue, UV) include spectrum sensors for advanced testing.

Testing

Run the standalone simulation regression script any time you want to verify the environment model:

python3 test_environment_simulation.py

Verbose mode prints the scenario details and sampled environment values:

python3 test_environment_simulation.py --verbose

The script validates:

  • day/night cycle progression
  • manual lights at night without changing the simulated daylight phase
  • device-driven climate reactions for lights, humidity/irrigation, and CO2
  • seasonal spread between dry/wet and summer/winter profiles
  • persistent random weather fronts over multi-day simulation runs
  • presence of exported environment fields used by Home Assistant sensors

🏗️ How It Works

  • Simulation Engine: Models environmental dynamics with device effects (e.g., lights increase temperature, heaters raise air temp), VPD, and outside air exchange.
  • Device Layer: Defines virtual hardware with properties, controls, and sensors (including spectrum sensors for special lights).
  • HA Platforms: Registers entities for monitoring and control with clean naming (e.g., switch.devheater).
  • Updates: Runs every 10 seconds, applying physics, randomness, seasonal behavior, and random weather fronts for realism.

See main OGB-HA docs for how this simulates real systems.

🤝 Contributing

📄 License

Licensed under the OpenGrowBox Community License (OGBCL) v2.0. Free for non-commercial development; commercial rights reserved.


Built for the OpenGrowBox community. Happy simulating! 🌱


About

Virtual development environment for testing OpenGrowBox HA integrations without physical hardware.

About

OpenGrowBox Dev Enviorment + Devices for Home Assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages