Equipment:
Quentacy DC 0/1-10V LED Dimmer Knob Controller Rotary Mini Switch PWM - $14.99
Climax Part RC-025-A Aluminum Rigid Coupling, 1/4 inch bore, 1/2 inch OD, 3/4 inch Length, 10-32 x 1/8 Set Screw - $6.40
ANNIMOS 20KG Digital Servo High Torque Full Metal Gear - $15.99
ESP8266 ESP-12 ESP-12F NodeMcu Mini D1 Module WeMos Lua 4M - $8.99
USB micro cable - Free
3D Printer:
Ender 3 v2 3D Printer
Code: If you are interested in STL/ESPHome/HA files just let me know.
I was looking at expensive LED light dimmers, and decide the throw something together for cheaper.
First I have to figure out how I was going to attach the rotary switch to the server motor. I was thinking of just 3D print out a coupling, but that does not leave me any adjustment for the rotary switch to the servo. So I added the Aluminum coupling to join the rotary switch and 3D printed part to connect the server to the coupling.
Once that was done just had to look online for wiring up the Wemos D1 to the servo and setup some automatons in Home Assistant. This is well documented online, and on other forums here. This is powered directly to the Wemos D1 (5v/GND) pins, just cut the end off of a USB cable.
At this point I was able to control the servo to turn the rotary switch over Home Assistant, next to build a nice enclosure for the project, I used FreeCAD to design it. Used some hot glue to hold everything down on the inside, might design the enclosure again, to make spots to mount everything.
Last step wire up the rotary switch to my LED dimmer wires, plug in USB power.
This photo is misleading, since the image on the right is before I attached the USB to the Wemos D1 for power.
Now to get enclosures made for all my other sensors.
Jeff