Trying to simplify my pistons to run in two chunks rather than separate pistons


#1

1) Give a description of the problem
(PUT YOUR INFO HERE)
I have to pistons that on there own work just fine but would like to put them together rather than have a ton of separate piston. I know its possible but still reading and learning the webcore integration.

2) What is the expected behavior?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)


5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS)


#2

The easiest way…

Open up and Edit the first piston.

Click on the line number 17 on the left edge of the piston. Then right click on that number and select to Duplicate that entire section. Then go about making your edits so that the duplicated section looks like your 2nd piston.

All this is in the video in case you don’t know what I mean by any of that.

The other way would be to go to the very bottom of a piston and add the lines there.


#3

Is this what you mean. It just seems so simple I feel like I’m missing something


#4
+1ms â•”Received event [Home].test = 1515309658791 with a delay of 0ms
+75ms â•‘RunTime Analysis CS > 15ms > PS > 37ms > PE > 23ms > CE
+78ms â•‘Runtime (39175 bytes) successfully initialized in 37ms (v0.2.101.20171227) (76ms)
+79ms â•‘â•”Execution stage started
+91ms â•‘â•‘Comparison (enum) not present is (string) not present = true (1ms)
+93ms â•‘â•‘Condition #11 evaluated true (8ms)
+94ms ║║Cancelling condition #1’s schedules…
+94ms â•‘â•‘Condition group #1 evaluated true (state changed) (11ms)
+104ms â•‘â•‘Condition #10 evaluated false (8ms)
+105ms ║║Cancelling condition #1’s schedules…
+106ms â•‘â•‘Condition group #1 evaluated false (state changed) (10ms)
+108ms ║╚Execution stage complete. (30ms)
+110ms ╚Event processed successfully (109ms)

#5

Think this is what your after.


#6

No, that’s not exactly what I meant. You’ve got the triggers nested inside each other. If you want what you asked for at the top of this thread, “would like to put them together” then it would look like this. Each IF is out on it’s own, not nested inside the other.

I don’t have a door lock, so I don’t know if you can use some logic like “lock changes” instead of locks or unlocks. But you have to do it the way I’m showing below with the triggers that you’re using.


#7

Ok I got it I think now thanks. Will have to try out when I get home.
If you have a lock you can only change the lock from lock or unlocked and the trigger is only gets for some reason. The value you can change from Unlocked, Locked, Unknown, and unlocked with time out. Just one more question if I begin with a restriction at the beginning before my execution will this supersede my piston. Meaning I don’t want this piston to run when I come home because I have an automatic trigger from my smart things app that unlocks my door when I return home with a Mode. This is just for friends and family while I’m away. Thanks much


#8

A restriction that you place at the top will affect the entire piston.

You could also place a condition inside each IF block (or even just one of them) as well.

So if you want to affect all of this then use a restriction, otherwise use nested IF statements.


#9

Alright thanks been a lot of help. My next task is to run announce name of each unlock code that is entered when they enter my home and also send me a text of the person, so this is gonna be fun. Haven’t done anything like this for 15 years so it’s a bit of a challenge to me


#10

Just remember, it’s a marathon, not a sprint… :slight_smile: