forSec option does not work any more on blind devices [SOLVED]
Moderator: leecollings
forSec option does not work any more on blind devices
Hi All
All is inside the subject.
I managed to open my garage door during 3 sec with the previous stable version of dzVents.
dz.devices("Garage door").switchOff().forSec(3)
With the latest version 3.0.1 I can use open() instead of switchOff but forSec has no effect.
dz.devices("Garage door").open().forSec(3)
Is there another way to open my garage door for 3 seconds?
All is inside the subject.
I managed to open my garage door during 3 sec with the previous stable version of dzVents.
dz.devices("Garage door").switchOff().forSec(3)
With the latest version 3.0.1 I can use open() instead of switchOff but forSec has no effect.
dz.devices("Garage door").open().forSec(3)
Is there another way to open my garage door for 3 seconds?
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: forSec option does not work any more on blind devices
Does the old command
Code: Select all
dz.devices("Garage door").switchOff().forSec(3)
My preference is to use this sequence of commands.
Code: Select all
garageDoor = dz.devices("Garage door")
garageDoor.cancelQueuedCommands()
garageDoor.open()
garageDoor.stop().afterSec(3) -- or garageDoor.close().afterSec(3) -- if that's what you want.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: forSec option does not work any more on blind devices
Old code does not work any more.
The door opens and stop when the door is fully opened (20sec after)
I will try yours tomorow.
Thank you
The door opens and stop when the door is fully opened (20sec after)
I will try yours tomorow.
Thank you
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
Re: forSec option does not work any more on blind devices
Does not work too
I think that this is a regression introduced with the update of the action on blind devices.
Here is the log file
I think that this is a regression introduced with the update of the action on blind devices.
Here is the log file
Code: Select all
2020-04-01 19:20:21.553 (ENOCEAN PI) Lighting 2 (Cde1 Bouton 3)
2020-04-01 19:20:21.636 Status: dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2020-04-01 19:20:21.691 Status: dzVents: Debug: Processing device-adapter for Cde1 Bouton 3: Switch device adapter
2020-04-01 19:20:21.691 Status: dzVents: Debug: dzVents version: 3.0.1
2020-04-01 19:20:21.691 Status: dzVents: Debug: Event triggers:
2020-04-01 19:20:21.691 Status: dzVents: Debug: - Device: Cde1 Bouton 3
2020-04-01 19:20:21.738 Status: dzVents: Info: Handling events for: "Cde1 Bouton 3", value: "On"
2020-04-01 19:20:21.738 Status: dzVents: Info: Télécommande Garage: ------ Start internal script: Telecommande: Device: "Cde1 Bouton 3 (ENOCEAN PI)", Index: 232
2020-04-01 19:20:21.743 Status: dzVents: Info: Télécommande Garage: ------ Finished Telecommande
2020-04-01 19:20:21.744 Status: dzVents: Debug: Commands sent to Domoticz:
2020-04-01 19:20:21.744 Status: dzVents: Debug: - Cancel = {["idx"]=203, ["type"]="device"}
2020-04-01 19:20:21.744 Status: dzVents: Debug: - Garage = Off
2020-04-01 19:20:21.744 Status: dzVents: Debug: - Garage = Stop AFTER 3 SECONDS
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
Re: forSec option does not work any more on blind devices
I found a workaround
How to report it to the developement team?
Code: Select all
door.open()
door.stop().at(os.date("%H:%M:%S",os.time()+3))
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: forSec option does not work any more on blind devices
Good that you got it working !
I am co-developer of dzVents and the creator of the .at() method in dzVents. What it does is computing the amount of seconds from now and use that computed value in an afterSec() method. So you can imagine why I am surprised that the
Code: Select all
.at(os.date("%H:%M:%S",os.time()+3)) method -- 3 seconds from now
Code: Select all
.afterSec(3) -- 3 seconds from now
I am very much interested in the log output of both methods. If there is something unexpected I might be able to fix it.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: forSec option does not work any more on blind devices
Sorry, was my mistake
I did a lot of modifications for my tests and the type of the device was not the same.
"Blind inverted" device
The code below is working well:
The code below is not working:
"Blind" device
None of the code below is working:
Hope it help
I did a lot of modifications for my tests and the type of the device was not the same.
"Blind inverted" device
The code below is working well:
Code: Select all
myDevice.open()
myDevice.stop().afterSec(3)
Code: Select all
myDevice.switchOn()
myDevice.stop().afterSec(3)
Code: Select all
myDevice.open().forSec(3)
Code: Select all
myDevice.switchOn().forSec(3)
None of the code below is working:
Code: Select all
myDevice.open().forSec(3)
Code: Select all
myDevice.open()
myDevice.stop().afterSec(3)
Code: Select all
myDevice.switchOff().forSec(3)
Code: Select all
myDevice.switchOff()
myDevice.stop().afterSec(3)
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: forSec option does not work any more on blind devices
Checked this on all recent Beta's but cannot replicate this. The forSec() is ignored for open() or close() as there is no way dzVents can know what to do when the delay is over. This has been the way it worked from the moment forSec() became available in dzVents.
All other methods work as designed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: forSec option does not work any more on blind devices [SOLVED]
It was working with switchOff().forSec(3) previously.
The problem raized after the update.
For me, open().forSec(x) mean that you would like to open the door during x seconds and stop.
This is usefull with a door which do not accept percentage.
A good way to introduce it should be to create something like this myBlind.open().stopIn(3)
My solution is the following:
I create a switch and manage the state of this switch.
and the command to open the door for 3 s
Not very clean but it works.
Thank you for your support.
The problem raized after the update.
For me, open().forSec(x) mean that you would like to open the door during x seconds and stop.
This is usefull with a door which do not accept percentage.
A good way to introduce it should be to create something like this myBlind.open().stopIn(3)
My solution is the following:
I create a switch and manage the state of this switch.
Code: Select all
if mySwitch.state == 'On' then
door.open()
else
door.stop()
end
Code: Select all
mySwitch.switchOn().forSec(3)
Thank you for your support.
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
Who is online
Users browsing this forum: No registered users and 1 guest