Logs say lights are on, but they aren't

I made this piston through WebCoRE and tested everything before I left to run some errands and everything, to my surprise, was working perfectly. I came back, and my lights didn’t turn on in the garage, so it was a nice dark walk to my light switch. Below is my piston and also the “Recent” tab from my “Garage” dimmer bulb from the SmartThings app. Can someone help me determine why the piston and the Recent tab both say the light was on, but it clearly wasn’t?

Only thing I can think of is when I left to run errands, I told Alexa to set guard to away, which also sets the location mode to away.

The highlighted portion in the image below is the moment I got home and it said the switch was on but it did not actually illuminate my room. I noticed it was using 31% memory which is a lot for a piston, but that’s because it’s constantly checking if there’s motion or not once the piston starts. Is there a more efficient way to do this? Thanks ahead of time.

Garage Motion's motion is active

then

with Garage do

 Turn on;

 Set level to 100%;

end with;

if

Location mode is Away

and

Location mode stays away from Home for 3 minutes

then

if

Time is not between 10 minutes to sunrise and 10 minutes past sunset

then

with Lamp do

 Turn on;

end with;

end if;

end if;

Set location mode to Home;

 Wait 10 seconds;

if

Garage Motion's motion is active

then

 Execute piston "Home \ webCoRE \ Garage Motion";

end if;

else

with Garage do

 Turn off;

end with;

end if;

end execute;

it would be much easier to read if you posted an image of the piston. You can easily create one by clicking on the green camera above the piston.

one thing I notice… you may want to use “changes to active” instead of “is active”. By using “change to” will change it to a trigger (he yellow lightening bolt to the left of that field)

also, check out the webcore community forum at https://community.webcore.co where you can find lots of example pistons and some users who enjoy helping others build their pistons :slight_smile:

Thank you for the quick response. I changed the trigger. Here is the piston in a better view. Thank you for your help.

Update: Just changing it to “changes to” seemed to maybe fix it. All I know is the light just worked (on and off) when I walked to get a beer from my garage fridge LOL

yikes! now I see the potential for some issues… mainly the use of one IF block. and a couple of other areas that could be a problem. Post the piston on the webcore forum and there are some great users who will help you fix it up :slight_smile:

I am half asleep at this point LOL

1 Like