Hack for LED Notification Based on Alarm Status in Smart Things

I wanted my Red Series Dimmer LED notification bar to show different color if my Smart Home Monitor is in Armed or Disarmed. The problem I was facing was that when my Dimmer switch was used to turn off / on the light it is connected to, then my LED color would disappear and get changed to the default Blue. My hack to fix this is I created a webcore routine that fires when the switch is either turned off or on. In the webcore routine, I check and see what the status of Smart Home Monitor is and reset the color of the LED notification bar to what it should be.
The nice part of this hack is that I get the best of both worlds. I can for a short while see the Blue Notification bar while the light is manipulated, but then the LED notification showing the status of the alarm is returned after I am done working with the switch. Hope this helps folks struggling to get this done!

2 Likes

Thanks for passing this along! I had searched for a solution but all the information I found said it wasn’t possible to get the state of smart home monitor.

You could also set the LED Indicator Color parameter instead which would persist through button presses. It can’t do any cool effects but works if you just want the solid/dimmed color changed. I do this in home assistant to change the color based on recycling schedule.

Can you shed some light on how to set the LED indicator Color Parameter?

You set the zwave config parameter 13 to change the LED Indicator Color
Range: 0 to 255
Default: 170

I’m not sure how you do it in Smart Things but in home assistant, I have an automation that calls the zwave.set_config_parameter service and sets parameter 13 to a different value based on my town’s recycling schedule. Ex 87 is green, 170 is blue.

Then I use parameter 16 for blinking notifications when garage door is left open, water leak detected, etc.

There is a tool that someone linked in another thread that helps with mapping the color values but I don’t have it handy right now.

The calculator tool can be found here.

Would you mind sharing your piston? Thanks.

//
/* Update Front LED Status Bar After Switch is Interacted With */
/
/
/* Author : Kulvir /
/
Created : 1/24/2020, 10:13:48 AM /
/
Modified : 1/24/2020, 10:49:26 PM /
/
Build : 14 /
/
UI version : v0.3.110.20191009 */
/**************************************************************/

execute
if
Porch Light’s switch changes to off
and
Smart Home Monitor status is Armed/Away

  • add a new condition
    then
    with
    Porch Light (Notification 1)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
    if
    Porch Light’s switch changes to off
    and
    Smart Home Monitor status is Disarmed
  • add a new condition
    then
    with
    Porch Light (Notification 2)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
    if
    Porch Light’s switch changes to off
    and
    Smart Home Monitor status changes to Armed/Stay
  • add a new condition
    then
    with
    Porch Light (Notification 3)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
  • add a new statement
    end if;
  • add a new statement
    end if;
    if
  • add a new condition
    then
  • add a new statement
    else
  • add a new statement
    end if;
  • add a new statement
    end if;
    if
    Porch Light’s switch changes to on
    and
    Smart Home Monitor status is Armed/Away
  • add a new condition
    then
    with
    Porch Light (Notification 1)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
    if
    Porch Light’s switch changes to on
    and
    Smart Home Monitor status is Disarmed
  • add a new condition
    then
    with
    Porch Light (Notification 2)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
    if
    Porch Light’s switch changes to on
    and
    Smart Home Monitor status is Armed/Stay
  • add a new condition
    then
    with
    Porch Light (Notification 3)
    do
    Turn off;
    Turn on;
  • add a new task
    end with;
  • add a new statement
    else
  • add a new statement
    end if;
  • add a new statement
    end if;
  • add a new statement
    end if;
  • add a new statement
    end execute;
2 Likes

So I tried to cut and paste my piston but it did not paste well from Webcore. I hope you get the idea from my cut and paste above.

Was anyone able to get this to work in SmartThings? I’m trying to accomplish the same as the thread subject: “Change the LED bar color based on Alarm Status”.

To do this in a way that can be then controlled in the the ST app, I think the first step is to get the dimmer’s child device accessible as a separate stand alone device.

Does anyone have any tips or a walkthrough on how to do this?

To Inovelli: Your product and documentation are top notch!

1 Like

Once you set a notification via the switch’s settings, a child device is automatically created.

I did it with the child device. I published my webcore green screenshot here

Thanks for the fast response Bry!
I don’t see notifications listed in the switch’s settings in the ST app (like what @stu1811 shows). Am I missing something?

I did get my initial request working. I named the LED Lightbar child device in the ST api device handler web UI and and am now able to set specifically set it in webCoRE (I’m new to that and have only a little experience with the ST web API). From webCoRE I was able to key off of location mode changes and set the LED lightbar’s color to match armed states. It has a few chained operations, but it works.

Basically:

  1. SmartThings Home Monitor mode change → triggers automation that sets sets location mode to match (Disarmed, Armed (Away), Armed (Stay)) → Home, Away, Night modes
  2. webCoRE looks for location mode changes and sets the LED light color to match the mode.

It would be nice to be able to directly specify “if (something), set lightbar color” in ST app automations directly but I was able to address my initial request.

Again, great hardware, docs, and apparently community too! :slight_smile:

What device handler and version are you using? Can you copy and paste the first five lines please?

@jzibble Also did you enable the child device? There is a toggle at the bottom of the settings page. I’ll screenshot later.

This is for a child device for a notification. Those get created automatically. There is no switch in the settings for a child device for a notification, at least with the 9/21/20 handler. Those switches at the bottom are for other child devices. Did something change with the 2021 DH?

You’re correct, my memory failed me. Just the notifications in my screenshot. Had to open the app to verify.

I’m not using a custom device handler, maybe that’s the problem? The device type is “Inovelli Dimmer” and was auto selected when I added the device.

Should I add a custom device handler and set that as the type in the ST API for the already included Inovelli dimmer device?

Use this for the lzw31-sn. Or better yet add Inovelli as a repo. From the DH page select Settings, Owner=InovelliUSA, Name=SmartThingsInovelli, Branch=master. Then click update from repo. Select DH and click publish. Then go the device and change the DH.

Yes, you will do that in the SmartThings IDE (which is what I think you are calling the API). Which switch are you using?