[OBSOLETE] Aeotec Home Energy Meter Gen 5 composite DTH

I’ve looked at the documentation and it looks like all parameters should be the same.

To help me track down the issue please go into live logging in the IDE, then in device settings in the app enable logging, change some settings and click done - wait for a minute or two and paste the result you get for the HEM in the Live Logging tab.

That is fantastic news.

From the IDE:

7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:58 PM: info Power Grid Sync Incomplete
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:58 PM: info Power Grid - Executing syncCheck()
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:48 PM: info Power Grid - Parameter timeGroup3 value is 120 expected 120
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:48 PM: debug Power Grid - Parsed: ConfigurationReport(configurationValue: [0, 0, 0, 120], parameterNumber: 113, reserved11: 0, scaledConfigurationValue: 120, size: 4)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:48 PM: debug Power Grid - Parsing: zw device: 28, command: 7006, payload: 71 04 00 00 00 78
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:46 PM: info Power Grid - Parameter timeGroup2 value is 120 expected 120
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:46 PM: debug Power Grid - Parsed: ConfigurationReport(configurationValue: [0, 0, 0, 120], parameterNumber: 112, reserved11: 0, scaledConfigurationValue: 120, size: 4)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:46 PM: debug Power Grid - Parsing: zw device: 28, command: 7006, payload: 70 04 00 00 00 78
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:42 PM: info Power Grid - Parameter percentageClamp3 value is 10 expected 10
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:42 PM: debug Power Grid - Parsed: ConfigurationReport(configurationValue: [10], parameterNumber: 11, reserved11: 0, scaledConfigurationValue: 10, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:42 PM: debug Power Grid - Parsing: zw device: 28, command: 7006, payload: 0B 01 0A 00 00 00
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:41 PM: info Power Grid - Parameter percentageClamp2 value is 10 expected 10
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:41 PM: debug Power Grid - Parsed: ConfigurationReport(configurationValue: [10], parameterNumber: 10, reserved11: 0, scaledConfigurationValue: 10, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:41 PM: debug Power Grid - Parsing: zw device: 28, command: 7006, payload: 0A 01 0A 00 00 00
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:40 PM: info Power Grid - Parameter percentageClamp2 value is 10 expected 10
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:40 PM: debug Power Grid - Parsed: ConfigurationReport(configurationValue: [10], parameterNumber: 10, reserved11: 0, scaledConfigurationValue: 10, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:40 PM: debug Power Grid - Parsing: zw device: 28, command: 7006, payload: 0A 01 0A 00 00 00
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationSet(configurationValue: [0, 0, 0, 120], defaultValue: false, parameterNumber: 113, reserved11: 0, scaledConfigurationValue: 120, size: 4)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationSet(configurationValue: [0], defaultValue: false, parameterNumber: 13, reserved11: 0, scaledConfigurationValue: 0, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationGet(parameterNumber: 11)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationSet(configurationValue: [10], defaultValue: false, parameterNumber: 10, reserved11: 0, scaledConfigurationValue: 10, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - Executing updated()
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationSet(configurationValue: [10], defaultValue: false, parameterNumber: 11, reserved11: 0, scaledConfigurationValue: 10, size: 1)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - no encapsulation supported for command: ConfigurationGet(parameterNumber: 10)
7f37d896-f5f2-45a5-9008-0592abe486d5  4:55:38 PM: info Power Grid - sending config.

OK, it looks like the parameter 13 (CRC-16 reporting) is missing (the HEM does not respond when asked for it’s value) despite the documentation for G2 listing it.

I prepared a new version of the DTH, changed the fingerprint so it gets recognized by ST and removed the parameter 13 “CRC-16 reporting”. I also provided temporary fix for small font on Android. You’ll find it under the same link - the file is called “aeotec-hem-g2.groovy”

After changing to it (the DTH will now be called Aeotec HEM G2) please change at least one setting and press done. Let me know if the Sync Incomplete status clears.

You’re the man!

I really appreciate your help, thanks very much.
(The text size did not change, but that is not the end of the world.)

Edit: Will it be fine if I change the description of the child DTH to refer to “Gen 2”. (It’s the OCD coming through)

If you change the name of child DTH you will have issues with creation of the child devices (the main DTH refers to the child DTH during creation of the child devices by name), but if they are already created changing the name shouldn’t cause any problems.

1 Like

I suspected as much.

My HEMS work properly for the first time and I may actually be able to use the one connected to the backup generator as I had planned.

Thank you once again!

I forgot to commit the fix for the small font to GitHub - that it’s why it wasn’t working. Should be fixed with the newest version.

1 Like

Perfect:

Should you not perhaps change the subject of the thread to refer to the Gen 2 as well? Or start a new thread to let people know that there is a proper DTH available for the Gen 2?

I’ll let you test it for at least few days before I start advertising it as working. :stuck_out_tongue:

1 Like

Hey ClassicGOD. How long should the device show “Sync In Progress”? My has been showing that for about 30 minutes since I installed the DTH.

Thanks,
–Jamie

“It requires “Aeotec HEM Gen5 Child Device” to work correctly so install both parts of the DTH before switching to it.”

Pardon my ignorance, but how do I install the child device code? I thought there is one DH for each device as selected via the drop down menu on the IDE. How do I (or maybe where) do I install the child device??

Thanks in advance…

Shawn

@royalj7 For this DTH “Sync In Progress” should last 40sec maximum. It looks like for some reason a scheduled function that verifies if sync finished did not run - please go into settings, change something and click done.

@ShawnInPaso Just install the Child Device DTH code so it’s visible in your ‘My Device Handlers’ tab. You don’t have to set it to any device. The main DTH uses it to create child devices.

If you don’t see the child devices make sure that your HEM is set to the main DTH and you have Child DTH installed in ‘My Device Handlers’ tab, then go to the HEM settings in ST app and click done - that should create the child devices.

@ClassicGOD - Thanks for the info, I’ll give it a try.

Edit to add: Hey, it works great !!!

The previous code I was using, for reasons I don’t understand, stopped updating the data. So…it is great to be able to use your code which has my HEM showing data again. Yay.

Thanks so much.

Some versions of firmware for 3 clamp EU version of HEM Gen 5 from time to time can start sending data with incorrect checksum making SmartThings reject them. If that happens to you and you see the data not updating again go to settings and change the CRC-16 setting, then sync, then change it back to what it was and wait for sync again.

If you have this specific model (EU, 3 clamp, 60A, Gen 5) AFAIK the newest firmware is 1.02 (look for “ver:1.02” in raw description in Devices tab of IDE). You can ask Aeotec support for the update but you will need USB to Z-wave adapter to use it.

I get this almost to work thanks to ClassicGOD, but gets the following errors that appear in the log.

12:59:42: error java.lang.NullPointerException: Can not invoke method startsWith () on null object @ line 198
12:59:42: info 1 Elet - Executing updated ()
12:59:41: error java.lang.NullPointerException: Can not invoke method startsWith () on null object @ line 198

Assuming that the errors above make me missing the values for “V” and “A” in the app.
Does it to do with the synchronization? (Connect Hem with ST)
In the app, “W” and “KWH” are displayed correctly.

Any idea what might be wrong?

I use: aeotec-hem-g2.groovy and aeotec-hem-gen5-child-device.groovy.

Thanks ClassicGOD, it synced and I’ve been collecting data through InitialState. Question for you. I have two 200A service panels at my home. I have the Aoetec HEM hooked up to one now. Is there anything I need to be aware of if I want to add a second unit? Is the DTH compatible with that setup?

If I do add a second, is there any way to get a sum of the two meters to report?

Thanks,
–Jamie

@Magnusvby - what meter version? Is it 1 clamp version?

@royalj7 there should be no issue with more than 1 meter but there is no real way to sum them together in DTH, sorry. Maybe someone could write a smart app with virtual devices but I don’t own 2 meters so even if I had time to write something like that I don’t have the hardware :wink:

Gotcha. Just to have them report seperately, I don’t need to do anything speical during setup?

Thanks,
–Jamie

No, you jus add it like the first one - jus remember to name it differently so you can tell them apart :smiley:

@ClassicGOD

A comment and a question if I may.

  • I use ActionTiles and noticed this DTH didn’t show up in the “authorized things” list for AT. So I added it as per this article: http://support.actiontiles.com/topics/363-some-devices-are-missing-from-the-authorize-things-add-location-screen/

  • Your code works great! I am trying to figure out the reporting, right now I get the live data perfectly (just 2 clamps used here), but I cannot see anything under the “Recently” screen and in the smartthings IDE nothing shows up in the “events” for the HEM. I have nearly everything enabled in reporting with low thresholds, so I must be doing someting wrong?? Any guidance appreciated…and again thanks for writing the awesome code.

Shawn