afterSec(x)
Moderator: leecollings
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
afterSec(x)
Maybe a stupid question:
for devices we have:
device.switchOn().afterSec(10)
Can't we have this also for variables like:
variable.set('my_value').afterSec(10)
In normal LUA you can do this for variables
for devices we have:
device.switchOn().afterSec(10)
Can't we have this also for variables like:
variable.set('my_value').afterSec(10)
In normal LUA you can do this for variables
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
Oh I didn't know that. I'll add it.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Thxdannybloe wrote:Oh I didn't know that. I'll add it.
Verzonden vanaf mijn iPad met Tapatalk
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
I'm also looking for this feature - is it added now?
Thanks!
Thanks!
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
Not yet.. just got back from vacation. Catching up here...
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
OK...but pleaaaaaseeee implement this soon - I really need it for my alarm system 
Thanks...

Thanks...
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
I'm testing it right now on my production machine. I want to have it running for a little before we start creating Pull Requests.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Sounds really good...thanks so much for doing this...
- DewGew
- Posts: 581
- Joined: Thursday 21 April 2016 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10618
- Location: Sweden
- Contact:
Re: afterSec(x)
Is it possible to use time option to a function also? eg. " myfunction().afterSec(delay)"
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
No, that's handled by the Lua interpreter. Calling a function has nothing to do with Domotic's scheduling support.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
Taking longer than expected as quite some changes have to made in the Domoticz event systems. Still working on that.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
OK - thanks again for your effort!
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Any progress? 

-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Are we getting closer to a solution? 

-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
Eh.. it is released in 3.8551 so give it a try.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Question:
Is it possible to cancel an .afterSec() before it is activated (the time has passed)?
The use-case is for an alarm system, where I use afterSec to time from when the PIR is trigged to when the siren should start. I want to be able to cancel the siren if the alarm is disarmed.
Thanks,
Mikkel
Is it possible to cancel an .afterSec() before it is activated (the time has passed)?
The use-case is for an alarm system, where I use afterSec to time from when the PIR is trigged to when the siren should start. I want to be able to cancel the siren if the alarm is disarmed.
Thanks,
Mikkel
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: afterSec(x)
In the upcoming dzVents 2.4 you can do device.cancelQueuedCommands(). Until then you can try device.setState(device.state)).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 39
- Joined: Thursday 08 December 2016 20:50
- Target OS: Linux
- Domoticz version:
- Contact:
Re: afterSec(x)
Hi,
Thanks for the quick reply.
I do it like this:
domoticz.variables('SoundSiren').set('0')
But that doesn't cancel the afterSec() - it's still called after the time-out.
Any other suggestions that might work?
Thanks.
Thanks for the quick reply.
I do it like this:
domoticz.variables('SoundSiren').set('0')
But that doesn't cancel the afterSec() - it's still called after the time-out.
Any other suggestions that might work?
Thanks.
Who is online
Users browsing this forum: Google [Bot] and 1 guest