I can’t figure out how to add devices using your code. I must have missed something fundamental here. I even tried the command-line version (ZigBeeConsoleMain). I run it using the arguments CC2531 /dev/cu.usbmodem1421 230400 16 0 0 00000000000000000000000000000000 true
and then use “join enable” to enable network inclusion, but I fail to include any devices. I tried the following devices:
IKEA Trådfri Remote
IKEA Trådfri E27 Bulb
Xiaomi Mi Temp/Pressure/Humidity sensor.
When using zigbee4java, device inclusion works (command line java -jar ./legacy-modules/zigbee-console-javase/target/zigbee-console-javase-3.1.0-SNAPSHOT.jar /dev/cu.usbmodem1421 16 0 true
)
Output from zigbee4java:
ZigBee API permit join enable ... [OK]
> 23:00:45 189 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
Node added: 00:15:8D:00:01:A3:66:62 (#5919)
> 23:00:45 190 WARN Created node object for #5919 (00:15:8D:00:01:A3:66:62) that was not available on the network
23:00:45 935 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
23:00:45 936 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
Device added: 00:15:8D:00:01:A3:66:62/1 (#5919)
Node discovered: 00:15:8D:00:01:A3:66:62 (#5919)
> 23:01:01 451 WARN Unknown command ID: 0x45c9
23:01:04 384 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
23:01:04 384 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
23:01:04 830 INFO Device announcement received - Network Address: #5919, IEEE Address: 00:15:8D:00:01:A3:66:62
> list
0) 00:15:8D:00:01:A3:66:62/1 [56765] : Thermostat
However, the Trådfri remote fails (I did not yet investigate why, and I am not that interested in getting zigbee4java running as I prefer to use with your code instead)
> 23:09:08 139 WARN ZDO_NODE_DESC_REQ FAILED on #35312 (00:0B:57:FF:FE:23:75:85)
23:09:15 487 INFO Device announcement received - Network Address: #56765, IEEE Address: 00:15:8D:00:01:A3:66:62
23:09:15 487 INFO Device announcement received - Network Address: #56765, IEEE Address: 00:15:8D:00:01:A3:66:62
23:09:16 038 INFO Device announcement received - Network Address: #56765, IEEE Address: 00:15:8D:00:01:A3:66:62
23:09:16 150 WARN ZDO_POWER_DESC_REQ FAILED on #35312 (00:0B:57:FF:FE:23:75:85)
23:09:34 437 WARN ZDO_ACTIVE_EP_REQ FAILED on #35312 (00:0B:57:FF:FE:23:75:85)
23:09:34 438 WARN Node #35312 (00:0B:57:FF:FE:23:75:85) removed from network because no endpoints have been discovered
After including from zigbee4java, I seem to get ZigbeeConsoleMain to see the devices (if I don’t reset), e.g.
23:13:05.556 DEBUG RX CMD: IeeeAddressResponse [2106/0 -> 0/0, cluster=8001, TID=NULL, status=UNKNOWN, ieeeAddrRemoteDev=null, nwkAddrRemoteDev=null, numAssocDev=null, startIndex=null, nwkAddrAssocDevList=[]]
23:13:12.027 DEBUG <-- AF_INCOMING_MSG (FE 1C 44 81 00 00 02 04 3A 08 01 01 00 8D 00 67 82 00 00 00 08 18 0C 0A 00 00 29 18 0B 3A 08 1D 86)
23:13:12.027 DEBUG Received Async Cmd: Packet: subsystem=null, length=28, apiId=44 81, data=FE 1C 44 81 00 00 02 04 3A 08 01 01 00 8D 00 67 82 00 00 00 08 18 0C 0A 00 00 29 18 0B 3A 08 1D 86, checksum=86, error=false
23:13:12.113 DEBUG RX CMD: ReportAttributesCommand [Temperature measurement: 2106/1 -> 0/1, cluster=0402, TID=0C, reports=[Attribute Report: attributeDataType=SIGNED_16_BIT_INTEGER, attributeIdentifier=0, attributeValue=2840]]
23:13:12.113 DEBUG <-- AF_INCOMING_MSG (FE 1C 44 81 00 00 05 04 3A 08 01 01 00 8D 00 74 82 00 00 00 08 18 0D 0A 00 00 21 8C 1E 3A 08 1D 1A)
23:13:12.114 DEBUG Received Async Cmd: Packet: subsystem=null, length=28, apiId=44 81, data=FE 1C 44 81 00 00 05 04 3A 08 01 01 00 8D 00 74 82 00 00 00 08 18 0D 0A 00 00 21 8C 1E 3A 08 1D 1A, checksum=1A, error=false
23:13:12.114 DEBUG RX CMD: ReportAttributesCommand [Relative humidity measurement: 2106/1 -> 0/1, cluster=0405, TID=0D, reports=[Attribute Report: attributeDataType=UNSIGNED_16_BIT_INTEGER, attributeIdentifier=0, attributeValue=7820]]
23:13:12.115 DEBUG <-- AF_INCOMING_MSG (FE 25 44 81 00 00 03 04 3A 08 01 01 00 8D 00 7F 82 00 00 00 11 18 0E 0A 00 00 29 E3 03 14 00 28 FF 10 00 29 DE 26 3A 08 1D 4C)
23:13:12.115 DEBUG Received Async Cmd: Packet: subsystem=null, length=37, apiId=44 81, data=FE 25 44 81 00 00 03 04 3A 08 01 01 00 8D 00 7F 82 00 00 00 11 18 0E 0A 00 00 29 E3 03 14 00 28 FF 10 00 29 DE 26 3A 08 1D 4C, checksum=4C, error=false
23:13:12.115 DEBUG RX CMD: ReportAttributesCommand [Pressure measurement: 2106/1 -> 0/1, cluster=0403, TID=0E, reports=[Attribute Report: attributeDataType=SIGNED_16_BIT_INTEGER, attributeIdentifier=0, attributeValue=995, Attribute Report: attributeDataType=SIGNED_8_BIT_INTEGER, attributeIdentifier=20, attributeValue=-1, Attribute Report: attributeDataType=SIGNED_16_BIT_INTEGER, attributeIdentifier=16, attributeValue=9950]]
23:13:14.237 DEBUG Ieee Address for 2106 returned null
But I can’t get inclusion to work. The only output that I see is:
> join enable
23:17:02.045 DEBUG Permit join for 255 seconds.
23:17:02.046 DEBUG TX CMD: ManagementPermitJoiningRequest [0/0 -> 65532/0, cluster=0036, TID=12, permitDuration=255, tcSignificance=true]
23:17:02.046 DEBUG -> AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 12 30 1F 03 00 FF 01 DD, checksum=DD, error=false)
23:17:02.056 DEBUG <- AF_DATA_SRSP (FE 01 64 01 00 64)
Permit join enable broadcast success.
>
In comparison, zigbee4java does this:
join enable
DEBUG ZigBeeApi - Sending permit join with data: -1
DEBUG ZigBeeApi - Sending permit join with data: -1
DEBUG CommandInterfaceImpl - -> ZDO_MGMT_PERMIT_JOIN_REQ (Packet: length = 5, apiId = 0x25 0x36, full data = 0xfe 0x05 0x25 0x36 0x0f 0xfc 0xff 0xff 0x01 0xe4, checksum = 0xe4, error = false, errorMessage = null)
DEBUG CommandInterfaceImpl - -> ZDO_MGMT_PERMIT_JOIN_REQ (Packet: length = 5, apiId = 0x25 0x36, full data = 0xfe 0x05 0x25 0x36 0x0f 0xfc 0xff 0xff 0x01 0xe4, checksum = 0xe4, error = false, errorMessage = null)
DEBUG CommandInterfaceImpl - <- ZDO_MGMT_PERMIT_JOIN_REQ_SRSP ([254, 1, 101, 54, 0, 82])
DEBUG CommandInterfaceImpl - <- ZDO_MGMT_PERMIT_JOIN_REQ_SRSP ([254, 1, 101, 54, 0, 82])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - -> ZDO_MGMT_PERMIT_JOIN_REQ (Packet: length = 5, apiId = 0x25 0x36, full data = 0xfe 0x05 0x25 0x36 0x02 0x00 0x00 0xff 0x01 0xea, checksum = 0xea, error = false, errorMessage = null)
DEBUG CommandInterfaceImpl - -> ZDO_MGMT_PERMIT_JOIN_REQ (Packet: length = 5, apiId = 0x25 0x36, full data = 0xfe 0x05 0x25 0x36 0x02 0x00 0x00 0xff 0x01 0xea, checksum = 0xea, error = false, errorMessage = null)
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <- ZDO_MGMT_PERMIT_JOIN_REQ_SRSP ([254, 1, 101, 54, 0, 82])
DEBUG CommandInterfaceImpl - <- ZDO_MGMT_PERMIT_JOIN_REQ_SRSP ([254, 1, 101, 54, 0, 82])
ZigBee API permit join enable ... [OK]
> DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
DEBUG CommandInterfaceImpl - <-- ZDO_MGMT_PERMIT_JOIN_RSP ([254, 3, 69, 182, 0, 0, 0, 240])
I probably fail to understand some difference between the two programs. @chris Could you please spot some obvious error that I am making?