Bug #153

Get Group Membership Command payload

Added by Han Alink almost 6 years ago. Updated about 4 years ago.

Status:Closed Start date:10/22/2012
Priority:Normal Due date:
Assignee:Stefano Lenzi % Done:

0%

Category:zigbee.zcl.library Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.zcl.library-1.X
Has a patch:No Has license agreement signed:No

Description

The Get Group Membership Command has 2 parameters: GroupCount and GroupList.
Only one is available in the tester interface.
Also the "Java Type" is corrupt (I think).

getGroupMembership.jpg (67.1 kB) Han Alink, 03/04/2013 08:44 pm


Related issues

blocked by Improvement #158: Add support for array type in ZigBee Tester Closed 10/23/2012
blocked by Improvement #162: No command result shown when type is Response in Tester Closed 10/24/2012

Associated revisions

Revision 557
Added by Stefano Lenzi almost 6 years ago

Adde Test Unit GetGroupMembership and fixed automatic generation of Group Count field (refs #153 )

Revision 612
Added by Stefano Lenzi over 5 years ago

Parsing of cluster was broken again because they were expecting Generic Response instead of Cluster Specific Response ( refs #174 )
Fixed parsing of Get Group Membership Command ( refs #153 )
Added method for readin uint8 and uint16 from ZCL Frame ( refs #153 ) to DefaultDeserializer and ZBDeserializer

Revision 670
Added by Stefano Lenzi over 5 years ago

Fixed the espected return response for Get Group Membership command ( refs #153 )

Revision 672
Added by Stefano Lenzi over 5 years ago

Added JUnit for Get Group Membership Command ( refs #153 )
Fixed missing defaultResponseEnabled() for Get Group Membership Command ( refs #153 )
Fixed desereliaziation of Group List for Get Group Membership Response ( refs #153 )
Added missing header to AlarmsClusterTest

Revision 1063
Added by Stefano Lenzi about 4 years ago

Array type are displayed in human readable form instead of java naming (i.e. int[] is shown as int[] instead of [I)
Created JUnit for checking the method
refs #153

History

#1 Updated by Stefano Lenzi almost 6 years ago

  • Category set to zigbee.zcl.library
  • Status changed from New to In Progress
  • Target version set to org.aaloa.zb4osgi.zigbee.zcl.library-1.X

The Java class representing Get Group Membership Command defines only a int[] parameter, because the GroupCount parameter is equal to the length of the array in Java. Nevertheless, the generation of the command was missing the GroupCount field till r557

Give it a try and closing if you agree to not define a GroupCount field and if it is working for you

#2 Updated by Han Alink almost 6 years ago

We still have a problem here. Trying to execute the getGroupMembership command shows the following error:
(Also the Java parameter name "[I" is wrong)

==== Action:: Groups.getGroupMembership ====
[12]
----------- result ----------
No cluster sent on the, because I was not able to handle the parameter [I with value '12'
More dettails on the issue:
org.persona.zigbee.tester.gui.Command$CommandParsingException: No convertion defined from class java.lang.String to argument of type class [I
at org.persona.zigbee.tester.gui.Command.invoke(Command.java:93)
at org.persona.zigbee.tester.gui.CommandActionPanel$1.actionPerformed(CommandActionPanel.java:97)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

#3 Updated by Stefano Lenzi almost 6 years ago

  • Status changed from In Progress to Feedback

The problem was the support for Array types as parameter ( see #158 )
It should be working now, please let me know and close the ticket in case

#4 Updated by Han Alink almost 6 years ago

No error message anymore, but the name of the group is not displayed in the tester window.

#5 Updated by Han Alink almost 6 years ago

Last update message incorrect; should discarded.

#6 Updated by Han Alink almost 6 years ago

I think the exception thrown now is correct, and it's a problem with the device(ZBMLC15). I'll try with another device.

==== Action:: Groups.getGroupMembership ====
[12]
----------- result ----------
it.cnr.isti.zigbee.ha.driver.core.ZigBeeHAException: it.cnr.isti.zigbee.zcl.library.api.core.ZigBeeClusterException: Expected SpecificCommandFrame (0) but received:2
at it.cnr.isti.zigbee.ha.cluster.impl.GroupsImpl.getGroupMembership(GroupsImpl.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

#7 Updated by Han Alink almost 6 years ago

Tried another device. It's probably not a device issue.
The ZCL frame received : 0x09 0x18 0x02 0x07 0x01 0x0f 0x00 which looks okay to me!

#8 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Feedback to In Progress

#9 Updated by Stefano Lenzi over 5 years ago

  • Status changed from In Progress to Resolved

I have added a JUnit test for testing your scenario and it seems to be working, can you check and close the ticket if it is done

#10 Updated by Han Alink over 5 years ago

Some test information on this item:

I'm first checking that the device supports NAMES:
Read Attribute NameSupport
Status: SUCCESS
Result: -128 (Yes, names are supported).

Now I'm sending the addGroup command (groupId 10, name test)
The resulting response:
[ ZCL Header: 0x19 0x08 0x00, ZCL Payload: 0x8a 0x0a 0x00] Success!!

Now I'm sending the viewGroup command; response:
[ ZCL Header: 0x19 0x09 0x01, ZCL Payload: 0x00 0x0a 0x00 0x04 0x74 0x65 0x73 0x74] (groupID 10, name test) Okay!

Now the getGroupMembership commmand: The send ZCL frame:
0x01 0x17 0x02 0x01 0x0a 0x00 (looks okay to me)

Response ZCL Frame:
0x19 0x17 0x02 0x0d 0x01 0x0a 0x00 (looks also okay to me)

The response in the tester window (is this what I should expect??):

==== Action:: Groups.getGroupMembership ====
[10]
----------- result ----------


Furthermore: The Java type for the groupID parameter of the getGroupMembership command reads: "[I" (and not "int[]"

#11 Updated by Stefano Lenzi over 5 years ago

I have changed the expect response message from the Get Group Membership Command, but I couldn't perform any test check if it is working if you have some time

Finally regarding the [I, it is correct as you can see from Javadoc

#12 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Resolved to Feedback

Added JUnit and checked testing
Please give it a try and close it, the ZigBee Tester should also print some output now

Please close the issue if you agree

#13 Updated by Han Alink over 5 years ago

No other output;just the ZCL frame. See attachment.

#14 Updated by Han Alink about 4 years ago

Okay, the command works as expected. Though I still do not understand why the Java type "array" is indicated with [| instead of int[].
You can close the issue.

#15 Updated by Stefano Lenzi about 4 years ago

  • Status changed from Feedback to In Progress

#16 Updated by Stefano Lenzi about 4 years ago

  • Assignee changed from Stefano Lenzi to Giancarlo Riolo

#17 Updated by Stefano Lenzi about 4 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Giancarlo Riolo to Stefano Lenzi

I should have fixed the display of int[] as expected with r1063

#18 Updated by Stefano Lenzi about 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF