Sending raw zigbee commands

IM trying to get the chimes to work on the iris keypad. I think I know the commands I just dont understand how to send them.

Im trying to send  cmd 20 data 3 to cluster 00C0

or cmd 25 data 2000 to clusrer 00C0

def zbc = zigbee.clusterLookup(0x00C0)
Is null but I know the internal care fob drivers send to this cluster.

This doesnt work. What am I doing wrong is there another way to send the commands.

def cmd = "he raw ${device.deviceNetworkId} 0 ${device.endpointId} 0x00C0 {11 00 20 03 00} {0xC216}"
sendHubCommand(new hubitat.device.HubAction(cmd, hubitat.device.Protocol.ZIGBEE))

Ive tried all kinds of variations. I think the command goes on the 3rd one but Ive tried others


Iris source code Java

AME_ATTR_SOUNDS_MASK = 0x0025;
AME_ATTR_KEYPADSTATE = 0x0020;
KEYPADSTATE_ARMED_PARTIAL = 3;
KEYPADSTATE_ARMED_ON = 2;
SOUNDIDX_HOME= 0x2000;
SOUNDIDX_ALARM= 0x8000;
SOUNDIDX_NIGHT= 0x4000;

  int sm = soundMask;
  if ((KEYPADSTATE_ARMED_PARTIAL == code) || (KEYPADSTATE_ARMED_ON == code)) {
     sm |= ( SOUNDIDX_ARMED | SOUNDIDX_HOME | SOUNDIDX_NIGHT);
  }

General.ZclWriteAttributeRecord[] recs = new General.ZclWriteAttributeRecord[] {
General.ZclWriteAttributeRecord.builder()
.setAttributeIdentifier(AME_ATTR_SOUNDS_MASK)
.setAttributeData(ZclData.builder().set16BitBitmap(rsm).create())
.create(),
General.ZclWriteAttributeRecord.builder()
.setAttributeIdentifier(AME_ATTR_KEYPADSTATE)
.setAttributeData(ZclData.builder().set8BitEnum(code).create())
.create()

The Java snippet is preparing an Attribute value ..... presumably somewhere else it sends it to a Cluster.

You should be able to use the standard methods of the Zigbee object to write to the Attribute as detailed on Zigbee Object - Hubitat Documentation

writeAttribute(Integer cluster, Integer attributeId, Integer dataType, Integer value, Map additionalParams = [:], int delay = STANDARD_DELAY_INT)

The last two parameters are optional so you can leave them off:

writeAttribute(Integer cluster, Integer attributeId, Integer dataType, Integer value)

But you do need to supply the correct data type e.g. DataType.ENUM8 or DataType.BITMAP16

Ok well Im missing something on how to send this. I had tried that before and got this error.
No signature of method: xxx.writeAttribute() is applicable for argument types: (java.lang.String, java.lang.String, java.lang.Integer, java.lang.String) values: [0x00C0, 0x020, 48, 0x03] on line 997 (method on)

cluster ="0x00C0"
attributeId ="0x020"
dataType = DataType.ENUM8
value = "0x03"

list writeAttribute(cluster, attributeId, dataType, value)

or writeAttribute(cluster, attributeId, dataType, value)

Well the clue is in the error message :slight_smile:

You are passing String values and not the Integer values that the method is expecting as per its definition:

writeAttribute(Integer cluster, Integer attributeId, Integer dataType, Integer value)

So declare those variables without the quotes:

cluster = 0x00C0
attributeId = 0x020
dataType = DataType.ENUM8
value = 0x03

Well I tried that. Also tried converting to dec and converting that to a integer
Same error

groovy.lang.MissingMethodException: No signature of method: xxx.writeAttribute() is applicable for argument types: (java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer) values: [192, 32, 48, 3] on line 1006 (method on)

I also need to send to endpoint 2 could that be it.

Maybe post more of your code so it can be validated, e.g. what's "xxx" in the error message referring to?

Wrap your code in the " or </> icons on the toolbar to make it easier to read.

Im trying to make this simple to eliminate anything else. Im just testing it by sending it with the on switch command in the driver. So its just the code I entered under on()

Preformatted textdef
on() {

cluster = 0x00C0
attributeId = 0x020
dataType = DataType.ENUM8
value = 0x03

writeAttribute(cluster, attributeId, dataType, value)

}Preformatted text

groovy.lang.MissingMethodException: No signature of method: user_driver_tmastersmart_Iris_v1_Keypad_864.writeAttribute() is applicable for argument types: (java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer) values: [192, 32, 48, 3, 2] on line 1006 (method on)

My driver is here but it doesn't have this code in it it has raw code under on() All that's removed.

writeAttibute() is a Zigbee Object method so you either need to import that class somewhere in your code or reference it with zigbee.

"The package name of this class is zigbee. So to use in an App or Driver you would reference it with zigbee." from:

https://docs.hubitat.com/index.php?title=Zigbee_Object

Well that got rid of the error but its ignoring me. I have to send to endpoint 2 How would I add the 02

this should do it:
zigbee.writeAttribute(cluster, attributeId, dataType, [destEndpoint :0x02])

4 Likes

Yep thanks that works for the arming It still wont take the sound commands but the sounds are working when it arms that's all we really need. I will have to experiment with it to see if its even possible to get chimes to sound separate from the arming. I thought it used to have a door chime.

Its all working now and that allowed me to control the care pendant also

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.