Relay on a Timer Controlled by SmartThings (backyard ducks)


Long time Smartthings user but have not posted in the community in quite some time. I need some advice from you experts.

My youngest son wanted some backyard ducks in our urban area home. Our backyard is completely private fenced and we have cut out a really nice section that’s about 85% shade all day long. What I would like to do is always have fresh water for the ducks to drink so I was thinking that it would be nice to have a relay that opened some sort of water shutoff device that would allow water to flow for a ser perion of time then close. So every 60 minutes the fresh water valve would open for 90 seconds to add some fresh cool water to their water bucket.

Any other alternate or better ways on how to make this happen, im all in!!


Most livestock supply stores will have a wide variety of automatic waterers. Any of those would probably be a better choice than trying to use SmartThings for this.

The company themselves says not to use SmartThings for anything that might affect health or safety. It’s just not reliable enough. And providing water to animals is exactly the kind of thing I wouldn’t use SmartThings for.

For example, suppose it glitches and runs the water continuously, so much that it overflows the bucket which then either falls over or the ducks refuse to drink out of it. Big problem. (As I’ve mentioned before, many of my extended family have working farms, and I grew up in a rural area. We had chickens, ducks, and horses when I was a kid. Ducks are smarter than chickens, but they are really really messy and can be picky about their water source.)

Some of the automatic waterers May have some smart features that would allow integration with SmartThings on some level, but again, I just wouldn’t.

JMO, obviously. (Well, not just mine, since Samsung would say the same thing as far as the basic use case.)

1 Like

Btw, I assume you know, but just to make sure: you need to get a waterer which is designed for ducks or geese, not chickens, as the bill size and shape is very different. Something like this can work well and as long as you check the water level every day you should be fine, even without smart technology added.

Also, I forgot to mention that Tractor Supply Company (TSC) was always our go to for livestock supplies. They’ve been in business for almost 100 years, have over 2000 stores, and a decent online store as well. Here’s their “getting started with ducks“ article:

The biggest challenge for most households, including in urban areas, is predators. Hawks, raccoons and owls all attack ducks regularly, and are not kept out by fences. So I think most people using SmartThings who have poultry end up putting most of their Home Automation efforts into the coop, controlling lighting, the door, monitoring temperature, etc. Most of these are things that won’t endanger the health of the animals if they fail or glitch for 24 hours, but long-term, they are a benefit. So when you’re planning your coop, that’s a good time to think about automation projects. :hut: :duck::duck::duck:

I hear what you’re saying and all but my plan is still to have it do exactly what I’ve asked in the forum. This is a 150’x50’ backyard with a shaded section modified to house the 4 ducks comfortably. I currently have (3) 2K Ubiquiti cameras monitoring the ducks 24/7 so at any given time my son or anyone in my family can view the ducks. I’ve built a shelter for them where one of the cameras is located and it’s equipped with climate control, ventilation, as well as temp, humidity, and airflow sensors :rofl::rofl::rofl: I was raised in the backwoods of the Mississippi delta so all that low tech farm stuff is very familiar to me. I’m just a country boy with a Ph.D. Is all :man_shrugging:t2:
Those float water containers only add water when the float goes down similar to a toilet so the water does get stagnant after several days. What I’m proposing will keep the water fresh. I was just thinking it would be much easier with a timed SmartThings relay. Otherwise I’ll just go all out and install a pedestal mount ip67 enclosure with some hardware and have a watering system that will drain once a day and run multiple times a day to keep clean water available. I also have a pressure sensor under the water supply so just in case of a malfunction and it does not refill I’ll know it instantly.

I know this is overkill but engineering complex solutions for very simple projects is a hobby of mine :laughing:

Trust me it’s hi-tech pet care to say the least. :rofl::rofl::rofl:

1 Like

Fair enough. :sunglasses: In that case, any of the various irrigation systems should work for your project. The simplest is just a dumb but electric water valve connected to a Smart plug (or in your case a relay) and then you turn the power on when you want water.

Check the quick browse lists for “pet and livestock projects“ and for irrigation and you should get lots of ideas. Many of them will be out of date as far as the automations side since they will reference smart apps or groovy, but for your purposes, that’s easy enough to replace with schedules in the current architecture. And the hardware ideas should all still be relevant.

FAQ: Using the quick browse lists without the community wiki

Or if you just want to go straight to looking at relays, the Zooz models are popular. These are Z wave so the range is good, they work well with SmartThings and the manufacturer provides their own custom edge drivers, their tech-support is very good, safety certifications are good on most models, they are well engineered, and the price is good.

This is the house brand for the retailer The Smartest House. Also available on Amazon if you prefer that.

There are also fully automated zwave water valve shutoffs That work with SmartThings, but they are way more expensive and The dumb but electric valve controllers sound like they will work just as well for your use case. :thinking:

Thanks for the information. Back to your original post, I made sure to do everything I can to be as safe as possible with the 4 ducks.

I know there are 100 ways I can do this from cheap to expensive but the question is this. Where in SmartThings is the setting to cycle a device every hour for XX number of seconds or minutes? With no end date?

Several years ago I was able to do this in SmartThings via some 3rd party plugin that isn’t around anymore. I built my own HEPA room air filter using AC Infiniti fans. This filter would turn over the entire room theoretically in 9 minutes. SmartThings would turn on the filter for 9 minutes then off for 40 minutes then on for 9 minutes again. Every day all day with no ends

1 Like

There isn’t anything just in the simple features in the SmartThings app.

It’s pretty easy to do it By Daisy Chaining with a virtual switch so that whenever that switch turns off relay turns on and vice versa, but that’s probably not the most popular way now.

Now there are several community created edge drivers that have all kinds of timer options in them. I think the following would probably best suit, but you can find additional ones on the quick browse list for virtual devices.

(EDGE Driver-Mc): Aplicaciones Virtuales Mc (virtual Switch Mirror, Virtual Calendar and virtual Switch Board...)

Alternatively, there is a third-party app with a much more powerful rules engine than the basic one in the SmartThings app which is also very popular. I’m not sure exactly how you would do this with that one, but you can look into it. They have their own community forum and also their Tech-support is usually very helpful. They have an annual license fee with the more sophisticated options, a free tier for the simple stuff, and a free trial if you want to check it out. You can find lots of threads in this forum from people using it, it’s very popular.

A simple way to do it would be to use the Requesting EDGE driver to accumulate time (see post #11 for edge driver) for the timer and a virtual switch as a control mechanism . I would set up a few Routines to create the cycle.

If Virtual switch Turns on 
Turn on valve
Start Timer
If Valve is on (precondition)
  Timer is 9 mins
 Turn off Valve
 Reset Timer to Zero and Start
If Valve is off (precondition)
 Timer is 40 mins
 Turn on Valve
 Reset Timer to Zero and Start
If Virtual switch Turns off
 Turn off valve
 Stop Timer and Reset