Active MemberView Badges
- Dec 24, 2019
- Reaction score
- Review score
- +0 /0 /-0
I control my 2 small aquariums (one 40 gal fresh, one 15 gal nano reef) with a combination of Home Assistant (which also takes care of my apartment), Reef-Pi, and Motioneye.
I wanted the tanks to mirror specific locations as much as possible. For example, I’m querying various sites to get daily water temp, tide, and weather data. I also wanted to be able to monitor everything from outside the house, so it needed to be web accessible.
The reef tank:
- Getting temp and ATO sensor data from reef-pi (Raspberry Pi 3B) and publishing via API, which Home Assistant installation can pick up as sensors
- Water temperature changes daily according to NOAA data, dropping to lower averages at night, and higher at midday depending on the data coming from a reef in Bali.
- Kessil Tuna Blue A80 fades up / down according to sunrise / sunset times, and offset by two hours so the late-waking humans can enjoy the tank.
- High and low tides control the Jabao SW2 wavemaker on/off according to a script that increases intensity at mid-tide change for that specific location.
- Top off and dosing from two peristaltic pumps on the reef-pi build. These are manual for now, because I'm not sure about speed and volume yet.
The freshwater planted tank:
- Getting temp and ato sensor data from scripts on a Raspberry Pi Zero W, and broadcasting to Home Assistant sensors via MQTT
- Water temp is targeted to a spot in the Amazon River. Amazon water temp data is hard to find so I had to go with monthly averages in a text file.
- Finnex Fugeray Planted turns on / off according to sunrise / sunset times, offset by one hour, CO2 also goes on and off with the lights.
- River high and low tides turn an extra pump on/off according to tide change for that location.
- a pi-enabled barrel feeder, run from a script on a motioneye action button
- a Pimoroni Octocam, which posts time lapse movies to twitter (@Octo_Cam_bot) and photos and stats for each feeding
Most simple power on/off switching is done with Tuya smart home outlets via home assistant. You can read about the hardware details of the Reef-pi controller on Thingiverse, with the enclosure files. Improvement has become a never-ending project but I think it’s pretty cool so I wanted to share. Will update the Github repository as I can.
Some other resources for aquarium control:
- Home Assistant Community Thread on Aquarium Control
- Reef-pi on Github
- Reef-pi tutorials on Adafruit
- Reef2Reef: Reef-pi Build Thread
- Thingiverse Reef-pi Group for some 3D printed components
- Motioneye on the OctoCam Tutorial
- MotionEye for external video feeds of the tanks
- Twitter @Octo_Cam_Bot
Nice work on the integration into Home Assistant.
I have a question. I finally started seeing MQTT messages from my ReefPi's but I am not sure if what I am seeing is normal and the same in your case as well. Looks like the MQTT message structure is not exactly as what I am used to seeing. Looks like the messages are published with single topic subscription. For example since there is a field ClientID under MQTT settings this would be listed as a Topic and then the subtopic for the parameter then the value. I am seeing just the subtopic for parameter and value.
I have this info same on all 3 Reef-Pi's so I suspect this is how they are but just wanted to check with you as you seem to have done a lot of work already with MQTT
Here is what I am seeing is yours the same?
The typical MQTT structure would be like this..