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

Hello, I’m fairly new to all of this, and I have a couple of pistons that use “wait.” My trigger is a door sensor in this case, and when I open the door at night, I want my hall lights and my other lamp to turn on. After 60 (set at 5 seconds for testing) seconds, I want the hall light to turn off.

It always runs and turns on my lights, but seldom does it turn the hall lights out. Can anyone see anything wrong? Below is the log:

5/23/2017, 9:39:38 PM +323ms
+2ms ╔Received event [Test Sensor].contact = closed with a delay of 144ms
+313ms ║Runtime (32105 bytes) successfully initialized in 71ms (v0.1.0b0.20170523) (310ms)
+315ms ║╔Execution stage started
+488ms ║╚Execution stage complete. (174ms)
+575ms ╚Event processed successfully (575ms)
5/23/2017, 9:39:35 PM +269ms
+1ms ╔Received event [Test Sensor].contact = open with a delay of 76ms
+207ms ║Runtime (32108 bytes) successfully initialized in 75ms (v0.1.0b0.20170523) (205ms)
+209ms ║╔Execution stage started
+326ms ║║Executed [Hall 1].on (52ms)
+386ms ║║Executed [Hall 2].on (57ms)
+544ms ║║Executed [Sofa].on (155ms)
+600ms ║║Executed [Hall 1].setLevel (45ms)
+643ms ║║Executed [Hall 2].setLevel (42ms)
+685ms ║║Executed [Sofa].setLevel (40ms)
+739ms ║║Executed virtual command setLocationMode (44ms)
+759ms ║║Executed virtual command sendPushNotification (10ms)
+774ms ║║Executed virtual command [Hall 1, Hall 2].wait (3ms)
+777ms ║║Requesting a wake up for Tue, May 23 2017 @ 9:39:41 PM EDT (in 5.0s)
+907ms ║╚Execution stage complete. (699ms)
+961ms ║Setting up scheduled job for Tue, May 23 2017 @ 9:39:41 PM EDT (in 4.818s)
+1125ms ╚Event processed successfully (1125ms)

You are trying to turn off the light as a result of opening a contact. The way webCoRE works by default is to cancel any waiting tasks if the condition changes before the wait is done. In your case, closing the contact before the wait time is up causes the waiting tasks to be canceled. Normally, you’d want the lights out a certain time after the door closed, not after it opened, so i would move the whole with block that turns the lights off into the else section of that if. Enable moving of items (the up and down arrows in the top left toolbar) then drag the with - by clicking on its up-down icon in the gutter over the else section.

Alternatively, disable the Cancel on condition state change under the advanced options of the with block containing the wait (click on the word with and click the cog button in that dialog, set tcp to never cancel). First method is preferred though

1 Like

Chose the first option and it works perfectly! Knowing how condition changes cancels any waiting task was key! Thank you!!!

@ady624 Yes installed webCoRE Dashboard through IDE and published, which then has been showing up on My Smart Apps. Not thru marketplace app. Tried to Uninstall thru IDE Locations > … but after Uninstall once I click Done and refresh the page it shows up in the list again and does not get removed from Automation > SmartApps.

Thanks.

Is it possible to create a device list by combining text elements into a device variable. Please see failed example below.

I’m creating the string variable Var3 which matches an actual device. This works fine. I then try to set a device variable to that string. In some variations it works insofar as the variable is set; in the example below it does not (error is “Empty device list”).

If it’s possible, what is the syntax for setting the variable for use with a subsequent command?

concat(var1,var2)
will join strings together. Output should be beep

Why is the camera not disabling after 2 minutes?

I’m trying to create a piston that turns on lights once motion is detected. If no motion is detected for 20 minutes, I want it to turn the lights off. I’ve created the piston below and it turns the lights on no problem, however after 20 minutes it turns the lights off regardless of motion activity. Any thoughts?

Have you set up a test piston to see if the camera actually accepts the disable command? That would be my first troubleshooting step as the rest of your piston looks good to me.

Drop the Else If and just add the following under the Else. Cancel on piston change is on by default so it will keep resetting until the motion becomes inactive again.

Wait 20 mins
Turn off
1 Like

So like this? I also changed the timeout from 20 min to 10 min.

The wait 10 should be right above Turn Off inside the with. It looks like it should work as you have it but my ocd said, that’s not how it should look like!

Edit: Don’t forget, you can drag and drop!

2 Likes

@c1arkbar Thank you for the suggestion. I am able to concatenate the two strings into one that is the correct name of the device. See my new piston:

Var3 correctly is a string variable with the device name. I wasn’t able to use a string variable as a device, so I added the extra step of creating a device variable which I then set to the string variable. The logs show both are set correctly. My problem now is that the device with statement throws an error:

I truly appreciate OCD and those who subscribe to it. :slight_smile: I think I got it right. Cheers!

2 Likes

Not sure what I’m missing with this one. Hoping someone might have an idea?
Goal is to turn on the light when the door opens or motion is detected, but to a specific level depending on the current location mode. I started this with IF Switch is Off so that the light level doesn’t get reset each time motion is detected, only when it first turns on. Unfortunately it’s resetting the light level each time, so if I manually turn the brightness up, step away from the motion sensor for 30 seconds and come back, it changes the level back to what is programmed - even though the Switch was On.
Thoughts?

new at this so forgive me

how do I remove the “else”?
I can’t seem to drag anything…

Thanks

Sorry, your piston looked fine, that other comment was for another post. My suggestion though was to see if the ‘disable’ (line #27 in your picture) command actually works with the camera from within webCoRE.

I just setup a test piston… if the bedroom fan turns on turn off the camera… worked like a charm… so now we know the command works… just I don’t have it in the right spot yet I guess.

Cool, got a pic of your test piston, maybe we can spot the difference.

Thanks Robin, I’ll give that a shot.