Countdown

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Robban
Posts: 15
Joined: Monday 09 November 2015 6:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Countdown

Post by Robban »

Hi

I am about to make an alarm system with domoticz and RpI and now i wonder

how do i make a countdown from 30 sek in blocky or Lua?

like..

if front door=open then start countdown
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Countdown

Post by BakSeeDaa »

You can create a virtual switch device then set an Off delay of the desired time. After you turn it on it will turn itself off after it's reached the time for it's off delay. You can then trigger on the virtual device change.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Countdown

Post by rgroothuis »

You can check the "last modified status", this has a date/time in it. Compare the date/time against the current date/time and you know the time difference. Do this in a time based Lua script.
pluggin
Posts: 45
Joined: Tuesday 26 May 2015 22:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Argentina
Contact:

Re: Countdown

Post by pluggin »

Robban wrote:Hi

I am about to make an alarm system with domoticz and RpI and now i wonder

how do i make a countdown from 30 sek in blocky or Lua?

like..

if front door=open then start countdown
I do what you need with SET/AFTER

Image

The rule do this:
If door or windows = open then wait 15 sec and turn on the Siren (This give me time to deactive the alarm)
If Siren = on then turn ON living room light for 5 minutes / turn it OFF SIREN after 5 minutes
Razberry + 4 Eversrping HSM02 + 2 Aeotec Multi-Sensor + 1 Aeotec Micro Dimmer + 4 Aeotec Micro Smart Energy Switch, 2nd + 1 Remotec ZXT-120 + 1 Aeotec Smart Energy Monitor + 1 Everspring SE812 indoor Siren + 2 fibaro motion sensor + Aeotec water sensor
Robban
Posts: 15
Joined: Monday 09 November 2015 6:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Countdown

Post by Robban »

ok, think i getting the hang of it,
however,

is it possible to make:

if door =open then countdown
if countdown>0 and <30 and pushbutton=on then stop countdown and deactivate alarm

?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest