Open() and Close() are reversed

Easy to use, 100% Lua-based event scripting framework.
Post Reply
OlivierFR
Posts: 32
Joined: Friday 25 July 2014 18:32
Target OS: Linux
Domoticz version:
Contact:

Open() and Close() are reversed

Post by OlivierFR » Wednesday 13 June 2018 16:59

Hello,
I'm using a script to control my blinds.
The state returned is correct (Open, Closed, Stopped)
If my blind is opened (up), the blind.state shows 'open'.
If I send the command blind.close(), nothing will happen (it will stay up).
If I send the command blind.open(), it will close (go down).
If I send the command blind.stop(), it will stop or move to the favorite position. This is correct.

If the blind is closed (down) and I send the command blind.close(), it will go up.

So the commands open() and close are reversed!

Can this be fixed?

Thanks,
Olivier

u01pei
Posts: 47
Joined: Sunday 04 January 2015 17:17
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Open() and Close() are reversed

Post by u01pei » Wednesday 13 June 2018 17:42

Maybe you should select "blinds inverted" for your device, or if you already did select inverted, switch to the non-inverted blinds?

OlivierFR
Posts: 32
Joined: Friday 25 July 2014 18:32
Target OS: Linux
Domoticz version:
Contact:

Re: Open() and Close() are reversed

Post by OlivierFR » Wednesday 13 June 2018 21:43

The device is defined as blinds (not inverted) and it works correctly in Domoticz UI.
It says closed when it’s down and the open / close buttons work correctly (correct direction).
If I set it up as blinds inverted, everything is reversed (buttons, open/close status).
When my script sends a blind.close(), I can see in the log that it actually sends a ‘Off’ command, and this opens the blind...
So the issue is clearly in dzvents which seems to translate the open() and close() functions to the inverted On / Off commands.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest