Filter (Feeding Mode) Automation with Samsung Smartthings, Alexa, and Smart Plugs

ariellemermaid

Well-Known Member
View Badges
Joined
Aug 21, 2020
Messages
665
Reaction score
498
Location
North Carolina
Rating - 0%
0   0   0
Background:

I wanted to do a little write-up of my day-long experience putting my aquarium filters on smart plugs. First off, you’re probably thinking “why?” Filter systems should be on all the time. Well, I’m one of those folks that likes to turn off my filtration when I feed; I feed small amounts and don’t want it to just end up in the filter making nitrate. I got tired of unplugging the filters and sometimes forgetting for a while to plug them back in; if this happened overnight fish could suffer or die if powerheads are inadequate. However, the convenience of a voice command is really appealing to me.

I wanted to use what I already had on hand; some spare smart plugs and a Smartthings hub. I was nervous, however, about putting the filter on a smart plug. First off, what if I’m trying to turn off a porch light and Alexa hears “filter” instead? Secondly, can we engineer out the human error of forgetting to turn the filter system back on? If you use Google as your digital voice assistant, this should all apply the same way.

Project Goals:
  • Send out a text warning if any filter has been off for more than 20 minutes.
  • No matter what, after a filter has turned off, turn it back on automatically on an interval that reasonably allows for feeding, water changes, maintenance, etc. In this example, 1 hour.
Now most of this can be accomplished in a pretty straight-forward way through the Smartthings app. However, text messages can’t be delayed. When they’re activated, they send. That’s annoying; for 2 filter systems I don’t need 4+ on/off alerts every day and eventually I’ll add a 3rd filter to this setup. I’m going to accomplish goal #1 by using a virtual switch.

Lets’s Go!

This is going to require 5 Smartthings automations and 1 virtual switch for 2 filter systems in addition to 2 smart plugs/switches. Disclaimer: there are more elegant ways to do this including using webCoRE code; however, I wanted to keep it as simple and straightforward as possible. I might go that route in the future, but for now this is something completely accessible for anyone to do.
  • “Filter Auto On” automation. If….filter 1 OR 2, etc. are turned off then set every filter to turn on with a 1 hour delay. If a filter is already on, turning it on again isn’t a problem (doing it this way saves on the number of automations). This automation is the master redundancy when a filter is turned off.
  • Make a virtual switch. Use this link to login to the Smartthings IDE. Go to My Devices (you might have to pick your hub off of the “My Locations” tab first). Click “New Device” and give it a name, make up a hardware ID (like FISH01), for the Type select “Simulated Switch,” Version is Published, and then select your correct Location and Hub. Other fields remain blank. I called mine Filter Notification.
  • “Filter Off Warning” automation. If….filter 1 OR 2, etc. are turned off then set “Filter Notification” virtual switch to turn on with a 20 minute delay. This determines how long before you receive a text message. Once "Filter Notification" is set to on, the text will send immediately hence the 20 minute delay in this automation.
  • “Filter On Status” automation. If….filter 1 AND 2, etc. are turned on, then set “Filter Notification” virtual switch to off with a 21 minute delay. Something greater than the interval set above. This serves the following purpose: if the filter is turned on before the text warning goes out via the above step, then the text warning will not send, however, we need a command here to reset the “Filter Notification” virtual switch in that case to off for the next time a filter off event happens (otherwise the text would go out immediately).
  • One text automation for each filter you have. If….[DT filter] is turned off AND “Filter Notification” is turned on, then send SMS “DT Filter has been off for 20 minutes!” AND set “Filter Notification” to off. Repeat this logic for each filter on a smart switch. This sends a text and resets the “Filter Notification” virtual switch; this text is a run-once warning.
  • If desired, you could create another automation to send a text when filters are turned back on but for now I've skipped this.
That’s all it takes! Using these automations and a virtual switch you can rest assured 1) no filter will be off for more than 1 hour, and 2) you will get a text if any filter has been off more than 20 minutes and it will tell you which filter is the culprit. If Smartthings does its job correctly. Pay attention to the OR vs. AND commands, as different automations use different schemes. I’m open to any thoughts, ideas, and suggestions! I don't rely on Smartthings completely, but for now, I’m comfortable with the redundancy this provides while simultaneously allowing me to go into feeding mode via voice command.
 

lapin

10K Club member
View Badges
Joined
Dec 16, 2017
Messages
10,876
Reaction score
18,041
Location
Austin
Rating - 0%
0   0   0
Nice
 

Daniel@R2R

Living the Reef Life
View Badges
Joined
Nov 18, 2012
Messages
38,417
Reaction score
67,446
Location
Fontana, California
Rating - 100%
1   0   0
Cool! Thanks for sharing!!
 
Back
Top