Light wont turn on for very simple piston


#1

I’ve have a simple piston that used motion (when active) to turn on a light. It fails to turn on the light. I have never gotten a light to turn on.

Here is snapshot:

The motion sensor operations another light so I know it works correctly (using basic smartthings functionality and not webcore).

I’ve looked around and it SHOULD fire when motion detector show active but it will not. Please advise.

Freddy


#3

I think you want “Changes to active” as that’s a better trigger (and a more immediate one).

Also, I’m a fan of logging things to the debug window…so you can add Log commands to sew what’s happening.

Lastly, if you’re having problems with a piston, make it as simple as possible. So lose all the stuff at the end about “only while Home, Away or Night”. Just let it run all the time then put that stuff back later.


#5

Thanks for your input. This is fairly simple compared to what I have in mind once I get this running. BTW, I did as you suggested…light still fails to come on.

Any other ideas? Is this a bad installation or should I consider ripping out smart app and starting over? Thanks.

Freddy


#6

Turn on logging to full. Re-run your tests and post both the piston and the logs. We’ll figure it out.


#7

In the absence of any triggers conditions will act as triggers.

Great write up about this here.


#8

Here are logs (logging full):

1/7/2018, 12:11:06 PM +690ms
+10ms ╔Starting piston… (v0.2.0ff.20171129)
+373ms ║╔Subscribing to devices…
+426ms ║║Subscribing to Ecolink Motion Sensor.motion…
+512ms ║║Subscribing to Side Light…
+514ms ║╚Finished subscribing (157ms)
+688ms ╚Piston successfully started (682ms)
1/7/2018, 11:51:35 AM +457ms
+7ms ╔Starting piston… (v0.2.0ff.20171129)
+279ms ║╔Subscribing to devices…
+314ms ║║Subscribing to Ecolink Motion Sensor.motion…
+395ms ║║Subscribing to Side Light…
+396ms ║╚Finished subscribing (134ms)
+515ms ╚Piston successfully started (514ms)

Looks to me like trigger and/or condition never triggers…


#9

In the ST app on your phone, under the motion detect recently tab, do you see the motion detector detecting motion.
As good a place as any to start.


#10

everything on phone works correctly supporting that sensor is doing its job. Further testing shows that webcore isnt triggering/logging. I tried another device (light switch) and using webcore to send SMS to my phone (does not work and wont log the trigger).


#11

There is something more basic incorrect or improperly setup…I literally cannot get anything to work.


#12

OK. So motion is being seen in the recently tab for your motion sensor.
Import this piston using the code shown.
Delete the Lux statement in the IF.
If your bulb does not dim, then replace the set level with a TURN ON.
See if it works OK.


#13

Does not trigger. :frowning: There is log produced either.


#14

Hmm. That doesn’t make sense.
This is a simple working piston.
From your logs above we can see it subscribe your Ecolink Motion Sensor and Side Light so if there is motion there should be something in the logs.
Not sure what else to suggest.
You are seeing motion in the recently tab but it does not report to webCoRE.
Any of you @webCoRE_Minions got any suggestions? I was going to go down the delete and re-install of webCoRE. Bit drastic though.

EDIT: Go into the IDE and oopen live logging. Then trigger your motion sensor.
You should see something for your motion sensor.


#15

you ar on to something. Look at first line below:

2:04:41 PM: warn ║ Kill switch is active, aborting piston execution.
87d939a9-5943-4754-a06e-232fe77aa703 2:04:41 PM: debug ║ RunTime Analysis CS > 17ms > PS > 123ms > PE > 14ms > CE
87d939a9-5943-4754-a06e-232fe77aa703 2:04:41 PM: info ╚ Received event [Floor Light].switch = off with a delay of 591ms
2b7fef7f-ed68-4e48-b74c-7c3ab6b3dff4 2:04:32 PM: trace getPhrases(), state.welcomeIssue = null
2b7fef7f-ed68-4e48-b74c-7c3ab6b3dff4 2:04:31 PM: trace getPhrases(), state.welcomeIssue = null
2:04:14 PM: info Waiting on events…


#16

Do you have other pistons that could interact with this piston.
Must admit I’ve never seen this before.


#17

See if Disable All Pistons is on in webcore settings?


#18

No interaction whatsoever…just starting out and testing this smartapp.


#19

OMG…I feel pretty small right now…Toggle was turned to disable on phone.

Thanks guys!


#20

Got it sorted that is all that matters.
I’ve learned something today as well.
I now know what “Kill Switch Is Active” means. :smile:


#21

I have some pretty sophisticated scripts and best of all, THEY WORK! Thanks again guys.

Freddy