Run pump x min on, x min off on continuous loop?

I need to run a pump on a continuous 20 min cycle (1 min on, 19 min off). I set this up using examples I found on the site. Using a GE smart switch, Virtual Device for a timer and 4 automations created with the Smart Lighting app. in the new app.
Automation 1 - turns off GE switch after 1 min using power allowance.
Automation 2 - turns off Virtual Device 1 after 19 min using power allowance.
Automation 3 - turns on Virtual Device 1 when GE switch goes off.
Automation 4 - turns on GE switch when Virtual Device 1 goes off.
This works fine but always fails after a few days of running. Any ideas? Is there a better/more reliable way to accomplish this?

This use case look tailor made for Webcore.

probably not since you are relying on a cloud based platform. it will get interrupted by any internet or cloud based outages.

Are you controlling it through a thermostat? If so check out this on/off circulation app otherwise you may want to check out webcore.

I did think about it getting interrupted by any connection issues being it is cloud based so I set up a test. I replaced the GE switch with another Virtual Device (Virtual Device 2) and set both with a power allowance of 1 minute. So now it’s just 2 virtual devices shutting on and off in the cloud. No connection to me other than watching it happen every now and then. Still failed within a couple of days.

1 Like

The only way to avoid internet/cloud hiccups is to only use devices that run locally and and app that does as well such as smart lighting. Or move to Habitat, but that brings a different set of issues.

assuming ST has resolved the issues with runIn(), unless that’s only me… :wink:

1 Like

I thought the test I mentioned above was avoiding cloud/internet hiccups. IDE shows smartlighting as well as all my automations under it as running on the cloud. Also the the 2 virtual devices being used are also running in the cloud. The devices start out switching ok but fail within a couple of days.

Edit: I did just unplug my hub and verified both virtual devices continue switching per my smartlighting automations on the phone app. Everything else shows as offline.

The smart lighting instance needs to show as local. See below my smartlighitng app where some run locally and others do not. The ones that run locally only include devices that run locally as well. The ones that run locally here switch a Fibaro Dimmer 2 which runs locally and are triggered by either time, sunset/sunrise or a door sensor that also runs locally.

I would just try webCoRE:

If pump stays on for 19 minutes
Then turn off

If pump stays off for 1 minute
Then turn on

1 Piston and should work as longs as the hub is connected.

If 2 virtual devices running in the cloud fail, I’m not sure what is going to keep 2 local devices running the same automation locally from failing the same way but I’m willing to give it a try. I will have to add a second (dummy) local switch for the timer along with the switch the pump is connected to. Then just run the automation locally on those 2 real switches rather than the virtual devices in my current test.

If you are taking about virtual switches that appear as devices in the SmartThings app then depending on the DTH you use they can run locally.

1 Like

I was trying to avoid the whole webCoRE thing for one simple app that should work with existing automations but I guess that is where I may end up. I am still at the getting started point of webCoRE. Currently until I sort this out I disconnected my pump from the smart switch and plugged it into one of those $15. electronic timers on Amazon. Handles it just fine. Runs continuous loop forever even maintains time and program during power failures.

1 Like

DTH? I’m using new app (not classic) and I just created a virtual switch in the Virtual Device Creator smart app. Only options are switch or dimmer and name. Once it’s created it shows up as cloud in IDE. I can’t see how to make it local. All the smartthings support documents I read about running smart app locally say you can’t use virtual switch.

I do the same thing to turn on a Peanut Zigbee pocket socket for a few minutes per hour.

The only time it fails is when the hub reboots for firmware updates.

For what it’s worth, I created my virtual switch using the IDE. It is marked as local.

You have to go in to IDE and make sure the virtual device is set to your hub. Once you set that, it’ll show as local.


Still “Smart”…I have a handful of basic motion light sensor switches (closets, laundry room, etc.) that are standalone and I NEVER have to worry about them not working because of some cloud glitch. I wish all the other stuff was that reliable but unfortunately, the more components you add, the more points of failure are added as well. Sometimes, simple is best.

My recirculating pump has a built in timer but I chose to go the other “Smart” route…So far, everything has worked great and no complaints. Here is the Piston to give you an example of how I made my pump “Smarter”…Of course this is way overkill for your needs but you can get an idea of how you can dig down deep using webCoRE to accomplish all sorts of things. You should really consider giving it a go.

1 Like

I just used the new app to add a smart lighting routine with a virtual switch and a Fibaro dimmer. both devices run locally and now so does the smart lighting automation.

I have not used the Virtual Device Creator smart app. I created mine in the IDE. Maybe that’s the difference? I am on the EU instance so my link to the IDE is Depending on where you are, yours may be different.

In there select My Devices and then + New Device. Give it a name, a device ID (something like FFEF) and select virtual switch as the type. It doesn’t hurt to select the location and hub as well.

After all this though, Webcore would be a better way to accomplish the whole task.

Ok, progress. I had to go into IDE and set the virtual switches to my hub as Andrew C suggested above. After that they became local. After that I was able to set my 4 automations to local. So what was previously running in the cloud is now running locally. It’s still the same automations and I suspect they will fail just as in the cloud. I will report back in a few days just in case anyone is interested. If it still fails I will likely move unto webCoRE or maybe just keep my electronic plug in timer. Thanks everyone for your help.