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

Question

Posted

Hi,

 

I am new to Fibaro so please bear with me if i sound ignorant. 

 

I have HC2, i created a scene that every time i arrive home the lights turn on. It works (reasonably) but after i arrive home the scene continues to run. So even when i switch off the light, the GPS polling keeps happening and it see i have arrived home and turns the light on. What logic do i use to make sure once i have arrived home fibaro should stop running that scene. I dont know LUA so please if possible no suggestions with LUA. 

 

Any help here please?

 

Thanks,

Akash

3 answers to this question

Recommended Posts

  • 0
Posted

you need to create a variable that you set as part of the scene. It should be either home or away.

 

If set to away and you arrive home the scene turns the lights on and sets the variable to home, if GPS sees you are home but the variable is also home it will not put the lights on.

 

When you leave home a scene needs to reset to away.

 

Hope that makes sense

  • 0
Posted

Hi Akash

 

Sorry, I know you didn't want any LUA code, but I've recently written a scene that will update the global variable(s) that Andy is talking about, based on the location of the phone.  It might not be any use to you, but could help others looking to do the same thing.  

 

You'll need to create the variables in the Variables panel first.  The names of these global variables then go in the globalVariableNames array along with the device numbers of each phone (which are also in the %%properties section of the header).  The locations that you want to check for proximity to are held in the locations array.  You can adjust the distanceAllowance variable according to how accurately you want to track the location.  I've set it so that it will register a change of location once 500m outside of one of the known locations.

Please login or register to see this code.

I'm also new to Fibaro, so probably not the best code, but I'm still learning.

 

You can then write scenes which will trigger whenever one of the global variables changes.  The global variable will hold both the current location name and the previous location name, so you that it gives you the ability to determine whether the user is leaving or arriving.

 

Dave

  • 0
  • Inquirer
  • Posted

    Thanks guys and apologies for the late reply. I haven't had a chance work on the system yet. Have the whole day tomorrow, will try the solutions you guys have suggested. Thanks

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