hardware and software
The tank is connected to a Raspberry Pi 3 B+ fitted with a Pi Camera Module 3, running Raspbian Bullseye (because Bookworm changed the way GPIO pins are accessed, which breaks one of the main apps on the Pi). It also has a Leviathan 1.1 hat from Aquarium Automation to simplify the wiring. It’s running two primary apps: reef-pi, which automates some functions and monitors tank parameters, and mediaMTX, which captures the pi-camera stream. Reef-pi currently monitors temperature through a cheap DS18B20 probe, and pH using an analog pH probe and breakout board, connected through ADS1115 I2C analog-to-digital converter.
Upstream of the pi, I have a homelab server running (among other things) datarhei restreamer. Restreamer takes the pi-camera stream, tweaks the format a bit, adds an empty audio track, and squirts it out as an RTMP stream to a virtual private server out in the cloud (there’s no cloud, it’s just someone else’s computer). From there, Owncast works its magic, and it comes right out of this very website into your eyeballs.
The camera itself is down in the tank, contained in an Entaniya waterproof dome-case thing. Originally, I had just attached two suction cups to the back of the case and stuck it to the tank wall, but that wasn’t able to aim it carefully, so I added a magnetic acrylic bracket that’s intended to hold coral frags, and designed a 3d-printed ball-and-socket mount to connect the camera case and adjust the aimpoint.