Turn on fountain if wind speed below 1MPH for more than ten minutes

I have a decorative fountain in the back yard garden. Discovered if the wind goes above 2MPH the water doesn’t flow into the lower buckets but, rather, outside onto the ground essentially pumping the fountain dry if left alone.

To combat this, I’ve added plugin SiteSensor which, via API call, “talks” to the Ambient weather station on the property. A scene was created that, if sustained wind speed is >2MPH, the fountain is shut off.

Now the ask:

I’d like to create a scene in which, if I’m home (only time the fountain runs) and if the sustained wind speed has dropped below 1MPH for 10+ minutes, the fountain is turned back on.

I can create a scene that will turn it back on if sustained winds are below 1MPH but I’m really looking for a means to build in that delay.

Thanks!

I have a similar scene for my awnings, for wind and rain. I check for LastTrip and then check the difference between os.time() for my threshold (30 minutes) to avoid going up/down. If you want to go this route, I can post some code when I’m home. But I suggest you explore Reactor, you can accomplish the same with almost no code.

1 Like

Reactor, surely

C

1 Like

I had a problem with Reactor and my t-stat. As soon as I installed Reactor, my t-stat suddenly had “offsets” to the setpoints. It required a reset to return the t-stat to normal stat and an uninstall of Reactor.

Dude, I’m right here, every day, waiting to troubleshoot anything that comes up and help people be successful with Reactor or any of my plugins. Why didn’t you report this? What kind of thermostat? It’s pretty rare for one person to have a problem with an entire class of device. I’ll bet we could have figured it out.

3 Likes

Every day is right!

Better support than most commercial enterprises.

C

Breathe, everyone - I’ve simply not had the time to focus on the Reactor issue and troubleshoot it beyond workaround phase. I can’t have the house AC going wonky this time of year. I’ve reached out to regpapa via his site.

It’s doable in code. Assuming your device will continue to try to untrip the sensor, create a scene (or a watch) and when the wind device is un-tripped, put some code in the condition (after you set the trip action for the new virtual sensor as one of the actions), and then add this code:

local tNow = os.time()
local throttlingTime = 30*60 -- 30 minutes

local lastTripped = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", dID) or tNow

return tNow - lastTripped > throttlingTime

In my case, I also watch for the current value before tripping/untripping a sensor, because I don’t want the re-trip o re-untrip an already tripped/untripped device. I started from this code and adapted:

UPDATE: Patrick was great and went so far as to purchase the same model t-stat and test it thoroughly. As we expected, he could not reproduce the issue. However, as we dug deeper he found a line of LUUP code that was faulty - something I’d picked up in the forums. That was corrected (and at this point isn’t even being used any longer given the results of working with Reactor.)

The fountain now comes on as it should, when HOME and staying on from an hour after sunrise 'til an hour after sunset. If the winds pick up above 2mph, it shuts itself down as before. The new fun is that, with Reactor, it’s watching the wind speed and as soon as it drops below 2mph a 30: timer starts. If at any time the winds go back up, the timer stops. If 30: finally passes without the wind going back up over 2mph then the fountain waits an additional minute then starts back up.

Quite brilliant, actually. Many thanks to @rigpapa for stepping in and up!

Btw - yes, the wind speed is local from the Ambient 2901A in the backyard. The data is fed from it via API into SiteSensor (which turned out to be a plugin of Patrick’s I’d been using for some time already) and used to control a few different scenes.

1 Like