OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

Something in nas-pd03z.xml makes openzwave daemon crash #2475

Closed wauswaus closed 3 years ago

wauswaus commented 3 years ago

Hi,

I have a Shenzen-Neo PD03Z for which I added a device specific xml file . I'm running the openzwave beta in Home Assistant but they made it impossible to get access to all the config files so I could not test this file and I made a pull request, keeping my fingers crossed it would work. Unfortunately not... If I add my device the openzwave daemon crashes. See the attached log.

I want to fix this but I'm having some trouble getting to the cause of this so I need your help! Log is attached. I copied the file of the PD02Z and made minor modifications. I think I fixed:

[20201121 17:05:18.547 CET] [ozw.library] [warning]: Warning - Node: 0 Attempt to get a Invalid Index 12 on ValueList HomeID: 0xfd807f47, ValueID: (Id 0x00010000159c0014, NodeID 21, Genre config, CC 0x70, Instance 1, Index 1, Type list) 
[20201121 17:05:18.548 CET] [ozw.library] [warning]: Warning - Node: 0 Value is not found in xml configuration for node 21, class 0x70, instance 1, index 1 - HomeID: 0xfd807f47, ValueID: (Id 0x00010000159c0014, NodeID 21, Genre config, CC 0x70, Instance 1, Index 1, Type list) 

There was a list defined but no list items for index 1.

Leaves

[warning]: Warning - Node: 0 Attempt to get a Invalid Index 1 on ValueList HomeID: 0xfd807f47, ValueID: (Id 0x00040000159c0014, NodeID 21, Genre config, CC 0x70, Instance 1, Index 4, Type list) 
[20201121 17:05:18.549 CET] [ozw.library] [warning]: Warning - Node: 0 Value is not found in xml configuration for node 21, class 0x70, instance 1, index 4 - HomeID: 0xfd807f47, ValueID: (Id 0x00040000159c0014, NodeID 21, Genre config, CC 0x70, Instance 1, Index 4, Type list) 

I think this is because the default value of 1 does not exist in any of the list items.

And of course the crashing.

[20201121 17:05:18.560 CET] [ozw.daemon] [warning]: ============================= 
[20201121 17:05:18.560 CET] [ozw.daemon] [warning]: CRASH!!! - Dumping Backtrace: 
[20201121 17:05:18.560 CET] [ozw.daemon] [warning]: ============================= 
[20201121 17:05:18.560 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: ValueAdded CC: COMMAND_CLASS_CONFIGURATION Instance: 1 Index: 11 
[20201121 17:05:18.560 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: ValueAdded CC: COMMAND_CLASS_CONFIGURATION Instance: 1 Index: 12 
[20201121 17:05:18.561 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: ValueAdded CC: COMMAND_CLASS_CONFIGURATION Instance: 1 Index: 99 
[20201121 17:05:18.561 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: Group 
[20201121 17:05:18.562 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: Group 
[20201121 17:05:18.562 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: Group 
[20201121 17:05:18.563 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: Group 
[20201121 17:05:18.563 CET] [ozw.library] [debug]: Detail - Node: 21 Notification: NodeNaming 
[20201121 17:05:18.562 CET] [ozw.daemon] [warning]: #1  0x00000000b6f1559b sp=0x00000000bef38ce8 pselect + 0x3c 
[20201121 17:05:18.565 CET] [ozw.daemon] [warning]: #2  0x00000000b6f155da sp=0x00000000bef38fe0 sigsetjmp + 0x33 
[20201121 17:05:18.565 CET] [default] [warning]: Exiting.... 

I hope you can help! log.txt

l3arcf commented 3 years ago

@wauswaus , in lieu of other responses I tool a look at index 1 of command-class 112 that you have in your config and see it's a list, but you have not defined the list options. Maybe that's the issue? I have a PD02Z and that config has the following options:

  <Item label="High Sensitivity" value="8" />
  <Item label="Normal Sensitivity" value="12" />
  <Item label="Lower Sensitivity" value="128" />
  <Item label="Lowest Sensitivity" value="255" />

I wonder if you need something like that.

wauswaus commented 3 years ago

Made a pull request, so lets hope for the best.