Simultaneous triggering of events


#1

1) Give a description of the problem
Automate watch cinema routine

2) What is the expected behavior?
I am trying to automate my Watch Cinema routine. What I am trying to achieve is that, when watch cineme activity (Harmony) is on, I need to control my projector screen (which is connected by a relay) and my light. I want the projector relay to open and after 38 seconds stop. At the same time I want the my corner lamp to come on, change the colour temp the warmest, wait 30 seconds and the fade level to 30% gradually. And after 5 minutes to 10%.

I am managing to do this currently, but I am having to use 2 different pistons. Is that the right way to do it? can I do it with a single piston?.

3) What is happening/not happening?
If I try to do it with one piston, ST wait for the screen to come all the way down (38 seconds) and then start turning on the lights etc.

4) Post a Green Snapshot of the pistonimage


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

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

You should be able to do it in one piston using the advanced options on your two action blocks. Click with then use the :gear: icon to show the statement options. When you set the Execution Method to Asynchronous the single piston should split and run the two separate action blocks at the same time.

For example, a very simple synchronous piston logs a message, waits, then logs another message showing the time elapsed since the piston started:

This piston logs the following, you can see that it executes the first block with A1 [wait] A2 then executes B1 [wait] B2

+231ms	║Elapsed time A1 00:00:00
+3263ms	║Elapsed time A2 00:00:03
+3280ms	║Elapsed time B1 00:00:03
+5302ms	║Elapsed time B2 00:00:05

Switching those two action blocks to asynchronous like this piston

logs the following where A1 and B1 execute at [roughly] the same time, then B2 finishes and A2 finishes:

+143ms	║Elapsed time A1 00:00:00
+199ms	║Elapsed time B1 00:00:00
+2246ms	║Elapsed time B2 00:00:02
+3170ms	║Elapsed time A2 00:00:03

Energy Saving Piston working but log fills with spam
#3

Thanks. I will play around and see if I can make sense out of this. :slight_smile: