Page 1 of 1

DzVents Roller shutter not working correctly.

Posted: Tuesday 02 July 2019 19:31
by EddyG
I am on:

Code: Select all

Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
This dzVents code does not work correctly.

Code: Select all

dz.devices("Schuifpui rolluik").stop().checkFirst().withinMin(delay)
The checkFirst part does not work correctly.
The roller shutter is type: RFY, RFY, Blinds and controlled by RFXcom and is working fine
It has 3 states: Open, Stopped and Closed. Manually (with handremote) and with Domoticz they work fine.
With dzVents I set them to 'stop' if above a certain Lux level and the 'Open' works fine also if lux is below a level or at specific time.
The problem is when I open the roller shutter with the manual remote sligtly then Domoticz does not know because there is no feedback from manual remote to Domoticz, so state in domoticz did not to change and is still 'stop'.
dzVents however send a stop command the next time the script is run despite the .checkFirst()
B.t.w. the script is run every 15 min and the delay is 5 (just to randomize a bit)
Is this a bug or am I doing something wrong?

Re: DzVents Roller shutter not working correctly.

Posted: Wednesday 03 July 2019 0:00
by waaren
EddyG wrote: Tuesday 02 July 2019 19:31 This dzVents code does not work correctly.

Code: Select all

dz.devices("Schuifpui rolluik").stop().checkFirst().withinMin(delay)
The checkFirst part does not work correctly.
Is this a bug or am I doing something wrong?
I guess this indeed a combination of methods that was not taken into account during the design of checkFirst.
Can you try to change line 26 in <domoticz dir>/dzVents/runtime/TimedCommand.lua
from

Code: Select all

if (checkValue == true and currentState == valueValue) then
to

Code: Select all

if checkValue and currentState:find(valueValue) then
and check the results ?
I tested this on dzVents 2.4.24 and it does work there without interfering any other checkFirst() combinations.

Re: DzVents Roller shutter not working correctly.  [SOLVED]

Posted: Wednesday 03 July 2019 14:40
by EddyG
Yep, that seems to work. Tnx. :D
I suppose that it will be put in next releases.
Currently I cannot switch to beta's because of the ZWave problems, so I will leave it in my code.