Aeon Labs ZW095-A - Z-Wave Plus - Home Energy Meter Gen 5

@Jimxenus Thanks for the thought. No doubt the mains are in there, but the box is sealed with a tag by the local power company (likely to keep people from stealing power ahead of the meter?). I had thought about calling them for temporary access to install the HEM, but no too sure I want to deal with that.

I understand, I had an electrician put my HEM in and I’m pretty sure he went underneath that panel to access the mains. It’s dangerous underneath there so the seal is more likely used to keep people out of there for safety reasons.

Well that’s good information; perhaps I should phone the utility to ask. Much appreciated.

Trying to figure out what I have done wrong with the device handler code that @Dillon_Miller has kindly provided above.

I copied all of the code and created/published the device handler via the IDE. Seemed to be published and saved okay. Then I included the HEM5, which was successful, but it just shows up as a generic device (e.g. the mobile app shows and on/off icon with slider)?? Obviously I’m missing a setp here but cannot determine what it is?

TIA,
Shawn

Hi @ShawnInPaso,

If you used the code from post #12 above, and did not change the name, then in the IDE change Type to “Aeon HEM Gen5(zwave plus)” and leave Version as it is (Published).

1 Like

Thank you John for your help.

I failed to update my post by indicating I did change the name as you described (found it at the bottom of the list). It is at “published”. Still no data though. :frowning:

Well I am now getting data, but not all of it. Progress.

Shawn

Sorry all, I’ve been away for a while. @ShawnInPaso, be sure to hit the configure tile inside the Things list device display. You may also want to change the preferences such as your personalized cost/kWh or the reporting intervals. For most, the intervals are likely fine. However, the cost is critical or it’s kinda a useless field on the display tile list.

The configure button does more than it seems by just hitting it which is actually less than exciting in and of itself. However, this is an odd device class to say the least. It is both polled by the ST hub and also sends its own reporting data to the ST hub. So in that way, it’s both passive and active at the same time. It is passive in the sense that the ST hub will poll the HEM main class to get voltage and such which is a product of the power feeding the HEM unit from the wall plug. It is active in the sense that the device collects data from the clamps (over time) and then sends this data to the ST hub using the set preferences. If you don’t hit the configure button, you likely won’t ever see the clamp data.

In short, if you are seeing only partial data from the device, you may simply need to check your preferences using the upper right gear icon, then hit the big configure tile button and wait a bit.

1 Like

Hi @Dillon_Miller, thanks so much for your kind reply (not to mention the great code).

I have been hitting the config button and doing those other things you suggest (also based on your good notes in the code), yet still no clamp data. I have also been in touch with Aeon, mostly to inquire if this issue could be due to a hardware issue or perhaps because of the clamp placement. I did learn that the “right now” voltage (shown in the example below - I get the info circled in red) is taken from the wire that powers the device (not from the clamps).

I’ve watched the live logging a lot, and I do get the response when pressing the config button as expected. I also see the kw and kwh values being passed, but no voltage or current data.

Would you have any thoughts on the issue being with the clamps? Hard for me to imagine as the kw and kwh are being seen, but I am learning a lot with this device.

Much appreciated,
Shawn

Live Log Response form pushing the config button:
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 113 with a byte size of 4 is set to [0, 0, 0, 6]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug —ASSOCIATION REPORT V2— Energy Monitor groupingIdentifier: 1, maxNodesSupported: 5, nodeId: , reportsToFollow: 0
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 112 with a byte size of 4 is set to [0, 0, 0, 30]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:08 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 111 with a byte size of 4 is set to [0, 0, 0, 60]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:04 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 103 with a byte size of 4 is set to [0, 0, 0, 0]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 101 with a byte size of 4 is set to [0, 27, 27, 15]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 8 with a byte size of 1 is set to [5]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 4 with a byte size of 2 is set to [0, 10]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 3 with a byte size of 1 is set to [1]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:11:52 PM: debug Sending configure commands - kWhCost ‘0.19514’, monitorInterval1 ‘60’, monitorInterval2 ‘30’, monitorInterval3 ‘6’

What you’re describing is totally normal IF the unit isn’t sending it’s report data or, the reporting data being sent is not being processed by the ST hub. Volts, kWh, and Both Totals Amps/Watts (I believe) are a base function of the unit and is part of the passive data collection that’s done by ST hub. I’m probably not saying exactly the way it’s done but the point is that the clamp data is/was more complicated to gather and that’s where I had the most challenge when I adapted the code to work on this unit. If they have changed the messages being sent, you will see no clamp/pole 1/2 information but could totally still see the other info you have circled above.

I wonder if possibly the secure encapsulated messages for sourceEndPoint 1/2 are not being processed. Perhaps this is a silent updated version of the HEM Gen5 and the firmware is sending misunderstood messages
 it’s just a thought but you can start by enabling some of the debug logging that i left in the code.

If you look through the code you’ll find a number of remarked out logging options as such:

//log.debug

Just take out the ‘//’ and only if it’s at the start of a line. There are other entire sections commented out that might have log.debug
 also but don’t mess with them as the entire section was found to be bad/unneeded and there are comments to that effect for those.

In my editor it’s at lines:

195, 202, 294.

What you’re looking for then is back int he IDE, under live logging. Perhaps some message about unprocessed zwave event or something similar. Maybe also encapsulated meter data
 if you send back all that you get from the live logging for this unit over say, 2 minutes after hitting config again, that would likely be all I need to help with diagnosing.

Be sure to update the ‘MyDeviceHandler’ code to unremark the debug lines and also to save/publish AND refresh the thing list on your mobile device BEFORE you hit config and ALREADY have live logging setup! LOL sorry for the caps. I learned the order of things the hard way.

Thank you so much for all of the extra help and knowledge @Dillon_Miller. I will try these actions a little later tonight and let you know what it reveals.

Well @Dillon_Miller, I had to take a quick look before I got too busy. I’ll have a longer look a little later.
I followed your instructions for the debug lines, etc., here are some initial results.

The live log now displays data that I do see on the mobile app (volts, amps, watts, kwh). Previously the volts and amps did not show up in the live log, just on the app. Not sure what the pole data would look like, but I don’t think it is showing in this brief look.

I stripped all of the non “energy monitor” info from this log capture.

Thanks again.

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:52 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 64 00 01 DC DE 00 00 00 00 00 00 ’ to [‘name’:‘voltage’, ‘unit’:‘V’, ‘displayed’:true, ‘value’:122.078, ‘isStateChange’:true, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor voltage is 122.078 V]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 C5 00 00 00 00 00 00 ’ to [‘name’:‘power’, ‘unit’:‘W’, ‘displayed’:false, ‘value’:6, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor power is 6 W]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 00 1D 00 00 14 36 ’ to [‘name’:‘energy’, ‘unit’:‘kWh’, ‘displayed’:false, ‘value’:5.174, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor energy is 5.174 kWh]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 8503, payload: 01 05 00 ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug —ASSOCIATION REPORT V2— Energy Monitor groupingIdentifier: 1, maxNodesSupported: 5, nodeId: [], reportsToFollow: 0

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 65 04 00 1B 1B 0F ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 101 with a byte size of 4 is set to [0, 27, 27, 15]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 04 02 00 0A ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 4 with a byte size of 2 is set to [0, 10]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 08 01 05 ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 8 with a byte size of 1 is set to [5]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 66 04 00 00 00 00 ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 102 with a byte size of 4 is set to [0, 0, 0, 0]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 03 01 01 ’ to null

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug —CONFIGURATION REPORT V1— Energy Monitor parameter 3 with a byte size of 1 is set to [1]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:33 PM: debug Sending configure commands - kWhCost ‘0.19514’, monitorInterval1 ‘60’, monitorInterval2 ‘30’, monitorInterval3 ‘6’

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:28 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 6C 00 00 00 62 00 00 00 00 00 00 ’ to [‘name’:‘current’, ‘unit’:‘A’, ‘displayed’:false, ‘value’:0.098, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor current is 0.098 A]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:25 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 E2 00 00 00 00 00 00 ’ to [‘name’:‘power’, ‘unit’:‘W’, ‘displayed’:false, ‘value’:6, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor power is 6 W]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:23 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 00 42 00 00 14 36 ’ to [‘name’:‘energy’, ‘unit’:‘kWh’, ‘displayed’:false, ‘value’:5.174, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor energy is 5.174 kWh]

023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: info data sent

023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: debug sending data

023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: debug event [name:energy, deviceId:f7c399d2-6372-43e0-92f3-d99b6faa8a00, isoDate:2016-11-15T01:48:16.510Z, unit:kWh, value:5.174, timestamp:[.sv:timestamp]]

023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: info a sensor event occured

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 64 00 01 DB E6 00 00 00 00 00 00 ’ to [‘name’:‘voltage’, ‘unit’:‘V’, ‘displayed’:true, ‘value’:121.830, ‘isStateChange’:true, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor voltage is 121.830 V]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 1E FE 00 00 14 11 ’ to [‘name’:‘energy’, ‘unit’:‘kWh’, ‘displayed’:true, ‘value’:5.174, ‘isStateChange’:true, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor energy is 5.174 kWh]

f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 AD 00 00 00 00 00 00 ’ to [‘name’:‘power’, ‘unit’:‘W’, ‘displayed’:false, ‘value’:6, ‘isStateChange’:false, ‘linkText’:‘Energy Monitor’, ‘descriptionText’:Energy Monitor power is 6 W]

ae058138-1751-4585-8e66-84c84c484e70 5:48:14 PM: debug updating TS

5:47:28 PM: info Waiting on events


5:47:28 PM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.

5:47:28 PM: info This console provides live logging of your SmartThings.

Thanks for the debug info. I enabled the same debug lines in my own device, saved, published (for me) and refreshed the app (pull down+release) then hit the configure button to spark some action
 here is the key info that I see in mine, and I don’t see in yours:

125dcc85-5d0e-4fd4-8a2d-aaf228d26bb8 ?11?:?24?:?10? ?AM: debug Command from endpoint 1: MeterReport(deltaTime: 0, meterType: 1, meterValue: [0, 0, 18, 152], precision: 3, previousMeterValue: [0, 0, 0, 0], rateType: 1, scale: 5, scale2: false, scaledMeterValue: 4.760, scaledPreviousMeterValue: 0.000, size: 4)

125dcc85-5d0e-4fd4-8a2d-aaf228d26bb8 ?11?:?24?:?10? ?AM: debug encapsulated: MultiChannelCmdEncap(bitAddress: false, command: 2, commandClass: 50, destinationEndPoint: 0, parameter: [161, 108, 0, 0, 18, 152, 0, 0, 0, 0, 0, 0], sourceEndPoint: 1)

So, in reverse order
 there is first the debug encapsulated line. This encapsulated data came from my HEM Gen5 unit and specifically from sourceEndPoint 1 which is clamp 1. It’s not of much use on its own until it’s un-encapsulated by the ST hub according to the code starting at line ~285:

def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
def dispValue
def newValue
def formattedValue
def MAX_AMPS = 220
def MAX_WATTS = 24000
if (cmd.commandClass == 50) {

This class is what looks for ‘commandClass: 50’ in the encapsulated junk from the HEM and pulls it apart and reads the individual clamp 1/2 data.

Then there is the real data that is extracted from the encapsulated junk which is the ‘debug Command from endpoint 1’ line. This has the real meter values from clamp 1. There should be another set of encapsulated/extracted lines from endpoint 2 or clamp 2 also.

Can you send me the exact version/rev that’s on the unit you purchased and also the output of Raw Description from the My Devices tab for your HEM?

Mine looks like this:
Raw Description 0 0 0x3101 0 0 0 e 0x5E 0x86 0x72 0x32 0x56 0x60 0x70 0x59 0x85 0x7A 0x73 0x98 0xEF 0x5A

Some of these HEX numbers represent the command classes that are advertised by your specific associated devices and I wonder if yours are the same.

I thought I remembered you mentioning somewhere above that you had to manually set your HEM to this device class!?

if Aon changed the command classes or class versions that might explain this.

Oh, also, check in your My Devices to make sure it doesn’t say inactive
 mine did that a while back and looked like it was fine but stopped tracking all data points.

Hey @Dillon_Miller - My apologies for missing your message 21 days ago. I feel really bad about your time and expertise helping me only to have not seen your message.

Over the past couple of weeks or more, I have also been in touch with Aeon Labs. An engineer there has also been providing help. He sent me a known working HEM5 in exchange for the one I had. Just tonight I installed the HEM5 from him, and voila’ it works.

So I am not sure if the HEM I had was bad, or maybe improperly installed? Either way, it works now and I couldn’t be happier about it.

Thanks so much for the help and of course for the awesome code !

Shawn

PS. Sorry I don’t have the data you requested from the other HEM I had; if there is something I can glean from the new HEM I have please let me know and I’ll get it to you ASAP.

No problem at all Shawn. I too have been busy and to be honest, forgot all about this thread again :)
 that time of year ya know. I noticed in the email regarding your response that there was a note about not seeing the cumulative kWh, I’m assuming you see it now since you edited that out of your reply?

That time of year for sure @Dillon_Miller. Yes, after I wrote my original reply, I recalled the device manager is used to populate the fields for cost and frequency of updates, after which the remaining values appeared immediately. Works really nice now, thanks again so much!

Just wanted to share my experience. I hate working with electric and installing one of these was my least favorite thing I’ve installed. I thought installing 25 smart switches, some being 6+ gang boxes sucked. Something about working around constant live power did not thrill me. I should have shut the main, way less stuff to touch by accident.

The clamps are easy enough to put on and I took my time being careful not to touch anything.

I used the device handler code provided. Added the device via the smart app and changed the type in the IDE. I was getting no data, and when I went to configure I’d get a refresh error. No way to edit the parameters, or even remove the device without. I used the updated preferences from post #26 (thank you tgrimmer). I could then load the preferences, but still no data, and now could access the remove device.

Back to the box, (UGH) moved around the clamps, no luck. I removed the device from within the smartthings app, and added it again. Started getting instant readings. IDK why it took two times, but its working great. I’ll see how accurate it is over time.

Thanks for all the work @Dillon_Miller and @tgrimmer, and all the other people that contributed to this thread.

Hi Dillon,

I keep getting:

No signature of method: script14819906230271631489553.metadata() is applicable for argument types: (script14819906230271631489553$_run_closure1) values: [script14819906230271631489553$_run_closure1@3e410f62] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Am I doing something wrong?

Thanks

NM. I see I was adding it as a smartapp, not a devicehandler.

will Dillon’s code work for one-phase HEM Gen5?