Nearly identical pistons don't subscribe to the same triggers


#1

1) Give a description of the problem
I have 2 very similar pistons to control location mode based on presence or 2 devices. 1 piston subscribes to only the presence indicators while other piston subscribes to presence AND location mode.

2) What is the expected behavior?
It seems the location mode is only referenced as a condition, not a trigger, so it shouldn’t be subscribed in either pistion.

3) What is happening/not happening?
It appears at times that the location mode subscribed piston encounters semaphore wait times. I’m trying to understand why.

**4) Post a Green Snapshot


  1. Attach any logs
    11/13/2018, 10:12:00 AM +97ms
    +0ms ╔Received event [Sxxxxd].mode = Away with a delay of 87ms
    +9620ms ║Piston waited at a semaphore for 9520ms
    +9651ms ╚Event processed successfully (9652ms)
    11/13/2018, 10:11:59 AM +479ms
    +2ms ╔Received event [xxxxx Android].presence = not present with a delay of 103ms
    +3927ms ╚Event processed successfully (3927ms)

Thanks in advance for any assistance.


#2

The first has one trigger and one condition…
The second has only conditions, so they are treated as triggers.


#3

Thanks for the prompt reply. That makes perfect sense.

I had trouble writing the “both devices not presence” condition as a trigger since they won’t happen at the same time. Any suggestions on a better way to write that one?


#4

There are many ways to accomplish this. One idea:

IF PresenceA changes to present  (trigger)
Then
    IF PresenceB is present  (condition)
    Then Do Stuff
    END IF
END IF

This one fires off when B is already home, and A arrives


IF PresenceB changes to present  (trigger)
Then
    IF PresenceA is present  (condition)
    Then Do Stuff
    END IF
END IF

This one runs when A is already home, and B arrives


#5

I suffer from trying to do things elegantly when brute force is simpler and more effective.

Thanks!


#6

That works too!

I use my previous post since I want different things happening depending on who is arriving home.