[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Is this what you mean?

Noob question: What is the value ‘Home’ and ‘tile’ in the expression mean? I believe i need to change that as well right? What value do i use here?

Yes. Are things working as expected?

You shouldn’t need to change Home and tile. When a piston tile is clicked the piston is called with an event. Part of that event’s data is:

$currentEventDevice = ‘Home’
$currentEventAttribute = ‘tile’
$currentEventValue = {tile number that was clicked}

EDIT: see correction to this in my post below.

Not too sure if it works yet as at the moment, the tile is not clickable. Any ideas?

UPDATE: Tested with the other piston and it’s toggling the lights now. So now the problem is that the tile is not clickable. According to the log, line 41 was false, hence no “toggling” took place. The log as follows:-

+534ms ║║Comparison (dynamic) t is_equal_to (string) Home = false (1ms)
+535ms ║║Condition #27 evaluated false (7ms)
+536ms ║║Condition group #23 evaluated false (state did not change) (9ms)

Remove the first if condition but keep the second if condition and try it please.

The current event device must be using the location name for your hub which Is probably different from ‘Home’. You can find the location name by going to the more tab in the ST app.

1 Like

Yes!! That seem to do the trick…thank you so much for your help and patience!!

Will try to add the currentEventDevice in later and see if that works or not.

Again…thanks for your help!

Yep. Or write one ternary statement and put it in a conditional evaluation loop or statement anywhere he needs it. That would still allow for the use of a device list global variable, which would execute more efficiently than him looping through a search of variable names, which is what I think he originally wanted. But I’ve been up a long time now so I may be missing a finer point somewhere.

In those statements, does he need the hub ID rather than name?

EDIT: Thanks, @bangali for your reply. I thought I had quoted the earlier post, but clearly had not.

Can anybody help me understand why this piston sends me the reminder message on Wednesday and not Thursday!?35 AM

As far as I can tell, your piston should work. There’s a discussion here regarding a possible issue with evaluations of days in webCoRE. Your example is the third one that I’m aware of. Hopefully, @ady624 can take a look at this and do his excellent magic!

@kayvint you are welcome.

@AWIV this is what i recommended to the user. no search of variable names required. :slight_smile:

i can think of a few other ways to do this same thing but not necessarily suggest all of them for another user to try.

1 Like

@AWIV not exactly sure which posting you are referring to. but, if it is the one i think it is, then no the user needs the name there not the hub id.

I think you can add me to the list. I have a few pistons that rely on days and they’ve been misfiring in various ways for the past few days.

@acdown87 i am sure @ady624 will look in to the issue. if you would like to experiment please try changing the if statement to a timer, like below, and see if it works tonight :slight_smile:

Are your ‘misfires’ consistent? Mine are consistently failing on Sunday and Wednesday nights. The other example I know of is consistently failing on every Saturday night. I seems to depend on the specifics of the piston’s instructions - i.e., which days are chosen, etc.

To be honest, I haven’t done much troubleshooting other than noticing that things weren’t quite right. This piston did run on Saturday and Sunday, and also on Monday, but has not run since (according to the log).

Logs
7/31/2017, 7:59:59 AM +122ms
+2ms 	╔Received event [Home].time = 1501502400000 with a delay of -879ms
+193ms 	║RunTime Analysis CS > 29ms > PS > 66ms > PE > 98ms > CE
+204ms 	║Runtime (35850 bytes) successfully initialized in 66ms (v0.2.0e1.20170728) (200ms)
+205ms 	║╔Execution stage started
+226ms 	║║Comparison (string) :d9dd57670e2045f82e647efa357a2ed8: is (string) :b11771d3d5c283d77773906d5a1aae7a: = false (4ms)
+229ms 	║║Cancelling condition #1's schedules...
+230ms 	║║Condition #1 evaluated false (14ms)
+232ms 	║║Cancelling condition #null's schedules...
+233ms 	║║Condition group #null evaluated false (state changed) (18ms)
+234ms 	║║Piston execution aborted due to restrictions in effect
+236ms 	║╚Execution stage complete. (32ms)
+245ms 	╚Event processed successfully (244ms)
7/30/2017, 7:59:59 AM +183ms
+1ms 	╔Received event [Home].time = 1501416000000 with a delay of -818ms
+172ms 	║RunTime Analysis CS > 21ms > PS > 64ms > PE > 87ms > CE
+184ms 	║Runtime (35850 bytes) successfully initialized in 64ms (v0.2.0e1.20170728) (181ms)
+187ms 	║╔Execution stage started
+202ms 	║║Comparison (string) :b11771d3d5c283d77773906d5a1aae7a: is (string) :b11771d3d5c283d77773906d5a1aae7a: = true (3ms)
+204ms 	║║Condition #1 evaluated true (9ms)
+206ms 	║║Condition group #null evaluated true (state did not change) (10ms)
+214ms 	║║Comparison (time) 28799393 happens_daily_at (time) 28800000 = true (1ms)
+216ms 	║║Time restriction check failed
+218ms 	║║Condition #5 evaluated false (8ms)
+223ms 	║║Cancelling statement #5's schedules...
+228ms 	║║Requesting time schedule wake up at Mon, Jul 31 2017 @ 8:00:00 AM EDT
+232ms 	║║Condition group #2 evaluated false (state did not change) (22ms)
+236ms 	║╚Execution stage complete. (49ms)
+238ms 	║Setting up scheduled job for Mon, Jul 31 2017 @ 8:00:00 AM EDT (in 86400.58s)
+253ms 	╚Event processed successfully (252ms)
7/29/2017, 7:59:59 AM +155ms
+1ms 	╔Received event [Home].time = 1501329600000 with a delay of -845ms
+276ms 	║RunTime Analysis CS > 39ms > PS > 104ms > PE > 133ms > CE
+287ms 	║Runtime (35848 bytes) successfully initialized in 104ms (v0.2.0e1.20170728) (284ms)
+288ms 	║╔Execution stage started
+305ms 	║║Comparison (string) :b11771d3d5c283d77773906d5a1aae7a: is (string) :b11771d3d5c283d77773906d5a1aae7a: = true (3ms)
+308ms 	║║Condition #1 evaluated true (9ms)
+309ms 	║║Condition group #null evaluated true (state did not change) (12ms)
+318ms 	║║Comparison (time) 28799469 happens_daily_at (time) 28800000 = true (0ms)
+319ms 	║║Time restriction check failed
+322ms 	║║Cancelling condition #5's schedules...
+324ms 	║║Condition #5 evaluated false (10ms)
+326ms 	║║Cancelling statement #5's schedules...
+332ms 	║║Requesting time schedule wake up at Sun, Jul 30 2017 @ 8:00:00 AM EDT
+338ms 	║║Cancelling condition #2's schedules...
+340ms 	║║Condition group #2 evaluated false (state changed) (27ms)
+346ms 	║╚Execution stage complete. (59ms)
+349ms 	║Setting up scheduled job for Sun, Jul 30 2017 @ 8:00:00 AM EDT (in 86400.497s)
+487ms 	╚Event processed successfully (487ms)
7/28/2017, 7:59:59 AM +289ms
+0ms 	╔Received event [Home].time = 1501243200000 with a delay of -712ms
+215ms 	║RunTime Analysis CS > 29ms > PS > 54ms > PE > 132ms > CE
+226ms 	║Runtime (35846 bytes) successfully initialized in 54ms (v0.2.0e0.20170726) (225ms)
+228ms 	║╔Execution stage started
+246ms 	║║Comparison (string) :b11771d3d5c283d77773906d5a1aae7a: is (string) :b11771d3d5c283d77773906d5a1aae7a: = true (3ms)
+249ms 	║║Condition #1 evaluated true (11ms)
+251ms 	║║Condition group #null evaluated true (state did not change) (13ms)
+265ms 	║║Comparison (time) 28799545 happens_daily_at (time) 28800000 = true (5ms)
+267ms 	║║Time restriction check passed
+269ms 	║║Condition #5 evaluated true (14ms)
+280ms 	║║Cancelling statement #5's schedules...
+285ms 	║║Requesting time schedule wake up at Sat, Jul 29 2017 @ 8:00:00 AM EDT
+290ms 	║║Condition group #2 evaluated true (state did not change) (35ms)
+295ms 	║║Cancelling statement #3's schedules...
+349ms 	║║Executed virtual command setLocationMode (48ms)
+371ms 	║║Executed virtual command writeToFuelStream (13ms)
+377ms 	║╚Execution stage complete. (150ms)
+380ms 	║Setting up scheduled job for Sat, Jul 29 2017 @ 8:00:00 AM EDT (in 86400.333s)
+397ms 	╚Event processed successfully (398ms)

Could someone help me with this piston? When my wife arrives home and opens the front door, I’d like LanNouncer to greet her. I can’t get it to fire but not sure why. I’m assuming it has to do with the 2 requirements at the top? I added a push notification just to let me know if its working but it never goes off.

I would reorder the IFs and change the presence IF to IS PRESENT. As it stands you have two triggers. If you change as I suggest you’ll have a trigger with a condition.

Thanks Nezmo, I don’t want it to go off every time she is home and the door opens though. Just when she arrives and then opens the door. I did just find the “followed by” option and now have to wait for her to leave to test :slight_smile:

image

Ah, got ya. Sorry.