[OBSOLETE] Aeotec Home Energy Meter Gen 5 composite DTH

reboot the hub and that should go away

1 Like

Hello,

thank you for the DTH, really useful. I’ve run into an issue that probably needs to be related to my setup. I’ve setup each clamp into different phases of my installation but I’ve connected all the with L and N. As a results, current is measured properly but V, W and kWh is not. what do you think I am doing wrong?

Thanks

Brilliant DTH thanks classicGOD !!! No errors so far, but any idea what takes the time when it is sync’ing? I was worried at first it was broken but then I just waited - can take a couple of minutes.

Is there anyway to add a variable to the reading on a child device? My solar feed has 2 lines coming out of it and the generation is split evenly between them. Rather than using both clamps just to measure the Solar output I want to just multiply the value by 2.

Great app, but I am having problems with one small thing. I am sending the data to Grovestreams, but the HEM only sends updates to Grovestream when you push the refresh button. Is there any way to get the HEM to send the data every minute or so? I am only looking to send watts, not the large amount of data that gets sent when you change reporting to “true” on lines 312 and 317.

@Ernie_Sharp You can setup a pollster instance to refresh it

Excuse my ignorance but i cannot get this DH working. It is in my list of device handles in the classic app and it says published. In the IDE I see zw:Ls.
When i go into the classic app and view right now all I see is the stock report allowing me to reset and configure. When i click on configure nothing happens. I see nothing like what others show for the different graphs, etc.

I am sure it is a problem with the loose nut behind the wheel

I successfully added a DH for a Zooz 4 in 1 sensor months ago but i cant get this DH working.
Thanks and again I apologize for my ignorance.

@ClassicGOD Thanks for this DTH! It is the first custom DT and SA I have installed in my ST system. It was a breeze and you should be commended on how much better this is than what is provided by the manufacturer. I’ve only been using it, but am getting the “Sync” issue, so hopefully that will go away with some time.

However, for some reason my child devices don’t seem to be reporting Wattage. Any thoughts?

Raw Description zw:Ls type:3101 mfr:0086 prod:0102 model:005F ver:1.35 zwv:4.54 lib:03 cc:5E,86,72,98,56 ccOut:5A sec:86,72,32,56,60,8E,70,59,85,7A,73,5A role:05 ff:9000 ui:9000 epc:2 ep:[‘9000 5E,32,59’]
Current States * energy: 1.093 kWh

How come my Clamp 3 says -0.200A and is measuring negative kwh, not showing Watts.? It is not turned the wrong way, since its the same as the other clamps?

@ClassicGOD I’m stumped! I’ve installed the Gen5 parent/child DHs. Paired my HEM with a double press so it’s in secure mode (confirmed in raw description).

Out of the box none of the child devices are reporting anything, I’ve enabled logging and wathcing the logs no data is ever reported for child devices, they are all ep0.

If I press the sync icon on the child devices, nothing happens in the logs at all.

I’ve tried disabling the thresholds in settings and I’ve tried adding Wattage reporting to group 1 at 5secs for the 3 clamps as well.

I’m what I need to enable in settings to get the reporting through, but for now I’d settle for wattage and kWh updates on the 3 clamps.

So the reason the manual refresh isn’t working for the child devices is that’s it’s been disabled in code.

Line 161 is “return [:]” so the function never executes, but is there a reason for this?

So I’ve not got manual refreshes working, but how do I get automatic updates?

I’m guessing it’s to do with enabling reporting to the groups but I can’t see where those groups get associated with the Hub in the DH, or how that information gets handled by the DH.

1 Like

So I’ve added a few features to this to meet my needs and if I get a bit more time I’ll make them more configurable.

Mainly I’ve added energy costs and the abilty to reset in software without resetting the actual reading on the device.

I couldn’t have done this without the aweseome code that @ClassicGOD wrote, I was going to fork the project but the repo is already a fork of the whole ST repo so it wasnt’ possible.

I’ve setup a new repo here → GitHub - Tmp2k/AeotecHEMgen5: SmartThings Device Handler for Aeotec Home Energy Meter Gen 5 feel free to put any of my code back into the original DH.

Added:

  • Energy costs displayed based on “Cost per unit” in prefernces
  • Resetting the meter doesnt change the energy reading on the device, it jsut adds an offset in software to zero the reading. This means you can reset as often as you like but you’ll never loose the total energy usage.
  • There is another offset value in preferences so that you can match the meter readings up to your existing meter value to keep things consistent.

Changed:

  • Fixed the refesh routeen, made parent refresh refresh all children and set it to perform a refresh every 5 mins
  • Changed some of the units and rounding so the display is simpler
  • Changed default display in devices list to cost instead of kW

Todo:

  • Add a reset date so that standing charges can be added to cost based on the last reset date
  • Add configurable currency and other options for calculating costs
  • Allow choice of unit to display on device list via preferences e.g. cost / kWh / kW etc.
4 Likes

Great update. Do you know what one needs to do to make it work well with the new version of the SmartThings app ? It works fine on the classic.

valueTile("totalCost", "device.totalCost", decoration: "flat", width: 2, height: 2) {
		state "totalCost", label:'${currentValue}', unit: "€"
	}

Managed to find the value places where the Units are shown. It would be a great idea to actually define the currency as a parameter.

I am also using ActionTiles and see that the units shown on ActionTiles are W while the DTH is providing the values in kW. Changed the following:

case 2: type = “power”; unit = “W”; value = Math.round(cmd.scaledMeterValue); break;

Where can I actually see the result of adding cost per unit? I don’t see it on the device page in classic :confused:

You should be able to see the cost on the device list page as the default attribute. Then when you view the device there should be 6 small tiles below the main tile.

[ Main tile ]
[kWh] [Volt] [Amp]
[Cost] [Meter reading] [Reset]

If that’s not what you’ve got see if you can post a screen shot.

Cost is just missing for me. I don’t think my meter is pairing correctly, as I have to manually refresh the tile to shaw any updates, although as far as I can tell it is paired securely, as it has Ls in the raw description in the IDE;

zw:Ls type:3101 mfr:0000 prod:0000 model:0000 ver:1.04 zwv:4.54 lib:03 cc:5E,86,72,32,56,60,8E,70,59,85,7A,73,98,5A sec:32,60,8E,70,59,85,7A,73 role:05 ff:9000 ui:9000 epc:3

Should it be zeros for mfr, prod & model?


Also, what does the reports group thing do? I can’t fathom that either…

Had to reinstall the device and now I cannot see the updated values for the children. I can see them being captured per clamp in the log but they are not shown in SmartThings Groovy IDE or the apps. Any ideas?

Re-did the installation of the device and confirmed its is in secure mode. Logging shows the children values but not in the UI ?! :pleading_face:

I had installed the HEM Gen5 and the ClassicGod device handler per the Aeotec setup instructions. Things seem to be functioning ok except the HEM wouldn’t auto report and I needed to manually click the refresh button for a new reading. I was given the following steps by Aeotec support that helped remedy the issue. I thought I’d pass a these along to maybe help someone with the similar issue.

From Aeotec Support:
It is likely that the association did not set properly during the pairing process (typically i see this happen if you don’t get auto reports and clicking refresh updates all sensor status).

You can fix this using Z-Wave Tweaker:

The steps to install Z-Wave Tweaker (You only need to do this once, if already installed, skip this section):

  1. Login to your SmartThings IDE
  2. Click on Locations and then select your gateway
  3. Select “My Device Handlers” then click on “Add new Device Handler”
  4. Select “From Code”
  5. Go into the Z-Wave Tweaker Code, and copy all of the code from line 0 to the very last line. (can be found here directly: https://github.com/codersaur/SmartThings/blob/master/devices/zwave-tweaker/zwave-tweaker.groovy)
  6. PRO TIP - Click on the “Raw” button which exposes only code, then ctrl + a (highlight all), then ctrl + c (copy highlighted).
  7. Paste this into your SmartThings IDE.
  8. Save the code.
  9. Then click on Publish -> “Publish for me”

Now install Z-Wave Tweaker over HEM Gen5 :

  1. Click on “My Devices”
  2. Look for your ​ HEM Gen5 and click on it
  3. Scroll to the bottom then click “Edit”
  4. Find “Type” and bring out the drop down menu
  5. First make note of the original device handler that you were using (you will need to revert back to the original device handler later)
  6. Find “Z-Wave Tweaker” and select it
  7. click on “Update”

Using Z-Wave Tweaker to Set a GROUP ASSOCATION

  1. Go into your “SmartThings Classic” App over your Smartphone
  2. Find the ​ HEM Gen5 and open up its page, you’ll notice that everything is incredibly different. Please make note of the GREEN “Sync” symbol at the bottom.
  3. On the top right, click on the GEAR icon
  4. Scroll down and look for the “CONFIGURE ASSOCIATION GROUP” section, there are multiple parts in this section (Association Group ID, Association Group Members, Command Class)
  5. On " Association Group ID " set this to = 1
  6. On " Association Group Members " set this to ​= 01 (this is the NodeID identification of your SmartThings hub)

image

  1. On “Command Class” set this to “Auto-detect”
  2. Now click on “Save” located on the top right.
  3. From step 2 you made note of the GREEN “Sync” symbol, if the color is ORANGE “Unsynced” then you will need to wait for this to change to GREEN “Sync” before moving onto the next section.
  4. If your Z-wave device is a battery device, Wake up the battery device now to take in the new changes.
  5. If you see GREEN “Sync” at the bottom of the device page, you are now done with this section.

Now install the original device handler over ​ HEM Gen5 :

  1. Click on “My Devices”
  2. Look for your ​ HEM Gen5 and click on it
  3. Scroll to the bottom then click “Edit”
  4. Find “Type” and bring out the drop down menu
  5. Find the original device handler and select it
  6. click on “Update”
1 Like