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

FIBARO Motion Sensor Scene


Question

Posted

Hi, I would like to know on

how to make the manual switch ON/OFF works while Motion Sensor scene is running...

Let say the scenario , a scene when motion is detected then turn ON light..then once the NO motion the light will turn OFF...I want to know how to make the light can be turned ON via manual switch while the scene is running and after the scene is end..

18 answers to this question

Recommended Posts

  • 0
Posted
Hi, I would like to know on

how to make the manual switch ON/OFF works while Motion Sensor scene is running...

Let say the scenario , a scene when motion is detected then turn ON light..then once the NO motion the light will turn OFF...I want to know how to make the light can be turned ON via manual switch while the scene is running and after the scene is end..

I'm not sure if i follow you?

But here is a link on how to make a light scene with motion plus then some

Please login or register to see this link.

  • 0
Posted

Of course you can. Search the forum, there are several examples which will do that for you.

  • 0
  • Inquirer
  • Posted

    Thanks for the prompt reply U5tabil and Dalle1985 , Acctually i know the scene setting for the normal motion sensor detect and light turn ON ,but my question here , I created a scene at Kitchen , whereby once Motion is Detected(BREACHED) , then LIGHTs turn ON , the Once Motion is SAFE, the LIGHTS turn OFF, my problem is here , what if i want to be at the kitchen for some time or if i am eating ( not in the range of Motion sensor detection) , then the LIGHTS will be TURN OFF right...How is possible for everytime i need to make a notable movement at the motion sensor to make the Lights ON for some time..My biggest problem here how to make the manual switch turn ON overides the Scene even it ACTIve or Not ACTIVE...Please i need to someone guidance since im stuck with these issue for couple of months....

    Please login or register to see this image.

    /emoticons/default_icon_cry.gif" alt=":cry:" />

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    • 0
    Posted

    Two way to do this I think. One is to increase the time before the lights gets turned off after your motion sensor goes back into SAFE state and the other is to use a variable to give extra condition for the motion sensor.

    Example :-

    Option 1

    ======

    Use a delay time

    (Scene Breached)

    IF KITCHEN_MOTION == BREACHED THEN KITCHEN_LIGHTS == ON

    (Scene Safe)

    IF KITCHEN_MOTION == SAFE THEN KITCHEN_LIGHTS == OFF (300) <- delay time before this scene turns off that lights in sec (which is 5 min).

    I'm sure you would have moved in 5 min which will re-activate the first scene so it will be in a loop per say until there is no movement detected for that 5 minutes. You can change this value to something that suits your activity.

    Option 2

    ======

    Create a global variable eg: auto_mode which can have a value of 1 or 0 (1 means it is on and 0 means it is off)

    You can then use this variable as the first condition to check if the motion sensor should be used to switch on/off the lights.

    You can set the value of that variable by setting it from the physical switch in your kitchen.

    • 0
    Guest imparator
    Posted

    krisshnakumar, Try this one

    i used this one also , thanx to Dalle1985 i works greats, and fits your need.

    or look at this threat :

    Please login or register to see this link.

    Please login or register to see this code.

    • 0
    Guest David R
    Posted

    This script is like something im after but I use a relay instead of a dimmer. What would I need to change in the values to use relay rather than dimmer ? Just 0 off 1 on?

    Thanks

    • 0
    Posted
    This script is like something im after but I use a relay instead of a dimmer. What would I need to change in the values to use relay rather than dimmer ? Just 0 off 1 on?

    fibaro:call(id, "turnOn")

    fibaro:call(id, "turnOff")

    • 0
    Guest David R
    Posted

    thanks peter but where in the script do I need to change

    • 0
    Posted

    dimid = 188 change that id to your relay the rest looks irrelevant as it is based on 0 off 1 on

    Does not matter if its dimmer or relay!

    • 0
    Guest David R
    Posted

    thanks Dean I will try this

    • 0
    Posted

    If you want to do it right, do this:

    Please login or register to see this code.

    This will ensure that the device is turned on and off correctly, but it should work with the first scene as well even though you use a relay.

    • 0
    Posted

    Hi guys, perhaps a noob question but - how would you set the motionoverride variable in an easiest possible way? What I did was I changed motionoverride to isNightTime variable, which I calculate separately, but this is not ideal - I may want to override manually even if not dark at times.

    • 0
    Posted

    It depends very much on what you want to do with it. I use it to ensure that lights does not turn on at night, so it is toggled together with my going to bed scene. The way I've set up the scene is such that of you've turned on the light manually, the motion sensor will not assume control of the light before the light has been switched off again.

    So you must first decide when you want to turn off the scene and then design a scene around that.

    • 0
    Posted

    my idea is: when it is bright - I want to override and not use motion detection- be able to switch the light on manually. Then when it is dark, i.e. at night when I enter the hall I want the lights to turn on automatically. So this is what i did with the isNight global variable, but it is a calculated variable based on maths not how dark it is really

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> So i think the most sensible way is to design a scene around one of my motion sensors - am i thinking correctly? Plus - go to bed scene you mention is a good idea I will surely combine

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> I am new to this business Dalle, but already noticed your code is great

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> Thanks for that

    • 0
    Posted

    Well, this is more less what the code does. If you look at the code, then, there is a variable called "light" set to 50 as default. This value determines below what lux reading the scene should turn on the light. So if your motion sensor detects light, it will determine by itself if the light level is high enough to not require the light be turned on. Then the isNight var or motionoverride as I chose to call it, will just be there to disable at night.

    If the light level is above 50, then you can just turn on the light manually and it will stay on until you turn it off. So I thonk the scene does exactly what you are asking for.

    • 0
  • Inquirer
  • Posted

    Dalle1985 Thanks alots but i encounter some problem here , the scene cannot run ...can you help me ..here is your code tht edited and the snapshot of the output

    Please login or register to see this code.

    [ Added: 2014-12-22, 13:04 ]

    Dalle1985

    Please login or register to see this attachment.

    • 0
    Posted

    Have you created the global variable motionoverride and set it to 0?

    • 0
  • Inquirer
  • Posted

    Dalle1985 yes I have created the global variable ready. The scene can run...but I have question here ..why I cannot switch on the light manually & light stay ON until I switch OFF for the condition LUX level below 50 for the Motion Sensor detects something, because from the coding as per you said The Light stays ON for 60s then it offs even the manual switch is turned ON..how to solve these...

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