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

Afternoon all,

Can someone take a look at my piston below please and see if they can work out what’s not set correctly. I’ve taken Dustin’s awesome example from the Webcore wiki and extended it to include two motion sensors (one in my hallway and one at the top of the stairs). I’ve got a hue bulb downstairs and a ST outlet powering a lamp upstairs. Essentially, when either motion sensor detects motions AND the lux level is <= 10 I have both lights switch on. After two minutes of inactivity the lights should go off.

What’s not working is that when the 2 minutes inactivity countdown starts, if I walk back in front of the motion sensor I want the countdown to reset to two minutes - this doesn’t happen. The lights go off after two minutes even if I’m doing a dance in front of the hallway motion sensor.

I’ve added the check to see if either of the lights are on to overcome the motion sensor being active and the lux level now being > 10 due to a light being on.

Thanks in advance

Ade

Move the last two with actions into the else section of the piston and add a WAIT in front of them. Stop using timed triggers inside conditions, they don’t follow the same rules as actions when it comes to cancelling tasks - they have no tasks.

1 Like

Thanks @ady624,

Legend as always?

Something like the below you mean?

Thanks

Ade

Yeah, remove the P settings on the actions, remove the second wait, since the second action is sync it will wait for the first to finish, so the first wait will delay both actions. Unless you make the second action async…

1 Like

Out of interest, is it ok that once the 2 minutes time stops the countdown restarts itself again and again?

I’m thinking from the point of view of memory being used up

Thats exactly the problem I have all the time. Never used one, novice here. I’m assuming it would go after the turn on? Or ? How do I use one?

Design Question:

I have a piston that detects the presence of my wife’s and my phone. If away; it sets the mode to Away. If one returns, it goes back to the previous mode.

Now, if I want to add automation to the away state, for example:

If we are 'away', set thermostat to 'X'

I’m thinking I should create a new piston that does just that; evaluates the home mode rather than directly evaluating presence in the piston to complete the action.

With that said, if I now wanted to add another automation for lighting, say:

If we are 'away', and its after sunset, turn on the 'entry light'

Is it best to break that out to it’s own piston as well? Or is it better to create a “master away” piston with all evaluations for any ‘away’ state automations?

I’m assuming separate pistons for each action and maybe a master piston to evaluate modes?

Just for sanity, I break it up in small pistons so I know which one exactly is interacting with the device, easier to troubleshoot. After you get comfortable with what’s all working, you can try to merge it into one or just keep it as is.

1 Like

Ok cool. I don’t mind having separate pistons, I just wanted to make sure it’s not more taxing, etc on the system. I rather smaller chunks for better management and organization.

Do you do the same with modes? A separate piston to dictate what mode the home is in? I was thinking creating a master mode changing piston this way when we return home, I can ask it to run this master piston to ensure it detects the correct mode it should be in. Right now, I have it returning to the previous mode, which I store in a variable. However, if I’m gone all day, I wouldn’t want to return at 10pm and the mode change back to good morning.

If I had two separate pistons, such as this:

PISTON 1

if all devices 'away', set mode to 'away'
else if 'device' presence changes to 'present', set mode to 'home'

PISTON 2

if any devices are 'present' and 'time' is later than 10pm, set modes to 'night'

Should we leave the house at 8am and then return at 11pm, will both actually run? I always confuse myself on when webCoRE is ‘always’ evaluation versus only evaluating once (condition vs trigger…right?).

In this scenario, i didn’t know if it would be more reliable doing a:

if all devices are 'not present', set home to 'away'
else if 'device' presence changes to 'present', run piston 'mode master'

Then, inside of the ‘mode master’ piston, I would have all of the mode changing automations. This would force the evaluation of the mode conditions, right?

Is one way better than the other?

I know that was a lot and I hope it made sense!

Thank you!

So my pistons randomly disappeared, which was not a big deal since had mist backed up, but now my mail is here piston I’m having problem with. I only want to send notifications once a day when mailbox is open but I don’t remember how I had it set up before and nothing I try is working (I’m trying to explain to my older parents how and failing miserably).

Any help would be greatly appreciated … I’m running out of patience

What do you mean randomly disappeared? On their own, not deleted? Did you have automatic backup for the mail piston? If so I can give you a list of your private snapshot codes, if you pm me a couple. I can’t tell you what’s in them though… just list out the existing codes for your account

I have a very simple setup when it comes to modes, away and home :slight_smile:

Regarding your example, this is probably how I’d do it… maybe

if all devices are not present, set mode to away
else
  if any of devices changes to present set mode to home (only from X time to X time)
  else set mode to night

Then… in the same piston…

If time is between 10P and X and any of devices are present
  change mode to night
else
  change mode to day

Again, completely untested so not sure if it will actually work :smiley:

I have no idea what my parents did, but they live Murphy’s law and all pistons disappeared.

I didn’t have mailbox piston backed up, I quickly set it up a few days ago to see how it went. I thought I had it set up as a condition (If) but I can’t get to work so tried a restriction (only when) and can’t come up with right variable/value combination.

Doesn’t help that I’m trying to decrypt a bunch of stuff for 3 different companies due to wannacry at the same time running pen tests on them…kinda distracting me from fixing piston since brain is fried from fallout.

I am trying to create a piston that will turn off lights and change the smart home monitoring status to do a few things…

  1. Turn off lights downstairs
  2. Verify that all contact sensors are closed
    3a. If a contact sensor is open it will “flash” the lamp in my room
    3b. If all contact sensors are closed it will change the smart home monitoring status to “Armed (Home)”
  3. Disarm the house at 6:00 the next morning.

Everything works fine with this besides the piston is triggered regardless of what button is pushed on the dimmer switch (I Have the Homeseer HS-WD100+ and want the triple tap down to trigger the piston).

Any ideas on how to resolve this would be appreciated.

@Austin_Anderson What if you create a virtual switch (physical switch is the triple tap) or is that how you have it setup now?

Then your virtual switch would trigger piston

Put your second IF into the THEN section of your first IF

Thank you! It is working as expected now.

1 Like

So right now the only way I can add a restriction to piston is after running it pauses itself then 12 hours later resumes, is this simplest way to only run once per day ?

Hmm, I have not tried it but will the timer keep running if the piston pauses itself?

I have Fibaro Motion ZW5 sensor. There is an issue when I attempt to create a simple piston to send me a text if the tamper activates. The two conditions of the tamper state in the IDE are ‘active’ and ‘inactive’


When I try to set up a piston, the two values it shows as possible are ‘clear’ and ‘detected’.

Very strange. When I set up the piston it does not work as it is looking for ‘detected’ and the condition being sent as ‘active’…

Why would the variables be different in IDE vs WebCore? I did change the DTH for the sensor since I originally included it in WebCore but I when I changed the DTH I unclicked the box on the WebCore SmartApp allowing to use the device, then clicked on it again to reacivate in WebCore. Is this the right thing to do when changing at DTH of a device already in WebCore or is there a different way or is this just a weird bug in WebCore?