Flash light on certain days of the week at scheduled times


#1

1) Give a description of the problem
I have set up a piston to flash my office light 3 times and trigger a sound to be played over one of my smart speakers at certain times of the day on workdays (mon-fri) to give me a visual/audio reminder to get up and stretch. However, the piston is not triggering at all. Can someone please point me to where I’m going wrong? Any help that can be offered to this lowly noob would be greatly appreciated WC travellers, you guys have been such a great community in helping me get started on this journey.

2) What is the expected behaviour?
Monday at 3:15PM (15:00) flash the office light 3 times and play sound on X speaker

3) What is happening/not happening?
None of what I’ve programmed is happening. I have also noted that the piston has a message showing “This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.” after I’ve saved it.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full

+1ms ╔Received event [212 Montague].test = 1586845549471 with a delay of 0ms
+47ms ║RunTime Analysis CS > 15ms > PS > 15ms > PE > 16ms > CE
+49ms ║Runtime (38732 bytes) successfully initialized in 15ms (v0.3.110.20191009) (47ms)
+50ms ║╔Execution stage started
+58ms ║║Comparison (integer) 2 is_inside_of_range (integer) 1 … (integer) 5 = true (2ms)
+59ms ║║Condition #2 evaluated true (5ms)
+63ms ║║Comparison (string) 16:25 is (string) 16:15 = false (1ms)
+65ms ║║Condition #3 evaluated false (5ms)
+66ms ║║Condition group #1 evaluated false (state did not change) (13ms)
+68ms ║╚Execution stage complete. (18ms)
+69ms ╚Event processed successfully (69ms)

#2

Instead using the first “if” function you can use better the timer function.

Replace “if” with “timer” and set it to run at what hour,day,weekdays etc you want.

Should look something like this:


#3

Hi Vsterian thanks so much for responding.

I’ve never worked with a timer before. Do you have a resource I could use to learn how to implement this?

Or if you’re able to instruct me that would also be awesome but don’t want to ask too much.

Thanks so much


#4

I would set up a Timer

If you have several times during the day that you want this to happen, then you can just copy the every block as many times as you like and just change the time. You could include all of the timer blocks in a single piston. Or, you could just write single pistons for each of your desired times. Whichever you desire.

I tried to find a good resource for how to use a webcore Timer. I could not find one. However, if you do a Google search for “webcore Timer”, you will find several posts in the webcore and SmartThings forums that provide helpful information. Someone here may know of a direct source of instruction.

This means that your piston does not subscribe to a trigger.
You will need at least one trigger in the margin to fire the piston automatically. If you do not see a trigger icon in the margin, then the only way to run the piston is to click on the TEST button. Otherwise, the piston will not run by itself.

You might want to read through Conditions and Triggers


#5

Thanks so much, Pantheon!

I got everything up and running thanks to your instructions. And in addition, I now have a HUGE amount of new pistons I’m thinking about creating now that I’m familiar with timers.

God damnit I love this community. I hope that someday soon I’ll be skilled enough to help others on here with their requests.

Cheers :smile:


#6

@gdoggy, Glad you got it running. It’s a great feeling isn’t it! If you would be so kind, check the green check mark at the bottom of my post for my solution to mark it solved. Thanks.


#7

Done and Done! thanks again mate :smile: