Aeon Labs Energy Meter clamps

Don’t be so “sure” :wink:

I haven’t read of a SmartApp that I can recall, but try some searches. If you don’t find one, I’ll take a shot…x

@johnconstantelo wow, your device type is absolutely awesome. I’m glad I found it in this thread as there are a lot of community device types out there but it’s hazy at best to know which ones work good, have updated UI’s, and which are best for the v1 hardware versus v2. Thanks for your contribution as it totally fits the bill. A couple of questions for you:

  1. with iOS, the only text I see on the main screen is "Home is currently using XXXw."
    I see the following code that also mirrors what you show in your screen shot above:

statusTextmsg = "Home is currently using ${device.currentState('powerDisp').value}.\nMin was ${device.currentState('powerOne').value}.\nMax was ${device.currentState('powerTwo').value}."
That does show up in the “Recent” tab, so I can get that information there, but it would be nice to have it on the main screen like your screenshot.

  1. Clicking the “Configure” button does nothing, are there any settings other than kwh cost that I should be worried about (I can edit the kwh cost in the “edit device” menu, which works great.

Lastly, would you mind taking a shot at creating a smartapp to send a notification if the hardware itself switches from AC power to Battery power? My smartthings hub, modem and router are all on a battery backup UPS so I theoretically could get a notification in the house power goes out… I just need a “connected” device that can report on a trigger. Does this device send an event, or could it be done in the poll() to check if it is now on battery, and then be able to send a push or text notification?

Thanks again for the awesome work!

Maybe this code could be retro-fitted for the HEM v1 device? I could give it a shot, I just don’t know what the equivalent handlers or references for powerSource.battery and powerSource.powered that is called in this app would be for the HEM v1.

 *  Power Is Out
 *  Copyright 2014 Jesse Ziegler

    name: "Power Is Out",
    namespace: "smartthings",
    author: "Jesse Ziegler",
    description: "Alert me of power loss using motion detector's change from wired-power to battery-power. SmartThings hub and internet connection must be working! You can connect the hub and internet connection device (e.g. modem, router, etc.) to a battery backup power strip so that the motion detector and detect the loss and the hub and router will still have enough power to get the message out before they fail as well.",
    category: "Safety & Security",
    iconUrl: "",
    iconX2Url: ""

preferences {
	section("When there is wired-power loss on...") {
			input "motion1", "capability.motionSensor", title: "Where?"
	section("Via a push notification and a text message(optional)"){
    	input "pushAndPhone", "enum", title: "Send Text?", required: false, metadata: [values: ["Yes","No"]]
		input "phone1", "phone", title: "Phone Number (for Text, optional)", required: false


def installed() {
	subscribe(motion1, "powerSource.battery", onBatteryPowerHandler)
    subscribe(motion1, "powerSource.powered", PoweredPowerHandler)

def updated() {
	subscribe(motion1, "powerSource.battery", onBatteryPowerHandler)
    subscribe(motion1, "powerSource.powered", PoweredPowerHandler)

def onBatteryPowerHandler(evt) {
	log.trace "$evt.value: $evt"
	def msg = "${motion1.label ?:} sensed Power is Out!"
	log.debug "sending push for power is out"
    if ( phone1 && pushAndPhone ) {
    	log.debug "sending SMS to ${phone1}"
   	sendSms(phone1, msg)

def PoweredPowerHandler(evt) {
	log.trace "$evt.value: $evt"
	def msg = "${motion1.label ?:} sensed Power is Back On!"
	log.debug "sending push for power is back on"
    if ( phone1 && pushAndPhone ) {
    	log.debug "sending SMS to ${phone1}"
    	sendSms(phone1, msg)

@drshaw, this could be an issue between iOS and Android. Can you try replacing the line above with:

statusTextmsg = "Home is currently using ${device.currentState('powerDisp').value}.  Min was ${device.currentState('powerOne').value}.  Max was ${device.currentState('powerTwo').value}."

I removed the “\n” characters that causes the next to go to the next line, and maybe the iOS version of the app doesn’t handle that well.

The Configure button doesn’t do anything that you can visibly see right away. It configures the device for reporting options you can change in the code, like reporting frequency. Go to the last few lines of code and you’ll see what I mean.

As for a SmartApp, the device doesn’t report back if it’s on AC or battery power that I know of. Saying that, there’s a built in SmartApp from ST called Energy Alerts. You could use that to notify you of when usage falls below normal levels that could potentially indicate a power outage.

Hope that helps.

Thanks for the tip on “Energy Alerts”. I’ll definitely look into that.

Here is a before and after screenshot of your device type. The before is the default code, the after is with your change (removing the “\n” characters).



I want to think that the “\n” is successfully breaking the line, it just needs to start 2 lines up from where it’s currently starting :slight_smile:

By default it updates every 30 seconds… if I wanted to change that to every 15 seconds, I assume I’d change this line:

zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 30).format(),   // Every 30 Seconds

To this:
zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 15).format(),   // Every 15 Seconds

Then push “configure”?

Wow, what a difference between Android and iOS in terms of the overall quality, look ,and feel of that on your device. I’m a little embarrassed to show you what it looks like on Android (Samsung Note 4)

I like yours a lot, but not enough to switch to an iPhone :wink:

I knew there were differences between iOS and Android, but I don’t know how to work around that for you to make iOS behave like Android. Sorry about that. I’ll need some help from other Community members.

I need to look at Aeon’s documentation, but I believe that and the one below determine when to send updates:

zwave.configurationV1.configurationSet(parameterNumber: 4, size: 2, scaledConfigurationValue: 50).format(),     // Don't send unless watts have increased by 50

Here are 3 in a row for me. Times and values vary:

Yes! That app works like a dream to let me know when a power outage has occurred. I set it up to push me when usage falls below 50 watts, and tripped my service disconnect breaker. Your device type quickly reported 0 watts in use and I successfully received a push notification from the Energy Alerts smartapp.
Thanks for the tip!

As for how your statusText displays on iOS… I’ll play around with it and see if I can come up with a solution. Thanks again :wink:

1 Like

It’s not really elegant, but I decided to just create some additional tiles with the missing information:

As far as increasing frequency, this is what I came up with (below) Edit, see next post!. I wanted to adjust these because I noticed PlotWatt Logger by @brianwilson was only pushing readings every 2.5 minutes and in the Plotwatt documentation, they say in that they want it as frequent as possible (but not more frequent than once per second but not less frequent than once per minute), so I changed that other parameter below to 15 seconds as well. While I was at it, I changed the kwh update to 2.5 minutes. Do you think these settings are okay or are there caveats I’m not thinking about?

I was actually getting some Unhandled Events, so I decided to read up on the HEM v1 advanced documentation for these configuration parameters. Then I compared with other community device types for this v1 device, as well as v2 device types, and this is what I’ve come up with (below). This successfully makes @brianwilson’s great PlotWatt Logger SmartApp push readings every 15 seconds, it eliminates the Unhandled Events that your report group 3 was generating, and increases the frequency to report watts every 15 seconds, and kwh every 60 seconds (with more descriptive comments).

        zwave.configurationV1.configurationSet(parameterNumber: 3, size: 1, scaledConfigurationValue: 0).format(),      // Disable selective reporting, so always update based on schedule below <set to 1 to reduce network traffic>
        zwave.configurationV1.configurationSet(parameterNumber: 4, size: 2, scaledConfigurationValue: 50).format(),     // (DISABLED by first option) Don't send unless watts have changed by 50 <default>
        zwave.configurationV1.configurationSet(parameterNumber: 8, size: 1, scaledConfigurationValue: 10).format(),     // (DISABLED by first option) Or by 10% <default>
        zwave.configurationV1.configurationSet(parameterNumber: 101, size: 4, scaledConfigurationValue: 4).format(),   // Combined energy in Watts
        zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 15).format(),   // Every 15 Seconds (for Watts)
        zwave.configurationV1.configurationSet(parameterNumber: 102, size: 4, scaledConfigurationValue: 8).format(),    // Combined energy in kWh
        zwave.configurationV1.configurationSet(parameterNumber: 112, size: 4, scaledConfigurationValue: 60).format(),  // every 60 seconds (for kWh)
        zwave.configurationV1.configurationSet(parameterNumber: 103, size: 4, scaledConfigurationValue: 0).format(),    // Disable report 3
        zwave.configurationV1.configurationSet(parameterNumber: 113, size: 4, scaledConfigurationValue: 0).format()   // Disable report 3

Excellent update to the device type @drshaw, this is good to have this documented as you’ve written it up. Thanks for your contributions!

Good work around BTW. Try spacing out your 3 tiles to 2 tiles for the min/max row, or for all rows, to see how that looks.

Did you are any other events maybe undocumented volts it amps

@lgkahn , not sure what your question is, but this is for HEM v1, not v2 that provides Amps readings.

I know but I thought it might be sending amps and volts as well. The aein smart switch v6 was sending amps in congig report 5 even though it was only documented to have reports 1-3

1 Like

I don’t have much experience, but I’m not sure you can do width=3 height =2 in the new 6X Unlimited tile layout. I changed the width to 3, 4, etc… to no effect.

@drshaw, most definitely you can. The main tile must stay 6x4, but all the others can be any combination. Most of mine use 3x2 a lot just for symmetry. Here’s an example:

@johnconstantelo any plans to update the device type to support HEMv2?

Hi @darkoperator, I don’t have one to experiment with, but it would’t take a lot of effort to modify the HEMv2’s code to start using the new attributeTile features.

Woops, I was setting the width in the wrong order for the tile call (after the inactiveLabel directive). Changing the order around fixed that. Thanks for the suggestion, the tiles look better now.

edit: actually, I think the problem was me editing the device type via Safari on my phone and the “save” button not actually saving my edits. I’m no noticing some other changes I thought I made not having any effect. Back using a desktop browser now and re-applying those changes are working.

1 Like