Scheduling Pet Feeder App

I’m trying to write an automatic pet feeder app. Unlike the one already in created apps, I’d like to be able to set mine on a schedule.

I have a couple of questions as I’ve already done some tests but would like to confirm.

  1. Can multiple schedule() methods be installed in an app? I created 3 but only 1 ran.
  2. If yes, is it possible to create an app that allows for an “infinite” number of times or do I have to hardcode the inputs by the user? For example, when installing the app, it would be nice to have a section that says “add another scheduled run?”

> 1. Can multiple schedule() methods be installed in an app? I created 3 but only 1 ran.

Yes, you can schedule up to 4. However, from my experience, each handler can only be scheduled once at any time. So you’ll have to do something like

def myHandler() { unschedule( myHandler ) <feed-the-pets> schedule( <next-time-it-should-run>, myHandler ) }

Did you ever finish your pet feeder app? Can you share it? We had been using multiple scheduled runs, but with the latest upgraded to the smartphone app it doesn’t seem possible to set that up any more.

I ended up just making an app for each time of the day. My app only triggers an outlet/switch which fires off my Super Feeder and then it automatically shuts it off after 5 minutes. Though the feed duration is actually only about a couple of seconds. I need the switch to cut power so the feed cycle can reset.

I have a SuperFeeder too… It’s a shame you need to make a series of separate apps to get something scheduled multiple times.

I am thinking of getting a Super Feeder also. Has anyone come up with an app?

I’m also trying to automate a Super Feeder. It seems like the Smart Lighting app should do what we need. That SmartApp lets you configure any number of on/off events triggered by various inputs, including time. Each event shows up as another SmartApp under the Thing it’s controlling, but only one SmartApp is under the home SmartApps tab.
I have it set up with an Aeon Labs z-wave smart switch, and it claims to be working, but isn’t actually turning on and off. I think my problem is with the switch and not the Smart Lighting app, though, and need to figure out how to reset the switch.