Aeon Smart Meter Switch 6 - Beta [ SmartThings Device Custom Release Beta]


(Ron) #1

I have written an initial beta for the Aeon Smart Meter 6 device.
This version of the Smart Meter plug has a led light surrounding the plug which can be modifed into several modes.

I have implemented these modes which are
Configure the state of red LED:
0= The LED will follow the status (on/off) of its load (Energy mode).
1= When the state of Switch’s load changed, The LED will follow the status (on/off) of its load, but the red LED will turn off after 5 seconds if there is no any switch action (momentary indicate mode).
2= Night light mode.

I have a single tile toggling through these modes.
0 = Energy
1 = Monent
2 = Night
(I need some nice icons for these modes which I have to work on)

I have also added a color selector which only works for the “Night” mode.
When in night mode you can select the color you want to use as your night light. Notice the circle in the middle of this selector which is the color which the aeon Smart Switch 6 will display. The slider at the bottom is important if you don’t slide to the right all colors look white.

I would like feedback on this beta so I can improve on it.

I need to add more options.

When the device is in “Energy” or “Momentary” mode there are three colors.
Purple - device off (can’t be changed)
Green - low power usage ( defaults to 50% brightness) I have hard coded my “configure” button to change this to 25%. I plan to make this a slider so you can select what you want.
Yellow - high power usage (defaults to 50% brightness) Again I have hard coded my “configure” button to change this to 25% and again I plan to make this a slider.
Red - Warning Power Level (defaults to 50% brightness) I hard coded this one to 100%, seems important :slight_smile: Again I will make this a slider.

I am still playing around with the other options available.

Here is what it looks like
On this screen the “NIGHT” tile is the toggle. It toggles between “NIGHT”,“MOMENT” and “ENERGY”

This is the color selector for NIGHT mode.
I wish the smart things app would let me show it ONLY when in night mode but we all know the app is extremely lacking in dynamic capabilities.


Aeotec Aeon Smart Switch 6
Color Wheel tile
(Eric) #2

Cool. Aeon/Aeotec makes a couple actual power meters, and this is a plug/switch so the name of this device should include the word “switch”.


(Ron) #3

Good point, will do…


(John Rucker) #4

Cool project. First question. I see your using the controlTile how are you getting it into “night mode”? I really like that “ring of color”!!


(Ron) #5

I need to make this more intuitive but the mode tile is a toggle. Just tap the tile and it switches between "Energy, Moment and Night. I chose to abbreviate the names because ST tiles don’t allow two lines of text anymore so the font gets tiny if too long.

I like the color wheel, but not sure I will keep it. You can’t set color #000000 (Black) for example to shut the colors off. Maybe when I add the brightness level I can get it to set 0 brightness and that would do the trick.


(Tim Slagle) #6

Nice job @Ron!

How often does energy report? Do you just poll it every X minutes?


(Ron) #7

Thanks, I have not added the configuration for the reporting. By default it is 3 min according to the engineering specs.
I would like to submit this to ST when it is done, do I have to code the simulator for it to be accepted ? I don’t really know much about doing that.


(Tim Slagle) #8

Give me a buzz when you want to


(Ron) #9

OK, let me clean up the code a bit. Thanks


(Ron) #10

I have been working with Aeotec support to find out why dimming of the nightlight mode isn’t working for this device.

They asked if I could supply the firmware versions by issuing a Version 2 Command Class Get. However I notice that the documentation from smartthings only indicates that Version V1 is supported.
https://graph.api.smartthings.com/ide/doc/zwave-utils.html

The page doesn’t display correctly so I was thinking perhaps it was not up to date. I contacted support and they asked me to post here with a tag to @duncan they said the V2 Manufacturer Specific Command Class should work but i have already tried that and it doesn’t return version. It returns cmd.manufacturerId, cmd.productTypeId, cmd.productId none of which helped Aeotec support identify the firmware version.
cmd: ManufacturerSpecificReport(manufacturerId: 134, manufacturerName: AEON Labs, productId: 96, productTypeId: 259)

I requested that Version V2 be added to the command classes supported by SmartThings. This seems to be the only way to get the firmware version from this device.


(Duncan) #11

Did Aeotec support mention Manufacturer Specific? We do support V2 of that, but I don’t see how it applies to firmware version.

The VersionGet command is the same in V2 as V1. If you send a zwave.versionV1.versionGet() and then paste the raw Z-Wave event that comes back (before it’s parsed as a V1 VersionReport) I can tell you what the firmware version is. I’d think you’d be able to tell the firmware version using V1 VersionReport (the parsing is all backwards compatible), but if they say you need V2 I guess you do.


(Ron) #12

@duncan No Chris P from Support told me that you said the Manufacturer Specific CC would work. I told them I had already tried that and it does not return version.

I checked in with my Z-wave software engineer Duncan, and he said that this V2 Manufacturer Specific Command Class should work, but would like to see a bit deeper what you are working on so he can better assist you. Would you mind posting on the community at community.smartthings.com and tagging him @duncan ?

Aeon Labs Support says I need to send V2 CC, I tried sending V1 but it doesn’t reply.

So am I just out of luck ? Or can this command class be added to our supported command classes ?


(Duncan) #13

There’s no difference between V1 and V2 VersionGet, so that wouldn’t be why it’s not responding. Also Z-Wave devices are required to support earlier versions of command classes.

I added zwave.versionV1.versionGet().format() to the refresh method of the code you posted above and ran it on my Smart Switch 6 and I got this in the live logs:

Z-Wave Switch: Unhandled: VersionReport(applicationSubVersion: 1, applicationVersion: 1, zWaveLibraryType: 3, zWaveProtocolSubVersion: 99, zWaveProtocolVersion: 3)
```

Which means mine is on firmware version 1.1

(Ron) #14

OK that is strange, I just uncommented out the code that wasn’t working and tried again and it did work this time. I didn’t change anything. Don’t know why that is…

I got back
cmd:VersionReport(applicationSubVersion: 1, applicationVersion: 1, zWaveLibraryType: 3, zWaveProtocolSubVersion: 99, zWaveProtocolVersion: 3)
Looks like we have the same version.

Thanks @duncan


(Ron) #15

@duncan

Since you have an Aeon Smart Meter Switch 6 would you mind testing your device code to see if you can get the Multilevel Switch Command Class to work ?

From the engineering specifications Multilevel Switch CC should allow setting the brightness of the night light.

5.6 Multilevel Switch Command Class
The Multilevel Switch CC is used to change the brightness level for the RGB LED when it is in Night light mode (configurable). It cannot be used to change the state of output load.

When I try the following nothing happens and nothing reports.

def brightVal = 25
delayBetween([
zwave.switchMultilevelV1.switchMultilevelSet(value: brightVal).format(),
zwave.switchMultilevelV1.switchMultilevelGet().format()
], 3500)


(Duncan) #16

No, it doesn’t respond and it also doesn’t report support for Multilevel Switch in its node info frame (look for 0x26 in the Raw Description). They must have added LED brightness in a later firmware version?

Can this device update over the USB port or does it only do over-the-air? Unfortunately we probably won’t get support for Z-Wave OTA for a few months at least as there are several higher-priority Z-Wave features.


(Ron) #17

@duncan I didn’t know about the raw description but found the details in the docs (yea better docs !) but how did you know to look for 0x25 ?

For anyone reading this thread the Raw Description is described here http://docs.smartthings.com/en/latest/device-type-developers-guide/definition-metadata.html?highlight=raw%20cluster

I think the firmware can be updated via usb, aeon-tec support said something about a zstick to upgrade. Not sure how it’s done though.


(Duncan) #18

You can find the hex codes of some of the most important command classes here: http://docs.smartthings.com/en/latest/device-type-developers-guide/z-wave-primer.html#command-classes
and the rest of them here: https://graph.api.smartthings.com/ide/doc/zwave-utils.html


(Ron) #19

OK feeling silly I use that page all the time but missed the column with the codes. Actually since I didn’t know about the Raw Description until today I didn’t know what they were used for anyway. Thanks for all the posts I can do a lot more on my own now that I understand this stuff better !


(Robert Vandervoort) #20

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.