Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reminder for newer Z-Smart systems versions #531

Closed
triller-telekom opened this issue Dec 20, 2019 · 2 comments
Closed

Reminder for newer Z-Smart systems versions #531

triller-telekom opened this issue Dec 20, 2019 · 2 comments

Comments

@triller-telekom
Copy link
Contributor

In the ZigBeeCoordinatorHandler the order of initializing the ZigbeeNetworkManager and adding extensions to it has to be changed, because is is now checked that the network is in INITIALIZING state before adding extensions:

ZigBeeDiscoveryExtension discoveryExtension = new ZigBeeDiscoveryExtension();
discoveryExtension.setUpdatePeriod(meshUpdateTime);
networkManager.addExtension(discoveryExtension);
networkManager.addExtension(new ZigBeeIasCieExtension());
networkManager.addExtension(new ZigBeeOtaUpgradeExtension());
// Add any listeners that were registered before the manager was registered
synchronized (nodeListeners) {
for (ZigBeeNetworkNodeListener listener : nodeListeners) {
networkManager.addNetworkNodeListener(listener);
}
}
synchronized (announceListeners) {
for (ZigBeeAnnounceListener listener : announceListeners) {
networkManager.addAnnounceListener(listener);
}
}
// Initialise the network
switch (networkManager.initialize()) {
case SUCCESS:
break;
case BAD_RESPONSE:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, ZigBeeBindingConstants.OFFLINE_BAD_RESPONSE);
return;
case COMMUNICATION_ERROR:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, ZigBeeBindingConstants.OFFLINE_COMMS_FAIL);
return;
default:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE,
ZigBeeBindingConstants.OFFLINE_INITIALIZE_FAIL);
return;
}

The same applies if we want to add all supported clusters to the network manager, this has to be done AFTER initializing the network manager as well.

@cdjackson
Copy link
Contributor

Thanks Stefan,
Yes, this is understood and I will mop this up over Christmas when I migrate to the new ZSS libraries.

Have a good Christmas.

Cheers
Chris

@cdjackson
Copy link
Contributor

Closed by #517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants