[Solved] Reminder timer with a reset event


#1

1) Give a description of the problem
I’m trying to setup some reminders that I can reset the counter with a push button. the count up part works fine but I cant reset the timer. I would like to have it be a momentary button but tried it with a switch too and it doesn’t reset the timer.

2) What is the expected behavior?
when the button is pushed the counter will reset

3) What is happening/not happening?
the reset to 0 does not happen

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


#2

The logic in the piston looks fine. So what do the Full logs say when you press the reset switch?


#3

When I change the dimmer switch to on, nothing registers in the Logs. I changed the timer to trigger every minute for testing.

1/27/2018, 8:22:31 AM +732ms
+58ms ╔Stopping piston…
+160ms ╚Piston successfully stopped (102ms)
1/27/2018, 8:22:18 AM +495ms
+1ms ╔Received event [Home].time = 1517062939795 with a delay of -1301ms
+146ms ║RunTime Analysis CS > 28ms > PS > 66ms > PE > 52ms > CE
+150ms ║Runtime (39578 bytes) successfully initialized in 66ms (v0.2.102.20180116) (148ms)
+152ms ║╔Execution stage started
+173ms ║║Cancelling statement #2’s schedules…
+183ms ║║Calculating (integer) 32 + (integer) 1 >> (integer) 33
+190ms ║║Executed virtual command setVariable (4ms)
+213ms ║║Calculating (integer) 10 - (integer) 5 >> (integer) 5
+218ms ║║Comparison (integer) 33 is_greater_than_or_equal_to (integer) 5 = true (3ms)
+225ms ║║Cancelling statement #7’s schedules…
+239ms ║║Calculating (integer) 10 - (integer) 33 >> (integer) -23
+246ms ║║Calculating (string) Dog Feeder will be empty in + (string) -23 >> (string) Dog Feeder will be empty in -23
+252ms ║║Calculating (string) Dog Feeder will be empty in -23 + (string) days >> (string) Dog Feeder will be empty in -23 days
+310ms ║║Executed virtual command sendSMSNotification (31ms)
+313ms ║║Condition #6 evaluated true (113ms)
+315ms ║║Condition group #5 evaluated true (state did not change) (116ms)
+320ms ║╚Execution stage complete. (169ms)
+323ms ║Setting up scheduled job for Sat, Jan 27 2018 @ 8:23:19 AM CST (in 60.978s)
+330ms ╚Event processed successfully (330ms)
1/27/2018, 8:21:19 AM +570ms
+1ms ╔Starting piston… (v0.2.102.20180116)
+121ms ║╔Subscribing to devices…
+129ms ║║Subscribing to Dining Rm Bulb 1.switch…
+202ms ║╚Finished subscribing (98ms)
+237ms ║Calculating (integer) 10 - (integer) 5 >> (integer) 5
+240ms ║Comparison (integer) 32 is_greater_than_or_equal_to (integer) 5 = true (1ms)
+256ms ║Setting up scheduled job for Sat, Jan 27 2018 @ 8:22:19 AM CST (in 59.972s)
+268ms ╚Piston successfully started (268ms)


#4

Well then that is the part that you need to troubleshoot. This piston is subscribed to events from that switch so you should not need to adjust the Timer to cause the piston to run. Simply turning on the switch should do it.

Is that a real switch, or are you using a light as a switch? Does this light report when it turns on?

If you disable the Timer (press the cog, go to advanced settings and set it to disabled) does the light switch itself produce an event?

You need to get the part working where the piston sees the light switch changing to on. If nothing shows up in the logs then that means that WC did not detect the event from that switch…and if it’s not detecting the event then your counter will never get reset.


#5

Thanks for the help, trouble shooting by disabling the first part helped me find the issue. The bulb was not reporting in.