HS-WD200+ Status LEDs


#1

1) Give a description of the problem
I’m having issues where the LEDs aren’t always set correctly. Sometimes the status may get set incorrectly or they will be flashing with the wrong color or solid with the wrong color. I’m making an assumption this is some kind of communication issue between Smartthings and the switch causing inconsistent StatusLed settings.

2) What is the expected behaviour?
What I would like to happen is every 10 minutes webCORE checks the status of the Deadbolt and sets the correct StatusLed or if the Deadbolt is locked or unlocked then it sets the StatusLed right away.
Locked=Green Solid LED
Unlocked=Red Flashing LED

3) What is happening/not happening?
The StatusLed is being set in an inconsistent manner possible due to a communication issue.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
12/5/2019, 8:10:35 AM +182ms
+0ms ╔Received event [Home].time = 1575555035491 with a delay of -309ms
+178ms ║RunTime Analysis CS > 41ms > PS > 84ms > PE > 52ms > CE
+180ms ║Runtime (37968 bytes) successfully initialized in 84ms (v0.3.110.20191009) (179ms)
+181ms ║╔Execution stage started
+207ms ║║Comparison (enum) locked is (string) locked = true (2ms)
+209ms ║║Condition #2 evaluated true (13ms)
+210ms ║║Condition group #1 evaluated true (state did not change) (14ms)
+212ms ║║Cancelling statement #5’s schedules…
+1941ms ║║Executed physical command [Living Room Lights].setStatusLed([2, 2, 0]) (1719ms)
+1942ms ║║Executed [Living Room Lights].setStatusLed (1722ms)
+1945ms ║╚Execution stage complete. (1764ms)
+1946ms ║Setting up scheduled job for Thu, Dec 5 2019 @ 8:20:35 AM CST (in 598.363s)
+1956ms ╚Event processed successfully (1955ms)


#2

You might need to use serSwitchModeStatus() before each color change. It’s been awhile since I set mine up but I seem to recall that being recommended.

Also, instead of 1 timer why don’t you use a trigger of “lock status changes”?

I have 4 lights. 4 (top one) is “everything is closed” OR “there is an active weather alert”. 1-3 are present status so I know who is/isn’t home. I have several triggers and rebuild all 4 lights when any of them change. No timer.


#3

Agree with milhouse. I have to setSwitchMode Status(), then statusSetLED(x,x,x) to get the LEDs to work.


#4

I’ll give the setSwitchMode Status() a shot but the reason I added a timer was so it would constantly check the status of the door to set the LED correctly since it seemed to be only setting it half way.

This is what I originally was using before I tried to implement a constant status check.


#5

What about trying…
If lock changes to locked
Then
Set to solid green;

If lock changes to unlocked
Then
Set to Red flashing;

This way, the piston only fires when there is a change of state in the lock.


#6

I like @Pantheon’s idea, with one small addition to catch errors:

IF lock changes to locked   <-- Trigger
Then
    Set to solid green
ELSE
    IF lock is unlocked     <-- Condition
    Then
        Set to flashing red    (door is unlocked)
    ELSE
        Set to flashing orange (catches any other status)
    END IF
END IF 

When creating this, please be careful with the indents and the ELSE blocks…


#7

@WCmore, I see the logic here with just one trigger versus two in my suggestion. And I totally knew you would add something to catch the errors. :slight_smile:


#8

I have mine set so that “all doors closed” is the trigger. That way, the only lights that are on are the indicators (blue = all good, because it’s not very bright) The first light is doors (different colors for different doors.) Next will be windows, then motion detectors, etc.

I’m going to make homemade lock/unlock detectors, and the lights will flash when a door is unlocked.