got ethical husbandry?

DC smart outlet (DIY?)

richiev

Supporting Member
I recently saw the Hydros Kraken (not yet released) and thought it seems very useful, in that it has a plethora of controllable DC outlets. However it's shockingly expensive and also not smart home integrated (AFAICT).

That got me looking around more, and I'm surprised there's not a cheap, smart, DC power strip. Maybe that's a super niche item, but it seems straightforward so I'm surprised someone hasn't released one.

I've been thinking this over and I'm planning on building one myself, so I wanted to get feedback from folks if they know of an existing one or have done this. My plan is build this from:
  • A DC relay board with a controller ($27)
  • A meanwell power supply ($66)
  • A bit of diy smart home coding (either home assistant+ ESP home or something Matter related)
  • I'll 3d print a case
For the initial version I'm just going to use an existing DC power supply I have, so it'll only cost $27. As I get it working and plug more things into it, I'll upgrade the power supply for more wattage. My hope is this gets rid of most of the cords under my tank, and at least one kasa smart strip, while still giving me full control.

Anyone know of things that do this that I can just buy instead?
 
I recently saw the Hydros Kraken (not yet released) and thought it seems very useful, in that it has a plethora of controllable DC outlets. However it's shockingly expensive and also not smart home integrated (AFAICT).

That got me looking around more, and I'm surprised there's not a cheap, smart, DC power strip. Maybe that's a super niche item, but it seems straightforward so I'm surprised someone hasn't released one.

I've been thinking this over and I'm planning on building one myself, so I wanted to get feedback from folks if they know of an existing one or have done this. My plan is build this from:
  • A DC relay board with a controller ($27)
  • A meanwell power supply ($66)
  • A bit of diy smart home coding (either home assistant+ ESP home or something Matter related)
  • I'll 3d print a case
For the initial version I'm just going to use an existing DC power supply I have, so it'll only cost $27. As I get it working and plug more things into it, I'll upgrade the power supply for more wattage. My hope is this gets rid of most of the cords under my tank, and at least one kasa smart strip, while still giving me full control.

Anyone know of things that do this that I can just buy instead?
sorry no help for any existing product aside from the kraken but definitely want to stay up to date on your project. I think this would be a great addition to most tank's electrical systems.
 
@richiev If I am reading this correctly, you want to control multiple DC outputs via an IoT implementation?
Yes. The specific device I'm planning to use I linked. It's basically an esp32 wired up to some relays.

I actually have it already, but I accidentally bought the one without the programmer. Then I thought I ordered the programmer weeks ago, but apparently never completed the order. Currently waiting for it to come from China...

Power supply to DC port, 8 relay ports controllable, and I'll likely just use esphome to control it. Assuming I don't have any weird issues, now that I have home assistant setup it shouldn't even require any programming.
 
Yes. The specific device I'm planning to use I linked. It's basically an esp32 wired up to some relays.

I actually have it already, but I accidentally bought the one without the programmer. Then I thought I ordered the programmer weeks ago, but apparently never completed the order. Currently waiting for it to come from China...

Power supply to DC port, 8 relay ports controllable, and I'll likely just use esphome to control it. Assuming I don't have any weird issues, now that I have home assistant setup it shouldn't even require any programming.
Yep! ESP32 is a game changer! Either ESPHome or MQTT either works.
 
Well, this was quite possibly the easiest hardware thing I've done in awhile.


1. bought an 8-outlet 12-24v DC Relay
2. installed ESPHome on it using the Home Assistant web UI (a series of clicks in a browser)
3. used ChatGPT to generate the config I needed (prompt below)
4. pasted the config into the ESPHome config and hit install
5. clicked a couple buttons in Home Assistant and it shows up as a device

Now I have a smart home compatible DC outlet for about $30 plus a DC power brick.

For someone without home assistant it'd be more complicated.
 
Last edited:
ChatGPT prompt and response
Generative AI is crazy scary cool. I had some examples I could've copy-pasted from, but this saved me a lot of hassle. I also wouldn't have realized the restore_mode functionality existed, without having asked that question.

Just sharing because this tool continues to blow my mind. Note the formatting being screwed up in the responses is because I'm copy-pasting into this forum. They were properly formatted, and syntax highlighted, in the actual response.

Prompt:
generate an esphome config for a series of relays, exposed as switches, using the following pin definitions:

#define RELAY_PIN_1 33
#define RELAY_PIN_2 32
#define RELAY_PIN_3 13
#define RELAY_PIN_4 12
#define RELAY_PIN_5 21
#define RELAY_PIN_6 19
#define RELAY_PIN_7 18
#define RELAY_PIN_8 5

Response:
Sure! Here's an example ESPHome configuration for a series of 8 relays using the provided pin definitions:

<snip...>
switch:
- platform: gpio
name: "Relay 1"
pin: 33
id: relay_1

- platform: gpio
name: "Relay 2"
pin: 32
id: relay_2

- platform: gpio
name: "Relay 3"
pin: 13
id: relay_3

<snip...>

Prompt:
Update the names to be of the format "Switch ###", the ids to have a similar format, and define the pins in a GPIO format


Response:
<snip...>
switch:
- platform: gpio
name: "Switch 001"
pin:
number: GPIO33
id: switch_001
<snip...>

Prompt:
in that, will they default HIGH or LOW?

Response:
In the configuration I provided, the relays will default to the LOW state upon boot because there's no default or restore_mode specified for the switches.

If you want them to default to HIGH, you would need to add the restore_mode and initial_state options. Here's an example for one of the relays:

<snip...>

Prompt:
regenerate the config with restore_mode as RESTORE_DEFAULT_ON

Response:
<snip...>
switch:
- platform: gpio
name: "Switch 001"
pin:
number: GPIO33
id: switch_001
restore_mode: RESTORE_DEFAULT_ON
<snip...>
 
That’s cool. Another great example that these chat tools and other AI tools really are only useful in the hands of someone who already has some knowledge in the domain. A person who can formulate the prompts and re-prompts precisely, knows what the pitfalls could be, has enough expertise to be able to read through and make sure it makes sense and not making stuff up. Same goes for other uses like writing essays, scientific papers, legal briefs, or news articles. Analyzing medical images and charts, or large data sets. Etc. In each case it can be very useful to augment an expert to automate tedious and error-prone tasks, but is useless or even dangerous in the hands of an interested non-expert.

This all is simple to you, but difficult or impossible to most. If you can get it to the point where it is simple to implement for regular folks, I bet a lot of people would want to use it.
 
That’s cool. Another great example that these chat tools and other AI tools really are only useful in the hands of someone who already has some knowledge in the domain. A person who can formulate the prompts and re-prompts precisely, knows what the pitfalls could be, has enough expertise to be able to read through and make sure it makes sense and not making stuff up. Same goes for other uses like writing essays, scientific papers, legal briefs, or news articles. Analyzing medical images and charts, or large data sets. Etc. In each case it can be very useful to augment an expert to automate tedious and error-prone tasks, but is useless or even dangerous in the hands of an interested non-expert.

This all is simple to you, but difficult or impossible to most. If you can get it to the point where it is simple to implement for regular folks, I bet a lot of people would want to use it.
Good points, but in this context it's biased because I started from a POV of knowing how I wanted to do it versus asking ChatGPT how to do it. Here's a more generalized interaction:

Consolidate_DC_Bricks__Control_Individually.png

Consolidate_DC_Bricks__Control_Individually-2.png


<text continues>
 
  • Like
Reactions: JVU
Enclosure created. Added a fan to it, but not sure it'll be required. I want minimal areas water can get in, so I didn't put many ventilation holes and just put one with a fan. Ideally I'd put some sort of shroud to funnel water away if somehow it gets near that. Also not sure the fan will actually be required, but I had some on hand so figured I'd try.

Still need to wire everything up and get some more dc outlets. I ordered some off amazon that come with a rubber cover to keep water out of any unused ones.

PXL_20231022_233351069.jpg

PXL_20231022_233302381 (1).jpg


Will plug it all together and start using it this week. Normally I'd of started using it before building the enclosure, but I've had enough circuits get fried with a single errant water drop that I now am trying to be more careful about it.

If anyone else is interested in one of these, LMK what you'd expect it integrated to (Google Home, Apple HomeKit, Neptune, Reef-Pi, ...) and I can add it to the list of things to think about. As-is right now you can control it through a web ui it runs or through Home Assistant. If you're not a hardware person, it luckily should only involve screwing some wires together and not even soldering. If you're not a software person, you'd need someone (eg me) to install the software but after that you should be able to set it up via a wifi network it'd create and a config screen.

Will update after I have it running my tanks. Plan is incrementally test it out powering a couple lower criticality things (media reactor pump, doser, sump light, skimmer), then I'll add in a gyre and the MP40. I'll likely setup a second one and put my pump and a light on that, to avoid single points of failure. Main AP9X I'll keep on its own power brick since that already gets warm.

Generally though, I AM SO EXCITED TO GET RID OF ALL MY DAMN POWER BRICKS!
 
  • Like
Reactions: JVU
This has been up and running for about a week now. Absolutely no issues, and the smart controls work well.

Since I have a bunch of things running on it, I bought a meanwell power supply with a higher wattage. I got rid of 4 power bricks and with the higher wattage should be able to get rid of another now.

Technically I should say I bought 4 power supplies; two 24V, two 12V. With those I'll be able to get rid of almost all my power bricks in my display and my frag tank.

All that'll be left is on my display a 36V (mp40), and I think a 48V for a light. I think my frag tank I will be able to use these for every power supply. I also might only need one ac power supply per tank after this.

I have a couple more relays on order from AliExpress to setup my tank. Again if anyone's interested in one of these lmk and I can help you build one.
 
  • Like
Reactions: JVU
Unit number 2 installed. This one powering all my 12V devices.
1000000570.jpg


I've gotten rid of 8 power bricks now. I'm pretty stoked about this, and hopefully it'll get me to finish cleaning up under my stand and doing proper cable hiding.

The 24V setup cost around $90, though honestly I'm not sure I needed the $60 fancy 24V power supply I bought for it. The 12V cost around $25 (+ I may switch it to a fancier dc power supply for $30). Each dc port is smart controllable.

A Hydros Kraken is $600. I'm sure the Kraken functioning as a controller would be helpful for some people, but I don't need that and saving $450 is pretty exciting.

I have one more half setup which is going to go on my frag tank. For that one I might do it half 24V and half 12V because I have a lot less equipment on that tank.
 
Back
Top