HomeSeer HS-WX300 LED control

Hello All,

I received and installed the WX300 device as a switch today and in normal on/off mode it controls a chandelier. But I also made a rule where if I tap the top "button" twice it opens my garage door and tapping twice on the bottom "button" closes it (thanks to the help of bertabcd1234).

Now I would like to control the LEDs with this automation or if the garage door is opened by other means. Here are the scenarios I would like to achieve:

  1. If the switch is off and the garage door is opened I would like one of the LEDs to turn red and flash and stay red and flash for the duration that the garage door is open. Then turn off when the garage door is closed.

  2. If the light switch is on (normal mode all LEDs are on and white) that the designated garage door LED turns red and flashes when it is opened while the other LEDs are still white.

I only have a basic setup with my devices and have never used RM before. Any help/suggestions would be greatly appreciated.

tia

I’m not familiar with the HS-WX300, but can help you get started with the rule(s). There are multiple ways to do this. You could create 2 rules with a predicate related to the switch, or you could do an if condition. Because you always want one of the situations to occur, I will recommend the latter (if condition).

As a trigger, you will want: Garage door - Open
Then as a rule:
If Switch is off
Turn on all LEDs (there might be a command to make them flash red?)
Else
Turn on garage LED
Endif
Wait for event: Garage door closed
Turn off all leds

Does that help?

I'm writing this assuming that the status modes and LED control of the 300 series is the same as the 200 series. If not, then my apologies...

That's easy. Trigger= door opens.

If switch=off
then setstatusled(x,1,1)
Wait for condition: Garage door closed
Setstatusled(x,0,0)
exit rule, or do something else

This is what a similar rule -but with no if statement- looks like on my WD200 dimmers.

Unless something has changed, you can't mix normal and status modes. When you issue the 'setstatusled' command to control even just one status LED, the switch will go into status mode, and all of the normal mode LEDs will go dark (or as otherwise commanded by the commands in status mode.)

1 Like

Thank you for the suggestions JB & Sebastien.

I figured out how to set the trigger in RM but when it comes to the action what do I choose?

You are correct JB that you can't have status and normal LED at the same time. Saw that on a HomeSeer video relating to the wx200 :smiley:

1 Like

The OP is using my driver, which I wrote to match what it looks like Hubitat does in their stock driver for this custom command, which would be something like:

setStatusLED("1", "red", "on") (this would be LED 1, color red, with blink enabled)

If you look at the setStatusLED() command in the driver, it will show you all the options you can use for this. All the parameters are strings, even though the first one is really a number...I'll probably add the ability to use a "real" number here since I see where that could be confusing. (I had to allow a string since that is what enum inputs--i.e., dropdowns--in Hubitat's driver UI uses for the data type, regardless of what kind of data it is.)

To turn it off, you do something similar but use "off" for the color (as you'll see in the UI as an option if you look). The third (blink) parameter doesn't really matter here since it s value won't matter if the LED is off, and you can leave it out since it's not technically required.

This is probably different from HomeSeer's custom driver (if they have one, or hasty ports from classic ST if not), but I haven't looked at that one in a while...

1 Like

To get to the setStatusLed command, from the drop down in your screenshot, select “Set Variable, Mode or File, Run Custom A…” which will allow you to choose “Run a custom action” and then from the list that will come up after you selected your device, you will select the “setStatusLed” command.

If I’m not mistaken, you will need to setup 3 “string” parameters as explained by @bertabcd1234.

Thanks guys.

I setup a practice rule to control an outlet/plug, to test the LEDs, by double tapping the switch. Does the below look correct because it's not turning on the 1st led red and flashing while the switch is on.

1 Like

Based on your last screenshot, it looks like you have only setup 1 parameter with 3 values.

To correct this, remove “,red,on” and press “Done with parameter”. You should then be given the option to add another parameter. Add “red”, repeat for “on”.

Thanks so much Sebastien, that did the trick. Also figured out how to revert back the LEDs to normal mode with all the LEDs back to white.

Thank you everyone for your help and expertise.

I wish all community forums were as helpful as this :smiley:

1 Like

The setNormalLEDColor("white", "true") command you used will work for that, as long as you know that if you were to set it to status mode again, the blinking red LED would still be there (i.e., this doesn't clear any of that out--just sets it to normal mode rather than status mode, so you can't see it).

That could be what you want.

If not, turning "off" all stautus LEDs will also revert the display to normal mode. The HomeSeer manual makes it sound like this happens automatically on the device, but my guess is that this is just what HomeSeer's own software does with the device; in my testing, I had to do it manually. So, I made the driver set it back to normal mode if all the status LEDs are off (and to status mode if any get turned on), presumably matching what a user might expect. Just another option if this is what you are really after. :smiley:

Yes, this is what I'm after. I thought the way I did it was "clearing it out" and reverting to normal mode. Yet I was just "masking" it.

How would that rule/string look like to turn off all status LEDs?

Also with the setNormalLEDColor("white", "true") that I used, it was when the switch was on. But if it's off and the red LED is on and blinking would turning off all status LEDs place the switch in normal mode too? Does that make sense??...lol I've been playing around with this too long and it's 3am here :crazy_face:

You would have to do each LED individually; there's nothing that will get all 7 at one time. (Or you could just handle setting/reverting each as the actual event that the LED corresponds to happens--that's probably what I'd do, then you'd be unlikely to have a reason to just "un-set" them all at once.)

Yes, the LEDs should revert to normal mode when all status LEDs are not set, regardless of whether the switch is on or off. (Though if it's off, this would likely result in none of the LEDs being on anymore, so if all of your status LEDs are also off, the visual difference could be nothing.) That being said, if you notice any oddities, it's possible I missed something in the driver, so let me know. :smiley:

That's a little tideous if you happen to change all 7 LEDs..ugh..lol

So since I just changed the one LED to red for the automation/event would turning it off look like setStatusLED("1", "off", "off") after the wait rule and that would change it to the normal operation mode with all LEDs white or off depending if the switch is on/off?

Yes, if you only set one LED with a status, then turning off that status would result in no more statuses set, and then the driver will revert the LEDs to normal mode. So if that's all you set, that's all you have to un-set. The command you wrote above will work for that (though you technically don't need the third parameter; blink is optional in general but not particularly useful if you're un-setting the status LED anyway).

And, as you know, you can also just revert the LEDs to normal mode at any time (a setLEDMode("normal"), for example), though that won't un-set any status LEDs on its own, so next time you switch back to status mode, they'll still be set to whatever status they were before. Sounds like you didn't want this above, but just throwing it out there in case it's useful in other cases.

Thanks Robert.

I tried both scenarios setStatusLED("1", "off", "off") and setStatusLED("1", "off"). It seems like the device only works with the first one as the light stays on and blinking if the latter is used.

Hmm, I'll have to look into why that is. What the driver reads for this is the state variables that you can see on the device page: statusled1 through statusled7. If all are 0, then they are assumed to be off (that's what this value should mean for any individual LED), and when the driver detects this, it switches the LEDs to normal mode. If state on the device page isn't showing this for some reason, then I don't know why--but it would explain the problem. (Note that state does not dynamically refresh, so you'll have to reload the page in the browser after making any changes that might affect these.)

The other possibility is that the switch firmware itself automatically switches to (or stays in? even though I should be changing it...) status mode if any part of the "blink" parameter (i.e., something for any LED) is not 0. I haven't tested it enough to see if that's the case...

Download the Hubitat app