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
Countdown
Moderators: leecollings, remb0
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: Countdown
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.
-
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Countdown
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.
-
- Posts: 45
- Joined: Tuesday 26 May 2015 22:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Argentina
- Contact:
Re: Countdown
I do what you need with SET/AFTERRobban 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

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
-
- Posts: 15
- Joined: Monday 09 November 2015 6:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Countdown
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
?
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
?
Who is online
Users browsing this forum: No registered users and 1 guest