Zwave scenes, slow responding

For Z-Wave related questions in Domoticz

Moderator: leecollings

geezerrr
Posts: 79
Joined: Tuesday 02 December 2014 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Zwave scenes, slow responding

Post 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 6469 times
Is there a way to speed up the scenes in domoticz?

Thnx in advance.
Ps. Love Domoticz!!!!
Last edited by geezerrr on Monday 22 February 2016 18:43, edited 5 times in total.
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
geezerrr
Posts: 79
Joined: Tuesday 02 December 2014 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Zwave scenes, slow responding

Post by geezerrr »

I almost give up hope... lol
But happy someone else facing the same behavior.
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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.
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post by mvveelen »

Where can I find the setting for the timeout of ZWave? Would like to try it.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post by mvveelen »

I made it 10000 and the first tests are promising. Going to try this setting for a few days. Thanks !
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
geezerrr
Posts: 79
Joined: Tuesday 02 December 2014 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Zwave scenes, slow responding

Post by geezerrr »

Hmm sounds hopeful!!
Will try it tomorrow
Thnx in advance
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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 !
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Zwave scenes, slow responding

Post 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.
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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 :)
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Zwave scenes, slow responding

Post 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.)
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Zwave scenes, slow responding

Post 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? :)
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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 :)
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Zwave scenes, slow responding

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


User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Zwave scenes, slow responding

Post 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.
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Zwave scenes, slow responding

Post 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.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Zwave scenes, slow responding

Post 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.
ben53252642
Posts: 543
Joined: Saturday 02 July 2016 5:17
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Zwave scenes, slow responding

Post 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
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest