NEW: Aeon Home Energy Monitor v2 Device

To get all the data, you need to do push the Reset tile within the app to configure the HEM to send more data, which you probably cannot do if the app crashes Android. i wish i could fix the app, but the problem is in fact with the SmartThings app for Android.

Sorry

Having some trouble installing the custom SmartDevice. I added the Aeon Home Energy Monitor into my network, it found the default entry from SmartThings and I can see the power readings just fine. I created my own SmartDevice, using the GitHub code from this thread, saved and published it. I then went under ‘My Devices’ and edited the device, changing it to the new SmartDevice I created. The problem is, on my App the tile switches to a big question mark ? and there is no settings or functionality. If I switch the device type back to the default SmartThings Aeon Home Energy Monitor, it starts working again.

Screenshot:

Any idea how to resolve this? What’d I do wrong?

Android? Word is that the HEMv2 device doesn’t work on Android due to ST implementation issues.

Try opening the App and pushing the RESET tile and see if that corrects things.

It’s funny, at first the tile looked normal but then would give me a fault when I clicked on the gear. Now it’s like xcguy picture above where is has no gear and a question mark . . . weird

Too bad Smartthing doesn’t have a command line where I could manually send the reset command. maybe there is a way to make an app to send commands?

Come to think of it, sometimes that Icon is thrown when some preference setting is missing or out of bounds - you might double check.

The app does try to reconfigure whenever you change preferences, it just doesn’t seem to be 100% reliable (configure() doesn’t always get called for some reason).

Same problem here. Big question mark. I’m using Android too. Has anyone found a solution?

I’m using ios8 on my iphone6 and also get the big question mark…

I’m currently running the V1 with SmartThings code. I like this version better but I’m getting the question mark also. In IDE I get the following error. Any ideas?

As it appears you’ve cut about 150 lines of code from the original file (your line 264 is my line 418), double check that you aren’t missing the preferences definitions for kWhCost …

I guess I should have included more information in my post. I’m running Slowfoxtrot’s edited version for the HEM v1 . I’m also running on a droid. I reposted the code and I’m not getting the error anymore. Now I just get a question mark with gear in IDE and a question mark no gear in the app. When I click the gear in IDE the information shows as it should. I read the colors can cause issues on the droid. I’m going to play with the code a bit and see what I get. Thanks for the help.

Hi Jody,

Do you have working code for the Aeon HEM V1 hardware? After the update a couple of months back, I now just get a ? mark with no gear icon when looking at my “things”. It’s still logging data correctly when I look at the developer login, but there’s no way to reset it each month.

Any ideas?

Thanks!
Derek

Hi PsychoBob – did you have any luck? I’m also running the HEM v1 and am still getting the question mark (?) with no gear icon whatsoever.

Any ideas?

Thanks! - Derek

I can take a look at this, when I moved I left my HEM in the breaker box at my old place. I need to retrieve it and get the code going again.

1 Like

Okay, no worries as that sounds like a ton of work. But if you ever get around to it, I’d love to hear your feedback.

Thanks! Derek

1 Like

I found another version that I modified and it works very well. I’m travelling this week and left my laptop on the job site but I will post tomorrow morning. The device type I’m using is only logging kw, kwh, and cost. I’m using grovestreams to log the data.

1 Like

Sounds good, look forward too seeing if it will work with my HEMv1 as well. Tks in advance, Derek

1 Like

Can’t wait to get this to work!!! lol

Here Is the version I modified. It’s basically the SmartThings version with added cost and modified reporting. It reports every 20s. It reports kW, kWh, and Cost. I use the grovestreams smartapp to collect the data.

/**
 *  Aeon Home Energy Meter V1
 *
 *  Author: SmartThings
 *  Modified by: PsychoBob
 *  Date: 2015-07-03
 */
metadata {
	// Automatically generated. Make future change here.
	definition (name: "Aeon Home Energy Meter V1 w/Cost", namespace: "PsychoBob", author: "PsychoBob") {
		capability "Energy Meter"
		capability "Power Meter"
		capability "Configuration"
		capability "Sensor"

        attribute "energyCost", "string" 

		command "reset"

		fingerprint deviceId: "0x2101", inClusters: " 0x70,0x31,0x72,0x86,0x32,0x80,0x85,0x60"
	}

	// simulator metadata
	simulator {
		for (int i = 0; i <= 10000; i += 1000) {
			status "power  ${i} W": new physicalgraph.zwave.Zwave().meterV1.meterReport(
				scaledMeterValue: i, precision: 3, meterType: 4, scale: 2, size: 4).incomingMessage()
		}
		for (int i = 0; i <= 100; i += 10) {
			status "energy  ${i} ": new physicalgraph.zwave.Zwave().meterV1.meterReport(
				scaledMeterValue: i, precision: 3, meterType: 0, scale: 0, size: 4).incomingMessage()
		}
	}

	// tile definitions
	tiles {
		valueTile("power", "device.power") {
			state "default", label:'${currentValue} W'
		}
		valueTile("energy", "device.energy", decoration: "flat") {
			state "default", label:'${currentValue}'
        }
        valueTile("energyCost", "device.energyCost", decoration: "flat") {
            state "default", label: '${currentValue}'
		}
		standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat") {
			state "default", label:'reset', action:"reset"
		}
		standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
			state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
		}

		main (["power","energy","energyCost"])
		details(["power","energy","energyCost", "reset","refresh", "configure"])
	        }
                preferences {
                     input "kWhCost", "string", title: "\$/kWh (0.16)", defaultValue: "0.16" as String
                }
}

def parse(String description) {
	def result = null
	def cmd = zwave.parse(description, [0x31: 1, 0x32: 1, 0x60: 3])
	if (cmd) {
		result = createEvent(zwaveEvent(cmd))
	}
	log.debug "Parse returned ${result?.descriptionText}"
	return result
}

def zwaveEvent(physicalgraph.zwave.commands.meterv1.MeterReport cmd) {

    def dispValue
    def newValue
    
	if (cmd.scale == 0) {	
        newValue = cmd.scaledMeterValue
        [name: "energy", value: cmd.scaledMeterValue, unit: ""]
        dispValue = String.format("%5.2f",newValue)
        sendEvent(name: "energy", value: dispValue as String, unit: "")
        state.energyValue = newValue
        BigDecimal costDecimal = newValue * ( kWhCost as BigDecimal)
        def costDisplay = String.format("%5.2f",costDecimal)
        sendEvent(name: "energyCost", value: "\$${costDisplay}", unit: "")
    }
    else if (cmd.scale == 1) {
        [name: "energy", value: cmd.scaledMeterValue, unit: "kVAh"]
    }
    else {
        [name: "power", value: Math.round(cmd.scaledMeterValue), unit: "W"]
    }
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
	// Handles all Z-Wave commands we aren't interested in
	[:]
}

def refresh() {
	delayBetween([
		zwave.meterV2.meterGet(scale: 0).format(),
		zwave.meterV2.meterGet(scale: 2).format()
	])
}

def reset() {
	sendEvent(name: "energyCost", value: "Cost\n--", unit: "")
    return [
            zwave.meterV2.meterReset().format(),
            zwave.meterV2.meterGet(scale: 0).format()
   ]
}

def configure() {
	def cmd = delayBetween([
		zwave.configurationV1.configurationSet(parameterNumber: 101, size: 4, scaledConfigurationValue: 4).format(),   // combined power in watts
		zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 20).format(), // every 20s
		zwave.configurationV1.configurationSet(parameterNumber: 102, size: 4, scaledConfigurationValue: 8).format(),   // combined energy in kWh
		zwave.configurationV1.configurationSet(parameterNumber: 112, size: 4, scaledConfigurationValue: 20).format(), // every 20s
		zwave.configurationV1.configurationSet(parameterNumber: 103, size: 4, scaledConfigurationValue: 0).format(),    // no third report
		zwave.configurationV1.configurationSet(parameterNumber: 113, size: 4, scaledConfigurationValue: 20).format() // every 20s
	])
	log.debug cmd
	cmd
}
4 Likes

PsychoBob,

Worked like a charm! I’ve been looking for 6+ weeks for a version that works with the HEMv1 and also displays properly in SmartThings and allows me to reset the values/costs each month. You the man!

I already have GroveStreams setup as well so I should be good to go now. I’m dual routing the data to both PlotWatt and GroveStreams to see which one is easier to use in the long run.

Thanks again – I really appreciated it!
Derek

1 Like

Good deal. Haven’t heard of Plotwatt. May have to give it a try. Grovestreams certainly isn’t without faults.