How I automated my aquarium, and how YOU can too! (using sonoff and HomeAssistant)

It’s been a while, hasn’t it?

While the updates may have been slacking, I sure haven’t slacked in the “home-automation departement”. Home Assistant is still my go-to when I want to start automating anything! That being said, over the past year I have been keeping fish & shrimp (yes, shrimp) which sometimes require a lot of manual activity. Know that a lot of aquariums need a set light cycle and some other even require much more than that! In my case I use CO2 which is used as part of the plant fertilization. Finally, for me it is also important to be able to monitor my aquarium form anywhere in the world. When I’m on holiday, I am able to help my “fish-sit” (babysit) with turning on/off every single piece of electrical equipment when they need it.

Obviously, this serves just as an example. If you want your HomeAssistant to turn on your coffee machine after your alarm clock goes off, you can also get inspiration here!

If you have watched the video above, I hope you start to get an understanding on how I tackled things. A lot of the components used are an application of the previous videos I posted with regards to sonoff, homeassistant, …

If you are interested in building something similar, I suggest you check out below resources and code/configuration examples!

  • For flashing your sonoff, I have two instructional videos: 1 and 2 (click on the numbers)
  • I don’t have any examples of DIY arduino applications. If you are reading this in the future, maybe I have some but for now I suggest the following link and some healthy dose of google.
    • In my case I used a NodeMCU, a DHT22 sensor and a DS18b20 sensor (waterproof)
  • In HomeAssistant I configured the different components and used some custom automations to make everything work together.
    • I use MQTT as my “data hub”.
    • Check down below for the code examples!

With this write-up I hope to have peaked your interest in automation as a whole. In case you have further questions, feel free to get in touch with me by any means possible (comments in this post, comments on my youtube video or via my mail)

Thanks for reading!

 

For those interested in the code examples, please find the general lay-out below:

Setting up the general requirements: I use MQTT sensors to display the values and the lights are turned on via MQTT (the Sonoff Tasmota Firmware allows for this):

We have some sliders to control the light cycle:

And finally the (far from optimal?) automations!

 

 

You may also like...

Leave a Reply