smich123 / open-zwave

Automatically exported from code.google.com/p/open-zwave
0 stars 0 forks source link

Node query process never ends when dead devices in the network #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have dead / not responding / switched off non battery powered devices in 
existing network
2. Include Z-stick as a secondary controller (HC2 with existing network)
3. Run MinOZW to discovery nodes

What is the expected output? What do you see instead?
Discovery process ends with the list of all queried devices.
Instead the query process never ends as the dead devices never move into the 
QueryComplete stage.

What version of the product are you using? On what operating system?
r627 on MacOS 10.8.2

Please include the file OZW_Log.txt from your program. Make sure the file
zwcfg*.xml is NOT present.
N/A nothing valuable there

Please provide any additional information below.
suggested change in Driver.cpp that solves the issue.

Index: Driver.cpp
===================================================================
--- Driver.cpp  (revision 627)
+++ Driver.cpp  (working copy)
@@ -1382,7 +1382,7 @@
        {
            if( m_nodes[i] )
            {
-               if( m_nodes[i]->GetCurrentQueryStage() != Node::QueryStage_Complete )
+               if( m_nodes[i]->GetCurrentQueryStage() != Node::QueryStage_Complete && 
m_nodes[i]->IsNodeAlive() )
                {
                    all = false;
                    if( m_nodes[i]->IsListeningDevice() )

Original issue reported on code.google.com by kstan...@gmail.com on 20 Jan 2013 at 8:11

GoogleCodeExporter commented 9 years ago
Please include the OZW_Log.txt file for this report.

Original comment by glsatz on 20 Jan 2013 at 1:29

GoogleCodeExporter commented 9 years ago
The query process ends but doesn't deliver the notification because of the dead 
nodes. This raises the question of whether the query process should end or 
should there be a different notification?

Good catch and thanks for the patch.

Original comment by glsatz on 20 Jan 2013 at 3:08

GoogleCodeExporter commented 9 years ago
Latest repository has a new notification called AllNodesQueriedSomeDead that 
handle this case. Please confirm.

Original comment by glsatz on 23 Jan 2013 at 7:36

GoogleCodeExporter commented 9 years ago
Please have a look at Issue #159

Original comment by kstan...@gmail.com on 23 Jan 2013 at 2:38

GoogleCodeExporter commented 9 years ago

Original comment by glsatz on 23 Jan 2013 at 3:56