Read report value from zigbee


(Marco) #1

Hi, i’m trying to read a value generated as a report from a zigbee Device (Fibraro FGRM 222)

I use parse() method to take the report but i cannot read the payload.

I have tried cmd.getValue() but system throws an exception.
I have tried cmd.getPayload() and it works but I cannot get the number but just [255]

Can u please help me?

Below code and log.

837153dd-35c1-47b3-a9b6-971064fc2480 08:20:48 CEST: debug Report SwitchBinarySet:[255]
837153dd-35c1-47b3-a9b6-971064fc2480 08:20:47 CEST: debug Parsed SwitchBinarySet(switchValue: 255)
837153dd-35c1-47b3-a9b6-971064fc2480 08:20:47 CEST: debug Parsing 'zw device: 10, command: 2501, payload: FF ’

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinarySet cmd) {
log.debug “Report SwitchBinarySet:${cmd.getPayload()}”
//Per controllare quando si chiude tapparella con bottone
if(cmd.getPayload() == “[255]”)
sendEvent(name: “openClose”, value: “opening”);
else
sendEvent(name: “openClose”, value: “closing”);
}

tks
Marco