[OBSOLETE] Aeotec Home Energy Meter Gen 5 composite DTH

Before I realised that I have the Gen 2 HEM, I used the DTH for the Gen 5. I had tiles in ActionTiles for the combined reading as well as the individual clamps. All Tiles updated correctly. I can’t remember anymore if I added anything to the DTH to get it to show in Action Tiles.
I could not get the Gen 2 version of your DTH to show up in Actiontiles, so I added these lines to both the parent and child DTH:
capability "Sensor"
capability "Actuator"
After doing that, I was able to add Tiles for the Combined as well as the individual clamps. But only the tile for the Combined values shows the consumption (in Watts), but it does not update. The Tiles of the 3 individual clamps, don’t show anything.
Any ideas?
Another thing I’ve noticed is that the total kWH readings won’t reset.

Are the devices updating in SmartThings app? Try removing HEM and its child devices from Authentication for ActionTiles and adding them again and readding the tiles in ActionTiles.

The only thing required for the DTH to work with ActionTiles is adding the ‘capability “Sensor”’ line. I will probably add it myself with the next update. There are some limitations on update frequency for ActionTiles tiles but other than that they display correctly for me.

When it comes to kWH reading - as mentioned in the first post:

To prevent accidental resetting of kWh data to perform the reset you have to press the “Reset kWh” tile at least twice with about 0.5sec delay between presses (or SmartThings may not register the second press) in a span of 2 seconds. You can tap it until you see “RESETTING KWH!” flash on the main tile or the kWH value reset.

I managed to reset the kWh, thank you. I’ll try the other suggestions over the weekend and report back.

Could there be a way we could add a specific date/time for the kWh to reset automatically on a monthly basis?

Yes, using a smart app.

1 Like

Read through the various posts and am confused around the capabilities for reading each clamp independently. Do I need to put both clamps on the same circuit (i.e. line 1 and line 2 of a US Circuit Breaker panel) to read the amps, volts, watts, etc. being used in a house or can a single clamp measure amps, volts, watts, etc. ? (and therefore in US a single meter with three clamps could measure the house plus two individual circuit breakers).

Hi, I’m a bit confused…how do we install the children devices ?

Once you have added both device handlers via IDE, the child device is automatically added when the main DTH is linked to the device / installed.

This will also work for the GEN 5?

Hi @ClassicGOD.
I noticed the following errors in the IDE log of one of my Gen 2 HEMs. I haven’t noticed these before, but they could have been there all along. Strange thing is that I’m only getting the errors with one of them - no such error with the second one:

1659a410-4335-4717-bce7-66979d6e898d  4:33:51 PM: error groovy.lang.MissingMethodException: No signature of method: script15002621375931971442421.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryGet) values: [SensorBinaryGet(sensorType: 161)]
Possible solutions: zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest), zwaveEvent(physicalgraph.zwave.commands.configurationv2.ConfigurationReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport), zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation) @ line 340
1659a410-4335-4717-bce7-66979d6e898d  4:33:51 PM: error groovy.lang.MissingMethodException: No signature of method: script15003300766731971442421.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryGet) values: [SensorBinaryGet(sensorType: 161)]
Possible solutions: zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest), zwaveEvent(physicalgraph.zwave.commands.configurationv2.ConfigurationReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport), zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation) @ line 340
1659a410-4335-4717-bce7-66979d6e898d  4:33:49 PM: error groovy.lang.MissingMethodException: No signature of method: script15003401575661971442421.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryGet) values: [SensorBinaryGet(sensorType: 161)]
Possible solutions: zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest), zwaveEvent(physicalgraph.zwave.commands.configurationv2.ConfigurationReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport), zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation) @ line 340
1659a410-4335-4717-bce7-66979d6e898d  4:33:49 PM: error groovy.lang.MissingMethodException: No signature of method: script15003400752191971442421.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryGet) values: [SensorBinaryGet(sensorType: 161)]
Possible solutions: zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest), zwaveEvent(physicalgraph.zwave.commands.configurationv2.ConfigurationReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport), zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation) @ line 340

Sorry for not responding earlier, had other things on my mind recently.

This is strange behawior. Please enable logging in the meter settings and wait for the error again and paste te log here.

It looks like the HEM is sending get (SensorBinaryGet) commands to the HUB? Never seen anything like this.

I’m sorry @ClassicGOD, but I removed both HEM’s from my network for now. I’m having issues with my hub (with the Z-wave module showed as “non-functional” every so often). Running Z-wave repairs, often fail in respect of a few devices and device I received from Support was to remove these devices. The HEMS were 2 of the devices in respect of which the repair failed.

Rapair for HEM probably failed because if they are configured to send a lot of data often they tend to take a long time to respond to commands. But they shouldn’t cause your z-wave module to show as non-functional. If you ever add them to network again try resetting them first :slight_smile:

Good luck with your hub.

2 Likes

anyway the v1 kWH monthly reset app can be updated to work with your DTH?

I’ve re-joined my two HEMS (Gen 2) to ST. Before I enabled logging, I noticed these errors in respect of one of them:

66a5b3e8-ca93-41b3-b790-0a7cfb307859 09:19:03: warn Exception 'java.lang.NullPointerException: Cannot invoke method parse() on null object' encountered parsing 'cmd: 3200, payload: 21 64 00 00 00 00 00 06 00 00 00 00'
    66a5b3e8-ca93-41b3-b790-0a7cfb307859 09:15:13: warn Exception 'java.lang.NullPointerException: Cannot invoke method parse() on null object' encountered parsing 'cmd: E00D, payload: 02 00 32 02 A1 6C 00 00 00 10 00 00 00 00 00 00'
    66a5b3e8-ca93-41b3-b790-0a7cfb307859 09:09:03: warn Exception 'java.lang.NullPointerException: Cannot invoke method parse() on null object' encountered parsing 'cmd: 3200, payload: 21 64 00 00 00 00 00 05 00 00 00 00'
    66a5b3e8-ca93-41b3-b790-0a7cfb307859 09:09:03: warn Exception 'java.lang.NullPointerException: Cannot invoke method parse() on null object' encountered parsing 'cmd: 3200, payload: 21 64 00 00 00 00 00 05 00 00 00 00' 

I’ve also noticed that I’m getting the “Sync Incomplete” error again. (I’m pretty sure I’m using the correct DTH:

   /**
 *  Aeotec Home Energy Meter G2
 *  Requires Aeotec HEM Gen5 Child Device
 *
 *  Copyright 2017 Artur Draga
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *	  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.

Tried numerous times but could not get any of the HEM’s to complete a sync.

Strangely, after enabling Debugging in the Settings, I haven’t been able to capture the error.

I was wondering if it would be possible to change the reporting settings of a device with webCoRE? Idea is to turn reporting of the HEM connected to the generator, off to reduce traffic over the network. It would be fantastic if reports could only be turned on when the generator runs. Currently, I have the reporting threshold fairly high to reduce network traffic, but ideally, if the generator runs, ideally one would want to reduce the reporting threshold, to get an accurate and instant indication of the load on the 3 phases of the generator. That would enable one to turn off devices as one approaches the maximum capacity of the generator.

Please enable logging in settings and paste the log for entire sync proces.

Also please paste raw description for both devices.

Raw Description:
First HEM: zw:L type:3101 mfr:0086 prod:0002 model:001C ver:1.08 zwv:3.67 lib:03 cc:70,32,60,85,72,86 epc:3 ep:[‘3101 32’]
Second HEM: zw:L type:3101 mfr:0086 prod:0002 model:001C ver:1.08 zwv:3.67 lib:03 cc:70,32,60,85,72,86 epc:3 ep:[‘3101 32’]

Log of Sync process:
First HEM:
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:49: info HEM Mains Sync Incomplete
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:49: info HEM Mains - Executing syncCheck()
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:44: info HEM Mains - Parameter timeGroup3 value is 120 expected 0
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:44: debug HEM Mains - Parsed: ConfigurationReport(configurationValue: [0, 0, 0, 120], parameterNumber: 113, reserved11: 0, scaledConfigurationValue: 120, size: 4)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:44: debug HEM Mains - Parsing: zw device: 70, command: 7006, payload: 71 04 00 00 00 78
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:42: info HEM Mains - Parameter timeGroup2 value is 120 expected 0
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:42: debug HEM Mains - Parsed: ConfigurationReport(configurationValue: [0, 0, 0, 120], parameterNumber: 112, reserved11: 0, scaledConfigurationValue: 120, size: 4)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:42: debug HEM Mains - Parsing: zw device: 70, command: 7006, payload: 70 04 00 00 00 78
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - no encapsulation supported for command: ConfigurationGet(parameterNumber: 113)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - no encapsulation supported for command: ConfigurationSet(configurationValue: [0, 0, 0, 0], defaultValue: false, parameterNumber: 113, reserved11: 0, scaledConfigurationValue: 0, size: 4)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - no encapsulation supported for command: ConfigurationGet(parameterNumber: 112)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - no encapsulation supported for command: ConfigurationSet(configurationValue: [0, 0, 0, 0], defaultValue: false, parameterNumber: 112, reserved11: 0, scaledConfigurationValue: 0, size: 4)
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - sending config.
424aa789-1a61-4fe3-936d-59e8db8a5784 11:23:40: info HEM Mains - Executing updated()

Second HEM:
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:26: info HEM Genset Sync Incomplete
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:26: info HEM Genset - Executing syncCheck()
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:16: info HEM Genset - Parameter thresholdClamp1 value is 150 expected 150
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:16: debug HEM Genset - Parsed: ConfigurationReport(configurationValue: [0, 150], parameterNumber: 5, reserved11: 0, scaledConfigurationValue: 150, size: 2)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:16: debug HEM Genset - Parsing: zw device: 71, command: 7006, payload: 05 02 00 96 00 00
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:15: info HEM Genset Sync Incomplete
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:15: info HEM Genset - Executing syncCheck()
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation supported for command: ConfigurationGet(parameterNumber: 113)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation supported for command: ConfigurationSet(configurationValue: [0, 0, 0, 0], defaultValue: false, parameterNumber: 113, reserved11: 0, scaledConfigurationValue: 0, size: 4)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation supported for command: ConfigurationGet(parameterNumber: 112)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation supported for command: ConfigurationSet(configurationValue: [0, 0, 0, 0], defaultValue: false, parameterNumber: 112, reserved11: 0, scaledConfigurationValue: 0, size: 4)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation supported for command: ConfigurationGet(parameterNumber: 5)
66a5b3e8-ca93-41b3-b790-0a7cfb307859 11:27:04: info HEM Genset - no encapsulation sup

OK, i was wandering if the HEMs run different fw versions but looks like they are the same so they should behave the same.

It looks like the Sync incomplete issue is due to parameters 112 (timeGroup2) and 113 (timeGroup3). HEM returns 120 for them and the DTH expects 0. You can see it in the log:

HEM Mains - Parameter timeGroup2 value is 120 expected 0

looks like the HEM doesn’t accept 0 value for this parameters. Try setting them to something different and try again.

The second HEM Didn’t respond with values for 112 and 113 at all - happens sometimes so ignore it for now and try with different values.

That was it! I changed it 112 and 113 to 7200 on both devices and the Sync completed successfully on both on the first attempt.

Thanks for the help.

I have not seen anyone discussing or asking for the ability to change device parameters (settings) with Webcore? Do you think that is at all possible and is there a need for it?

It is possible but proper implementation would require large modifications to sync workflow.

I can write simple addition to the DTH that would enable you to do it but without any checks (like verifying if it succeeded) if you tell me what parameters you would like to change.