[RELEASE] HomeSeer Wall Switch HS-WS200

This is a device handler for the HomeSeer Wall Switch (HS-WS200+).

All Features are fully functional with Automations and all the built-in apps, but until Custom Capabilities are fully supported and all of their known bugs have been fixed you’ll need to use the Workaround Child Devices with those SmartApps.

Features

  • Switch

  • Button Actions:
    down, down_hold, down_2x, down_3x, down_4x, down_5x, up, up_hold, up_2x, up_3x, up_4x, up_5x

  • LED Mode
    Normal LED Mode(load) / Status LED Mode (custom)

  • Normal LED Color
    white, red, green, blue, magenta, yellow, cyan

  • Status LED Color
    off, red, green, blue, magenta, yellow, cyan, white, blinking red, blinking green, blinking blue, blinking magenta, blinking yellow, blinking cyan, blinking white

  • Status LED Blink Frequency
    You can only change it from the settings, its child device, or WebCoRE because of a bug in custom capabilities

Workaround Child Devices

  • Requires the optional Child Device Handlers

  • There’s a setting for each child device that determines if it gets created.

  • Normal Mode:
    Switch On: Normal Mode | Switch Off: Status Mode | Color Control: Sets Normal Mode LED Color

  • Status Mode LED Color:
    Switch On: Restore Last | Switch Off: LED Off | Color Control: Sets LED Color

  • Status Mode Blink Frequency:
    Switch On: Restore Last | Switch Off: Disable Blinking | Dimmer Level: Sets Blink Frequency (1=100ms, 2=200ms, etc.)

   


HomeSeer Wall Switch

            

   


Child Device for Changing LED Mode and Normal LED Color

   

   


Child Device for Changing Status LED Blink Frequency

   


Child Device for Changing Status LED Color

   


   

Device Handler Code

   


   

Optional Child Devices

This is great, Kevin. Thanks. is there any way I can get the blink frequency to also apply to the LED in Normal mode?

The device doesn’t support that.

Thank you for your work here, Kevin! I am a huge fan of this switch and previously controlled its LEDs with webcore. That broke at some point along with my triple click feature, so I moved to your device handlers. Can you please let me know?..

-If you have any tips for WD200+ that is not always reporting on state correctly? I can control it perfectly, but it retains on state when I turn it off at switch.

-I’ve added the child device handlers to control LEDs. I created the Normal mode child device, tests good. I can also see the Status Mode Blink Frequency. But I do not see the LED child devices. I have respective Color Child app published, but no dice.

Thank you again in advance; have a great week!

Jeff

Remove // from the log.trace line at the bottom of the code, open live logging, physically turn it on or off, wait about 5 seconds, physically do the opposite, wait 5 seconds, and then post the live logging data.

That will show whether or not the handler is getting any messages from the device when it’s controlled physically.

Now that automations supports custom capabilities I think the LED related functionality is exposed through the parent device so the child device workarounds shouldn’t be necessary, but I haven’t tested that myself so I could be wrong…

@krlaframboise Thank you for the DTHs! I have been having super annoying issues with all my Homeseer devices crashing (they freeze up and only a power cycle will restore them). I switched to your DTHs to see if the issue would go away but it is the same. Supposedly it is due to excessive traffic causing the device to stop responding. Anyhow, I have a couple unrelated issues I wanted to run by you:

  1. I have an automation where my kitchen counter lights turn on and off based on motion and a few other things. When I switched to your DTH the lights started not turning on and I found that the ST app sees the dimmer as ON when in reality it is OFF. If I press OFF, then the automation turns them on properly. After weeks of this issue, I switched to the ST generic zwave DTH and it works perfectly again. So, to recap, the light is off, but the ST app thinks it is on, therefore the webcore automation does not work.

  2. I have a webcore automation that triggers the leds to turn on based on something happening in the house. With the previous DTH, I could turn blinking on only at night to catch my attention. With your implementation of this feature I would have to change the color from say “red” to “blinking red” at night unless I misunderstood the code. I wonder whether I can use “blinking red” with blink frequency 0 and just change that to 500 at night. Even if this works though, it would still bug the OCDness in me.

I am aware the current piston just sets the blink frequency to 500 at night but the colors used are the non blinking ones so in effect nothing changes. Before I start reworking the code to switch to the blinking colors at night, I was hoping there was some nicer solution.

Thoughts?

Please open the device’s details screen in the idea and post what’s shown next to Raw Description.

Am I correct to assume that you posted this to the wrong topic and you’re actually using the Dimmer handler with that device?

Apologies, yes, the issue is with a dimmer… the WD200.

This handler was tested by HomeSeer and myself and we didn’t run into any issues with the reliability of the on/off reporting so that might have something to do with changing handlers instead of re-joining the device.

You should be able to leave the individual leds on blinking red and toggle the master blink frequency between 0 and 500.

This was written when custom capabilities were buggy and only partially supported which is why it has all the child work arounds and the implementation isn’t as clean as I would have liked.

That being said, I noticed that your pistons are looping through all the LEDs, but that shouldn’t be necessary using my handler.

I actually excluded, reset and included the dimmer with your DTH being the only one installed. As mentioned prior, if I swap the DTH with the generic ST one, it works properly (ST app shows proper off status so the piston is able to turn it back on when needed).

As for the led notification piston, it loops all my notification devices and for each device it loops for each led, however my intention was for it to only send commands to the devices when the updated table shows that a value has changed. Did I do this incorrectly and I am sending a zwave command for each led on each device?

@JDRoberts I think you have these super powers… Would it be possible for you to move the last few posts to the WD200 related thread? I mistakenly posted in the WS200 thread and am now derailing the thread.

Sorry, I’m not (and don’t want to be) a moderator. Just an active user.

If you flag your own post and write a note, one of the moderators will see it and can do the move for you.

1 Like

@krlaframboise In the post just above mine, @manicmods appears to be talking about a similar issue. In my case it would appear that the issue is when webCore turns the dimmer off the status is not reflected in the ST app. In fact, one way for me to restore it is to turn it on and off manually at the switch.

Keep in mind you’re on the wrong topic and the issue that user reported was that it worked fine when controlled in ST, but the status didn’t change when physically controlled which sounds like the opposite of what you’re seeing.

I’m going to respond on the other topic…

1 Like