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

Programming the Satel Integra alarm system i.c. with the HC2


Osec

Question

Well I thought it would be time to share some programming of the Satel Integra alarm system, together with the HC2.

As you know, LUA is not always understandable, so I created a programming, which should be understandable with blocks.

The first programming is about to use the motion sensors from the Integra alarm system, to turn the lights on when there is motion detected, and where there is no motion, the lights will be turned off. So in this case we have a Timer function. And only when there is Sunset, because at sunrise we don't want to have the lights on!

The example is about 1 motion sensor, but can be done with more of course.

1st step: Program in the Integra, at the Outputs tab, some virtual outputs. (Image 1)

One we call "Sunset", which will be a Bi switch and will be functioning as Sunset/Sunrise state. For the motion sensor we program it as Mono switch and define the zone ( motion sensor), which will trigger this output. Also you can define the cutt-off time, this is the time, when there is no motion anymore, that the output will go off.

Program a scene in the HC2 that the "Sunset" state output must be turned on at Sunset. (Image 2)

Than you program another scene where you define if the "Sunset" state output is on, and there is motion detected, to turn on the lights. (Image 3). If the Sunrise state output is Off, the lights will not be turned on.

Also the lights must be turned off when there is no motion anymore, so create another scene, and define to turn off the lights when the motion output is Off. (Image 4)

At last you have to create the last scene to switch off the "Sunset" state output at sunrise (Image 5).

So when it is sunset, every time when there is motion within the cut-off time, the lights will stay on.

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

And at sunrise, the Bi switch will be turned of, so the lights will stay off.

Have fun!

Br Taco

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Interesting ... i'm still considering to buy a satel system. This gives a bit more insight how things integrate.

I think however it can be done a little bit easier by using the timer values in the HC2 scene (Image 3) to automaticly turn the lights back off again. Or am i missing something?

Please login or register to see this image.

/emoticons/default_icon_cool.gif" alt="8-)" />

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Interesting ... i'm still considering to buy a satel system. This gives a bit more insight how things integrate.

    I think however it can be done a little bit easier by using the timer values in the HC2 scene (Image 3) to automaticly turn the lights back off again. Or am i missing something?

    Please login or register to see this image.

    /emoticons/default_icon_cool.gif" alt="8-)" />

    Hi Edwin,

    If you use the timer at the end of the lights, it is a delay time. So after the lights has been turned on, you have to create 2 new lines - "And", and after that - "Turn Off, with the delay time ( in the red box).

    But when you use it this way, it is a hard shutdown (turning the lights always off) after the delay time.

    So you will not have a timer function, where the lights stays on during motion detection.

    I think it is better to use it this way, based on the outputs. The 24 Bi switch output stays on as long as you walk there. If no motion, the output will turn Off, so the lights after that as well

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • How you made the Bi switch?

    Hi Razvan,

    please take a look at screen 1, in the output screen of the Integra alarm system, there you make it.

    The Bi switch will be turned on and off by Fibaro. see screen 2 and 5

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Osec,

    Great post. Where did you bought your alarm nth Netherlands?

    Thanks,

    Remco i

    Hi Remco,

    We are the distributor in the Netherlands, so quiet easy for me

    Please login or register to see this image.

    /emoticons/default_icon_cool.gif" alt="8-)" />

    The systems will be sold via authorized dealers /installers.

    Link to comment
    Share on other sites

    • 0
    Guest GG

    Very interesting to see how you guys have implemented your integration with the Integra.

    I have done it using one scene for every motion detector I want to turn some lights on/off for.

    I'm using a global variable to hold the duration the light should be on at every movement.

    This scene will be called each time there is movement at the motion detector and each time the counter is decremented.

    Each time there is movement the timeout is set to whatever my global variable timeout_indoor is set to, normally 180 seconds. As long as there is movement, the light will stay on and then be shut off 180s after last movement.

    Please login or register to see this code.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Yes GG, I know, but a lot off people are struggling with LUA.

    Here I have also A LUA code, I have 2 motion sensors which are controlling the same light.

    If one of them senses motion, the light goes On, and a timer will be triggered. When there is no motion anymore, the light goes out after 120 seconds.

    --[[

    %% autostart

    %% properties

    6 value -- Sensor 1

    24 value -- Sensor 2

    %% globals

    Counter

    --]]

    -- display the number of the currently running scenes

    local num = fibaro:countScenes();

    if (num == 1) then

    fibaro:debug('1 scene is currently running');

    else

    fibaro:debug('Number of the scenes running: ' .. num);

    end

    -- prevent starting more than 1

    -- scene at a time

    if (fibaro:countScenes() > 1) then

    fibaro:abort();

    end

    fibaro:debug('start');

    --local startSource = fibaro:getSourceTrigger();

    Counter=600;

    if (( tonumber(fibaro:getValue(6, "value")) > 0 )) then

    fibaro:debug('Lights on');

    fibaro:call(300, "turnOn");

    while(Counter > 0) do

    Counter=Counter-1;

    fibaro:debug(Counter);

    fibaro:sleep(1000);

    if tonumber(fibaro:getValue(6, "value")) > 0 then Counter = 60; end

    if tonumber(fibaro:getValue(24, "value")) > 0 then

    fibaro:call(300, "turnOn");

    fibaro:debug('Light 2nd sensor motion On');

    Counter = 120;

    end

    end

    fibaro:call(300, "turnOff");

    fibaro:debug('Lights off');

    end

    fibaro:debug('end');

    Link to comment
    Share on other sites

    • 0
    Very interesting to see how you guys have implemented your integration with the Integra.

    I have done it using one scene for every motion detector I want to turn some lights on/off for.

    I'm using a global variable to hold the duration the light should be on at every movement.

    This scene will be called each time there is movement at the motion detector and each time the counter is decremented.

    Each time there is movement the timeout is set to whatever my global variable timeout_indoor is set to, normally 180 seconds. As long as there is movement, the light will stay on and then be shut off 180s after last movement.

    Please login or register to see this code.

    Hello, I have tried to apply your code to my testing network and it is not working , i even copied it as it is and just changed the IDs and still not working, the code I tried at the end by just copying and pasting without any change (except removing the second motion sensor since i have one) is as follows :

    Please login or register to see this code.

    I have attached a snapshot in the attachment, it is not entering the loop at all.

    Update:

    I fixed the code, i am new to LUA but that just needed to have the while loop as an outer one and everything inside, LUA and bash scripting are not much different by concept i guess...

    Please login or register to see this attachment.

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