HA Electrical Measurement Specification

I have been looking for information on how to process clusterInt:2820, cluster:0B04, size:26, attrInt:1285, attrId:0505. I have a smartenit in wall outlet model 4035A. I used the smartpower Outlet as a starting point and modified the inclusters. This seems to be working outside the updates from the outlet.

I assume this is a new spec. It is located here but I do not have an account and I have still not gotten emails back after signing up.

Here is what I know so far. 0505 is RMSvoltage. I have extended the getPowerDescription to catch this cluster and attribute but am at a loss with no documentation.

Here is the raw data
Parsed Data: [raw:B6F2010B04260505217B0008052184000B05290A001005283D, dni:B6F2, endpoint:01, clusterInt:2820, cluster:0B04, size:26, attrInt:1285, attrId:0505, encoding:21, value:3d280510000a29050b0084210508007b]

My code is on github here.

If anyone has this elusive measurement specification can you post that link.
Maybe I am not approaching this correctly but I think this is all that is left to do to get this outlet functioning correctly.

That message actually contains a bunch of different attribute values but the platform doesn’t currently parse them all out for you. We plan to make it easier to handle these types of messages in the future, but for now you’ll need to do a little more work in the device type handler.

Digging into the the “raw” data of B6F2010B04260505217B0008052184000B05290A001005283D:

(note that all values are hex, attributes and values are in little endian byte order)
B6F2 - dni (aka node ID)
01 - endpoint
0B04 - electrical measurement cluster
26 - number of characters remaining in the string
0505 -> 0x0505 RMS Voltage attribute
21 - data type (unsigned 16-bit integer)
7B00 -> 0x007B value for RMS Voltage (0x007B = 123 V)
0805 -> 0x0508 RMS Current attribute
21 - data type (unsigned 16-bit integer)
8400 -> 0x0084 value for RMS Current
0B05 -> 0x050B Active Power attribute
29 - data type (signed 16-bit integer)
0A00 -> 0x000A value for Active Power
1005 -> 0x0510 Power Factor attribute
28 -> data type (signed 8-bit integer)
3D -> 0x3D value for Power Factor

The definition of the RMS Voltage attribute from the ZigBee ZCL specification is:

Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be measured, a value of 0xFFFF is returned.

1 Like

Let me dig in and see if I can come up with a power function for this until you guys build it in. I will report back as soon as I have a workable solution. Any chance I can see the current parser. I assume mine will be much more of a hack due to experience with groovy.

OK this is coming along slowly. This said it is progressing. I have gotten the power to auto update but it uses both the simple power standard ( on refresh) and the HA Electrical measurement spec when it sends out the update. As I learn I will have to see if there is a way to tell the refresh to use the HA electrical measurement but for now it seems to work. Next challenge, I have uploaded the spec sheet with the cluster IDs. I can not get the device to register as anything but a thing. Is there anything that will tell me what its cluster ID’s are? I think I have the clusters correct. I am not sure about in and out clusters and assume this relates to client or server zigbee standards and I have updated the fingerprint as the spec sheets lists. Any help/direction would be great on how to flush out the issues with registration. Updates are on github Link

Like you probably guessed, “in” clusters refers to server clusters and “out” clusters refers to client clusters. If the device joins as a Thing you should be able to look at the “Raw Description” by clicking on the Thing under My Devices. If it doesn’t show Raw Description it is possible we didn’t get the Simple Descriptor from the device when it joined. Removing the device from the account, factory resetting it and joining it again should usually fix that.

Once it shows Raw Description, the fifth parameter is the number of In/Server clusters, followed by those clusters, followed by the number of Out/Client clusters, followed by those clusters. My guess is this device has a few undocumented clusters that you need to add to the fingerprint. Also, if you’re not sure about the values for manufacturer and model I suggest leaving those out of the fingerprint until you get the device to join with your device type. Wrong values for manufacturer and model can prevent an otherwise correct fingerprint from matching the device.