Universal MQTT RGB button controller (Complete/Testing)

#1

A little history on my setup…

My wife and I have a medium sized 7 room house in the middle of nowhere in the USA with ZERO inspections or compliance laws to deal with… When I first moved in we gutted the entire interior during my initial house-wide remodel… (the house was abandoned for about 10 years and is basically new now minus the framework)

High Voltage Lighting Controller:

During this time i pulled all of my high voltage lighting from each fixture to a central area in the attic and pulled 2x 20Amp lines up for power, all converging into a gutted out large electrical panel, this panel contains 2x 16 channel 12v relay boards that i use to control the overhead lights, the electrical load is divided evenly between all of the rooms and fused at 5Amp prior to entering each relay… controlled by an arduino mega and operated currently via simple HTTP calls (eventually MQTT?)

12V RGB LED Strip Controller:

While the house was apart i also pulled 2x cat5e runs to almost every imaginable location for a button panel (I’ll get to the buttons shortly) and also to every light fixture location, under the cabinets, stove hood, basically anywhere you could think of to stick an LED, plus 4 runs behind every TV (TV’s are 100% wall mounted and RGB backlit)… All of these cables return to 1 of 2 boxes, the first is the 12V RGB controller that feeds 72 channels of PWM to make up 24x independent 12volt RGB strip channels… this controller is quite simple because I used OLA (Open Lighting Architecture) running on a Raspberry PI 2 with an FTDI adapter and an rs232 to rs485 converter to feed 2x 36channel 12v dmx decoders that are in turn wired through cat5e to the various strips around the house… OLA connects to openhab flawlessly over the Artnet binding with always_broadcast toggled… (important!!)

Dual Zone Thermostat:

Eight of my cat5e runs go to DHT22’s that we custom fit into the wall with old 4 pin cdrom audio cable ends so u can pull the retaining screw and swap them easily should they ever fail and need to be replaced… These 8 sensors feed into an arduino mega which controls various in-pipe actuators for per vent flow control and 2 furnaces and 3 AC’s via a 16 channel relay board. It also features a HTTP web interface for control and status feedback.

Various ESP Nodes:

There are about 30 or so (I’ve honestly lost track) ESP8266 12e based nodes running EspEasy for motion sensing, infrared remote senders, etc via MQTT… (I HATE WiFi with a passion but have a hidden SSID AP for the esp’s)

DIY Power meter:

This took extensive research and I would not have attempted if I hadn’t been an electrician for several years prior… But this meter uses 2x 120v to 6 volt transformers with diodes and voltage dividers to make a roughly 3v @ 120v for analog sampling and this does require some tinkering to get the exact reference numbers correct… For current sampling I use 2x 400A rated solid core CT’s (Current Transformers) into a carefully calculated bias resistor and then connected to ground and analog inputs… The reason for using 2 sets is because my service is 240V @ 200A with a center tap making 2x 120v Legs that both need measured for accurate readings… I used 400A CT’s to avoid saturation at near-peak current… (Reduced overall level of detail by half but it will be accurate till the main breaker blows!!) This information is also accessed via a web interface on an arduino mega running the openenergy library only with custom HTTP server…

ALL of this feeds into openhab 1 and 2 (I have both operational concurrently on different VM’s in my ESXi cluster) along with about 15 or so AV devices with bindings configured plus a few usb controlled apc backup units on my primary rack…

Everything has worked relatively flawlessly for a few years (Minus things I’ve temporarily broken while doing code revisions)

BUT… The time has finally come due to the wife nagging to build the ridiculously overkill RGB button controller… The plan is to have 64 GPIO channels via a centipede shield (4xMCP23017) connecting to 64 buttons (16 panels in groups of 4) complimented by 192 channels via 8x tlc5947 12bit 24channel LED drivers for 12V PWM LED control for full color 4 button menus on up to 16 button panels scattered around the house that will connect to their buttons via the 2x cat5e’s that I pulled to every possible location when i first moved in…

Im still waiting on my buttons to arrive from china (Should be about 2 weeks left) but have a few arduino mega’s, pi2&3’s, a PINE64, and a small pile of esp’s to work with to build the control interface… I will be playing with different options over the next few weeks but would like to make it MQTT for the most compatibility because almost all platforms support it nowadays… If anyone has any suggestions on a good way to handle 2 workloads of IO easily please feel free to share any thoughts/ideas as I’ve never really grasped structured data and I’m assuming that going be the way to go unfortunately… I’m also open to answering any questions anyone has and eventually I will post pictures of everything mentioned and once I clean up my code (de-personalize it) I intend to make a public github to share it with everyone on this forum (and inherently the rest of the world) in the hopes that they inspire someone else to enjoy the best hobby ever!!! Thanks for reading my rambles and I will be posting updates as progress is made…

Off to soldering land for a few hrs…

3 Likes
#2

Fallen out of chair. Eyes rolled back in my head. Brain turned to goo.

Holy Crap! I think I followed most of that. Went FULL ON DC to all the lighting. Kind of what I was talking about in the thread about building wiring legality in AU. I am super curious to see the lighting panel progress as it goes. And you are far and away more knowledgeable than I in this kind of stuff so I look forward to learning from your endeavors. Sounds like lots of fun!!!

#3

Yes 12v is awesome… I have a central 12v 5000amp battery bank to run all of the automation gear and LED lights for a seriously extended time… (I’ve went 4 days at a time with no utility power more than once but have never had to use even half my storage capacity) I use 5050 type RGB LED strips and 10watt waterproof cool white LEDs on the exterior and in both of my large sheds… I admittedly dont use the in house LED’s as much as the regular 120v bulbs but they are nice to add a little extra color and to use for night lights… I’m admittedly more skilled in hardware than software (im from the apple 2 & ms-dos era) so hopefully this wont take a year to write the code… got the centipede soldered together last night and working on a layout for the tlc5947 boards to fit my case and hopefully will be soldering that chain together later today… I’m admittedly still deciding which controller to use once my hardware is assembled… i like the reliability of arduino but I’m uncertain if the mega will have the code space I need for 192 pwm outs and 64 inputs over MQTT… I should get my buttons in 8 days so that’s my personal deadline to hopefully have a rough draft of code to try!! If you want flexible low volt I’d highly recommend the dmx decoder solution over my current endeavor due to the current restrictions on the TLC5947 chip (intended for single LEDs (or chains) at low current), the dmx decoder board on the other hand, can handle up to 3amps per channel, 9amps per strip… (much more flexible for driving various lengths and configurations of LED’s)

#4

This sounds like a dream setup! I’d love to see how the button controller turns out. Please keep posting updates :slight_smile:

#5

I did some looking at the DMX controllers and stuff for outdoor show lighting…aka, that neighbor that keeps us up all night with the music sync’d light show at Christmas… and was pretty impressed at how relatively inexpensive it is. Really pretty versatile and I can see how it would work great for interior lighting control as well. Definitely post lots of pictures. Or video. But definitely pictures!!!

1 Like
#6

Pictures from about an hour of progress today…

If you haven’t seen one of these its 4x MCP23017’s on 1 board and its called the centipede!!

Here is the tlc5947’s before i stick over 200 wires to them over the weekend!!

And here is the beginnings of my enclosure so far.

And one of my 12V Dimmer box as requested.

(yes i know the wiring could have been organized better!)
More to come over the weekend…

2 Likes
#7

Looks awesome! Can’t wait to see the next steps!

#8

Just a few updates… I have MQTT control of led’s thru the arduino!!! (on a breadboard until i get the actual buttons in from china) 16 Buttons of RGB greatness coded and functional so far… Now for more tedious (copy, paste, modify variables, repeat) to get the other 48 coded in… if anyone wants the current “unfinished” code to play with let me know, otherwise my buttons should arrive by the end of the week and the real “testing phase” can begin and hopefully ill have time to take more pictures!!!

3 Likes
#12