Slow repsonse from devices - need to diagnose now.

For Z-Wave related questions in Domoticz
Post Reply
stuiow
Posts: 184
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

Slow repsonse from devices - need to diagnose now.

Post by stuiow » Thursday 07 September 2017 12:40

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
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » Thursday 07 September 2017 12:47

There should be timeouts in the logfile in that case.
Think the default timeout is 40 seconds, you can lower that in options.xml

stuiow
Posts: 184
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

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

Post by stuiow » Thursday 07 September 2017 13:02

What does the timeout actually do? Is that the minimum time the node has to respond before its dropped?

I
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » Thursday 07 September 2017 13:17

Correct, after that period the controller doesn't wait anymore so it's free to send another command.

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » Thursday 07 September 2017 13:19

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
-->


stuiow
Posts: 184
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

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

Post by stuiow » Thursday 07 September 2017 13:23

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
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » 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.

User avatar
LouiS22
Posts: 482
Joined: Friday 27 February 2015 14:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Budapest, Hungary
Contact:

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

Post by LouiS22 » Thursday 07 September 2017 14:19

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

stuiow
Posts: 184
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

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

Post by stuiow » Monday 30 April 2018 12:29

I've got a question about this now?
How do I prevent the options.xml being over written every time domoticz is updated?
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » 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.

Nautilus
Posts: 752
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

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

Post by Nautilus » Monday 30 April 2018 21:58

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?

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

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

Post by Egregius » Tuesday 01 May 2018 7:23

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
-->

Nautilus
Posts: 752
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

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

Post by Nautilus » Tuesday 01 May 2018 8:25

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?

ben53252642
Posts: 393
Joined: Saturday 02 July 2016 5:17
Target OS: Linux
Domoticz version: Beta
Contact:

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

Post by ben53252642 » Sunday 10 June 2018 10:56

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.

User avatar
gizmocuz
Posts: 8641
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

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

Post by gizmocuz » Sunday 10 June 2018 11:03

@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
Quality outlives Quantity!

ben53252642
Posts: 393
Joined: Saturday 02 July 2016 5:17
Target OS: Linux
Domoticz version: Beta
Contact:

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

Post by ben53252642 » Sunday 10 June 2018 11:08

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests