Page 1 of 1

Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 12:40
by stuiow
Hi all,
Some or most of my devices have so much lag, could be up to 30 seconds of response sometimes!!

Obviously with Domoticz and OZW, diagnostics are limited to see if there are some dodgy nodes/signal black spots.

BUT ihave a aeonlab Gen5 USB stick that drives my z-wave network.

Can i just grab that out of my PI, then pop it into a laptop (at the same location) and run some kind of software to get more diagnostic info out of the network, without harming the network once the stick is plugged into the PI again?

Running latest RELEASE of domoticz.

Cheers guys

Stu

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 12:47
by Egregius
There should be timeouts in the logfile in that case.
Think the default timeout is 40 seconds, you can lower that in options.xml

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 13:02
by stuiow
What does the timeout actually do? Is that the minimum time the node has to respond before its dropped?

I

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 13:17
by Egregius
Correct, after that period the controller doesn't wait anymore so it's free to send another command.

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 13:19
by Egregius
To be complete, this is my options.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- To be effective, this file should be placed in the user data folder specified in the Options::Create method -->
<Options xmlns='http://code.google.com/p/open-zwave/'>
  <Option name="logging" value="true" />
  <Option name="UserPath" value="/var/log/cache/" />
  <Option name="Associate" value="true" />
  <Option name="NotifyTransactions" value="false" />
  <Option name="DriverMaxAttempts" value="5" />
  <Option name="SaveConfiguration" value="true" />
  <Option name="RetryTimeout" value="5000" /><!-- Default 40000 --><!-- 15000 OK -->
  <Option name="PerformReturnRoutes" value="true" /><!-- added -->
  <Option name="AssumeAwake" value="false" /><!-- added -->
  <Option name="SaveLogLevel" value="3" /><!-- added -->
  <Option name="QueueLogLevel" value="3" /><!-- added -->
  <Option name="DumpTriggerLevel" value="3" /><!-- added -->
  <Option name="NetworkKey" value="0x09, 0x05, 0x03, 0x04, 0x01, 0x06, 0x07, 0x01, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" />
  <Option name="RefreshAllUserCodes" value="false" />
  <Option name="ThreadTerminateTimeout" value="5000" /><!-- 5000 -->
</Options>
<!--
Log Levels:
0 	No Logging
1 	All Messages
2 	Fatal Messages Only
3 	Error Messages and Higher
4 	Warning Messages and Higher
5 	Alert Messages and Higher
6 	Info Messages and Higher
7 	Detailed Messages and Higher
8 	Debug Messages and Higher
9 	Protocol Information and Higher
-->


Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 13:23
by stuiow
ah thats interesting, as i do sometimes pile up the commands and at some point, it all happens at once, so that would make sense.

I'll take a look over this over the weekend i think. Thanks for the info

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 13:49
by Egregius
There's some interesting information about this on http://www.domoticz.com/forum/viewtopic ... ut#p106018
It comes down to this:
could be that a retrytimeout of 1000msec works fine if you have small amount of devices.
The more devices and traffic the longer the retrytimeout should be.
You can try with 5000msec, works fine in my installation with 52 nodes.

Re: Slow repsonse from devices - need to diagnose now.

Posted: Thursday 07 September 2017 14:19
by LouiS22
Egregius wrote: Thursday 07 September 2017 13:49 There's some interesting information about this on http://www.domoticz.com/forum/viewtopic ... ut#p106018
It comes down to this:
could be that a retrytimeout of 1000msec works fine if you have small amount of devices.
The more devices and traffic the longer the retrytimeout should be.
You can try with 5000msec, works fine in my installation with 52 nodes.
That's indeed interesting, thanks for this post. I've just lost all my setting due to a Z-stick hardware fault. Had to order a replacement, now I'm struggling to set everything back (that's a joy, especially that all my sensors are attached to the old/wrong stick. Have to factory reset almost all of them, while some of them were simple reincluded with an exlcusion first/inclusion trick). 5 more to go, but they're the power sockets... Forgot to mention what a joy removing a door sensor, where the tamper switch is located deep inside the stuff and the cap is almost unremovable :D

Re: Slow repsonse from devices - need to diagnose now.

Posted: Monday 30 April 2018 12:29
by stuiow
I've got a question about this now?
How do I prevent the options.xml being over written every time domoticz is updated?

Re: Slow repsonse from devices - need to diagnose now.

Posted: Monday 30 April 2018 12:39
by Egregius
Make a copy of options.xml for your modifications.
Add a line to the domoticz startup script to copy your options file to the domoticz folder.

Re: Slow repsonse from devices - need to diagnose now.

Posted: Monday 30 April 2018 21:58
by Nautilus
Egregius wrote: Monday 30 April 2018 12:39 Make a copy of options.xml for your modifications.
Add a line to the domoticz startup script to copy your options file to the domoticz folder.
Seems like a few lines are commented out by default in Options.xml - any idea why it is like this? Where does the default values come for example for "DefaultTimeOut"? Can I set them somewhere else as well?

My Options.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- To be effective, this file should be placed in the user data folder specified in the Options::Create method -->
<Options xmlns='http://code.google.com/p/open-zwave/'>
  <Option name="logging" value="true" />
  <Option name="Associate" value="true" />
  <Option name="NotifyTransactions" value="false" />
  <Option name="DriverMaxAttempts" value="5" />
  <Option name="SaveConfiguration" value="true" />
  <!-- <Option name="RetryTimeout" value="40000" /> -->
  <!-- If you are using any Security Devices, you MUST set a network Key -->
  <!-- <Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" /> -->

  <!-- Some Devices have a big UserCode Table, that can mean startup times
  when refreshing Session Variables is very long (Especialy on Security
  Devices) This option will make the UserCode CC stop on the first
  "available" usercode slot rather than retrieve every one -->
  <Option name="RefreshAllUserCodes" value="false" />
  <Option name="ThreadTerminateTimeout" value="5000" />
</Options>
Is this ok?

Re: Slow repsonse from devices - need to diagnose now.

Posted: Tuesday 01 May 2018 7:23
by Egregius
There's no other place for these setting.
Google "zwave options.xml" to find an explanation for the tags.
This is my options.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- To be effective, this file should be placed in the user data folder specified in the Options::Create method -->
<Options xmlns='http://code.google.com/p/open-zwave/'>
  <Option name="logging" value="true" />
  <!-- <Option name="UserPath" value="/domoticz" /> -->
  <Option name="Associate" value="true" />
  <Option name="NotifyTransactions" value="false" />
  <Option name="DriverMaxAttempts" value="5" />
  <Option name="SaveConfiguration" value="true" />
  <Option name="RetryTimeout" value="5000" /><!-- 40000 --><!-- 15000 -->
  <Option name="PerformReturnRoutes" value="true" /><!-- added -->
  <Option name="AssumeAwake" value="false" /><!-- added -->
  <Option name="SaveLogLevel" value="3" /><!-- added -->
  <Option name="QueueLogLevel" value="3" /><!-- added -->
  <Option name="DumpTriggerLevel" value="3" /><!-- added -->
  <Option name="NetworkKey" value="0x09, 0x05, 0x03, 0x04, 0x01, 0x06, 0x07, 0x01, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" />
  <Option name="RefreshAllUserCodes" value="false" />
  <Option name="ThreadTerminateTimeout" value="5000" /><!-- 5000 -->
</Options>
<!--
Log Levels:
0 	No Logging
1 	All Messages
2 	Fatal Messages Only
3 	Error Messages and Higher
4 	Warning Messages and Higher
5 	Alert Messages and Higher
6 	Info Messages and Higher
7 	Detailed Messages and Higher
8 	Debug Messages and Higher
9 	Protocol Information and Higher
-->

Re: Slow repsonse from devices - need to diagnose now.

Posted: Tuesday 01 May 2018 8:25
by Nautilus
Thanks. It seems that the Network key is available under controller node's settings (Parameter 4: Security Network Key) on Aeotec Gen5 z-stick. Which probably explains why I have been able to "include (secure)"...:) I would imagine the other setting default to some values as well even when commented out on the config.xml. With Network key, I wonder if it is set in both places (config.xml & controller settings), would it conflict in some way or the other one is the primary place?

If Domoticz update overrides this file every time is it so that by design it should not be modified?

Re: Slow repsonse from devices - need to diagnose now.

Posted: Sunday 10 June 2018 10:56
by ben53252642
Egregius wrote: Thursday 07 September 2017 13:17 Correct, after that period the controller doesn't wait anymore so it's free to send another command.
Thank you Egregius, this has been very useful. :D

I've got about 60 devices and have also been seeing an occasional lag of up to about 30 seconds.

Would be nice if this could be set within Domoticz.

Re: Slow repsonse from devices - need to diagnose now.

Posted: Sunday 10 June 2018 11:03
by gizmocuz
@ben53252642, should be possible around line 983 in OpenZWave.cpp in the domoticz code (and some optional settings)
Please make a github issue for this so it can be put on the list

Re: Slow repsonse from devices - need to diagnose now.

Posted: Sunday 10 June 2018 11:08
by ben53252642
Thanks Gizmocus, will do, in the meantime here is a one line method of changing it with sed. :)

Code: Select all

sed -i 's#.*Option name="RetryTimeout".*#  <Option name="RetryTimeout" value="5000" />#g' /root/domoticz/Config/options.xml