Vertical: Cannabis · Home Assistant

Cannabis-Specific Deployments.

Reading time
~14 min · 2,998 words
FAQ
0 questions
Status
Draft 1 · under review
Section
All Home Assistant pages

Cannabis is an agricultural crop with specific production requirements — photoperiod-sensitive genetics that need tight day-length control during flowering, stage-specific environmental profiles that differ meaningfully between vegetative and flowering phases, and in most regulated markets, extensive compliance documentation covering every environmental parameter and every physical interaction with the plants. Home Assistant fits cannabis production well because its strengths — precise automation, continuous data logging, camera integration, dashboarding — map directly to cannabis cultivators' needs. This page covers the Home Assistant patterns specific to cannabis: photoperiod control for flowering genetics, environmental profiles per growth stage, security and compliance cameras, environmental record-keeping structured for regulatory review, odor and air-filtration integration, and the automation patterns that come up in cannabis production more than in other crops. This page does not provide legal or regulatory guidance; cannabis regulation varies by jurisdiction and requires licensed professionals. The technical patterns here apply in any regulatory context; compliance specifics depend on the rules the operation is operating under.

Before building a cannabis Home Assistant deployment.

Prerequisites and framing.

Regulatory context understood. Cannabis is legal, partially legal, and illegal in different jurisdictions. Regulated markets have varying requirements — some require seed-to-sale tracking with specific camera coverage and retention; some require environmental records of specific parameters at specific intervals; some impose specific security requirements (perimeter monitoring, restricted access, alarm systems). Before building, understand the specific requirements that apply. Licensed compliance consultants are the right resource; Home Assistant does not replace them.

Security considerations are higher than typical. Cannabis operations are targets — for theft, for regulatory inspection, for insurance purposes. Home Assistant deployments should reflect this with strong security discipline per [User Management and Security](/home-assistant/operations/security). Physical security of the host, network segmentation, access control, audit logging — these matter more than in most agricultural contexts.

Data integrity matters for compliance. The environmental records, camera recordings, and audit trails may be required as evidence of compliance or in response to regulatory inquiry. Records that are complete, accurate, and tamper-evident are more defensible than records that are not. Backup discipline per [Backup and Recovery](/home-assistant/operations/backup) is especially important.

Production sophistication varies widely. Cannabis is grown by hobbyist home growers (where legal), small craft cultivators, and large industrial operations. Home Assistant fits all three, but the specific patterns and investment level differ. This page focuses on patterns that scale — applicable to small operations and useful in larger ones.

The crop demands precision. Cannabis is tolerant of imprecise conditions but rewards precise ones. Tight photoperiod control, tight environmental profiles, careful stage transitions, and attention to small details produce better outcomes. Home Assistant's precision capabilities pay off especially well in cannabis production.

Photoperiod control.

The most critical single automation in photoperiod-genetics cannabis production.

Why photoperiod matters. Photoperiod-sensitive cannabis genetics flower in response to day length. Vegetative growth continues under long-day conditions (typically 18 hours light, 6 hours dark); flowering begins when the plants receive shorter days (typically 12 hours light, 12 hours dark). The transition — "the flip" — is the critical point. Inconsistent photoperiod during flowering can cause plants to re-vegetate or develop hermaphroditic flowers, both serious problems.

The absolute darkness requirement. During the 12-hour dark period in flowering, the plants must receive no light. Even small amounts — an LED indicator on equipment, light leaking through a door seal, a flashlight during a check — can disrupt flowering. The control strategy must account for this: no equipment indicators in the grow space, sealed door weatherstripping, and no scheduled activities during the dark period.

Time-based automation. The schedule is simple: lights on at a specific time, lights off at a specific time. Home Assistant handles this easily with time-based automations. The complexity is in the discipline, not the control logic.

Backup controls. Photoperiod is critical enough that Home Assistant alone as the control is risky. Hardware timers as a parallel or backup control provide redundancy. If Home Assistant fails (restart, update gone wrong, network issue, hardware failure), the hardware timer continues the photoperiod schedule. The grower can decide whether to run both (belt and suspenders) or to use Home Assistant as primary with the hardware timer as backup automatically engaging if Home Assistant is absent.

Autoflower considerations. Autoflowering cannabis genetics flower based on age, not photoperiod. The photoperiod-control concerns largely disappear; the schedule can be consistent (typically 18/6 or even 20/4) throughout the life cycle. Simpler from a photoperiod-automation perspective.

Light intensity considerations. Beyond photoperiod, cannabis responds to light intensity — DLI accumulation matters for yield and quality. The lighting patterns from [Lighting Control](/home-assistant/agriculture/lighting) apply; cannabis has higher DLI targets than many crops (35-50 mol/m²/d during flowering for high-intensity production, though this varies).

Photoperiod transitions. Moving plants from vegetative to flowering is a definite event. Some cultivators prefer a gradual transition (reducing day length by 30 minutes per day over a few days); most do an immediate change. Home Assistant handles either pattern; the choice depends on the cultivator's production approach.

Environmental profiles per stage.

Cannabis production has distinct environmental targets for each growth phase.

Propagation/cloning. High humidity (70-85%), moderate temperature (72-78°F), gentle air circulation, low light (young plants cannot use high light until roots establish). Automated control in this stage prioritizes humidity maintenance and gentle airflow.

Vegetative. Moderate-to-high humidity (50-70%), warm temperature (75-82°F day, 68-74°F night), moderate VPD (0.8-1.2 kPa typical target), increasing light intensity as plants grow. Plants respond to consistent conditions; automation maintaining steady parameters produces better growth.

Early flowering (weeks 1-3 of flower). Temperature and VPD similar to late vegetative. Humidity begins to come down (55-65% range) as plants commit to flowering. Day/night temperature differential may increase to encourage compact growth in some cultivars.

Mid-flowering (weeks 3-6). Humidity continues dropping (50-60%). Temperature slightly cooler than vegetative in some cultivars to encourage trichome development. VPD target rises slightly (1.0-1.4 kPa) as transpiration becomes more important for nutrient movement to flowering sites.

Late flowering (weeks 6-harvest). Lower humidity (40-55%) to reduce disease pressure on swelling flowers. Temperature cooler still (cooler nights than vegetative). Attention to airflow to prevent humidity pockets in dense canopy.

Flush and harvest prep. Depending on cultivator's practice, final weeks may include lower nutrient EC or plain water to "flush" the plants. Environmental targets similar to late flowering; harvest timing based on trichome observation.

Post-harvest drying. Cool (55-65°F), moderate humidity (55-65%), low light or darkness, gentle airflow. A separate drying space with its own automation covers the drying phase. Improper drying damages otherwise-good flowers.

Stage transitions as events. Each stage transition is worth logging as an explicit event. The automation can use a recipe-selector pattern (similar to fertigation recipes) where an inputselect determines the active stage; automations reference the inputselect and apply stage-appropriate targets.

Security and compliance cameras.

Cameras serve multiple purposes in cannabis operations.

Regulatory camera coverage. Most regulated markets require camera coverage of specific areas — entry/exit points, where cannabis product is handled, vault/storage areas, disposal areas. The exact requirements vary by jurisdiction; licensed compliance consultants provide the specifics. Home Assistant with Frigate (per [Frigate and Computer Vision](/home-assistant/ai/frigate)) meets most regulatory coverage requirements technically; the compliance aspect is ensuring the coverage matches what regulators specify.

Retention requirements. Regulated markets typically require video retention for specific periods — 45 days, 90 days, or longer are common. Storage must support this; planning for video storage at the required retention is part of the deployment. Off-site backup of the video may or may not be required; where it is, the backup strategy includes the video.

Coverage gaps. Gaps in camera coverage (during system failures, power outages, equipment maintenance) are compliance issues. Monitoring that alerts on camera outages, and procedures for handling gaps, matter. Frigate's health reporting surfaces when cameras are not functioning; automations alert on this.

Access control integration. Cameras typically pair with access control — who entered when, with video confirming. Home Assistant integrates with various access control systems through integrations or through simple door sensor / camera correlation.

Worker privacy considerations. Regulated cameras cover cultivation areas where workers spend most of their time. Disclosure to workers is appropriate (often required); union and labor-law considerations may apply. The technical camera setup is easy; the human aspect requires thought.

Internal operational cameras. Beyond compliance-required coverage, operational cameras support normal agricultural purposes — IPM, equipment monitoring, operational awareness. These typically are not subject to the compliance retention rules but should be handled under the same security discipline.

Environmental record-keeping for compliance.

The data layer that supports regulatory review.

What regulated markets often require. Temperature and humidity logs for cultivation areas at specific intervals (often hourly). Dates of pesticide/treatment applications. Records of destroyed/disposed plant material. Records of harvests. Specific record formats and retention periods (often multi-year). The specifics vary significantly; assume nothing without confirming with compliance consultants.

Home Assistant as the data layer. Continuous environmental monitoring through normal sensors (temperature, humidity, VPD) produces the raw data. InfluxDB retains it with appropriate retention policies. Grafana produces reports in audit-ready formats. This is precisely what InfluxDB + Grafana were built for (in other contexts) and applies well to cannabis compliance.

Structured event logging. Beyond environmental data, events matter — when the lights came on, when irrigation ran, when treatments were applied, when plants were moved between spaces. Each event logged with timestamp, specific action, and any relevant context produces the audit trail regulators may request.

Tamper-evidence. Some regulatory frameworks require records that cannot be modified after the fact. Home Assistant's standard logging is not cryptographically tamper-evident; meeting such requirements may require additional infrastructure (cryptographic hashing, append-only logs, external attestation). Consult compliance experts for specific requirements.

Export formats. Regulators may request data in specific formats — CSV for spreadsheet import, PDF for archival, specific structured formats for some systems. Grafana supports multiple export formats; the operation's compliance process defines what is needed.

Data integrity monitoring. Gaps in the record, sensor failures, disposal events that should have been logged but were not — monitoring for compliance-relevant gaps and addressing them promptly is part of the operational discipline.

Specific cannabis-automation patterns.

Patterns that come up more in cannabis than in other crops.

The night guard. During the critical dark period, no scheduled automations run that could introduce light. Home Assistant automations in the grow space during flowering are checked for "might this produce light?" — equipment that shows status LEDs, notifications that might trigger screens, remote access that brings someone in with a light. The flowering-stage mode gates these automations.

Sealed room CO2 enrichment. Common in higher-end cannabis production. CO2 supplementation up to 1200-1500 ppm during lights-on for enhanced photosynthesis. Coordination with ventilation — typically rooms are sealed during CO2 enrichment, with dehumidification handling the humidity load. See [Greenhouse Climate Optimization](/home-assistant/advanced/climate-optimization) for CO2 coordination patterns.

Negative pressure for odor control. Cannabis is aromatic; regulated operations often require odor mitigation. Exhaust through carbon filters, with the grow space maintained at slight negative pressure (exhaust exceeds intake slightly) to prevent untreated air from leaking out. Pressure sensors in the space, integrated with exhaust fan control, maintain the negative pressure.

Harvest and drying transitions. Moving plants from flowering rooms to drying spaces is a workflow with compliance implications (batch tracking) and operational implications (environmental transition for the plants). Automations can coordinate the transition — confirming the drying space is ready, logging the move, updating batch records.

Trim room and vault spaces. Areas where dried product is processed and stored have their own environmental and security requirements. Home Assistant covers these spaces with appropriate sensors and cameras; the environmental needs are typically simpler than cultivation but compliance remains substantial.

Integrated pest management for cannabis. Cannabis has specific pest pressures — spider mites, aphids, fungus gnats, powdery mildew, Botrytis. The IPM patterns from [Integrated Pest Management](/home-assistant/advanced/ipm) apply; compliance restrictions on allowable products narrow the treatment options significantly in most regulated markets.

Fertigation for cannabis.

The fertigation patterns applied to cannabis specifics.

EC ranges across stages. Cannabis EC targets vary by stage — propagation low (0.8-1.2 mS/cm), vegetative moderate (1.2-2.0 mS/cm), flowering higher (1.6-2.5 mS/cm), late flowering sometimes reduced (for "flush"). Specific ranges vary by cultivar and cultivation approach; extensive cultivar-specific guidance exists.

pH discipline. Cannabis in most soilless media prefers pH 5.8-6.2. Tight pH control supports consistent nutrient availability; excursions affect specific nutrient uptake. The fertigation safety discipline from the Fertigation page applies especially to cannabis where economic value per plant is high.

Runoff monitoring. Runoff EC and pH in cannabis production is particularly informative — it reveals nutrient accumulation patterns and plant uptake behavior. Cultivators tracking runoff have better information for recipe adjustments.

Feeding schedules aligned with lighting. Fertigation typically during lights-on when plants are actively transpiring. During lights-off (especially the full dark period in flowering), plants are not taking up water; fertigation is not needed and can cause problems.

Common failure modes.

Specific cannabis deployment problems.

The light leak that re-vegetated a room. A door seal degraded; a small amount of ambient light reached the flowering room during what should have been dark period; plants began re-vegetating. Fix: periodic inspection of door seals; light meters or light-sensor devices in the room to detect unexpected light; addressing the physical light-proofing before expecting the automation to handle it.

The photoperiod disruption from a Home Assistant update. An update introduced a brief period where Home Assistant was offline during the lights-on time; the lights came on late; the next day's dark period was correspondingly shifted. Fix: hardware timer backup so photoperiod is maintained during Home Assistant outages; update timing chosen to avoid photoperiod-critical periods.

The compliance gap from unnoticed camera outage. A camera failed; the outage was not noticed for several days; during the gap, compliance-required video was missing. Fix: monitoring for camera status; alerts on outages; procedures for handling gaps including regulatory notification where required.

The environmental record that was incomplete. A sensor failure produced gaps in the environmental log; during a regulatory inquiry, the operation could not produce complete records. Fix: sensor redundancy where records are required; alerts on missing data; procedures for addressing gaps.

The CO2 enrichment during ventilation. Sealed-room CO2 was enriched; the dehumidifier triggered exhaust ventilation unexpectedly; expensive CO2 vented out. Fix: coordinate CO2 enrichment with ventilation state; pause enrichment during any ventilation; explicit modes rather than independent automation.

The backup that contained unencrypted compliance data. The operation's backup contained detailed cultivation records; the backup was not encrypted; cloud storage exposure became a compliance issue. Fix: encrypt all backups containing compliance data; secure backup storage; review compliance implications of cloud backup services.

The pest treatment that was not allowed in regulated market. A treatment that would have worked for the specific pest was not on the allowed-substances list for the jurisdiction. Treatment decision had to change. Fix: allowed-substances tracking in the operation's IPM toolkit; compliance-aware treatment decision process; automation for tracking treatment history supports compliance reporting.

The drying room that never reached target humidity. The drying room was too large for the dehumidification capacity; humidity stayed at 70%+; mold developed on drying flowers. Fix: dehumidification sized to the space and crop load; monitoring that alerts on humidity above targets; addressing the capacity issue rather than accepting the outcome.

The stage transition that happened automatically at the wrong time. An automation transitioned the environmental recipe based on days-in-stage; the specific crop was behind schedule; the transition happened while plants were not ready. Fix: human review of automated transitions; growth-stage confirmation through observation; manual override when operations diverge from standard timing.

The security camera placement that missed the required area. Cameras were placed for operational monitoring; during a regulatory visit, the inspector noted that one required area was not covered. Fix: specific review of camera coverage against regulatory requirements; compliance consultant involvement in initial deployment and periodic review.

What not to do.

Patterns to avoid.

Don't rely on Home Assistant alone for photoperiod in flowering. Hardware backup timer parallel or fallback is important. Photoperiod disruption has serious consequences; the redundancy is inexpensive insurance.

Don't underestimate the absolute-darkness requirement. Every light source in the grow space during dark period is a potential problem. Equipment indicators, door seals, window coverings, and anyone entering with any light matters.

Don't skip compliance guidance for regulated operations. Home Assistant is a tool; compliance is a regulatory topic that requires licensed expertise. The technical deployment must match what the regulations require, not what seems reasonable.

Don't treat cannabis as generic agriculture in automations. The specific patterns — photoperiod sensitivity, environmental profiles, regulatory data needs — differ from other crops. Adapting generic agricultural patterns without considering cannabis specifics can produce problems.

Don't skimp on backup discipline. Compliance data matters; losing it matters. Full backup discipline including encryption and offsite copies applies strongly to cannabis operations.

Don't ignore the security dimension. Cannabis operations are targets. Home Assistant deployments must reflect this with strong security discipline throughout — user management, network segmentation, physical security.

Don't expose cannabis-related data through cloud services without review. Cloud LLMs, cloud backups, and cloud integrations send data to external services. Review what is sent and whether the cloud service's terms and jurisdiction are acceptable for cannabis-related data. Local alternatives (local LLMs, self-hosted backup) may be preferable.

Don't automate cannabis operations before stable basic operation. The foundational Home Assistant work — reliable sensors, working automations, backup discipline — must be solid before adding cannabis-specific complexity.

Don't make assumptions about regulatory requirements. Regulations change; requirements vary by jurisdiction and sometimes by license type. Periodic review of compliance with current regulations is part of the operational discipline.