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

Motion Sensor Scene , turn light on and off


Question

Posted

Hi all,

I would like to turn light on, and if not tripped for 10min then turn it off again. All in one scene, this should be possible ?

I tried what I thought is good, but it did not work. Can somebody post me how to do this ?

I´m fairly rookie so any detailed help is much appreciated ! I´m on 4.058 !

 

thanks a lot !

Otter

Recommended Posts

  • 0
Posted

would you like to be able to turn the light off manually as you leave a room aswell? as most the scenes you see here will not allow you to! it will come straight back on!

 

but 4.058 has created a few issues as your motion sensor if fibaro defaults to 30 secs breach/safe and this STUPID new instances crap with scenes means that you would be limited to 5 minutes (300 secs)

 

so trying to get 600 seconds (safe) would require another 10 instances...

 

---

 

That may or not be correct but it is the only was i see it in my setup!

 

scene1:

if motion = breach

then

switch my light on

advanced settings instances = 2

 

 

scene2:

if motion = safe (600) < this is where the problems will occur...

then

switch my light off

advanced settings instances = 10 < you would need 20

 

If someone from Fibaro had the common decency to advice users it would save all the pissing around!

 

Good luck...

  • 0
  • Inquirer
  • Posted

    am i better using "tamper tripped" or breached, what is the diff ? THANKS ! I guess the fallback to 4.054 would fix it. Can I by the way download templates which I have now under this firmware and import into 4.054 ?

    • 0
    Posted

    I do not think power-trip fully grasp the implications of multithread programming and concurring instances. The reason for this new "instance crap" is that a multitude of users have had issues with memory leaks and this is why you can not run infinite instances of the same script.

    I believe there is an easy way to get around the problem though. If you are using block or lua then create a variable to hold the light state.

    If breached and light is off then turn on light

    Set light on.

    If safe 600 turn light of.

    Set light off.

    If you are doing it in one LUA scene then you could use the fibaro kill command to kill off extra instances. And you also may want to create a counter that resets every time the sensor is breached within the time frame.

    A top tip to learn LUA is to first create the block scene and then convert it. Then you could make the two scenes into one.

    • 0
  • Inquirer
  • Posted

    folks im a rookie...happy to know how to Spell LUA

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" />

    • 0
    Posted

    I do not think power-trip fully grasp the implications of multithread programming and concurring instances. The reason for this new "instance crap" is that a multitude of users have had issues with memory leaks and this is why you can not run infinite instances of the same script.

    I believe there is an easy way to get around the problem though. If you are using block or lua then create a variable to hold the light state.

    If breached and light is off then turn on light

    Set light on.

    If safe 600 turn light of.

    Set light off.

    If you are doing it in one LUA scene then you could use the fibaro kill command to kill off extra instances. And you also may want to create a counter that resets every time the sensor is breached within the time frame.

    A top tip to learn LUA is to first create the block scene and then convert it. Then you could make the two scenes into one.

     

    And where did it state he has a HC2?

    • 0
    Posted

    I suggest you try your WORKAROUND before commenting... because i do not think it will work!

    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" /> best of luck!

    • 0
  • Inquirer
  • Posted

    Does this need to be ARMED or DISARMED when using the BREACHED ?

    • 0
    Posted

    the one without armed/disarmed is fine

    • 0
    Posted

    a simple solution for USER FRIENDLINESS! would be to incorporate a SIMPLE additional block with a kill or counter... why is everyone intent on pushing new users who want an easy life into using bloody LUA!

     

    in fact at what point dd you clarify what box your using? if its HCL then you have no choice!

    • 0
    Posted

    No Lua capabilities I'm afraid... So you have no choice but to use block scenes!

    My tag username perfectly implies the sort of characters that have a habit of posting here without researching first!

    I wish you all the best but would advise an email to [email protected] and ask them for a solution for 4.058 as we are all in the dark regards potential changes that are not documented as of yet. And as you go over that 5 minute maximum for default motion sensor parameters you will struggle!

    • 0
    Posted

    I suggest you try your WORKAROUND before commenting... because i do not think it will work!

    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" /> best of luck!

     

    You are right, I learnt long ago that you should wait at least a couple off weeks before installing anything new and shiny from Fibaro. You are also right on your asumption that my pseudo code would fail but may be for the wrong reason? I still believe that the easy way around the problem is that you make a global var to check for instances running before trying to sleep. But that goes for both sensor safe and breached. I do not do block programming so I didn't catch that the other scene also would spawn instances every time the sensor goes safe.

     

    Hence the pseudo code should be something like

     

    If breached and light is off then turn on light

    Set light on.

    If safe and light is on and running instances is 0

    Set running instances to 1

    Sleep 600 turn light off.

    Set light off.

    Set running instances 0

     

    Is that better? (I won't install .58 for at least a week or so) =)

    • 0
    Posted

    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 shall try... i just do not see why a kill or abort could not have been added to block scenes to fix this? bit like rolling a new car off the production line but not putting air in the tyres!

    • 0
    Posted

    That will not work either... it will not allow a user to manually switch the light off using the wall switch if they wish to override!

     

    The light will come back on immediately!

    • 0
    Posted

    The light only comes back if the sensor is triggered again. Make sure to set the light variable to off and the instance counter to 0 if turning the light off with another scene. If needed sleep for a bit before setting the light variable to off to make the sensor inert to motion.

     

    But you are right, I my self can not place my sensor in a perfect position in my bathroom therefor I only uses it to turn the light on and then the pushbutton to turn it of.

    • 0
    Posted

    so if i have 3 rooms that require safe (600) for example your saying i need a variable for each light and an instance for each light aswell? if so that does make sense... but what a lot of messing about to overcome what i consider to be a half hearted attempt to fix memory leaks!

    • 0
    Posted

    Fibaro support personel ... Please advice !

    • 0
    Posted

    Fibaro support personel ... Please advice !

    Hahahahahaha this one made me laugh!

    • 0
    Posted

    Still have to try 

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

    • 0
    Posted

    Sorry all. I really am a noob.

     

    Does this not help, i have a motion sensor that

    if breached and

    it is dark, and

    the light is already off 

     then

    Turn on for 120 seconds then turn off

     

    Please login or register to see this link.

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