Automate Your Grow with Home Assistant #7: Dimming & Scheduling Your Grow Light

Published at : 23 Dec 2025

How to dim your Mean Well B-type driver from Home Assistant using an optocoupler. This method should work for other drivers that have a dedicated dimming circuit that accepts a PWM signal and can source its own current on this circuit (tested and working on Inventronics EUD-600SxxxDT series drivers).


***LINKS FROM VIDEO***
- Support LEDG: https://paypal.me/supportledg
- Home Assistant Config Files: https://github.com/ledgardener/HomeAssistantYT/blob/master/part-7-dimming/lights-flow
- Node Red Export Scrubber: https://zachowj.github.io/node-red-contrib-home-assistant-websocket/scrubber/
- Link to repo for my personal system: https://github.com/ledgardener/gardenAutomation


***PARTS IN VIDEO***

- ESP32 (can't find my model on American Amazon but this looks like a good substitute): https://amzn.to/3dwEhNA

- 400-pin Breadboard: https://amzn.to/2I4eqPN
- PC817 Optocoupler: https://amzn.to/3saxptd

- 100 Ohm Resistor: https://amzn.to/3sgfEsJ
-You Can probably find the PC817s and resistors far cheaper elsewhere like digikey if you can combine them with a bigger order to make the shipping worth it.


- All Amazon links are affiliate links, which means LEDgardener receives a commission from Amazon if you make a purchase after following the link, at no extra cost to you. Thank you for supporting the channel!



***MY GARDEN AUTOMATION SYSTEM***

***CONTROL BOX***

BUD Industries NBF-32026 Plastic ABS NEMA Economy Box with Solid Door, 15-47/64" Length x 11-51/64" Width x 6-9/32" Height, Light Gray Finish:
https://amzn.to/2XnDMgD

Plastic Internal Panel to Mount Gear:
https://amzn.to/2VbwtG4

Panel-Mount AC Connector for Box:
https://amzn.to/3c75OB9

Nylon Standoffs:
https://amzn.to/3b3fDA4

Cable Glands for Passing Cable In and Out of Control box:
https://amzn.to/2VotryG


*** CONTROL BOX MISC ELECTRONICS ***

Amazon Fire Touch Panel Tablet:
https://amzn.to/2JWE2eN

Right-angle Micro USB Cable for Tablet:
https://amzn.to/3efeTdk

Mean Well 12VDC Power Supply:
https://amzn.to/2JUHd6B

Drok Voltage Stepdown Converter with Readout:
https://amzn.to/2RqgP91

Dupont Cables:
https://amzn.to/2yQio9M

Breadboards:
https://amzn.to/3e4jM8K

Screw Terminal Blocks:
https://amzn.to/2x9F2tl

8 Channel Relay Board:
https://amzn.to/2JR01DX


*** DEVELOPMENT BOARDS (CONTROLLERS) ***

You can also use other hardware, check out this page for a good writeup:
https://smarthome.university/home-assistant/best-hardware-for-home-assistant/

Arduino Mega:
https://amzn.to/3eaeNDr

ESP32S WiFi Development Board (Handles WiFi communication between control box and Home Assistant server as well as from inside tent to Home Assistant server):
https://amzn.to/2JSNdgb

Whitebox Labs Tentacle Shield to Add Atlas Scientific Gear to an Arduino and provide electrical isolation of probes (pH probe needs to be isolated from EC probe):
https://amzn.to/3aYVzPl


*** SENSORS ***

BME280 Temperature/Humidity/Pressure Sensors for Tent and Control Box:
https://amzn.to/3ed8hMb

Waterproof Temperature Sensor for Nute Reservoir:
https://amzn.to/2yQ8cy2

Atlas Scientific Conductivity Kit K 1.0 5-200,000 μS/cm:
https://amzn.to/39RFSIo

Atlas Scientific pH Kit 0-14 pH:
https://amzn.to/2JQVKQV

Moisture Sensors:
https://amzn.to/34BumA1

Catch Basin Float Sensor:
https://amzn.to/2XotuNj


*** PUMPS AND SOLENOIDS ***

Peristaltic Pumps:
https://amzn.to/3a1UWDg

Motor Drivers to Control Peristaltic Pump Speed:
https://amzn.to/2yR2MCX

Tubing for Peristaltic Pumps:
https://amzn.to/2UYHDzc

Nutrient Res Stirring Pump:
https://amzn.to/2UYGQhI

Nutrient Fertigation Pump:
https://amzn.to/34qHrM7

Normally-Open 12V Solenoid (Allows water to flow into system until solenoid is activated, which closes it - used for flood protection. Requires 12VDC power supply and 1/4" spade connectors):
https://amzn.to/3el7qJI

1/4" Spade Connectors:
https://amzn.to/3efd3Js

Normally-Closed 12V Solenoid (Restricts water between RO res and Nute Res, requires pump in RO res to push water through it):
https://amzn.to/3aUnyzA

Pump to push water through solenoid:
https://amzn.to/2UYGQhI


*** NUTRIENT JAR STIRRING SYSTEM ***

Nutrient Jar Stirring Fans:
https://amzn.to/2JT0PYR

Nutrient Jar Magnetic Stir Bars:
https://amzn.to/3aUleZo

Nutrient Jar Magnets:
https://amzn.to/3aZl4jp

Nutrient Jar Superglue:
https://amzn.to/3ebdHYb



*** RESERVOIRS ***

Reservoir Totes:
https://www.homedepot.com/p/HDX-27-Gal-Tough-Storage-Bin-in-Black-HDX27GONLINE-5/205978361

1/2" Double-Threaded Bulkhead for Connections to Reservoirs:
https://amzn.to/2yHAcnh

1/2" Tubing to go between reservoirs and out to plants:
https://amzn.to/3a0epEp

Sharkbite swivel to attach tubing between 12V solenoid on RO res and 1/2" float valve on nute mix res (requires wormdrive clamp to secure hose to fitting):
https://amzn.to/2JVwR6s

Nut Res Fill Float Valve:
https://amzn.to/2yIs7yG

1/4" Float valve for DIY Humidifier and RO Res:
https://amzn.to/2xmtBOX

DIY Weigh Scale Kit for Reservoir:
https://amzn.to/2RI1BfN