Repeat Piston to react on a switch statement


#21

Not sure what you mean… What is the master piston?


#22

sorry


#23

The piston didn´t run this night.
Log:
Logs
16.5.2018, 08:35:59 +78ms
+1ms ╔Received event [Home].time = 1526452560000 with a delay of -922ms
+187ms ║RunTime Analysis CS > 14ms > PS > 76ms > PE > 97ms > CE
+191ms ║Runtime (76917 bytes) successfully initialized in 76ms (v0.3.104.20180323) (190ms)
+192ms ║╔Execution stage started
+201ms ║║Comparison (integer) 18 is_equal_to (integer) 0 = false (1ms)
+202ms ║║Condition #31 evaluated false (4ms)
+203ms ║║Condition group #26 evaluated false (state did not change) (5ms)
+209ms ║║Comparison (time) 30959283 happens_daily_at (time) 30960000 = true (0ms)
+209ms ║║Time restriction check passed
+211ms ║║Cancelling condition #24’s schedules…
+211ms ║║Condition #24 evaluated true (6ms)
+212ms ║║Cancelling statement #24’s schedules…
+216ms ║║Requesting time schedule wake up at Thu, May 17 2018 @ 8:36:00 AM CEST
+668ms ║║Calculating (integer) 1 + (integer) 1 >> (integer) 2
+670ms ║║Calculating (integer) 2 + (integer) 0 >> (integer) 2
+675ms ║║Comparison (integer) 2 is_less_than (decimal) 6.0 = true (2ms)
+676ms ║║Condition #25 evaluated true (458ms)
+677ms ║║Cancelling condition #23’s schedules…
+678ms ║║Condition group #23 evaluated true (state changed) (472ms)
+680ms ║║Cancelling statement #2’s schedules…
+685ms ║║Skipped execution of physical command [Garten Pflanzenbewässerung].off([]) because it would make no change to the device. (3ms)
+685ms ║║Executed [Garten Pflanzenbewässerung].off (3ms)
+689ms ║║Skipped execution of physical command [Garten Rasenbewässerung Haupt].off([]) because it would make no change to the device. (2ms)
+690ms ║║Executed [Garten Rasenbewässerung Haupt].off (3ms)
+693ms ║║Skipped execution of physical command [Garten Rasenbewässerung Seite].off([]) because it would make no change to the device. (2ms)
+694ms ║║Executed [Garten Rasenbewässerung Seite].off (4ms)
+700ms ║║Comparison (integer) 18 is_equal_to (integer) 16 = false (2ms)
+701ms ║║Condition #35 evaluated false (5ms)
+702ms ║║Condition group #32 evaluated false (state did not change) (5ms)
+707ms ║║Comparison (integer) 18 is_equal_to (integer) 16 = false (1ms)
+708ms ║║Condition #38 evaluated false (4ms)
+709ms ║║Condition group #36 evaluated false (state did not change) (5ms)
+715ms ║║Comparison (integer) 18 is_equal_to (integer) 16 = false (2ms)
+716ms ║║Condition #41 evaluated false (4ms)
+717ms ║║Condition group #39 evaluated false (state did not change) (5ms)
+723ms ║║Comparison (string) null executes (string) :bf896d3930a24ec51640ca0710681504: = false (2ms)
+724ms ║║Condition #18 evaluated false (4ms)
+729ms ║║Condition #83 evaluated false (4ms)
+730ms ║║Condition group #1 evaluated false (state did not change) (11ms)
+736ms ║║Condition #22 evaluated false (3ms)
+737ms ║║Condition group #19 evaluated false (state did not change) (5ms)
+745ms ║║Condition #91 evaluated false (4ms)
+745ms ║║Condition group #84 evaluated false (state did not change) (6ms)
+752ms ║║Condition #99 evaluated false (4ms)
+753ms ║║Condition group #92 evaluated false (state did not change) (6ms)
+760ms ║║Condition #107 evaluated false (5ms)
+761ms ║║Condition group #100 evaluated false (state did not change) (5ms)
+763ms ║╚Execution stage complete. (571ms)
+764ms ║Setting up scheduled job for Thu, May 17 2018 @ 8:36:00 AM CEST (in 86400.158s)
+771ms ╚Event processed successfully (771ms)


#24

The next date it’s scheduled to automatically water is the 18th. On that date it will run (and at whatever frequency you set up beyond that.


#25

first run was 2 hours ago :slight_smile:
but i got these messages:
zone1 and 3 has a small bug :slight_smile:


#26

I’ll take a look at it. Do you have the logs from that run? Would be. Much easier to troubleshoot with those! Looks like your zones might be sending multiple on/off reports to ST but sounded to verify before changing the piston to accommodate.


#27

I see it now. Delete the last 3 IF condition from your piston. I’m not sure how/why they are there, but they’re evaluating TRUE when your automated cycle is running and creating duplicate messages, I think.

The three I’d delete (or at least disable temporarily using the settings cog) to see if it corrects the issue are lines 165, 179, and 193.


#28

Yes, I have registered myself. I also wanted to get a summary via sms if I manually turn on a switch for a zone.
if I disable the three if statements, I will no longer receive the notifications. do I have to copy somewhere else?
you’re right, right now he is reacting twice with the last if statements.


#29

The IF statement at line 97 captures the time for cycles you automatically start, and the IF at line 137 was put in there to capture the time and send it to you for any manually terminated watering cycles.

The last 3 IF statements are redundant with steps above and causing you get get multiple SMS messages with watering zones are turned on or off.

I’m getting very confused how many switches you have to operate these three zones, so maybe I’m missing something. But if you want to be able to start watering by a Routine, OR a master switch, OR individual switches… I would just add the individual switches/zones into the IF statement at line 97. Then you won’t get multiple messages when zones turn on and off.


#30

there you are somehow right :slight_smile:
the piston with der master switch is for my hue lamps, not for the water irrigation :slight_smile:

my idea was / is:

  1. a routine for automated irrigation
  2. alexa works better with switches, so i created a simulated switch for automated irrigation in point 1
  3. In addition to this, I can also switch the switches on manually, of course, each zone should only receive a maximum of the watering time that has been set in point 1

is that too complicated?

the if in 97 is the automated part. if i add here the normal switch, so it going to start the automation. i need something like the last 3 if´s in the piston, in these place the statements are redundant, You’re absolutely right.

That’s why I think we just have to copy the 3 instructions somewhere else in the piston. or?

the easiest way would be. could I somehow check with the last 3 if statements if I activated the switch from the smartthings app or if it was activated via webcore? so the redundant part would not exist anymore. or?


#31

Give this one a shot and let me know if you still get duplicate messages?


#32

it works perfect :slight_smile: