Powerlevel test

30 views
Skip to first unread message

CPS

unread,
May 10, 2019, 4:45:26 PM5/10/19
to python-openzwave-discuss
Dear all, 

Does anybody succeeds in doing powerlevel tests with the COMMAND_CLASS_POWERLEVEL ? I do not manage to set the framecount relibably (I used various ZWAVE PLUS devices and python-openzwave or the ozwg controle panel: the result is always the same: framecount most often is stuck at 0 and the debug output with the byte stream actually indicates that a 0 is really sent over the zwave protocol. Only very rarly a number different from 0 is set for the frame count (but not the one I chose) and then the powerlevel test actually seems to excecute according to the zwave spec.

Not sure where the problem is : on my side, on the python-opnezwave or in the openzwave package itself.

I reproduce the problem by using pure openzwave and the openzwave control panel application on git. (...so may be indicating a problem in the openzwave library?)

Thanks for sharing your experience, or any hints,

CPS 

CPS

unread,
May 12, 2019, 2:07:23 PM5/12/19
to python-openzwave-discuss
I will answer myself to my question:

There seems (according to me) a bug in Open-zwave (the underlying c++ lib):
In Powerlevel.cpp in the method Powerlevel::SetValue( Value const& _value ) there seems to be a wrong type in the "case PowerlevelIndex_TestFrames:" section it reads 

value->OnValueRefreshed( (static_cast<ValueByte const*>( &_value))->GetValue() );

however the TestFrames  value is short. After correcting to 

value->OnValueRefreshed( (static_cast<ValueShort const*>( &_value))->GetValue() );

and recompiling the library and the concerned application (e.g. ozwcp which seems to links statically to open-zwave) the TestFrames can be set as expected.

There is still a problem that the Powerleveltest times out when the number of testframes is "high" (256 is enough in my case) or when there is a significant number of not acknowledged packages (which of course take a longer time to "test").  You get the error
 ERROR: Dropping command, expected response not received after 1 attempt(s)
and the test report message from the node under tests comes some time later. In my case sometimes the AckPackages is then not updated anymore (but I see the incoming message from the node under test in the debug output of openzwave). Pressing then once more the button to send the test report works. 

Hope this helps (I will also notify the open-zwave colleagues)

Btw, thanks for the great software (python wrapper and open-zwave !)

CPS

CPS

unread,
May 14, 2019, 4:00:22 AM5/14/19
to python-openzwave-discuss
For information: The bug has been fixed in the master branch of the open-zwave cpp library git-hub commit ead2f40. 
Reply all
Reply to author
Forward
0 new messages