Going to next level of Aquarium Automation...who's with me?

So I saw a few posts about controlling aquarium lights with HA and I was curious if anyone else has taken HA to the next level with their Aquariums. Either way, I thought I’d share a little project of mine - perhaps it could be inspiring to others.

My Integration is a little insane, but that’s because my aquarium setup is also a little insane.

It’s a multi-tank marine aquarium setup, with a common water supply between all the aquariums totalling out around 2000 litres in water volume.

In the living and dining rooms, there are two good sized aquariums and there are even more aquariums in the back “fish room” where all the filters, pumps, etc are contained (a small dis-used closet I took over about 10 years ago).

Only a few months ago, I discovered HA and started testing it out on the house. A couple of weeks later, the wife and I were sold on HA and we dove in with both feet. Somewhere along the way, I remembered that I was very unhappy with my current monitoring tools for my aquarium & decided to do something about that with HA. About 2 weeks ago, I realised I had a spare RaspberryPi (first Gen version) that wasn’t doing anything anymore, and decided to make a remote “controller” that would integrate into HA.

I added almost half a dozen float sensors and 3 Temp sensors (have 6 more that just arrived I will be adding soon) and banged out some quick python code to monitor the probes/sensors with & feed back data to HA over MQTT.

About 10 days into the project, I was originally just going to add small OLED monochrome display for local feedback, but stumbled across some acrylic tubes and a NeoPixel LED bar I had in a box & came up with a more colourful “status” display using color patterns.

Yesterday, I installed it and it went “Live” and started gathering temp data for me right away.

And today, I finally managed to extend the float sensor cables & brought those online.

But the real value is in the control and oversight this now gives that I didn’t have in such a nice and accessible presentation before. I did have it, but not like this - and more importantly, not in a way that made sense to my wife. As you can see from my control panel below, I’m setting things up - for the first time in 20 years with this hobby (aquariums) - that my wife will finally be able to do water changes herself. Other tasks, like automatically emptying about 15 litres of protein skimmer waste just became 100% automatic today.

Anyways… if you’ve got an even crazier Aquarium setup that’s managed by HA - I’d love to see what you’ve got. If you’d like to know more, need ideas or need help with bringing your own Aquarium into the HA fold…I’d be happy to see what help I could lend. In the meantime, I’ll be hammering away at my own solution, working to improve it more. On the bucket list:

1.) Ph Meter
2.) Other water quality metrics (ORP, NH4, NO2, etc.)
3.) Fleshing out and thorough testing of ‘Fail safe’ logic - including the ability to detect over-flow conditions and shutdown safely.
4.) Greater and more intelligent integration between my aquarium heaters and central heat of our house (in the past, they’ve fought it out before & we paid the electric bill/gas for that - HA helped in uncovering that mystery
5.) scheduled automatic water changes
6.) Flow rate monitoring and control.
7.) Hook up another RaspberryPi currently in use as a media centre (Kodi) and use it to relay water level and temp readings from the remote tanks in living / dining rooms. Not that I expect this to be different when the system is running, but extremely useful to know if I shut down the central pumps for maintenance. Good to know if a tank starts to get too cold.

Happy Home and Fish Automation. :slight_smile:


I was thinking about taking my lights off my Apex and putting them on Zwave outlets once I swapped from MH to LED so I could better tie control of them into the home theater but you’ve taken it 5 levels above that.

My tank is down at the moment due to a crash so I’m taking the opportunity to fix somethings I didn’t like about my set-up, I’ll have to bookmark this tread to have a better look once I get closer to starting it back up.


1 Like

Could be of interest


Wish I had space for a decent aquarium in my flat…

1 Like

SeveredDime: I have only one Zwave device for this, mainly because I wanted power monitoring of my setup at the root socket - not so much for power control (although I jokingly refer to it as my Master Kill Switch). I don’t have a lot of experience with Zwave and wasn’t sure if it was reliable enough for Pump control, thought lights it would be just fine.

Alternatively, keep your eyed to any circulars announcing auctions or sell-offs of old Datacenter equipment. Sometimes companies just even scrap this stuff and you can get it for free if it’s already in their trash bin. Cool thing about some of that enterprise gear, is they built those things for 99.7% uptime in many cases and can take thousands and thousands of switching operations without fail. I’ve had my Neol Powerswitches for about 10 years now controlling the T-5s and hasn’t missed a beat or failed to turn on once (but gone through a couple of ballasts and countless T-5s tho).

Also, I heard Belkin (?) offers a ethernet switched that offered multiple independently addressable power sockets and power monitoring for only 100-150 US dollars.

On the flip side, I’ve just started playing with a couple of Sonoffs, and these with the TASMOTA firmware seem to be doing pretty good so far, but I’ve only had them for a couple of weeks. At 8 Euros a device, that’s a pretty good bargain - you should check into those.

Sorry to hear about your tank crash. I hope you didn’t lose too much and you were able to save some things from it. My big tank is typically very stable (relatively speaking) compared to the small ones that are stand alone tanks. But sometimes, it’s those small stand alone tanks I’m most pre-occupied with too. Perhaps it’s a quarantine tank or a baby fry tank with 200 baby clownfish fry. I’ve had those nightmare scenarios where I said night to my little baby Nemo fish, only weeks old, to come back in the morning, discover a “stuck” heater in that tank … or a mysterious ammonia bloom took everything out by morning. In those instances, Seneye could at best send me an Email / SMS which never would wake me up (haha) and that’s if their service even “worked”. (I won’t digress down that rant…). Point is, bad things don’t happen often, but when they do, they go down fast, as you probably know. And I feel the determining factor in my ability to deal with that situation is really down to detection and reaction time. For instance, if I’m at a customer site during a work day and I’m not around home and and the Ph or Ammonia levels start to go wonky in my Fry tank, I want that Home Assistant can help me out and start doing small partial water changes in my quarantine or fry tanks - until I get home to deal with the situation.

If I am home plan is to have Home Assistant Scream / Flash / nudge me and wake me the heck up & tell me “Your fish need attention NOW”. It’ll flash the lights, turn on the stereo and TV and be sure to get me up. If I can find an old “magic fingers” bed massager at an old hotel auction, I might incorporate that too.

And most importantly, I want a way to have an alarm if something goes wrong with my monitoring device … i.e. a sensor is stuck or fails to respond… an alarm is sounded for that too. (This is where Seneye completely falls down, IMHO…speaking as a 5 year long customer of theirs too. They presume you just stopped using your Seneye device or you’re having “router problems”.)

That said, what I’ve seen of the APEX controllers sure seems to be nice. Is there not anyway to incorporate those into HA? Do they not have an API you can call / interface with? If it’s got ethernet / Wifi and a Telnet / Web interface, you surely could do something with that, can’t you? That’s kinda how I did it with my Neol and APC Powerswitch bars.

Thanks for that @robmarkcole… I’ve seen a lot of open source efforts, from custom ardunio Robots to a RasberryPi (ReefPi, which seems to have died off, btw) based projects and/or devices for this, but that’s a new one. :slight_smile:

1 Like

Mine’s a 265 gallon display with a 75 gallon sump, so not quite as big as your system. My crash wiped everything out, it was tough to deal with. I have young kids so I wasn’t paying as much attention to is as I should have and I didn’t notice that one of my main GFCI’s tripped and shut down half my tank causing one of my heaters to not function and the tank cooled and everything was lost.

I haven’t looked into incorporating the APEX in the HA, but I’m sure there’s something I can do. If at the very least to add another later of redundancy.

i got 5 aquariums.
2x 160 lite and 3x 60 liter.
lights off is managed through HA for a long time now.

only recently i started to implement LED lights. so i will automate light changes through HA soon.
water changes are just opening and closing a few taps. in the future i will do that with electric ones, but there are lots of other things more important now. my garden for instance, giving me the chance to experiment with waterflow sensors and automating closing and opening waterflow.

so nothing extreem, just normal stuff.
i will use nodemcu or arduino to automate my aquariums.

1 Like

17 June Update:

So about 2 weeks ago, I upgraded our RaspiPi 2 Kodi box with with a RaspiPi 3 complete with breakout boards & installed remote float sensors (for overflow warnings) and temp probes on the two tanks in the living/dining area. Additionally, it has a AM2315 Humidity and Temp sensor for the living room conditions on it as well.

And since I have two breeding clownfish couples now - each of a different genetic history, I have setup two new Fry tanks with the hopes of catching and breeding my first Clowns with aquariums monitored and controlled by Home Assistant. Adding additional temp probes for each tank cost only about 5 euros each (including extra glue-heat-shrink wrap applied, for extra protection against salt water conditions) - far cheaper than commercial products which range from 39.00 euros to 150 euros for extra temp probes to connect to dedicated controllers.

Additionally, I also created a switchable layout view within my Aquarium Tab on HA, offering both views related to functional operation (i.e.- grouped according to Temp, Waterlevel, Heater status, etc) or related to by physical aquarium grouping layout. This new later view will allow anyone (other than myself) to quickly switch to the view which makes understanding my tank setup and management - more comprehensible and easier to manage, if I’m not around and have to depend on someone else running it for awhile. But it’s also nice to switch over to if I’m just concerned about the parameters of one specific tank for awhile.

My idea was to let this run and see how reliable and what benefits just working with what I had (i.e. Ph probe and other features still have yet to be added) would bring to me for the first few weeks.

As of about 2 weeks ago, I’ve had both CoralPi and NemoPi - which are really just remote agents of Home Assistant - CoralPi being installed in the back Fishroom area where all my extra tanks are and general aquarium maintenance is performed (a former slightly oversized broom closet), and NemoPi which is installed in the living dining area, under the TV and in-between my two big display aquariums. Meanwhile, HA is running from a more central location in the house on it’s own RaspPi. Eventually, I may install redundant copies of HA on these Pi’s as part of an overall redundant design, but for the moment, they’re just simple MQTT sensor agents.

Almost incredibly, the second night after I installed NemoPi…AFTER my wife and I went upstairs to bed, I stopped off in my office, to wind down by watching some home automation vlogs on youtube. About 30 mins later, after I was done, I started to shutdown & saw “IT” right as I gave HA one last check - HA had detected and given a small alert (which I had not yet expanded to a BIG FREAKING alert…cause I was concerned about the possibility of false alarms still) that CoralPi and entire electrical subsystems in the fish room had gone off line.

Somewhere in-between the time my wife and I pushed off to go upstairs and eventually to bed, and that moment - a GFCI breaker had tripped, shutting down the dedicated electrical grid for the aquariums and fish room. NemoPi was running because he’s sitting on a different breaker, as was HA.

I went downstairs, and sure enough, everything was dark (I have some tanks in the fish room on alternate day-night schedules from the main display tanks which illuminate the fish room at night). I was up for the next two hours trying to figure what had ‘leaked current’ and caused the GFCI to trip, but couldn’t figure it out. Everything seemed to come back on and appeared to restart without fail. I tested every tank for the possibility of leaking current, found none and went to bed, but slept uneasy. I awoke the next morning and discovered (thanks to HA logging) everything performed brilliantly from 2am onwards. And about 2 days later, I finally figured out what it was.

Although I had originally suspected something even wrong with CoralPi (it was a new addition to the fish room) as having caused the GFCI tripping, CoralPi’s data logging provided the answer - it was a malfunctioning heater in one of the newest Fry tanks I’d just setup in preparation of baby clownfish on the way.

Although I have my heaters dialled in to 29C, HA actually controls the temperature at 27C more precisely (down to a .000 degree, if I wanted too) than the built in thermostats could ever provide. But despite being set even to 36C later in testing, when HA flipped on the heater, it’s own heater thermostat reed relay was sticking open. A closer inspection of the heating element revealed why - it had begun to leak salt water into the tube - which became and remains primary suspect now for the GFCI breaker tripping 2 nights before.

That was a major save of my entire system - that night - being alerted by HA that my tank was in serious need of immediate attention. I’m pretty sure my main tanks would have been stressed, but quickly recovered the next day - had I found it 8 - 10 hours later. They’re big enough and large enough - they’d be okay. But I"m pretty sure I would have lost some if not all my babies… over 200 tiny baby clownfish - and not enough fresh oxygenated water coming into the tank…it wouldn’t be long before suffocation settled in. (BTW, I am heading towards battery powered HA & battery backup pumps controlled by HA, for all of this).

So far, this HA Proof of Concept for me has been really great. It’s bit of work to put together, but it’s not just been fun, it’s been rather rewarding - esp after that power outage event which saved my butt. BTW - that’s only like the 2nd or 3rd time in 12 years that GFCI breaker has ever tripped. The only two other times I could remember it tripping was when a light assembly fell into a tank & when another heater leaked and literally exploded upon leaking - we think from water vapour pressure, which had not yet caused a short condition - tripping the GFCi at the same time.

This experience left me wondering… If I didn’t have HA implemented 2 days before, like I did… would I have found out what caused that first GFCI breaker trip in time, before it tripped a second time? In the previous heater explosion - it didn’t fracture the aquarium heater glass tube - it propelled it into the 6 inch deep calcium based sand-bed at the bottom of my aquarium, which is where I retrieved it from after the ‘explosion’ incident occurred. I wondered if that had happened in my much much smaller 10 liter bare glass bottomed fry tank - what would be the result?

I know there’s some very nice dedicated aqua controller products that are specifically designed for these roles, and could have also been used to make similar discoveries. But to me, it’s pretty cool that I can do this with HA just as easily and a lot more easier on the wallet, it seems. Which goes a long way to saying a whole heck of a lot about Home Assistant and it’s founder’s vision & everyone behind this project.

And makes me very appreciative of everyone that’s done something for HA - because in a way - in the bigger scheme of things… many here helped create a great product that ended up saving my fish, corals and my ass. One of those “rare events” happened just days after implementing HA on my tanks and totally saved the day (actually, saved the night before and the day after.)

Thank you for that. You all are, and Home Assistant is, totally full of WIN! :slight_smile:


@cowboy Great work, wow! I’m looking to make a very simplified version of your project for spa and swimming pool management. I’m only looking to capture pH, water temperature and outside air temperature. Have you had any success yet integrating a pH sensor into HA? I’ve seen there are cost-effective Arduino based pH sensor kits available but that the probes only last about 6 months? Be interested to hear of any progress in that department.

Im also intressted in pH sensor

@xbmcnut - not just yet, mainly because I haven’t gotten to that stage of the project due to summer holidays, actual physical expansion of my aquarium system (added another tank & growing out more baby fish and corals, etc.) not to mention I was adding a lot of other features to our installs of home assistant. :slight_smile:

Current planning is to pick up the soldering iron and restart work (where I left off) on this right after the Hardwear.io hardware hacking conference 20-22 Sept.

Measuring (and controlling) parameters like Ph and Redox and eventually other water parameters has always been the endgame goal, but in the spring it was lower on the priority list & I was working my way there. I’m very optimistic about HA as use for an Aquarium controller, but wanted to slowly work my way from “simple things” to “complex things” so that the actual implementation is able to cope with any weaknesses of HA and properly and safely compensate for them. Using HA to measure and control so many variables in my own system is a path that is proceeded down relatively slowly in order to do so “safely”. The upside is the more experience gained, the more I work out the safe(st) way to do things. I like to design things that “fail safely” in my aquarium. Being a computer security guy at two major telco’s over 15+ years, one tends to come away with that approach in everything she/he builds. :slight_smile:

From what I understand most common pH probes only last 6 months, and need recal every 30 days. Lab grade, obviously more expensive, are available, and these last a year or more, and require recal every 3-6 months. Still haven’t decided what implementation I’ll go for in the first round, that will probably be determined largely on price / quality I can source here. But ultimately I see now immediate reason it wouldn’t be compatible with either type in the long run.

Another issue I have, is HA rolled out some major breaking changes. I didn’t count on it, but it happened, and that sent me back to the drawing board on one key feature I want anything that’s going to control pH and the like to have. It’s a must have in my book, but not something commonly seen on most controllers. :slight_smile:

I did do some research over the summer and found most of what I think I need to know to successfully build a hardware interface for directly controlling Tunze’s variable speed 12V DC nano-stream pumps straight from HA. This would give more control over Feeding timer cycles, oscillation patterns, day/night cycles, storm and wave making cycles, and provide better integration into everything else.

And somewhere by Thanksgiving / Christmas… I hope to have an web interface written to control not one, but multiple Aquaillumination Hydra HD LED lights. :slight_smile:

I’ll continue to post updates as I get back on track with things at the end of Sept. :slight_smile:

@cowboy Thanks! I appreciate the update. I just ordered a cheap aquarium pH sensor module from China. I’ll see if I can get it calibrating with ESPeasy as that can read an analog input and with its options, allow for limited tweaking of the values being read. I’ll post here if I get it working.

1 Like

How’s this going, did the sensors work out?

Small delay… in part because I’m getting my plumbing infrastructure ready to install 2 more aquariums. Not exactly your typical plumbing install here with 4 x 32cm pipes under the floor and longest under the floor at 15 meters. Probably gonna be working on this the next few days.

All of this happened because I had to repurpose my Quarantine tank as a large holding tank for 100 baby clownfish that are growing faster than I can sell them. And an aquarium shop is waiting on me to take some fish to try to breed commercially for them, so I need a new Quarantine tank like yesterday. :wink:

Still hope to getting around to ordering the parts this week, and start here soon, and hope to be able to report back positively in a few weeks. :slight_smile:

I can promise you this - I’ve only got 3 months of Seneye slides left, so I’ve got to have it built, debugged and tested and into production well_before I run out of Seneye slides and I lose the capability to monitor my Ph levels. :slight_smile:

1 Like

So, and hopefully this isnt a really dumb question, but how do you integrate all the sensors into HA? I have experience using MQTT to report sensor data via a nodemcu and/or arduino, but never done so with a Pi. What is required to get the sensor data to report to the other Pi (with HA installed)?

@jnvd3b - it’s pretty simple.

The MQTT server info/login is added to the HA config.

In your config you then add other entries that match up to the kind of component you are using. You can add garage door controllers, temp/humidity sensors… - list goes on.

So its [MQTT server] > [HA instance (to get to read values)] < [HA config (create a component entry - and nominate the topics it uses to publish or subscribe to)]

Look at all the options:

Hmm I think I worded the question poorly. I am familiar with MQTT but have only used it to receive info from Arduinos/NodeMCUs. Is there an inherent advantage to using a Pi for this setup rather than an arduino?

@jnvd3b - Well, Home Assistant gives you a way to display the values - to control your device via it MQTT topics (if that is the devices goals), to create automations around those values or to use those devices as a part of the automation - you could even log historic data from your arduino devices.

Home Assistant runs on the RPi, alongside a MQTT broker like mosquitto (if you wish).

Does that help clear things up?

awesome would love to see more info on this project!

I was just thinking. I have a varioS pump (dc variable speed return pump). Would it be possible to control it with Home Assistant using the 0-10v input on the pump controller??