Aeotec Aeon Smart Switch 6


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 :smile:

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 :frowning:

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 ?

Ya I know but I tried it that way too. I even tried size 3… the documentrarion says it us a long int… wish they could get the docs right. I found the color tile in one of the rgb light drivers.

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.


Thanks for the code Robert.

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.

As mentioned above, this device works with Smartthings (for me version 1 of the hub) using the Aeon Smart Energy Switch device type. Press action button labeled in the following manual and connect the device…

Adding the custom device should help, yes.


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?

color change only works in “nightlight mode” The other modes use colors to represent power levels and they are not changeable.

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.

@tobycth3. Here is that thread.

1 Like

Is it possible to change the LED color based on a trigger using SmartLights App?

I installed @jbisson DTH, but no luck figuring it out.

@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:

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 documentation is unclear, especially, around which attributes should be there and which one are optionals. Based on the documentation we should have 3 attributes: hue, saturation and color. Color Options should have: hue,saturation, hex, level, switch.

That being said, is there any helper function to contruct an RGB color value based on hue/saturation/level?

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).

@Scott_Barton I’ve uploaded a new version which addressed the bug.

seems to be working now. I’ve used colorUtil.hslToHex which seems to have worked quite well. However, I couln’d find any documentation around it, hidden util class?