Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
MarcoTorino71 6
HI,
I have a problem
I use a my scene to arm and disarm my alarm system.
It works.
But now, I want the siren sound 1 second when I arm my alarm, but not between 07:00 AM and 09:00 AM.
But my code failed.
This is the code:
-- Set formato data local
Adesso = os.date("%H:%M")
local InizioSilenzio = "07:00"
local FineSilenzio = "09:00"
fibaro:debug(Adesso)
if
(Adesso > InizioSilenzio and Adesso < FineSilenzio)
then
fibaro:debug("Attivo sirena")
fibaro:call(53, "turnOn");
setTimeout(function()
fibaro:call(53, "turnOff");
end, 1000)
else
fibaro:debug("No Sirena")
end
The test failed and the result is "No Sirena" everytime.
I tried to change the hour's range but nothing to do.
Where are I wrong?
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.