[Depreciated] Aeotec HEM (Gen 5) ZW095-A Driver

For the Aeotec Home Energy Monitor Gen 5 (ZW095-A) only.

This thread has been created to combine/update the information about this device/driver. As well as provide detailed documentation on how to deploy it. This driver is maintained by @codahq, with support/documentation by yours truly. It is a fairly complex driver. Please read this carefully. If you have questions, or updated data, please post.

MUST READ - If you read nothing else, please read this section

On first use go to the Device details, and Preferences section. Here you must set Cost (can be anything, or the actual cost from your electric company), as well as your Reporting Group options. If you do not make the Cost/Reporting Group selections properly it will not report any readings. If you're switching from another driver, and your Reporting Group options look different - see Know Issues.

Quick reference sample

Driver Capabilities

All capabilities can be reported in total, as well as for each clamp separately.

Capability - Reports As

KWH - Energy
Watts - Power
Current - Current
Voltage - Voltage

Reporting Groups

Reporting Groups are the sets of information you would like sent to the hub at a given interval.

It is recommended NOT to chose a similar state type for separate Reporting Groups (shown below)

Wrong selection example - Will not work properly, results in kVarh listed - see Known Issues

Instead if you want a state reported for separate clamps, select them all in the same Reporting Group. To combine all similar state options in one Reporting Group by holding the CTRL key for Windows (Command key for Mac), and selecting each one. Unfortunately, since Hubitat doesn't support multi-select preferences in drivers you will have to select your Reporting Groups EVERY time you save preferences.

To get started we recommend choosing....

Reporting Group 1 - Watts HEM, Watts Clamp 1, Watts Clamp 2
Reporting Group 2 - Current HEM, Current (Amperes) Clamp 1, Current (Amperes) Clamp 2
Reporting Group 3 - KWH HEM, KWH Clamp 1, KWH Clamp2

Correct selection example - Will show state for all the given selections, both Clamps 1 - 2, and total independently. (state HEM selection not displayed, but selected above)

Save Preferences

Once Cost, and Reporting Group selections have been made, click Save Preferences to apply.

Driver Code

See this post for details

Preferences Details

  • Cost in $ / kWh - The amount you are charge by your provider for electricity.

  • CRC-16 Encapsulation - prevents partial messages from being misinterpreted as wrong values

  • Selective Reporting - Applies to watts only. When enabled instead of sending watts at the interval specified it will perform two checks;
    ~ The first check is to see if the watts have changed by the amount you specified in the numeric change preferences. If the watts have changed by more than this amount since the last report the report will be sent. Otherwise, the HEM does not communicate watts, to the hub.
    ~ The second check is exactly like the first except that instead of checking a number it checks by a percent.

Example - Reporting Group 1 selections is HEM Watts, and HEM Voltage, with Selective Reporting disabled

Mocked up data that is reported:
6:00 PM - 500 watts, 124 volts
6:01 PM - 503 watts, 123 volts
6:02 PM - 502 watts, 123 volts
6:03 PM - 575 watts, 124 volts
6:04 PM - 579 watts, 125 volts
6:05 PM - 569 watts, 122 volts

Example - Reporting group 1 is setup with HEM watts, and HEM voltage, with Selective Reporting enabled. "Whole HEM Watts Change" is set to 50.

Mocked up data that is reported:
6:00 PM - 500 watts, 124 volts (500 saved internally as last watts report)
6:01 PM - 123 volts (503 watts report suppressed because 503 - 500 = 3 which is less than 50)
6:02 PM - 123 volts (502 watts report suppressed because 502 - 500 = 2 which is less than 50)
6:03 PM - 575 watts, 124 volts (575 saved internally as last watts report)
6:04 PM - 125 volts (579 watts report suppressed because 579 - 575 = 4 which is less than 50)
6:05 PM - 122 volts (569 watts report suppressed because 569 - 575 = -6 which is less than 50. they absolute value the difference)

  • Whole HEM Watts Change - The amount of numeric change +/- in Watts HEM needed to trigger a report when selective reporting is enabled

  • Clamp 1 Watts Change - The amount of numeric change +/- in Clamp 1 Watts needed to trigger a report when selective reporting is enabled

  • Clamp 2 Watts Change - The amount of numeric change +/- in Clamp 2 Watts needed to trigger a report when selective reporting is enabled

  • Whole HEM Watts Percentage Change - The percentage of change +/- needed in Watts HEM to trigger a report when selective reporting is enabled

  • Clamp 1 Watts Percentage Change - The percentage of change +/- needed in Clamp 1 to trigger a report when selective reporting is enabled

  • Clamp 2 Watts Percentage Change - The percentage of change +/- needed in Clamp 2 to trigger a report when selective reporting is enabled

KNOWN ISSUES

Hubitat doesn't support multi-select preferences in devices. There is nothing we can do about this. We need the HE devs to fix this. They sort of work but the limitations are:

  • They always reset after the page reloads, and do not populate values

  • They start as single select until you save once

    • If you're switching from another driver you may see the screen below. Chose one from each group then click "Save Preferences". After the first save you will have the option to select multiple states for each group.

Reporting Group Error - some combinations don't save correctly and kVarh (an unimplemented report) is defaulted to the report groups instead. It is not known, why or what combinations will result in this error. However we have found that if see "kVarh" in the Reporting Group list, that is most likely a bad combo. Please post bad combos, so we can create a list here.

image

  • Reporting Group Error will occur when using the same state type in different Reporting Groups. If you want a state reported on separate clamps, select them all in the same Reporting Group. Do this by holding the CTRL key, and selecting each one.

Devices with firmware 1.35 do not adhere to Selective Reporting settings properly.

4 Likes

@mick.baker @LosinIt If I finish/validate the 3 clamp code and then send you guys a copy would you be willing to try it out? (if you buy one LosinIt)

Sure..

I'd love to but the 3-clamp model is useless here in the US, as far as I can tell.

Misunderstood. Thought you were over the pond as well.

@codahq I have some time at the monent to test your changes for POWER 3 if you have managed to code anything yet... Otherwise this driver works very well. Keep up the good work.

2 Likes

Is there a way to add Battery Reports on this driver, getting this warning using this driver every min:

On mine, I don't use the battery at all but the real driver had an option to either have Battery or power via AC power I remembered.

Are you using the model number listed? Don't recall mine having a battery (kinda wish it did). I just checked and my hub does do not give that warning. If it is different let us know, so we can add it to a list that works with the driver.

Either way I'll ping @codahq to see if it can be added either way.

Now that I'm looking, the fingerprint doesn't match exactly so it must not be the exact same. It does have ZW095 labeled on it, maybe I have an older revision/version than what you have. I do know it works for me though other than the warning for the battery that I posted although I don't use the 3rd clamp for the Clamp 2 readings.

Does that mean you have a G1? The Gen 5 isn't battery powerable. What is the fingerprint?

I'm trying to set an alert on power usage in RULE but I don't seem to be able to pick the POWER 1/2/3 attributes only the sum of all 3. Is this something that can be fixed?

Can you get what you want if you don't use power and instead use "Custom Attribute"? The OOB power capability only allows for one power attribute. If you can't get what you want I have considered adding composite devices to have parity with the some of the OOB drivers that have power metering. I would make it an optional preference though. I hate when devices unnecessarily create child devices.

Anyway, in this scenario there would be a child device for each clamp and then you could use the power capability selector on the child devices. I could be convinced to do that if you can't get what you need by using Custom Attribute.

Yes... your right using Custom works. Is your explanation also why I can't select POWER 1/2/3 in the InFLUXDB and HubConnect applications? If so then that's a big shame.

Yes, but doesn't the HubConnect application support custom attributes in some other way?

Indeed it does but needs some one to code the driver. Alas I'm not there myself but I dream one day i will be able to contribute more.

That's reason enough for me to add the child device functionally. I'll post here when the change is pushed.

1 Like

Clamp 3 support and child component device support is posted. If you want clamp 3 support there is one line of code at the top of the file that you change from:

@Field static def ENABLE_CLAMP_3 = false

to

@Field static def ENABLE_CLAMP_3 = true

I didn't want everybody (e.g. me aka the important one) to have to see the clamp 3 options so I hid them behind that variable.

I also captured that battery report even though this really isn't the correct driver for that device. There is no derivative of the Gen 5 that supports battery. There might be one of the G2 but I always thought it was just G1 that supported battery.

Aeotec either had a really bad counterfeiting problem or production or refurbishing issues where a lot of G1 and G2 devices were mislabeled. I have a G2 that is mislabeled as a Gen 5. It even had Gen 5 packaging. There are a myriad of other accounts floating around of devices that appear to be one device that are actually a different device under the plastic case. Who knows what happened.

Either way, the label on the outside of the device is probably not trustworthy in some situations. I would recommend asking the device what it is. The firmware has a harder time lying.

This device isn't powered by batteries.. it's directly powered by the mains!
How can I test the child component changes you have made? I've had a look around and it all seems to be more or less the same as before.

736afe244231f2e997a80d90959803f6

Use the new preference, Luke.

1 Like

Love your sense of humour. I can report that it's now working in HubConnect and InfluxDB. Outstanding... Take the rest of the day off...

I cant praise you enough... excellent work...

2 Likes