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

Set parameters in LUA


FBerges

Question

I have a NEO coolcam siren here and I want to use it for alarm messages.
Say different tones for different messages.
So far so good.
If I carry out the parameters via the device setting, the settings in the siren also change.
However, if I do it as stated above about a LUA scene, nothing changes.
The stupid thing is I don't get an error message the part runs through without changing anything and the sound doesn't matter what I do.
The sleep in between are only to try if the siren may need a break between the parameter setting.
They have to get out or get smaller.
Has anyone ever tried this and can tell me where the error is?


Edit here is the manual.

Please login or register to see this link.


HC3, Latest firmwhare
I wrote the following :

 

function sirene_tuerklingel(DeviceID, SirenenTime)
    fibaro.call(DeviceID, "setParameter", 1, 1, 3) -- Alarm Sound Volumen 1-3
                                                      -- 1=Low
                                                      -- 2=Middle
                                                      -- 3=High
    fibaro.call(DeviceID, "setParameter", 2, 1, 1) -- Alarm Sound Duration Time 0-3
                                                      -- 0=Sirene is not on
                                                      -- 1=30Sek.
                                                      -- 2=1min
                                                      -- 3=5min
    fibaro.call(DeviceID, "setParameter", 3, 1, 3) -- Door Bell Sound Duration Time 1-127
                                                      -- 0=Sirene is not on
                                                      -- 1-127 Time
    fibaro.call(DeviceID, "setParameter", 4, 1, 3) -- Door Bell Sound Volumen 1-3
                                                      -- 1=Low
                                                      -- 2=Middle
                                                      -- 3=High
    fibaro.call(DeviceID, "setParameter", 5, 1, 10) -- Alarm Sound Index 1-10
                                                      -- There ar 10 different Sound
    fibaro.call(DeviceID, "setParameter", 6, 1, 9) -- Door Bellsound Index 1-10
                                                      -- There ar 10 different Sound
    fibaro.call(DeviceID, "setParameter", 7, 1, 2) -- Default Siren On Mode 1-2
                                                      -- 1=Alarm Sound Mode
                                                      -- 2=Door Bell Sound Mode
    fibaro.call(DeviceID, "setParameter", 8, 1, 1) -- Alarm LED Enable 0-1
                                                      -- 0=LED will be disable
                                                      -- 1=LED will de enable
    fibaro.call(DeviceID, "setParameter", 9, 1, 1) -- Boor Bell LED Enable 0-1
                                                      -- 0=LED will be disable
                                                      -- 1=LED will de enable
    fibaro.call(DeviceID,"turnOn")
    fibaro.sleep(SirenenTime)
    fibaro.call(DeviceID,"turnOff")
end

 

function sirene_einbruch(DeviceID, SirenenTime)
    fibaro.call(DeviceID, "setParameter", 1, 1, 3) -- Alarm Sound Volumen 1-3
                                                      -- 1=Low
                                                      -- 2=Middle
                                                      -- 3=High
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 2, 1, 1) -- Alarm Sound Duration Time 0-3
                                                      -- 0=Sirene is not on
                                                      -- 1=30Sek.
                                                      -- 2=1min
                                                      -- 3=5min
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 3, 1, 3) -- Door Bell Sound Duration Time 1-127
                                                      -- 0=Sirene is not on
                                                      -- 1-127 Time
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 4, 1, 3) -- Door Bell Sound Volumen 1-3
                                                      -- 1=Low
                                                      -- 2=Middle
                                                      -- 3=High
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 5, 1, 3) -- Alarm Sound Index 1-10
                                                      -- There ar 10 different Sound
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 6, 1, 3) -- Door Bellsound Index 1-10
                                                      -- There ar 10 different Sound
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 7, 1, 1) -- Default Siren On Mode 1-2
                                                      -- 1=Alarm Sound Mode
                                                      -- 2=Door Bell Sound Mode
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 8, 1, 1) -- Alarm LED Enable 0-1
                                                      -- 0=LED will be disable
                                                      -- 1=LED will de enable
    fibaro.sleep(1000)
    fibaro.call(DeviceID, "setParameter", 9, 1, 1) -- Boor Bell LED Enable 0-1
                                                      -- 0=LED will be disable
                                                      -- 1=LED will de enable
    fibaro.sleep(1000)
    fibaro.call(DeviceID,"turnOn")
    fibaro.sleep(SirenenTime)
    fibaro.call(DeviceID,"turnOff")
end

 

--MAIN

----------------------------------------------

--sirene_tuerklingel(438,2000)
sirene_einbruch(438,2000)

 

greeting F.B.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Hi

    So I have the solution to the problem.
    That is a simple documentation error by Fibaro.
    Look here!

     

    Please login or register to see this image.

     

    Please login or register to see this code.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • So I tried a Fibaro Smart Implant FGBS-222.
    (I had a network here with a power supply relay etc. for my doorbell campaign)

    After manual switching (parameter 24 from 0 to 1), inputs E1 / E2 are swapped and function as described in the manual.

    Now with the LUA
    fibaro.call (440, "setParameter", 24, 1, 1) and fibaro.call (440, "setParameter", 24, 1, 0)

    Result NIX but something of NIX !!!
    On the one hand it calms me (nothing wrong), on the other hand sh… my idea doesn't work!

    I hope this will be fixed quickly if it doesn't work because of some desperation.

    Greetings and a nice Weekend

    FB

    Edited by FBerges
    Link to comment
    Share on other sites

    • 0

    hi @FBerges

     

    very interested into your experience having also a neo coolcam siren + Aeon Labs one for which i would like also to have a QA to settle parameter before ringing it (sometime medium volume with music for door bell, sometime full volume with sirens sound for alarm).

     

    I was having a VD in HC2 doing it but no way adapting it for HC3... can't manage doing it :(

    did you find any solution for the issue since?

    have you managed to create a QA for?

     

    thanks for your return of experience and have a good week end,

    br

    mathias

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @mateo
    Hi
    No I have not yet found any other solution for this.
    The command "setParameter" does not work and is, according to my information, an error in Firmwhare 5.030.
    What I know is that a Betta from Fibaro is out and I hope that the bug is fixed.
    Waiting for the release since I am not a betta tester.
    Hope dies last.
    I have 3 useless sirens waiting to be used.
    Greetings to the neighboring country
    Frank

    Link to comment
    Share on other sites

    • 0

    dont use fibaro.sleep(1000) (you send on 1s action to hold bettter use

    Please login or register to see this code.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @mateo

    hello mateo

    I now have my NEO coolcam siren running well.
    My problems are actually an error in the Fibaro documentation.
    The command to change the register is:
    fibaro.call (siren ID, "setConfiguration", 1, 1, 1)
    I have solved the problem.
    Then I set all the parameters as I needed it for each purpose and it worked.

    Now look like this:

     

    -- Signal Nr.2 = Einbruch KG
    -----------------------------------------------------------------------------
    function Sirene_Einbruch()
        --Wenn der Letzte Ton der abgegeben wurde,
        -- nicht Einbruch ist dann muss Initialisiert werden
        if sirenen_alarm_ton ~= 2 then
            fibaro.call(sirene3, "setConfiguration"111-- Alarm Sound Volumen 1-3
                                                                   -- 1=Low
                                                                   -- 2=Middle
                                                                   -- 3=High
            fibaro.call(sirene3, "setConfiguration"211-- Alarm Sound Duration Time 0-3
                                                                   -- 0=Sirene is not on
                                                                   -- 1=30Sek.
                                                                   -- 2=1min
                                                                   -- 3=5min
            fibaro.call(sirene3, "setConfiguration"3110-- Door Bell Sound Duration Time 1-127
                                                                   -- 0=Sirene is not on
                                                                   -- 1-127 Time
            fibaro.call(sirene3, "setConfiguration"413-- Door Bell Sound Volumen 1-3
                                                                   -- 1=Low
                                                                   -- 2=Middle
                                                                   -- 3=High
            fibaro.call(sirene3, "setConfiguration"5110-- Alarm Sound Index 1-10
                                                                   -- There ar 10 different Sound
            fibaro.call(sirene3, "setConfiguration"619-- Door Bellsound Index 1-10
                                                                   -- There ar 10 different Sound
            fibaro.call(sirene3, "setConfiguration"711-- Default Siren On Mode 1-2
                                                                   -- 1=Alarm Sound Mode
                                                                   -- 2=Door Bell Sound Mode
            fibaro.call(sirene3, "setConfiguration"811-- Alarm LED Enable 0-1
                                                                   -- 0=LED will be disable
                                                                   -- 1=LED will de enable
            fibaro.call(sirene3, "setConfiguration"911-- Boor Bell LED Enable 0-1
                                                                   -- 0=LED will be disable
                                                                   -- 1=LED will de enable
        end
        
        if sirenen_alarm_ton ~= 2 then
            sirenen_alarm_ton = 2 --Initialisiert, der Ton kann abgespielt werden.
            fibaro.sleep(3000-- Wartezeit nach Initialisierung sonst kommt der Ton nicht richtig raus
            fibaro.call(sirene3,"turnOn")
            fibaro.sleep(3000)
            fibaro.call(sirene3,"turnOff")
        else
            fibaro.call(sirene3,"turnOn")
            fibaro.sleep(3000)
            fibaro.call(sirene3,"turnOff")
        end
    end 
     

    I only initialize the siren if another sound has been played beforehand, otherwise it is only switched on and off.
    Global variable (siren_alarm_ton) is responsible for this.

    After the initialization you have to take a break or the sound will not be played back.

     

    Greetings from the neighboring country
    Frank

    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...