dzVents randomised times  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
mash47
Posts: 13
Joined: Wednesday 04 December 2019 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.10717
Location: Sheffield, UK
Contact:

dzVents randomised times

Post by mash47 »

Here's an example from the wiki ..

Code: Select all

-- switch on for 2 minutes after a randomized delay of 1-10 minutes
device.switchOff().withinMin(10).forMin(2)
Are randomised actions different in dzVents and device/scene timers? The wiki states that the random action time is after the set time whereas the device/scene random action time is +/- around the set time.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzVents randomised times  [Solved]

Post by waaren »

mash47 wrote: Saturday 07 December 2019 12:18 Here's an example from the wiki ..

Code: Select all

-- switch on for 2 minutes after a randomized delay of 1-10 minutes
device.switchOff().withinMin(10).forMin(2)
Are randomised actions different in dzVents and device/scene timers? The wiki states that the random action time is after the set time whereas the device/scene random action time is +/- around the set time.
Probably a language thingy.
I read
after a randomized delay of 1-10 minutes
as that it will be switched off somewhere between 1 and 10 minutes and that is indeed what this method does.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents randomised times

Post by dannybloe »

I'd say the comment should be something like: -- switch off for 2 minutes after a randomized period of 1-10s has passed.
And the delay is before the actual switching.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest