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

Unable to create a "Lights on" Scene with Fibaro Motion Sensor


Question

Hi

I am new to HC2 so bear with me.

I have a Fibaro Motion sensor that I want to use to trigger lights in the kitchen.

I have created a simple scene:

if(Sensor==Breached(0s))

Then

(Turn on lights)

And a simular Scene to turn of the lights 

If(Sensor == Safe (60s))

Then

(Turn off lights)

 

My problem is that the Scene to turn ON the lights does not trigger! It does not looks like the motion sensor reports a Breach. It seems to detect motion because it is blinking green when I move in front of it. Firmware is up to date. I suspect that there is a setting on the motion sensor that is causing this. Scene "Lights OFF" is working.

Plese help me!

 

LUA code:

Please login or register to see this code.

Motion sensor parameters:

1 = 15

2 = 2

3=1

4=2

6=5s

8=0

9=200lux

12=0

14=255

16=0

18=(all)

20=20

22=30s

24=0

25=1

28=0

29=0

40=200lux

42=3600s

60=2C

62=900s

64=0s

66=0c

80=10

81=50%

82=100lux

83=1000lux

86=18c

87=28C

89=1

 

 

Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

Are you saying you have two scenes triggering on 7 value?

 

While if you are only wanting something this simple you should look at association if you want this to work you should remove one of your scenes and combine.

 

 

Please login or register to see this code.

 

Link to post
Share on other sites
  • 0
Just now, robmac said:

Are you saying you have two scenes triggering on 7 value?

 

While if you are only wanting something this simple you should look at association if you want this to work you should remove one of your scenes and combine.

 

 

Please login or register to see this code.

 

 

By the look of the initial post, I think he is using block scenes and did the LUA conversion to post the code in the forum. However if he is using LUA then I definitely agree that 1 scene is the way to go!!

Link to post
Share on other sites
  • 0
  • Inquirer
  • 2 minutes ago, devfern24 said:

    Can you see the motion detector being set off in your mobile app/ web browser?

     

    In my mobile app (iPhone) I tried Motion Sensors - and selected my motion sensor. Should I see it there?

    I am sitting next to my sensor and it is constantly blinking green while I am writing.

    Link to post
    Share on other sites
    • 0

    Yes. It is a fibaro motion sensor, correct? If so, the light or "eye" of the sensor in the mobile app will light up blue if motion is detected.

    Link to post
    Share on other sites
    • 0
    3 minutes ago, Badblock said:

     

    In my mobile app (iPhone) I tried Motion Sensors - and selected my motion sensor. Should I see it there?

    I am sitting next to my sensor and it is constantly blinking green while I am writing.

     

    If it is constantly blinking green while you are writing, then i dont think you reset the parameters back to default. Under default setting the motion sensor is "blind" for around 8 seconds after motion is detected to conserve battery life. After clicking 'restore parameters to default' did you click the save button on the right toolbar, then manually wake the sensor to send it the new parameters?

    Link to post
    Share on other sites
    • 0
  • Inquirer
  • Now this is weird! I updated the scene with the if-else-end that robomac provided and now the sensor went quiet.

    When I try to reset the default parameters nothing happens - but I try to sava anyway.

    Just to test, I tried setting parameter 1 to 200 and and parameter 2 to 10 and then save. After the save is done the values defaults back to 15 and 2 as if I did nothing.... WHY?

    Link to post
    Share on other sites
    • 0

    Did you wake the device after changing parameters like i mentioned in my last post? If this is not done, the parameter changes will not be sent to the motion sensor. After changing parameters and clicking save, take the cover off the back of the motion sensor and triple click the little button back there. The motion sensor will light up blue, indicating it is awake, and the parameter transfer will take place (you should be able to see this at the very top and center of your web browser)

    Link to post
    Share on other sites
    • 0
  • Inquirer
  • Ahh, so you have too wake it in order for it to receive the parameters. Something is different for sure because now it is also blinking red (and green) while I am writing.

    Link to post
    Share on other sites
    • 0
    3 minutes ago, Badblock said:

    Ahh, so you have too wake it in order for it to receive the parameters. Something is different for sure because now it is also blinking red (and green) while I am writing.

     

    You betcha. Basically all battery powered z-wave device "sleep" to conserve battery life, only reporting to the controller when they need to. To change parameters, the device must be "woke up".

     

    Are you back to default parameters or still running something custom? Under default params i belive the motion sensor flashes a certain color depending on the temp of the room when motion is detected. Also check your app/ web browser to see if motion detection is now being detected in the controller.

    Link to post
    Share on other sites
    • 0
  • Inquirer
  • I am a programmer but LUA is new to me :-)

    So how would i create a scene with LUA that turns on the lights if breached then after x seconds turn lights off again?

     

    if(Sensor==Safe(600s))

    Then

    (Turn off lights)

    else

    (Turn on lights)

    Link to post
    Share on other sites
    • 0

    Hi @Badblock,

     

    If you like to learn by examples check my signature for some scenes and VDs! Who knows, maybe you can find something useful for you.

     

    Enjoy coding! :) 

    Link to post
    Share on other sites
    • 0
    3 hours ago, Badblock said:

    I am a programmer but LUA is new to me :-)

    So how would i create a scene with LUA that turns on the lights if breached then after x seconds turn lights off again?

     

    if(Sensor==Safe(600s))

    Then

    (Turn off lights)

    else

    (Turn on lights)

     

    You can probably just make a block scene and than add the "else" after converting to Lua. that sounds like it could save you some writing and it should work fairly well. (altho there was a person whom had issues with converssion to Lua lately)

    Link to post
    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...