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 Detector - Change PIR sensitivity using LUA


eureka

Question

Hi All,

 

I am using my fibaro motion sensor for multiple purposes. For one of them I need it to have a high sensitivity, however, for others I need it to have a lower sensitivity (otherwise it will trigger to early). Is it possible to change the PIR parameter setting using LUA in a scene?

 

edit: same question for 'GPS location frequency refresh'. When I am close to home I want to update it more often to be more accurate. If I'm far away, it can update less frequent, to save battery on my phone.

 

Thx!

Edited by eureka
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
31 minutes ago, eureka said:

I am using my fibaro motion sensor for multiple purposes. For one of them I need it to have a high sensitivity, however, for others I need it to have a lower sensitivity (otherwise it will trigger to early). Is it possible to change the PIR parameter setting using LUA in a scene?

 

How many times per day do you need/want to change the sensitivity?

 

Edit: I know, I am answering a question with a question. :-) Sometimes, questions help to answer other questions ;-) ...

Edited by petergebruers
Link to comment
Share on other sites

  • 0
  • Inquirer
  • it's depending on whether I am home or away. When I'm at home I use it to put lights on, however, the sensor can be far away so I need it to be sensitive. If I am away I don't want to have false positives so it needs to be less sensitive.

     

     

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, eureka said:

    it's depending on whether I am home or away. When I'm at home I use it to put lights on, however, the sensor can be far away so I need it to be sensitive. If I am away I don't want to have false positives so it needs to be less sensitive.

     

     

     

    Might work. But, a battery operated device only "reads" parameters when it wakes up. The default for the FGMS-001 v 2 is 2 hours. So, worst case, your change will only happen after 2 hours. The only thing you can do is reduce that interval, but then you get higher battery drain.

     

    Technically speaking, the API supports updating parameters. It is undocumented and the solution is not published, but it works. I have working code to change "the dimming level at next turn on" of the older "Dimmer 1". The code has the potential to mess with your device, in the sense that you might have to exclude it and include it if something goes wrong.

     

    What do you think... do you want to try?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • sure! worth a try! I only use the sensor at night to wake the light (girlfriend goes to toilet and is not fond of the dark), so I can make sure it changes sensitivity based on whether it's day night. Is there a parameter in lua which mentions the last time the device woke-up? I can then use that to estimate when to update the parameter to be switching to sunset/sunrise.

     

    Do you know whether this is also possible for geotracking to change update frequency based on distance from specific location?

    Link to comment
    Share on other sites

    • 0

    I've tested GPS location more than a year ago and it did not meet my expectations. I cannot really comment on this. But I saw a recent topic that might be of interest:

     

     

    Here's the code to change a parameter. Explanation is in the code.

     

    If you get a message like "Nothing written to device" your device might have a different product ID, let me know and I'll investigate.

     

    Please login or register to see this code.

     

    Edited by petergebruers
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks! Will try it out! Can you maybe explain the part on the ProductInfo. How do you get to, for example, 1,15,1,0,16,10,2,2?

    Edited by eureka
    Link to comment
    Share on other sites

    • 0

    If you run this script on your device (so alter device ID in last line of script) and the prodInfo does not match, the scene prints both IDs. If you are certain you are talking to the right device, you put the info from that debug info in the last line...

    Link to comment
    Share on other sites

    • 0
    1 hour ago, danaeal2002 said:

    Hi,

    The script works perfectly, I can change the parameter 37 "à volonté". Thank you very much.

    That is good news! When you say "37", you are talking about an Aeon labs siren, I presume ;-)

     

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