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

I know this thread has been inactive for some time. But I hope someone can help with a question.
I have this hooked up monitoring my Solar generation and can get total Amps and Watts to display as well as most of the other data. However, the most important value: kWh won’t display. it constantly displays “0”.
I’m using the US version.
Any help is appreciated.

Anyone able to guess why I can’t get any data at all from the zw095? Here’s the log. I used v0.8 of DuncanIdahoCT’s handler. I’m just trying to get it working before I hook it up to the panel as it’s very tight. I do have secure inclusion on by the way. I’m not sure but it might be because it’s not receiving any data.

groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#multiply.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.Number] @line 248 (zwaveEvent)

Hello!

I have seen this “groovy.lang.GroovyRuntimeException” message before, and have a simple solution that worked for me. It might not be perfect, but it stopped the error messages, and made sense after some analysis.

I have made a number of other tweaks of my own to the DuncanIdahoCT Device Handler, but unfortunately I haven’t gotten it posted on Git (or anywhere outside of my own ST account). I’ll share and get it posted at some point yet. At any rate, I ran into a couple of things in the same portion of the code which I’ll explain below. Full credit and big thanks to Dillon for his work on the original code.

It is unfortunate that the Groovy error message doesn’t tell us more about the actual problem to begin with.
I found the error seems to come from the kwhCost variable not being defined (it isn’t a required setup value, perhaps it should be), and at first connection/pairing will not yet have been set. For me, adding the following snippet of code to set up the kwhCost variable with an initial value fixed the error message. There may be other or potentially more appropriate ways to do it, but this worked. YMMV, but I suspect it won’t.

I highly encourage anyone making changes to BEFORE editing, copy and paste your current HEM device handler code into a local text file and save it somewhere safe in case you need to revert to the previous version.

After this "previousValue’ line (~247 of the original):

Add:

            if ( kwhCost == null )
            {
              // default to something if kwhCost is not set (null) to avoid a Groovy BigDecimal error:
              // groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#multiply.
              String kwhCost = "0.19514"
            }

You can skip the comments if you like, and feel free to set your own value for electricity cost per kWh. I used the original default cost setting value from the setup section for consistency’s sake.

Also, in the same section, there was a variable name typo immediately after what you would have just added.

After these two lines:

Change this next line (~250 originally), as shown, to update the ‘costDisplay’ variable at the end (in place of just ‘costDisp’). I also swapped the ‘Displayed Cost’ label for ‘Estimated Cost’ since I felt like it made more sense at the time:

            sendEvent(name: "cost", value: costDisplay, unit: "", descriptionText: "Estimated Cost: \$${costDisplay}")

So when all is said and done, your fixed “case 0” section could look something like this:

        case 0: //kWh
            previousValue = device.currentValue("energy") ?: cmd.scaledPreviousMeterValue ?: 0
            if ( kwhCost == null )
            {
              // default to something if kwhCost is not set (null) to avoid a Groovy BigDecimal error:
              // groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#multiply.
              String kwhCost = "0.19514"
            }
            BigDecimal costDecimal = cmd.scaledMeterValue * (kWhCost as BigDecimal)
            def costDisplay = String.format("%5.2f",costDecimal)
            sendEvent(name: "cost", value: costDisplay, unit: "", descriptionText: "Estimated Cost: \$${costDisplay}")
            map.value = cmd.scaledMeterValue
            break;

Also, while I’m posting – for those of you that are also using the new SmartThings Connect app with this device, you can at least get an overall Power reading once you click into the HEM device itself by adding a VendorID (vid) string to the metadata definition at the very top of the code. (This has no effect or impact to the old ST app views.) Here’s what my definition line (~76) looks like now:

	definition (name: "Aeon HEM Gen5(zwave plus)", namespace: "DuncanIdahoCT", author: "Dillon A. Miller", vid: "generic-switch-power-energy") {

I haven’t seen or figured out how to get more than the one “Energy Consumption” data point to show up on the new app yet. I’m not even sure if more is possible with the current Connect releases. Anyway, it’s better than having no data at all on the new app, right?

Save the updates, publish the new device handler for yourself and give it a try!

Hope this information is useful for some folks down the road.

All the best, and happy power monitoring to you all!

1 Like

I’ve got the handler installed, but I’m not showing any pole data. Just the total watts and total amps? Any idea what is going on?

My power company also has a different rate for the first 800kwh and a different rate for any over that. Has anyone altered the code to account for this. I have no idea where to begin.

Thanks!

These might be some silly questions, but… there can be many things that might cause issues like you describe.

  • Did you go through the configuration settings and steps for the HEM in the phone app, and afterword you would have clicked on the “Configure” button within the HEM device display within the app?
  • Is your HEM device reasonably nearby to your SmartThings hub (without too many walls/floors or metal that might reduce Z-Wave performance)? Have you tried moving the hub closer to the HEM device at any point or adding a repeater or another device between the HEM and Hub?
  • Have you also checked in the Smart Things IDE for messages or logs from the HEM device?
  • Can you document for us what you might have already tried beyond the above?
  • Has it ever worked properly, or is this a new installation?

Here’s how to check the IDE for logs:

  • Login to https://graph.api.smartthings.com/
  • Pick your location by clicking My Location -> Home (or whatever or your home site is named)
  • Scroll down and click the “List Devices” link, find the HEM (or however it is named in your app)
  • Scroll down and click “List Events” within the HEM’s device page
  • Check for recent events from the HEM unit that might be useful

If you do see some historic logs from the HEM, you can also watch for “live” logs as they come in from the device as well:

  • Click the top menu link for “Live Logging” and select the HEM device once you see any active log traffic from the unit to focus the log display for just HEM messages

At one point a while back, I put together some additional debugging log options for a version of the Device Handler I’ve used as I’d had some trouble with a malfunctioning HEM unit. Aeon was nice enough to replace it under warranty, but the logging proved very useful in proving to them that it was having radio/communication issues prior to them agreeing to replace the broken unit. Let me know if you think you might be interested in the code update.

As for the issue of the different rate structures, you’d have to add some additional configuration variables and update the code to provide handling for the tiered rate structures (Optional KW threshold value and $Rate AfterThresholdMet). If I remember right, the HEM unit itself helps keep track of the current period power cost amount based on configured pricing, and the app simply interprets and displays the HEM responses.

i.e. The HEM would have to be configured with which rate to use, and when. Something like: 0-to-N kwh threshold @$BaseRate and N+1 kwh @$RateAfter if that makes sense? The app would have to know to send a programming update to the unit to update the unit price when it hits the threshold KW value for the month so that the HEM would have and use the updated rate – until it gets reset to 0KW and the original rate. This could get a little involved.

Also remember that there is no guarantee your power bill and your HEM displayed pricing would be accurate and in sync unless you know exactly when the power company resets your billing for the month AND remember to reset the data HEM values in the app data at that exact time monthly.

Hope this helps give you some ideas.

Did you get a change to upload your code? Or would you be willing to share with me?

A few other questions, everthing seems to work using Dillion’s code, however I don’t see any data for Poles on the tiles. The top two tiles on the left and right just have “–”.

Also is there a way to send the data out to a spreadsheet, such as google that I can then graph the raw data later?

Thanks,
Jake

Hi everyone - I just bought one of these (1 core UK) as it allows bi-directional power monitoring (I have solar PV). I’ve got the device handler installed using DuncanIdahoCT’s this. Running ST V2 hardware with firmware 000.024.00020.
It is logging power usage and total energy consumption OK. However the smart app configuration doesn’t doesn’t work (just does nothing) and I only get a very basic display in the app - see picture.

  1. Any idea what’s wrong? My skill level old but is reasonable - ex IT-developer but not tried writing any groovy device handlers myself.

  2. Also there are a lot of branches of this - does someone have a latest version with all fixes in???
    DuncanIdahoCT code

I have ben running the 3 clamp version using the ClassicGod DTH for quite some time now. Works really well.

1 Like

Yes I’ve just installed the ClassicGOD DTH, works great, thanks for the tip off

@Dillon_Miller I am using your DH for the device. It worked perfectly for 3-4 months. Now the device is not reporting to ST anymore. I can manually hit refresh and get the kWH, kW, Volts and Total amps. Nothing else. The automatic reporting to ST has been stopped. I know the Clamp level details are reported to ST (not polled), hence they are missing as well. I tried ClassicGod DH without any success as well. I removed and reconfigured the device, factory reset the device. Nothing seems working. Any help ?

I’m in the same boat. I think SmartThings has stopped the device from uploading from the hub to the cloud because it is to chatty… the cloud is overloaded and instead of expanding the cloud they are limiting the computing on their end…
The only device handler that works (keeps working without stopping) is the “home energy meter”, which is stock on SmartThings. The device doesn’t stop because I can just change the device handler and it is back, if the device locked up it would need to be reset at the device…
I wish someone would take that one and use its polling model and expand it to report all the data.

1 Like

I’m not too sure about that. I’ve got my gen 1 HEM reporting like crazy (using my own DTH). Probably 2 or 3 times a minute, but my reporting thresholds are very, very low.

Perhaps the DTH you’re using just needs a little tweaking?

I got mine back working now. The issue was not pairing in secure mode. I moved the meter around 5 feet of hub and tried pairing after a factory reset. It paired securely. Then I used ClassicGOD’s device handler from support page of HEM Meter. Its create 2 additional devices for individual phases. But overall works. The Aeotec support guy asked me to move closer to hub for secured pairing. Then you can move back to panel.

1 Like

My gen5 meter was working fine from May 2019 until a week or so ago. Nothing changed. I had been using the ClassicGod DH so i switched to the stock DH. That didn’t help so it was suggested i turn off Device Health. That didn’t fix it. The gen5 is just an expensive paperweight now. Hopefully Samsung can fix what they broke, The gen5 works with other platforms so it is definitely something Samsung broke

Mine stopped working in the past and after resetting with Aeon Labs, finally made it to work again but lost my data. It stopped again after a few months and never bothered with it as I could not make it to work again. Yes, it is an expensive paperweight attached to our box.

1 Like

Hi Wardie. I have solar PV too. So I don’t need a 2 clamp edition then? Excellent. I currently have an Owl Intuition that doesn’t integrate obviously with SmartThings, so would like to upgrade. I did wonder if I’d have to get a 2 clamp version. So with a single clamp it shows a negative when power is being exported to the grid?

Do you know if you can set rules to turn devices on and off based on that surplus / deficit figure in the SmartThings app?

Reason why I’m asking is I also use a “surplus” monitor that does this - It’d be nice to replace both setups and all the clamps in my consumer unit with a single one!

1 Like

The 27.8 firmware update fixed the issues with my HEM5. Hopefully others have had the same success

Since the update, both the classic app and the new app say the device is offline at times. I tap refresh and the error message disappears. This has happened several times in the last few days. I am using the ClassicGOD DH with the default configuration. I do have the child DH on the list also

1 Like

Hello Everyone,

I know this thread isn’t super active, but I figured I’d have a better chance here than creating a new one.

I’ve got the Gen5 meter setup and working with the ClassicGOD DH. The accuracy of the reporting is almost spot on compared to my DTE Energy Bridge from my energy provider. I purchased the HEM after signing up for the smart monitoring from my provider for a couple reasons. 1. It’s $1.99 a month-- which isn’t actually too bad based on the graphing and realtime data they offer in their app. 2. Would be nice to have everthing under one roof with Smartthings, along with more capabilities.

After playing around with both options for a couple days, I’m wondering if I’m just missing something with the HEM and STs. What kinds of things are you guys doing with HEM and STs that I might be missing or not considering? I thought it would be cool to be able to set up alerts if my usage spikes over a certain amount, or even use HEM to monitor when my power gets restored after a power outage, so I know when to disconnect my generator-- but that only happens like once every couple years.

I’m also finding that STs seems to be getting bogged down with the HEM device reporting so often. I’ve dialed back the reporting threshold, and that does seem to help, but then it kind of defeats the purpose of having it. I do like to see up-to-the-second useage occasionally.

So I’m trying to decide whether I want to keep the HEM and cancel the smart meter monitoring from my provider, or just return the HEM and continue to roll with the provider energy bridge monitor. Chime in if you are using the HEM in ways I haven’t considered. I’d love to hear your feedback. Thanks!

I am in a similar boat as you earlier this year: I am not seeing the power (Watts) report in the logs unless I hit the “Refresh” button. I think I might have to do a secure pair as well. How can you tell if the device is paired securely or not? Thanks

Edit: I found this on another thread which basically says if you view the specific device from the My Devices page of the IDE, in the Raw Description section there is a parameter for cc:… if it says cc:98 then it is secure. Mine says cc:5E, which is not secure. Will try repairing with a quick twice tap to see if i can get it to be secure and see if that helps with my power reporting.