Jump to content

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


  • 0

Sound Siren when Arm Alarm


MarcoTorino71

Question

Hi All,

 

I would like to make the siren sound when I arm the alarm.

That is, 1 second of sound, 2 seconds of pause and 1 second of sound.

How can I do?

Thank you

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Hi,

     

    of course. Thanks to @Sankotronic for the code:

     

    - Solution 1:

     

    function soundSiren(n,d)
      if n==nil or n==0 then n=2 end
      if d==nil or d<1000 then d=1000 end
      for i=1,n do
       fibaro:call(sirenID,"turnOn") fibaro:sleep(d)
       fibaro:call(sirenID,"turnOff") fibaro:sleep(d)
      end
    end

     

    Use this if you have only one siren. Launch the function as:

     

    soundSiren(x,y)

    where:

    x= how many time the siren ring

    y= second of sleep

     

    change sirenID with ID of device.

     

    - Solution 2:

     

    function soundSiren(id,n,s,p)
      if n==nil or n==0 then n=1 end
      if s==nil or s<500 then d=500 end
      if p==nil or p<1000 then d=1000 end
      if id~=nil then
        if type(id)~=table then
          for i=1,n do
            fibaro:call(id,"turnOn") fibaro:sleep(s)
            fibaro:call(id,"turnOff") fibaro:sleep(p)
          end
        else
          for i=1,n do
            for d=1,#id do fibaro:call(id[d],"turnOn") end fibaro:sleep(s)
            for d=1,#id do fibaro:call(id[d],"turnOff") end fibaro:sleep(p)
          end
        end
      else fibaro:debug("Siren ID not provided, nothing to do") end
    end

     

    With more siren.

    Launch:

     

    soundSiren({id1,id2}, n, s, p)

     

    {id1,id2} - this is table of siren ID's that you want to sound. For one siren you can still send as soundSiren(sirenID, n, s, p)

    n - number how many times siren will sound

    s - duration of sound from 500ms to as much as you like

    p - duration of pause between sounding from 1000ms (1s) up to desired pause.

    • Like 1
    Link to comment
    Share on other sites

    • 0

    Ciao Marco,
    hello everyone,

     

    i have also an issue with my siren.  It doesn´t turn off, when entering the pin on the alarm panel. 
    I basicaly run/start the siren via the Advanced Alarm panel - as "Light"  (see screenShot)

    It does start when the alarm is triggered, fine.  But it doesn´t stop.

     

    Any tips?  

     

    The main reason I have discovered this issue in my system is because I was about to create a "Leaving the house" - Scene and i wanted the siren to peep for a second when one of the windows sensors showing an open window.

    I know this should have been posted under a different topic ...but as there is a connection...maybe someone can help me out.

     

    Thank you.

     

    Markus

     

     

    Please login or register to see this image.

    /monthly_2020_07/grafik.png.85b2c03459eae4d2cea1f99e9b8132d5.png" />

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...