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

Maybe something like this:

By default, actions (the WITH block) are cancelled when condition state changes. Try changing the TCP setting of the WITH block to never cancel tasks — click on the WITH statement, gear icon, select Task Cancellation Policy (TCP), select Never cancel tasks.

What does the async with do?

Sorry, @elf you are correct. The Async allows the piston to continue with other tasks, if you wanted it to reset the wait every time the motion changed to active. Not sure if you want it to just wait then turn off. If that is the casae then @elf is correct.

@elf @Jeff_Inderbitzin - Thanks guys!

I put the wait and off in the else statement without the async and that worked. I also left the wait and off in the Then statement and changed TCP to never cancel, that worked too! I think I’ll leave it with the latter because it makes more sense to my brain.

this scheduled piston just ran a few minutes ago, the times happens daily should have been true. but, the trace shows it wasnt. interestingly the trace ended at 7:59:59 PM … may be thats why the piston fired but the condition evaluated as false?

thanks.

I am having this issue as well. Where is the TCP setting in webcore?

Click on your with then on the cog(gear) icon.

1 Like

Under advanced options (cog/gear button) in any statement or if you select the statement (click next to its first line rather than the text on that line) you can find it under Properties to the right of the editor

1 Like

Any idea why I can’t enable automatic backup on some pistons?

Button just won’t do anything… it’s laughing at me.

Button has no code behind it yet. Will get around to fixing those soon. Meanwhile you can make a duplicate piston of it, make sure you enable backup, then delete the original

1 Like

Hello again. One of my pistons is preforming very slowly. I took a look at the logs and it states “Piston waited at a semaphore for 264ms”. I see it varies +/- ms whenever it logs this which also appears to be whenever the piston is triggered. I suspect this is the reason the lights take a while to turn on. Any suggestions on how to fix this?

If you enable higher level logs you will figure it out - you have multiple events happening in a rapid succession - if that is unavoidable then that’s fine, the semaphore is a mechanism that prevents a piston from running multiple times simultaneously. This allows counters and other things to work properly in the piston. The semaphore can be disabled by allowing parallelism for the piston, but in most cases you should not have to worry about the semaphore messages.

1 Like

I don’t know if I’m talking nonsense, but in my experience, the hub doesn’t like the loop commands. I overloaded my hub to a standstill by using loop commands in my pistons. Once I had removed them, my hub and devices became a lot more responsive.

I started a thread requesting guidance on how to design “resource friendly” pistons. I expected to draw much discussion but did not receive much of a response, which made me think that others don’t have the issues I had. It puzzles me because, after my bad experience, my perception is that the hub could easily be overloaded by webCoRE. I’m always astonished by the complicated and evidently resource intensive pitons others create, while my far less complicated pistons overload my hub, causing devices to stop responding to any type of input.

1 Like

You always have to have waits in the loops. Always, unless that loop is a for and goes on for a very limited number of cycles…

1 Like

This piston with the new Followed Within is not working. It sends me the notification even tho the light switch was not pushed. In summary, Contact Sensor 3 contact does change to closed, but the 2nd condition was never true (the switch was not turned off physically or progammatically), yet the notification fired.

Any ideas? Is there a bug in Followed Within?

Here are the logs:

7/9/2017, 10:15:45 AM +396ms
+1ms ╔Received event [Home].time = 1499609746682 with a delay of -1287ms
+226ms ║RunTime Analysis CS > 30ms > PS > 59ms > PE > 137ms > CE
+238ms ║Runtime (36181 bytes) successfully initialized in 59ms (v0.2.0d1.20170708) (236ms)
+242ms ║╔Execution stage started
+260ms ║║Cancelling statement #1’s schedules…
+261ms ║║Condition group #1 made progress up the ladder, currently at step 2 of 2
+262ms ║║Cancelling statement #1’s schedules…
+264ms ║║Cancelling condition #1’s schedules…
+266ms ║║Condition group #1 evaluated true (state changed) (12ms)
+270ms ║║Cancelling statement #2’s schedules…
+356ms ║║Executed virtual command sendNotificationToContacts (75ms)
+361ms ║╚Execution stage complete. (121ms)
+370ms ╚Event processed successfully (370ms)
7/9/2017, 10:15:31 AM +420ms
+2ms ╔Received event [Door Sensor (indoor)].contact = closed with a delay of 320ms
+222ms ║RunTime Analysis CS > 27ms > PS > 48ms > PE > 146ms > CE
+232ms ║Runtime (36195 bytes) successfully initialized in 48ms (v0.2.0d1.20170708) (229ms)
+233ms ║╔Execution stage started
+253ms ║║Comparison closed changes_to closed = true (2ms)
+256ms ║║Cancelling condition #4’s schedules…
+257ms ║║Condition #4 evaluated true (12ms)
+258ms ║║Cancelling statement #1’s schedules…
+259ms ║║Condition group #1 made progress up the ladder, currently at step 1 of 2
+269ms ║╚Execution stage complete. (36ms)
+272ms ║Setting up scheduled job for Sun, Jul 9 2017 @ 10:15:46 AM EDT (in 14.991s)
+289ms ╚Event processed successfully (288ms)

Will this simple piston work?
I had the turn on working fine now want to add
wait 10 min. & turn off
I am a rookie trying to figure things out.
Mike

You are complicating things too much. When do you want the light off, 10 min from contact open or 10 min from contact closed? Use a Wait… task followed by the turn off in either the then or the else (depending on what you want). If you want 10 min from open just add a wait and a turn off after the turn on, but set the TCP of that with block to Never. But you most likely want 10 min after close.

10 min from open will work.
just want outside lights to come on when I take the dog out & then turn off in 10 min.
Mike

Thanks. Appreciate the commentary.

I probably need to rethink some of my pistons and approach. I have moved quite a few Core pistons into webcore and undertook to redo the way they work at the same time. I think I’m moving too fast as the loops are likely causing me some issues.

I’d love for @ady624 to publish all of his own pistons so we can all better understand how the tools should be used to be ideal. Maybe a ‘Best of’ type thread for examples, I’ve been following the example thread and found neat ideas, including the use of loops - but pulling out exemplary examples and seeing how ady uses pistons would a great asset IMO.

2 Likes