[BETA RELEASE] Aeotec HEM Gen5 (2 Phase) Driver

Aeotec HEM Gen5 (2 Phase) Driver

This driver is for the Aeotec Gen 5 Home Energy Monitor (HEM), 2 Phase Version.

NOTE

A couple things to note:

  • This is BETA software, and is subject to be totally broken. I'm still testing it out myself, but more eyes are always appreciated.
  • This is a MVP. Minimal functionality has been achieved, but I'm not doing anything extra, like calculating dollar costs.
  • This is my first driver released to the public, so I've probably done some things incorrectly.

IMPORTANT RESTRICTIONS:

  • THIS DRIVER IS CURRENTLY FOR THE H.E. C-7 HUB ONLY
  • THIS DRIVER WAS DEVELOPED AND TESTED ONLY AGAINST FIRMWARE 1.37 ON THE HEM
  • THIS DRIVER IS FOR THE ZW095-A ONLY

Status

This driver is in BETA status and is considered a MVP (Minimum Viable Product). While all basic functionality should work, nothing extra has been added. Please file issues with feature requests if there is a functionality you would like to see added.

Known Issues

  • Hubitat's Driver interface does not handle multi-select options well. This means a few things:
    • You will not see the option to multi-select until you save the configuration at least once.
    • Selections do not persist after refresh or saving.
    • Unfortunately, there is no workaround for this. If you find it frustrating, please bring it up with Hubitat support.

Tested environments

Hubs:

  • C-7

HE Software:

  • 2.2.4.158

Release Notes

  • 0.1.0: Initial Release

Code

https://github.com/viertaxa/hubitat/tree/main/Drivers/AeotecHEMGen5-2-Phase

Feature Requests and Bug Reports

Please open Feature Requests and Bug Reports as an issue on GitHub:

https://github.com/viertaxa/hubitat/issues

Support

Support can be found at https://github.com/viertaxa/hubitat/discussions or below.

HPM

This will be released on HPM once it leaves BETA status.

Releases

RELEASE HISTORY:
    - 0.1.0: Initial Release
    - 0.1.1: Fix typo introduced in cleanup of code
    - 0.1.2: Add back in ability to enable debug messaging
    - 0.1.3: Cleanup of cruft and a bit of debug logging added
    - 0.1.4: Tiny bit of cleanup
2 Likes

Reserved for future use.

Also reserved for future use.

:+1:

After looking around and finding this driver, I pulled my Aeotec HEM Gen5 out of a box and reinstalled it on my C-7. Found it right away and have it up and running with this driver.

I do have a question though. I see a lot of fields in the Preferences about reports. Where can I find these reports?

Looking to see reports based on energy usage per hour/day/week type of things. Is this available somewhere? If not, that's my next app... lol.

Thanks

The "reports" are z-wave reports, i.e. how often the meter tells the hub what its usage has been. There's no reporting built in to this driver for making pretty graphs and such. I would suggest using one of the exporter apps out there that send to an external timeseries database and hook Grafana up to that to get nice graphics.

1 Like

You should have this added to Hubitat Package Manager

2 Likes

Do you have 3 phase version of the driver?

1 Like

For some reason this driver will work perfectly for me for about 24-36 hours and then the device will stop reporting anything and won't refresh or respond to configuration requests. I have to exclude and reinclude it.

This is the only error I see in the logs:

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '1' with class 'java.lang.Integer' to class 'java.util.List' on line 415 (setAssociations)

I have it working with 2 probes but my model has 3 probes. Can this driver support 3 probes?

FWIW I've fixed the bugs with the driver, and now I've got the (US model) working for me just fine.

I had the same issues.

I tell you what, it took way longer to figure out than I wished, even as a day-to-day java/groovy developer, without having good docs on the APIs, it makes it hard to debug.

I'd kill for the JAR files to be released on the maven repos so I could add them to my local IDE and get intellisense.

I'll send a push request to the original author of this thread later today. I can send a link to my public repo as well.

Using mine to implement a dryer started/dryer done functionality on a "dumb" dryer (because I would prefer to keep my dryer dumb).

1 Like

@novasbc
A link would be awesome. And thank you for all your hard work on it. Also what's your dryer rule look like? Not real happy with mine.

@rlithgow1 , the system won't let me post links on posts. But if you go to the OPs repository, you can see my pull request. From there, you can navigate to my public repo with the clone + fixes.

1 Like

@rlithgow1 both of these are different, but in reality I think the washer logic with the dryer minimum wattage would work. I started with the dryer logic, and thought I needed to account for the end-of-cycle "wrinkle prevent" where it stopped and started. In reality, the minimum wattage I put in made it such that this mode didn't use enough power to trigger anything, as my dryer wasn't using any heat.

So, if you use the "washer" logic from below, it will make it so that if the washer/dryer stops using power for 2 minutes then it will turn my virtual switch off (which is what my notifications are keyed off). It accounts for the fact that the washer (and dryer for that matter) stop and start during their cycles.

  • Washer Running = virtual switch
  • Dryer Running = virtual switch
  • Notifications watch the state of the above switches.

Washer
IF (Power level of Washer(410) is >= Trigger Power (Watts)(2)(T) [TRUE]) THEN
Cancel Delayed Actions
On: Washer Running
ELSE
Off: Washer Running --> delayed: 0:02:00(cancelable)
END-IF

Dryer
IF (Power level of Dryer Energy Monitor(6053.103) is >= Trigger Power (Watts)(150)(T) [TRUE]) THEN
On: Dryer Running --> delayed: 0:00:30(cancelable)
ELSE
Cancel Delayed Actions
Off: Dryer Running
END-IF

1 Like

Thanx I'll download your fix and try it out...:call_me_hand:

I ordered a Aeotec Gen5 HEM, and it should be here in a couple of days. My goal is to log my furnace oil boiler on-time which equates to fuel oil consumption.

I plan to access it thru the same api I use for my AeotecMultiSensor6.

I'm just wondering if the latest and best supported driver is still the one at:

FYI - my HE platform version is 2.3.0.124 and my hardware is Rev C-7.

Just saw this message. I think you'll probably want to pull from my repository.

The viertaxa repo maintainer still hasn't acted on my pull request.

1 Like

Can you post a link to it now? (or to the raw?)

novasbc - thanks, yes I've added your pull requests (https://github.com/viertaxa/hubitat/pull/4) to viertaxa's driver.

I installed my Aeotec HEM about a week ago and everything seems to be working fine. I do wish I had a way in the dashboard to change my "Energy Meter" tile to "Watt Meter" and my "Power Meter" tile to "KwH Meter". But otherwise, it's a nice addition to the dashboard where I also monitor my fuel oil furnace.

The @novasbc driver for the Aeotec ZW095-A Home Energy Meter Gen5 works with firmware 1.37 and Hubitat Elevate C-7 version 2.3.1.142. Thank you! https://github.com/novasbc/hubitat-viertaxa