Page 1 of 2

Zwave scenes, slow responding

Posted: Monday 22 February 2016 18:43
by geezerrr
Dear all,

I'm facing a "problem" with my zwave scenes.
My (beta)domoticz is running on a pi 2 with Razberry 2.0, with 35 nodes. (No dead nodes or problems, healthy network)
And domoticz Slave server (pi2) with the same devices.

When I switch a device it switches instantly, On both Master- and Slave server. Unfortunately the Master server isn't sharing the scenes to the Slave.. So in first case I created scenes on the Slave server. But switching a scene resulting in sending all on/off commands separately to the master.. Means al lot of traffic, correct me if I'm wrong..
So I created the scenes on the Master and activate them by json with a dummy switch on my Slave.

The actual problem is that a scene like below will take 5 up to 20 seconds to complete when execute on the master pi. When execute on the Slave it take at least 20 to 30 seconds.
ImageUploadedByTapatalk1456162464.338096.jpg
ImageUploadedByTapatalk1456162464.338096.jpg (228.28 KiB) Viewed 6525 times
Is there a way to speed up the scenes in domoticz?

Thnx in advance.
Ps. Love Domoticz!!!!

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 19:32
by mvveelen
I'm having similar issues on my Synology DS414. When I turn a scene ON or OFF, it takes (often) about 30 seconds to switch every light off. When I do this separately, it switches immediately. I don't know what causes the delay and I don't know how to speed it up. Anyone?

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 19:34
by geezerrr
I almost give up hope... lol
But happy someone else facing the same behavior.

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:04
by bizziebis
Maybe Domoticz is sending signals too quick when switching a group or scene. When a node is not responding it will retry after a few seconds. Maybe after some retries it will respect and and move to the next command. This can cause huge delays. I remember I also faced this a while ago. I decreased the timeout time of zwave to get a quicker response.

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:10
by mvveelen
Where can I find the setting for the timeout of ZWave? Would like to try it.

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:37
by bizziebis
Edit the file Config/options.xml and uncomment the line

<Option name="RetryTimeout" value="40000" />

Change value to something else and save. You should also restart Domoticz.

https://github.com/OpenZWave/open-zwave ... ig-Options

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:48
by mvveelen
I made it 10000 and the first tests are promising. Going to try this setting for a few days. Thanks !

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:48
by geezerrr
Hmm sounds hopeful!!
Will try it tomorrow
Thnx in advance

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 20:53
by mvveelen
I even changed it to 1000 now. So that's 1 second:

Code: Select all

RetryTimeout	Integer	Timeout before retrying to send a message. Defaults to 40 Seconds
The delay WAS 30 seconds sometimes and I had this timer on 30000 already. So 1000 seems the most logical step for me. Also starting up Domoticz is way faster. All devices are ready within 10 seconds or so :D !

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 22:10
by Egregius
Wow, 1000 sounds so short.
I lowered it for a long time to 30000 (default=40000), for a few weeks it was on 25000. Now set it to 2000, will see soon if it has a downside.

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 22:13
by mvveelen
Well, retry period of 40000 = 40 seconds. I don't want it to wait so long, so I'm trying 1 second (=1000( for a retry :)

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 22:34
by Egregius
Start up is indeed extremely fast this way:

2016-11-25 22:31:33.047 OpenZWave: Starting...
2016-11-25 22:31:46.193 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 28 (0x1c)
2016-11-25 22:31:55.929 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 17 (0x11)
2016-11-25 22:31:58.488 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 28 (0x1c)
2016-11-25 22:32:00.490 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 28 (0x1c)
2016-11-25 22:32:02.493 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 28 (0x1c)
2016-11-25 22:32:04.495 OpenZWave: Received timeout notification from HomeID: 25487143, NodeID: 28 (0x1c)
2016-11-25 22:32:04.565 OpenZWave: Awake Nodes queried

31 seconden :)

(The timeouts are: Node 17 Qubino Zwave+ dimmer on Aeotec S2 stick, Node 28 Zipato Siren wich isn't supported completely.)

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 22:46
by Nautilus
bizziebis wrote:Edit the file Config/options.xml and uncomment the line

<Option name="RetryTimeout" value="40000" />

Change value to something else and save. You should also restart Domoticz.

https://github.com/OpenZWave/open-zwave ... ig-Options
Seems that the RetryTimeout is commented out by default - so does it still default to 40s even if this setting is not present in the options.xml? And how do you cope with updates by the way, isn't the file overwritten in each update? :)

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 23:15
by mvveelen
Another plus: dimming is now instantly. Normally it took a few seconds (or more) to see the dimming result, but now it's very direct :)

Re: Zwave scenes, slow responding

Posted: Friday 25 November 2016 23:20
by Egregius
I can't confirm the dimming thing, has always been instant here.
Assume awake is also a good one.
My complete options.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<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="2000" /><!-- Default 40000 --><!-- 30000 OK--><!-- 25000 OK-->
  <Option name="PerformReturnRoutes" value="true" /><!-- added -->
  <Option name="AssumeAwake" value="false" /><!-- added -->
  <Option name="SaveLogLevel" value="2" /><!-- added -->
  <Option name="QueueLogLevel" value="2" /><!-- added -->
  <Option name="DumpTriggerLevel" value="2" /><!-- 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="4000" /><!-- 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: Zwave scenes, slow responding

Posted: Saturday 26 November 2016 5:50
by Egregius
Hmm, for the first time my lights and radio didn't switch on when I entered the living room. This was the only change, so I'll raise it again.

Re: Zwave scenes, slow responding

Posted: Saturday 26 November 2016 9:28
by bizziebis
If the timeout is too short it will quickly mark the node as unresponsive and drop the command. So if you have a lot of traffic, or maybe interference at a given time, the short time interval will prevent the command from reaching the node.

I used 4000 for a long time and that seemed to work for my situation

Re: Zwave scenes, slow responding

Posted: Saturday 26 November 2016 12:09
by mvveelen
Ah, well, I don't have as much ZWave devices as Egregius, so maybe it's logical for him to use a slightly larger timeout.

Re: Zwave scenes, slow responding

Posted: Saturday 26 November 2016 13:53
by Egregius
Could be, I can believe that ;)
52 nodes here, timeout at 3000msec now. No issues so far.
I guess it's just a mather of testing, if there's an issue just add 1000 until it's stable.

Re: Zwave scenes, slow responding

Posted: Sunday 10 June 2018 13:12
by ben53252642
I've added this to my /etc/init.d/domoticz file

Added just after:
do_start()
{

Code: Select all

ozwoptionspath="/root/domoticz/Config/options.xml"
sed -i -e '/Option name="RetryTimeout"/d' $ozwoptionspath ; sed -i -e '$i \  <Option name="RetryTimeout" value="1500" />' $ozwoptionspath # Set OpenZWave RetryTimeout option
sed -i -e '/Option name="ThreadTerminateTimeout"/d' $ozwoptionspath ; sed -i -e '$i \  <Option name="ThreadTerminateTimeout" value="4000" />' $ozwoptionspath # Set OpenZWave ThreadTerminateTimeout option
sed -i -e '/Option name="AssumeAwake"/d' $ozwoptionspath ; sed -i -e '$i \  <Option name="AssumeAwake" value="false" />' $ozwoptionspath # Set OpenZWave AssumeAwake option
sed -i -e '/Option name="PerformReturnRoutes"/d' $ozwoptionspath ; sed -i -e '$i \  <Option name="PerformReturnRoutes" value="true" />' $ozwoptionspath # Set OpenZWave PerformReturnRoutes option
Then I reload the daemon using: systemctl daemon-reload

Now when I run: service domoticz start

It automatically modifies any default options.xml for ozw to contain the above settings.

Suggest also looking at this to potentially increase responsiveness further:

viewtopic.php?f=61&t=21336