I see your code used a “color” tile. Is the “color” selector tile documented ? I want to add a label to this tile but it isn’t working. I didn’t even know that tile existed. I hope it will keep working since it is undocumented
I have this code mostly working. Here is my beta device code.
thanks by comparing yours and mine figured out my problem the issue was the color fx can not have any line after the setconfig not even a log.debug… go figure… weird… I am posting the new version of fine as I got the color and brightness sliders working
Cool, actually the version you posted to me above had a lot wrong with it. You were passing the value of size 4 as a single BigInt instead of an array of bytes. That’s why I just started my device code over from scratch. I found too many issues in the copy above. The new copy you posted looks better but I think I will stick with mine and keep moving forward with it. I also find cut/paste from text file into ide makes a mess of the formatting
Did you see my question about the color tile ? I am not sure I like using it but I would like to know if it is documented anywhere. How did you find that ?
Actually I think aeon’s engineering spec is mostly spot on. I think the fact that you have to split the bytes into an array is a ST thing. I have written and modified a few drivers and have always needed to do this. In fact sometimes you have to take a large number and spit it into high and low order bytes. This one is easier because each byte is actually a different value so you can simply write [ red, green blue ] and it works.
here is my contribution. v 0.4 is current as of today.
support secure inclusion, brightness level changes, color control for the night light, led behavior switching, and a full readout of electrical properties and reporting interval.
There is really very little left to create parameters for. If anyone thinks I need to add an option to report based on thresholds which is set to do so by default, I can do that. It’s a pretty chatty device as is.
I am attempting to use the Smart Switch 6 (SS6) to provide a color indication of the state of my Smart Home Monitor (SHM). I tried using Smart Lights to do this based on modes, but it would not change the color of the SS6 no matter what I did.
Next, I installed Rule Machine to provide the control and programmed three rules to trigger on the three different states of the SHM, and the Action for each rule was to change the color of the SS6. In Rule Machine, the Action was “Set color for these bulbs,” and the SS6 showed up in the list of potential targets without any issues. The color of the SS6 light never changed when these were run. Just to double check, I programmed another rule to depend upon Condition instead of a Trigger for the SHM state, but this still would not change the color of the ring.
I can manually change the color of the ring in the Things view without any problem, but cannot seem to get any automation of the color change. I have the device in the “Nightlight” mode.
Anyone have an idea or found a way to make this work? I like the compactness and simplicity of using the LED ring as a system status indicator, and it feels like it should work somehow.
Thanks for your work. I have added my 2 smart switches as custom devices using your code. I am unable to change the LED color. Do I have to set the LED Behavior = 2 to change the color. Also does the configure button work within the ST app?
going through my messages… seems ST emails get lost in my sea of emails these days.
Yeah, the color change is only for the night light mode as @Ron says. As far as changing the color using a smart app, I have never tried to do it. Also my switch died mysteriously after having controlled my air purifier for quite some time. I blame it on my wife’s hair straightener and hair dryer which are on the same circuit… Perhaps Aeon didn’t built surge suppression into the units? I do have surge suppressors everywhere and even a whole home one on the panel… but… I digress.
I think what would need to happen is for a handler to be created inside the device type to receive and translate the color commands coming from the smart app. The reason you see it in your apps is because it has the capability “color control”. This ma create a bit of a false sense of functionality though. In my device type I take the RGB selector in the device screen and translate that to the RGB codes used in the configuration parameter that corresponds to the night light color. That was the cleanest way i could hack that into the UI. For a bulb, when you select the color and saturation and color temp, etc, it translates that into a Z-wave command class for color control and throws that at the bulb which in turn does the work… What we’d need is sort of the opposite here. Code that would parse the command coming in from the smart app and translate that into the configuration parameter like I’m doing now… so instead of an action / command from the tile, it would be parsing the command from the app. There should be some reusable code in the device type to accomplish that, but I could only test with my dimmer. Also making the time to do this is tough with current job / family obligations. Hopefully this helps someone else figure it out until / if I ever get to it.
Here’s my contribution as well, it is based on existing code. I’ve added a preference screen, allowing to set the param and time interval as well as other couple other switches. Brighness color level got fixed as well.
@Scott_Barton this should be possible. However, It doesn’t work for me either. The event passed in to the device handler does not contains the actual color value. Here’s what I’m getting in the setColor event map:
[switch:on, hue:25, saturation:100, level:80]. Notice there is no color in there. Based on this documentation, it should: http://docs.smartthings.com/en/latest/capabilities-reference.html
Seems like a SmartLight app bug or a ST hub bug at this point. Someone from smartthing could maybe comment on this one on why the color attribute is not being passed in.
Also, you might want to update my code, I’ve added a bunch of useful stuff in the parameters section.
I believe that is the color. What you’re looking for and not finding is the “hex” key in that map, but the Hue/Saturation/Level defines the color; H25/S100/L80 should be in the neighborhood of #CCFF99.
The color attribute is a map with the potential keys hue, saturation, hex, level, switch, which is consistent with the event map you are getting, except that it does not contain a k-v for “hex”. From context I am assuming that the k-v “level” is the “color” level component of a HSL tuple since there’s no reason to have a switch level value in a color map.
You may get some mileage from the pseudocode at this site with the caveat that ST gives you Hue as a percent value (0-100) not in degrees (0-359).