Front Porch w/ Contact Sensor Issues


#1

1) Give a description of the problem
So this piston worked a while ago. It used to turn the light on when the contact sensor opened and then I changed it to set the level to 100%. Now I want to keep the light on and dimmed for the evening and then light it up to 100% when the door opens, there’s another piston to dim it back down.

2) What is the expected behavior?
Contact opens -> light level changes from 30% to 100%.

3) What is happening/not happening?
Watching the trace, I see the trigger executes but the Then does not.
Also if I turn the light all of the way off, and I open the door the light DOES set the level to 100% and turn on.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
5/13/2018, 9:57:55 PM +553ms
+1ms ╔Received event [Front Door Contact].contact = closed with a delay of 402ms
+164ms ║RunTime Analysis CS > 20ms > PS > 84ms > PE > 60ms > CE
+166ms ║Runtime (37769 bytes) successfully initialized in 84ms (v0.3.104.20180323) (164ms)
+167ms ║╔Execution stage started
+178ms ║║Comparison (enum) closed changes_to (string) open = false (0ms)
+179ms ║║Cancelling condition #5’s schedules…
+180ms ║║Condition #5 evaluated false (6ms)
+181ms ║║Cancelling condition #4’s schedules…
+182ms ║║Condition group #4 evaluated false (state changed) (8ms)
+183ms ║║Cancelling condition #1’s schedules…
+184ms ║║Condition group #1 evaluated false (state changed) (11ms)
+186ms ║╚Execution stage complete. (19ms)
+188ms ╚Event processed successfully (187ms)
5/13/2018, 9:57:49 PM +819ms
+1ms ╔Received event [Front Door Contact].contact = open with a delay of 363ms
+140ms ║RunTime Analysis CS > 24ms > PS > 61ms > PE > 55ms > CE
+143ms ║Runtime (37775 bytes) successfully initialized in 61ms (v0.3.104.20180323) (141ms)
+144ms ║╔Execution stage started
+155ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+157ms ║║Cancelling condition #5’s schedules…
+158ms ║║Condition #5 evaluated true (7ms)
+189ms ║║Comparison (time) 79069978 is_after (time) 1526256300000 = true (6ms)
+190ms ║║Time restriction check passed
+192ms ║║Condition #6 evaluated true (33ms)
+193ms ║║Cancelling condition #4’s schedules…
+194ms ║║Condition group #4 evaluated true (state changed) (43ms)
+195ms ║║Cancelling condition #1’s schedules…
+196ms ║║Condition group #1 evaluated true (state changed) (46ms)
+199ms ║║Cancelling statement #2’s schedules…
+342ms ║║Executed physical command [Front Porch Light].setLevel([100]) (138ms)
+343ms ║║Executed [Front Porch Light].setLevel (140ms)
+346ms ║╚Execution stage complete. (203ms)
+347ms ╚Event processed successfully (347ms)

–Edit–
Looks like it’s setting the level properly. Not sure what’s up. Maybe device… Odd it works when it’s off and I open the door.


#2

It looks like it is working correctly. The first log at 9:57:49, the front door opened and the light got set to 100%. The second log, at 9:57:55 is the front door closing. What are you actually seeing the light do? The piston looks like it’s working correctly. You are subscribed to the events of the contact sensor. Your conditions are true when the door is opened and false when it gets closed.


#3

Yes it’s very odd. I’m seeing it not set the level to 100%.
If I manually set the level to 100% it works.
If I turn the light on and let this piston execute, it works as well.
Very strange, might be the device handler. It is an IKEA bulb with a community device handler.
Works manually though so my get tells me it’s fine.


#4

Are you sure the bulb actually goes to 100% and not 99%? I have a couple dimmers that don’t truly go to 100%. They stop at 99.


#5

Good idea. I tried changing it to 99% to no avail. Interestingly I hadn’t been checking the app. The app thinks the light is at 100%. Maybe it is a device handler thing… That stinks.


#6

So miraculously, it just started working. And it keeps on working…
I don’t think I really did anything. I did set it to 99% like you were thinking then back to 100%.
I wonder if it’s just a fluke… Oh well, all is well that ends well I suppose.
Thanks!


#7

Now it stopped working. I don’t get it…