DzVents Roller shutter not working correctly.  [SOLVED]

Moderator: leecollings

Post Reply
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

DzVents Roller shutter not working correctly.

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DzVents Roller shutter not working correctly.

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

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

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

Who is online

Users browsing this forum: No registered users and 1 guest