api.getDevices() return only 3 devices

70 views
Skip to first unread message

mathieu.s...@gmail.com

unread,
Aug 31, 2016, 6:17:53 AM8/31/16
to zigbee4java
Hello,

I successfully used your api to connect to my CC2531 dongle, but when I do :
api.getDevices() I don't have access to my bulb :(.

I'm using your example :
public static void main(String[] args) {
final byte[] networkKey = null; // Default network key
final SerialPort port = new SerialPortImpl("COM8");
final ZigBeeDongle dongle = new ZigBeeDongleTiCc2531Impl(port, 50, 11, networkKey, true);
final ZigBeeApiDongleImpl api = new ZigBeeApiDongleImpl(dongle, false);

api.startup();
List<ZigBeeDevice> zigDevicList = api.getDevices();
for(ZigBeeDevice device : zigDevicList){
if(device.getDeviceId() != 0){
api.on(device);
try {
Thread.sleep(1000);
api.color(device, 1.0, 0.0, 0.0, 1.0);
Thread.sleep(1000);
api.color(device, 0.0, 1.0, 0.0, 1.0);
Thread.sleep(1000);
api.color(device, 0.0, 0.0, 1.0, 1.0);
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
api.off(device);
}
}
api.shutdown();
port.close();
}
And my logs :
11:11:10 038 INFO Loading network state...
11:11:10 455 INFO Loading network state done.
11:11:12 056 INFO Setting clean state.
11:11:12 084 INFO Resetting dongle.
11:11:14 685 INFO Initialized ZigBee network with new or reset network state.
11:11:15 936 INFO Received: IEEE Address Response status=0, sourceAddressMode=0, ieeeAddress=5149013099166978, networkAddress=0, startIndex=0, numberOfAssociatedDevices=0, associatedDeviceList=[]
11:11:15 956 INFO Received: Node Descriptor Response status=0, sourceAddress=0, networkAddress=0, apsFlags=0, bufferSize=1, capabilities=80, complexDescriptorAvailable=false, manufacturerCode=160, logicalType=0, serverMask=0, maximumInTransferSize=40960, userDescriptorAvailable=false, frequencyBand=0
11:11:15 976 INFO Received: Active Endpoints Response sourceAddress=0, networkAddress=0, status=0, activeEndpoints=[3, 2, 1]
11:11:16 027 INFO Received: Simple Descriptor Response deviceId=0, sourceAddress=0, status=0, profileId=260, deviceVersion=0, networkAddress=0, endpoint=3, inputClusters=[], outputClusters=[1281, 1282]
11:11:16 029 INFO Received: Simple Descriptor Response deviceId=0, sourceAddress=0, status=0, profileId=260, deviceVersion=0, networkAddress=0, endpoint=2, inputClusters=[], outputClusters=[257, 258, 512, 513, 514, 516, 768, 1027, 1024, 1025, 1026, 1028, 1029, 1030, 2820, 1280]
11:11:16 039 INFO Received: Simple Descriptor Response deviceId=0, sourceAddress=0, status=0, profileId=260, deviceVersion=0, networkAddress=0, endpoint=1, inputClusters=[], outputClusters=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 10, 12, 21, 1794, 256]
11:11:23 437 INFO Serial portName 'COM8' closed.
11:11:23 442 WARN Discarded stream: expected start byte but received this 0x00
11:11:23 442 INFO ZigBeeApi saving network state...
11:11:23 510 INFO ZigBeeApi saving network state done.


Any idea ?

mathieu.s...@gmail.com

unread,
Aug 31, 2016, 8:24:47 AM8/31/16
to zigbee4java, mathieu.s...@gmail.com
Forgot to say, I'm trying to use a Philips Hue Bulb which wasn't connected to a bridge before. But I don't see it and I don't know how to talk with it.
Reply all
Reply to author
Forward
0 new messages