Aquariums and terrariums can be seen as closed ecosystems. The problem is that they don't work as is. One can create a really closed ecosystem, but with very few animals, and specific species. Let's focus again on normal aquariums. In those, people want to have many colorful animals. The problem is that the more animals you have, the more pollution you get. In aquariums, fishes, shrimps, etc, produce wastes (the technical term is "poop", but not only) after consuming food (more on this topic in this post : https://hackaday.io/project/2929-rlieh-aquarium-closed-ecosystem-management/log/9806-water-qualitity-sensors).
The problem is that this pollution is toxic to most animals. It is really dangerous, as it can kill animals, whose corpses will produce more toxins, and kill even more animals.
Another problem is that fishes will produce carbon dioxide, and need oxygen to breathe. All in all, it is up to the aquarium's owner to ensure that the water is suitable for the animals.
One solution to improve water quality is to have real plants, since they consume animal wastes and carbon dioxin. With enough plants, the impact of animal pollution can be greatly reduced. Plants require mostly lights, and a few nutrients, some of which they can obtain from animal wastes.
Keep in mind that i'm being a bit schematic here in order to keep things simple, but this is the general idea.
So what is the problem here? With a good set of lights and enough plants, we should have no problems right?
Well, things are not often that simple. Indeed, have too few lights, and brown algae will colonize your tank, and the "good" plants will die. Too much light and you'll get green algae. Too many wastes, and you'll have another kind of algae. Even with the right amount of light, you have to turn it on and off, otherwise, the tank's inhabitants will end up having problems (most fishes can't close their eyes).
All in all, the first problem is that you have to control the lighting to have the correct intensity and the correct illumination. Most of the time, the problem is that aquarium don't have strong enough lights (or bad quality lights), so in order to solve this problem, there is no miracle solution. We'll use powerful lights. However the more powerful the lights, the more power they drain, given a chosen technology. Furthermore, powerful lights will produce heat, that can be detrimental to the aquarium (we'll discuss the problem of temperature later).
With more powerful lights, we waste more power, so we have to ensure that the lights are on only as long as it is required.
For this purpose, this project includes a system to handle the lights automatically. Indeed, manual control means that you can either forget to turn on the lights, causing some problems to the plants, or forget to turn it off, and have algae growth AND wasted power.
So the first function of Rlieh is to manage lights. It has to be able to turn it on and off, set a time for turning it on, and off (or a time to turn it on and a duration), and ideally it should allow us to have it fading it on and off, to replicate the sun rise and set (this is less stressful for the inhabitants). However, one can want to look at something in the tank for maintenance, and we have to be able to turn the lights on for that. The system should thus be able to override the current light state, with an auto-off after some time to prevent the user from forgetting to turn it off.
This post is already quite long, so i'll stop here, and discuss cooling in another post later. I'll also make a more synthetic post to summarize all these aspects for those that don't want to read those long blobs of text :)