Setting up Aeotec Home Energy Monitors gen 1 to 5 on 2023-09+ zwave js

TLDR: Aeotec HEM gen 5 is buggy, but it works great with server polling, just turn off all reports and don’t count on them. There’s beginner-friendly detailed setup info on how to set it all up on your new system using the new Z-Wave-JS integration, start to finish.

Background stuff you can skip:
I’m a very recent adopter of Home Assistant (installed just over a week ago) so i’m still stumbling across stuff. The main reason i wandered into it is that i was using an outdated Vera system before which kept corrupting my Z-Wave table and renumbering my devices which killed my outside links in for information to my personal website (which i use to control garage door, cams, lights, etc, Vera is just too slow, and i can’t get the app into night mode which is annoying)… Home Assistant looked great in all these respects (huge kudos to the dev team!), so my first task: move my Aeotec HEM gen1, buy a new gen5 of same model, and set up monitoring for my home power use and solar generation. I followed the obvious instructions and was met with the following issues: HEM gen1 worked, it was easy, and no major issues, but couldn’t get reports until i figured out on my own how to do it. HEM gen5 worked too, easy, however same problem, and when i did figure out how to receive reports, it never actually sent the reports according to the scheduled configured in param 111. I wanted 60 seconds, the published documentation claims all numbers are valid down to 0 (yup, can’t figure out that logic at all), so 60 shouldn’t be a problem. Even if it was interpreted as hex it should have still sent a report more frequent than 120 seconds, however reports were coming in at six hours separation, sometimes a bit less, sometimes a bit more, but not an exact fixed schedule, and certainly not following param 111. I tried every parameter, threshold, trigger priority, all three reports, and each individually, nothing makes the firmware report at my desired frequency. Finally i got it working by just turning off reporting altogether, and making my lowly little pi4 poll for the information at my imposition using HASS automation. I’m returning the gen5 just for the fact that it’s firmware doesn’t work well and there’s no firmware update posted and it’s brand new and should work fully. It didn’t help that my email to tech support asking about report timing was responded by a simplistic patronizing description of what a kWh means, including what “kilo” means instead of even minimally touching on anything at all that was asked in the service request.

The point:
Ok, it will be returned… but for this past week i searched everywhere online for how to set it up , and i couldn’t find relevant information there or in this forum that was sufficiently explicit for a HASS simpleton of only one week’s experience to figure out from descriptions, so i’ll provide what it took for me to get it going from the simpleton’s point of view in hope of helping other simpletons out there see the light. (is there a word limit here? :slight_smile: ) Setting up the HEM modules (especially this gen5 with the reporting bug) seems the most complicated in Vera and i assume in HASS as well, so if a new user can jump this hurdle they’re set for the race.

Initial set up:
I did mine on a pi4 system. Online information on how to get that going is great, there are no glitches, no risk, all good. I bought Zooz zwave8 USB stick and it worked pretty much out of the box using instructions readily available everywhere on the web. The only thing i would add is don’t fret over all the initial options on first setup, the “integrations” plug-ins are all available to install later very easily, no fomo necessary. If you install too many, no harm either, there’s three dots on every integration that let you remove them afterwards and the system will highlight orphaned stuff and suggest you delete the orphans after too. Well done guys, on programming all of this.

HEM setup:
Each of the Aeotec HEM devices have a pairing button. gen 1 you have to remove the battery lid, it’s under there, gen 5 doesn’t open, but it’s underneath the mounting clip, just remove the clip. Before you do any pairing, press that reset button and hold it down for 15 seconds or so until the led is seen flashing through the front side of the device. That resets all settings, un-pairs it from any previous history stuff and gives you a fresh start.

HEM setup:
Now, in HASS tap through settings - devices & services - Integrations, click on z-wave (if you don’t see that then tap on add-integration and follow instructions to install it and bind it through Z-Wave JS, and have it find your Z-Wave dongle, look up how elsewhere). In the Z-Wave integration tap on “Add Hub”, then while it’s waiting to add stuff, go to each of your HEMs and in turn for each press the pairing button for about 1-2 seconds to start their pairing process. Watch the flashing of the LED through their front side and it will go solid for a bit to say it’s paired. That should be it. each device will go through an interview process then silence. Give it a few minutes for the dust to settle.

My initial interview results on the gen5 were a bit confusing and unexpected, it helped do a system restart and then run the interview a second time, after which everything looked like it should. To restart, tap through settings - system and you’ll see the power-down icon on top right, expand the advanced options on the shutdown screen to find the restart system option. Once the system is back up and happy, get back to settings - devices & services - devices and find your newly added device there, it’s the one with the super-long name that scrolls pointlessly off the screen into oblivion to make it almost useless as a device name but there should be enough there for you to recognize what it is (hint, some stuff is easier to find if you sort by vendor or by model number). Tap on it to open.

On this device options screen you should start by tapping on that pen marker on the top right and rename that paragraph to something easier that will fit better in your memory, save that RAM in your head for better stuff there’s no upgrade path. Underneath the Z-Wave icon in Device Info you see configure and vertical ellipses, tap on the vertical ellipses and select Re-interview. After the second interview all should be great and you won’t need to ever do it again barring catastrophe. Now, finally, the device is entirely installed, recognized, and happy, but still needs some detail work for it to make you happy too.

HEM Configuration:
Under device info, on this same device screen, tap Configure under the Z-Wave icon, and go through and select whatever options suit your needs. The gen 1 device just works, so no problems there. If you have trouble, just download the most updated firmware version for it ( and it should be fine. The gen5 i couldn’t get to report on its own, no mater what i did. Your mileage may vary here, try it. If it doesn’t work for you, no frets, you can poll the information instead of waiting passively for it on a silver platter. I have the “polling automation” option you need for it below.

Next, the device creates many entities (“sensors”) that you probably have no interest in. Go through the sensors section and for each sensor entity open it in turn, find out what it is, see it’s data graph, and if you don’t need to have it always in your face, hide it from the landing page dashboard by tapping on the gear icon and and make it not “visible”, remember to hit update on the way out. If you won’t need it at all for any calculations, then also hit “disable” so you’re not taking up more space from it. It won’t delete, it will just grey out and not disturb you again unless you “show hidden” later to get it back. If the system can’t find something after re-interrogation, it will highlight that fact and recommend that you delete it altogether permanently, that’s in the same gear settings here. Once you’ve pared down your sensors list to what you wish to expend hard drive space on, now you need to enable the reports to be seen.

Receiving reports:
Just below the sensors entities configuration box is a Configuration entities box, by default all configuration entities are disabled, so the HEM may be sending reports but HASS has its ears closed. Here you want to show all the hidden entities, look through them and select the ones that match the values you selected to report when you configured the HEM device itself. For each of those, simply tap and enable. You may also want to tap on the icon itself to open the entity (not obvious here since the location you tap is different from the sensor entities box), then tap the gear and decide which you want visible on the landing dashboard vs just available to use by the energy meter but not cluttering the dashboard.

Setup is now complete. That is all there is to it, assuming your reports are working as you wished. Even if they are not, if you’re ok with reports sent only every variable 6 hours and don’t need the minute detail, you’re good to go. Go to the Settings - Dashboards - Energy and start setting up your home energy monitoring in HASS. That’s pretty well documented, so find your own way around here.

Resetting cumulative values to zero:
For future maintenance purposes, may as well re-zero your accumulating consumption counters on these devices. We can leave a sleeper script in there so you can do it anytime to restart the counters whenever you dream it up (eg, monthly reset if you’re trying to validate billing, or annual reset if you’re trying to monitor solar panel rundown…) Note that if you run this script you should also give the offset information to your saved database so that your home energy chart doesn’t end up with an ugly 400 terawatt spike in it, i haven’t added this in since i’ve only had it a week, but i will be doing so later. I may post an update then to this script if there’s sufficient interest, or maybe a suggested edit from someone more genius than i can help me over that hurdle sooner (hint hint).

Tap Settings - Automation & Scenes - Scripts. Add-script and give it some useful title, opt for single mode, then spend considerable time finding an ok icon for it (hey, HASS dev team, that pull down method for icon selection could use some serious improvement by the way). For the “Sequence” you need to call the service ‘Z-Wave: Set a value (advanced)’ then under targets click the “+ Choose Device” and add in each of the HEMs that you programmed in (and anything else you’d like to reset occasionally for that matter, eg, Tesla charger, etc). The reset will zero the values of all the cumulative sensor entities at once on the entire device. Finally, enter command class: “50”, property: “reset”, and value: “true” (don’t include the quotation marks). No need to check any boxes, just save it.

At this point it shows up as a script for you. Considering, however, that all the forums here keep asking for stuff in YAML, this casts some doubt on whether the GUI is actually generating the code we think it is generating, so open that script again by tapping on it, and at the top right tap the vertical ellipses and select “Edit in YAML” (yup, that’s where that is!)… Here’s my own fancy YAML code for this:

alias: Zero out HEM.g5 and HEM.g1
  - service: zwave_js.set_value
      command_class: 50
      property: reset
      value: true
        - 10eb6b280839042f1e50e70395bfb5f3
        - d275d33a1c7949292e3baf7979b4c559
icon: mdi:archive-refresh
mode: single

It does work without the quotes that the GUI version initially added in for me. Maybe somebody else can show me how this script can grow to first read the value that will be zeroed, then zero it, then apply the proper offset to the database to heal the ugly energy spike that this might produce.

To execute the script, tap on the vertical ellipses next to the name of the script and select “run”.

Gen5 Reporting bug work-around, Polling automation:

If reports just don’t behave for you (ie, gen 5 bug), there’s a work-around. It costs a few extra but impactful clocks on your HASS device. In my case, i probably would eventually rather control the timing myself from HASS anyway where it’s easier to track and one setting in one place that i can annotate and label plainly can serve for all the HEM and other devices at once rather than have to peck through each device to control my database size like a chicken hunting for seeds. I’ll leave device originated reports for unpredictable stuff, like motion detection.

Tap through Settings - Automations & Settings - Automations, then Create Automation. I couldn’t find an option to “repeat every x seconds” as one of the triggers (this is unfortunate) but you can set a “time pattern” trigger and use that to make it repeat once a minute, once per hour, or at a specific hour per day. The actual numerical value you choose seems trivial unless you’re trying to separate multiple automations. For Action, you will call the service ‘Z-Wave: Refresh values’ (select from the list) and then add all the sensor entities you wish to refresh into the list. (hint, don’t select report entities from the configuration entities box where you enabled receiving reports). They don’t all have to be from the same device. There is an option to “refresh all values”, i did not try this, and don’t wish to try as it may just overpopulate my database and fill up memory without benefit. Save it with some obvious name and it’s done. If you open the automation again for edit and while in edit mode tap on the vertical ellipses at top right of that page to “view in YAML”. Compare to mine below:

alias: Refresh hem.g5 whole house W & kWh
description: "Compensates for uncontrolled reporting from device firmware"
  - platform: time_pattern
    seconds: "0"
condition: []
  - service: zwave_js.refresh_value
      refresh_all_values: false
        - sensor.home_energy_meter_gen5_electric_consumption_w
        - sensor.home_energy_meter_gen5_electric_production_w
        - sensor.home_energy_meter_gen5_electric_production_kwh
        - sensor.home_energy_meter_gen5_electric_consumption_kwh
mode: single

Don’t forget to turn off the device-initiated reporting within the HEM device config.

That’s it for now, only offset compensation left to do after zeroing which i hope somebody here can help with.

Sorry for the painful reading experiences. This is what i wish i’d known from the start when i got going, maybe it’ll help at least one other person.


Thank you for the solid write-up! I just installed a Gen 5 and was wondering about the 6hr report interval.

What firmware are you running on your Gen 5? I have 1.35 and am wondering if 1.37 offers some remedy for reporting intervals? I’ve requested the fw update and will report back.

Hi there, I’m sorry that i can’t answer that question. I was determined to figure out how to get it working and i succeeded, and wrote my overly wordy description of how, but as soon as i worked out a way around that bug i returned the HEM for a refund merely because that single firmware bug would have “bugged” me forever, mostly for the fact that their techs weren’t acknowledging there was even a bug (or trying to understanding it) and went for condescending as the first communication method. Nothing wrong with the product, i just don’t support companies that treat their customers that way. I purchased instead an Emporia Vue2 and put ESPHome onto it, made a few minor customizations to the yaml file since i don’t need such frequent data updates, and haven’t looked back since.

I have a Gen5 (US, 2 phase, 200A), with firmware 1.35. It has been working mostly fine, and I am a bit puzzled by the reports but I guess I am lucky. I have it set up to report every 10s and it does. My data makes sense. However, it does not report VAR and kVARh. I have just entered an automation to poll those every 5 minutes. And, it seems to have a bizarre zwave path, going from where it is to a different floor and back to very near it where the zstick is.

So my only complaints are that VAR isn’t reported. Of course there’s only one voltage sense so you don’t know the voltage on the other leg – but that I knew before I bought it.

Can anyone with newer firmware give a trip report?

I’d forgotten about that… I think my gen5 also did not report these values. I did remember an odd spike in whole-house power that happenned in HASS whenever my solar power overcame my consumption, but i see that with the gen1 model too, which i still use, so it may not have been from gen5. With gen1 i see that spike around 2 to 3 times per month, where suddently there’s about 50-80KW consumption in that one 15min interval, followed by exact 0 on the next interval.