Ignore the coordinator node in the zigbee resource
This commit is contained in:
parent
929ef2fb5d
commit
527989fe7c
@ -169,6 +169,10 @@ void ZigbeeHardwareResourceImplementation::thingsLoaded()
|
||||
foreach (ZigbeeNetwork *network, m_zigbeeManager->zigbeeNetworks()) {
|
||||
if (network->state() == ZigbeeNetwork::StateRunning) {
|
||||
foreach (ZigbeeNode *node, network->nodes()) {
|
||||
// Ignore the coordinator node
|
||||
if (node->shortAddress() == 0x0000)
|
||||
continue;
|
||||
|
||||
if (!m_nodeHandlers.contains(node)) {
|
||||
qCDebug(dcZigbeeResource()) << "Node" << node << "is not yet handled by any plugin. Trying to find a suitable plugin.";
|
||||
onZigbeeNodeAdded(network->networkUuid(), node);
|
||||
@ -199,6 +203,10 @@ void ZigbeeHardwareResourceImplementation::onZigbeeNetworkChanged(ZigbeeNetwork
|
||||
// been installed now, such nodes might be handled by them now.
|
||||
if (network->state() == ZigbeeNetwork::StateRunning && m_thingsLoaded) {
|
||||
foreach (ZigbeeNode *node, network->nodes()) {
|
||||
// Ignore the coordinator node
|
||||
if (node->shortAddress() == 0x0000)
|
||||
continue;
|
||||
|
||||
if (!m_nodeHandlers.contains(node)) {
|
||||
onZigbeeNodeAdded(network->networkUuid(), node);
|
||||
}
|
||||
|
||||
@ -299,6 +299,17 @@ void ZigbeeManager::loadZigbeeNetworks()
|
||||
|
||||
void ZigbeeManager::checkPlatformConfiguration()
|
||||
{
|
||||
/* Example platform configurations
|
||||
*
|
||||
* serialPort=/dev/ttymxc2
|
||||
* baudRate=115200
|
||||
* backend=nxp
|
||||
*
|
||||
* serialPort=/dev/ttyS0
|
||||
* baudRate=38400
|
||||
* backend=deconz
|
||||
*/
|
||||
|
||||
QFileInfo platformConfigurationFileInfo(NymeaSettings::settingsPath() + QDir::separator() + "zigbee-platform.conf");
|
||||
if (platformConfigurationFileInfo.exists()) {
|
||||
qCDebug(dcZigbee()) << "Found zigbee platform configuration" << platformConfigurationFileInfo.absoluteFilePath();
|
||||
|
||||
Reference in New Issue
Block a user