So if on/off switch send me data with some source and destination end point value, should I use those values in tx packet?
of course.
For example, I see the frame which was shown in the above which captured.
I understand any parameters, SE=0D,DE=FF,ON/OFF CLUSTER(0006),HA profile(0104).
if you want to send any command or read attribute, then you will set DE=0D, and SE will be set as you like number.
Anything for SE?
There is one more thing, that I donāt quite understand ā¦ that is FRAME CONTROL of ZCL header ā¦ can you help me to build a packet which would put switch in ON mode? I donāt know what am I doing wrong, because nothing had worked so far.
Do I have to include both, 64 and 16 bit address or can I omit one of them?
So if we would build a packet ā¦
Start Delimiter = 0x7E Length = to be calculated ā¦ Frame Type = 0x11 Frame ID = 01 meaning? DA64 = 00124B0001A76371 DA16 = 0FB3 SE = some arbitrary number? DE = 0x0D Cluster ID = 0x0007 ? Profile ID = 0x0104 Broadcast Radius = 0x00 (maximum) Transmit Options = 0x00 (as stated in XBeeĀ®/XBee-PROĀ® ZB RF Modules document - All bits must be set to 0) Frame Control = ??? Transaction Sequence Number = 0x01 - some arbitrary number right? Command ID = 0x02 Write attributes? Attribute ID = 0x0010 (Switch Settings Attribute Set) ZCL Payload ? = 0x30 (8-bit enumeration) 0x01 (value) ?? Checksum = to be calculated ā¦
And where can I find any info on returned value from certain cluster ā¦ while I trying to get this packet right, the switch is sending me back packets, but I donāt know how to interpret them ā¦
Start Delimiter = 0x7E Length = to be calculated ā¦ Frame Type = 0x11 Frame ID = 01 meaning? if you want to get transmited status, this field is set not zero. DA64 = 00124B0001A76371 DA16 = 0FB3 if you got the 16bit network destination address, this field will be set it you got, but not, then it must be set to 0xfffe. SE = some arbitrary number?yes,from 0x01 to 0xf0. DE = 0x0D Cluster ID = 0x0007 ? yes, perhaps. Profile ID = 0x0104 Broadcast Radius = 0x00 (maximum) Transmit Options = 0x00 (as stated in XBeeĀ®/XBee-PROĀ® ZB RF Modules document - All bits must be set to 0) Frame Control = ??? perhaps 0x00 Transaction Sequence Number = 0x01 - some arbitrary number right? incremented counter Command ID = 0x02 Write attributes? yes Attribute ID = 0x0010 (Switch Settings Attribute Set) yes, perhaps. (notice!. this field is set little endian). ZCL Payload ? = 0x30 (8-bit enumeration) 0x01 (value) ?? yes Checksum = to be calculated ā¦
By the way,does āWireless IR Motion Detectorā have something on/off factor?.
I believe the problem is in Frame Control ā¦ that is the only thing, that I donāt know how to set.
2.3.1.1 Frame Control Field
The frame control field is 8-bits in length and contains information defining the
command type and other control flags. The frame control field shall be formatted
as shown in Figure 2.3. Bits 5-7 are reserved for future use and shall be set to 0.
Bits: 0-1 -> Frame type | 2 -> Manufacturer specific | 3 -> Direction | 4 -> Disable default response | 5-7 -> Reserved
2.3.1.1.1 Frame Type Sub-field
The frame type sub-field is 2 bits in length and shall be set to one of the nonreserved
values listed in Figure 2.4.
Frame Type Value(b1b0) | Description
00 | Command acts across the entire profile
01 | Command is specific to a cluster
10-11 | Reserved
2.3.1.1.2 Manufacturer Specific Sub-field
The manufacturer specific sub-field is 1 bit in length and specifies whether this
command refers to a manufacturer specific extension to a profile. If this value is
set to 1, the manufacturer code field shall be present in the ZCL frame. If this
value is set to 0, the manufacturer code field shall not be included in the ZCL
frame.
2.3.1.1.3 Direction Sub-field
The direction sub-field specifies the client/server direction for this command. If
this value is set to 1, the command is being sent from the server side of a cluster to
the client side of a cluster. If this value is set to 0, the command is being sent from
the client side of a cluster to the server side of a cluster.
2.3.1.1.4 Disable Default Response Sub-field
The disable default response sub-field is 1 bit in length. If it is set to 0, the Default
response command will be returned, under the conditions specified in 2.4.12.2. If
it is set to 1, the Default response command will only be returned if there is an
error, also under the conditions specified in 2.4.12.2.
2.3.1.2 Manufacturer Code Field
The manufacturer code field is 16-bits in length and specifies the ZigBee assigned
manufacturer code for proprietary extensions to a profile. This field shall only be
included in the ZCL frame if the manufacturer specific sub-field of the frame
control field is set to 1.
I set frame control to 0x01, cluster id to 0x0006, and voila, light turned on [:D]
The packet contains only command ID (0x00 - OFF, 0x01 - ON, 0x02 - TOGGLE)
I set frame control to 0x01, cluster id to 0x0006, and voila, light turned on [:D]
The packet contains only command ID (0x00 - OFF, 0x01 - ON, 0x02 - TOGGLE)
Thank you chobichan, youā ve been a great support so far! I finally started to understand zigbee ha protocol.
But as far I understand, not all options are supported with xbee ā¦ for that I would need zigbee module with HA support right?
Such as forming a network, discovery of devices etc. I can only use zdo and zcl commands right?
I have the same ir motion detector as Pajci has mentioned in first postā¦ Now i wonder how can i configure it? iām reading zigbee cluster library but i donāt get it
I can read some values, eg. ZoneState (page 361 in zcl) 18 01 01 00 00 00 30 00 79 (this means not enrolled,how to get it?) or ZoneType (page 362 in zcl) 18 01 01 01 00 00 31 FF FF 79 ffff means invalid zone typeā¦ expected value is 0d00 (motion sensor) any suggestion how to set it, that iāll get some values when something will move in front of the sensor?
if i read IAS_CIE_Address register (page 364 in zcl) i get response 18 01 01 10 00 00 F0 00 00 00 00 00 00 00 00 A9 ā> this is address of coordinator (digi xstick) is this ok?
How could i send (how should i structure a packet)a generated Command (page 366, chapter 8.2.2.4 in zcl document) Zone Enroll Request?