[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Still trying to get my Blink Camera on my front door to turn on and off if someone steps on the front door pressure mat. So far, I have the camera turning on, and it sending me an alert text just like I want. But… it won’t turn the camera off after 2 minutes. I setup a test piston using the ceiling fan just to make sure the camera does respond to a turn off command. The first piston is the test turn off which works, and the second piston is the main one, that works up until the turn off … Thanks

Is that a pressure pad? If it is, try setting it to Never cancel tasks under the With, click the Cog. The opening event after the person steps off is canceling your timer.

Seriously, I have no understanding of what I just did and why… but it worked… YEAH !!! Thank you !!!

1 Like

Is it possible to send arguments/parameters to webcore from IFTTT, e.g. with a request like something like …/ifttt/fanTimer?time=60 I’d like to get time=60 and use it in the webcore piston.

Yes, send them using ingredients in IFTTT and read them with $args.time

1 Like

Is there a way to put an if statement to check if any routine has been run in last 10 min? I am trying to automate my garage door when my wife is at home already but when we come both at the same time, geofence does not recognize both at the same and garage door opens. If I can put condition to check if certain routine has been ran 10 min ago, it will fix my problem. Thanks

I had that same issue. Took the arrival out of the routine and let webcore do the work. Works great.

What exactly are you trying to do with this setup?

@c1arkbar I’m using a couple of MiniMotes to separately control two fans. Under varying conditions that determine which MiniMote controls which fan I can construct the fan name (e.g Fan1 and Fan1) in a variable and I want to issue a command for that device.

Is it possible for a text variable to contain the device name ?

See this post for an example…

I should be able to do that, although I generally avoid using devices that are not locally defined in a piston. Also, linking a device by name is generally bad, as changing the device name would break the flow. You should consider declaring your two minimotes in two different variables and then using either if() or a ternary operator to select the one you need:

declare
   device minimote
   device minimote1 = Minimote 1;
   device minimote2 = Minimote 2;
end declare;

[...]
Set variable minimote = {whichDevice == "1" ? minimote1 : minimote2}

Replace whichDevice == 1 with your own condition.

1 Like

That helps a lot. Gives me some ideas on streamlining the logic instead of brute-forcing it.

How is Changes to different than is when using motion to turn on a light?

I want to have a light come on when motion is detected. What is the difference in behavior with having the light come on with motion when using Changes to active vs is active?

If you have is active as the only condition then not much is different from the two. Once you start adding other triggers then it becomes more like a restriction.

I’m wondering if there is a way to find the number of minutes between two preset time intervals. For instance, if I wanted to populate a variable with the number of minutes between sunset and midnight every day, is there an expression to make this happen?

What is the purpose or benefit to using piston states? I’ve got 10 or so pistons right now and all I’m really doing is turning lights on/off with motion or contacts and announcing presence changes via sonos. I can’t see where it matters in what I’m doing.

I use it in a couple different places, but here’s a simple one.

When we go to bed and the house shuts down (Night mode), I have a couple of lights that I preset to super low dim levels so nobody is blinded if they turn them on to pee at night or whatever.

Next morning I want the level to jump back to 100% after they are turned on for the first time when Home mode is active. But I only want it to happen the first time they are turned on…if someone manually sets the dimmer level lower during the day, I want that to stick. Adding the “execute on piston state change only” allows this behavior.

Also, custom piston state is useful for creating a dashboard sort of view:

I’m trying to set up a series of different lighting events that happen on specific days, every year (think: July 4th, Xmas, etc). I can’t find a way to enter just the date without the year…thus the piston would only run for the year 2017. Am I missing something?

I am looking for a piston to run on schedule or event change to show presence status of each presence device and store each device as a separate global variable.

I have a few questions that have come up as I am expanding my home’s automations:

  1. I’m trying to use SHM more heavily but am having problems with using my Android devices as presence sensors (mostly because of delays in status updating). Is there a way for WC to trigger a refresh of a smartphone-based presence sensor like there is for other devices?

  2. Is there a way to determine how long ago a piston was triggered and then display it as it’s state? I’ve already tried using formatDuration($now - runTime, true, 'm', true) where runTime is a datetime variable which holds when the piston was last run. If there is a better way to get this data, that is appreciated as well.

  3. Is it possible to set default options for all newly created piston? For example, always have Show Advanced Statements checked.