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

Delay in HC2 scenes/variables


Question

Posted

Iv been struggling for some time with variables and scenes, like time of day variables, gps variables etc. I follow the manual and tutorials that i find. Do everything according to the book. But it aint working. Then after 1 day even 2 days it starts working. Why?

An example. I set up an simple GPS variable with "home" and "away". And setting the location etc, tried changing a lot. like distance from area, update every 1 minute (which will drain a lot of battery and is useless). But it did not work at all. Then i made a scene to turn on and off 1 lamp as a test to see if its working with the variable. It did not work at all. Now 2 days later, even when i haven't done anything to the settings, scenes, variable or anything as i gave it all up for christmas it suddenly by itself started working. And i can see in event logger that it started working 2 days after i set it up in the first place.

WHY? Is this some sort of bug? Now that i know it, i will be more sure to just let it settle a couple of days. Before i start changing stuff thinking iv done something wrong.

8 answers to this question

Recommended Posts

  • 0
Posted

Did you by any chance restart your device?

  • 0
  • Inquirer
  • Posted
    Did you by any chance restart your device?

    I tried that several times under several circumstances. But it doesnt help at all.

    • 0
    Posted

    Can you give some code? Preferably not using GPS. What firmware version? Is your HC2 in alarm by any chance? What devices used as triggers?

    • 0
  • Inquirer
  • Posted
    Can you give some code? Preferably not using GPS. What firmware version? Is your HC2 in alarm by any chance? What devices used as triggers?

    Im running the 3.590 version on the HC2. Fresh install too, i just did a clean recovery install on it aswell, installing everything again.

    I don't have it in alarm mode or anything, just keeping it simple at the moment not many devices at all.

    But like i said now after some time the "time" variable is now working no changes needed just some time.

    But im having problems with the GPS variable, or GPS at all to work.

    I set a simple "away" and "home" variable telling that if my phone user is 250meter or more away then im away, and if im 250meter or closer then im home. iv set to update all from 1 minute to every 30 minute. but it is still not working. I dont get this GPS think why its not working, its not that complicated to set up. But its just not working.

    This is the "away" variable coverted from box to LUA.

    Please login or register to see this code.

    And this is the simple scene that im trying to get it to activate

    Please login or register to see this code.

    Im far away from that location with my phone now, been away from that location for days, and this lamp has been on for days now without turning off...

    • 0
    Posted

    If I remember well firmware 3X works like this. If you have this at the top of your scene:

    Please login or register to see this code.

    Then the scene runs when "Vegard" changes state. If the variable (already) has value = "Away" then

    Please login or register to see this code.

    does not run the scene, but this does make it run:

    Please login or register to see this code.

    I can't try it because I'm on 4.X.

    • 0
  • Inquirer
  • Posted
    If I remember well firmware 3X works like this. If you have this at the top of your scene:

    Please login or register to see this code.

    Then the scene runs when "Vegard" changes state. If the variable (already) has value = "Away" then

    Please login or register to see this code.

    does not run the scene, but this does make it run:

    Please login or register to see this code.

    I can't try it because I'm on 4.X.

    So starting a scene with a variable is not good?

    So since im already away even when im moving around here does not change the state? Im trying now to change location to "test" location that is the location im at now. maybe it will change when im moving around this location.

    How is it in 4.x? Maybe i should upgrade.

    • 0
    Posted
    So starting a scene with a variable is not good?

    So since im already away even when im moving around here does not change the state? Im trying now to change location to "test" location that is the location im at now. maybe it will change when im moving around this location.

    How is it in 4.x? Maybe i should upgrade.

    Using global variables in this way is possible, but I've not seen it used as a trigger very often. Usually people use never ending loops that check the state of the variable. That may have to do with your second question.

    If you have another scene that runs when you are at a different location, and sets the global variable to something else, then that should work. But only if you move from A to B or B to A. this leads to a special case, that maybe should be handled: if you reboot your HC2, no script will run.

    In V4 I can't get it to work, but that may be my specific case. If you are running a test system, you can run V4. If it's production, you must not do that, beta is for testing only! Here's the thread that discusses the current beta:

    Please login or register to see this link.

    so you can get an idea of what is working and what not.

    I think one of the drawbacks of geolocation is that it's hard to debug... I've seen quite a few threads here commenting on accuracy, updating and debugging. I've always stayed away from it. So I hope another member can help you out!

    Edit: I quickly checked with V4 and it's working. I thought V4 also triggered from the variables panel, but that doesn't seem to be the case. Only scenes trigger global variable changes. This is the code I used to test. Scene 1:

    Please login or register to see this code.

    Scene 2:

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted
    So starting a scene with a variable is not good?

    So since im already away even when im moving around here does not change the state? Im trying now to change location to "test" location that is the location im at now. maybe it will change when im moving around this location.

    How is it in 4.x? Maybe i should upgrade.

    Using global variables in this way is possible, but I've not seen it used as a trigger very often. Usually people use never ending loops that check the state of the variable. That may have to do with your second question.

    If you have another scene that runs when you are at a different location, and sets the global variable to something else, then that should work. But only if you move from A to B or B to A. this leads to a special case, that maybe should be handled: if you reboot your HC2, no script will run.

    In V4 I can't get it to work, but that may be my specific case. If you are running a test system, you can run V4. If it's production, you must not do that, beta is for testing only! Here's the thread that discusses the current beta:

    Please login or register to see this link.

    so you can get an idea of what is working and what not.

    I think one of the drawbacks of geolocation is that it's hard to debug... I've seen quite a few threads here commenting on accuracy, updating and debugging. I've always stayed away from it. So I hope another member can help you out!

    Edit: I quickly checked with V4 and it's working. I thought V4 also triggered from the variables panel, but that doesn't seem to be the case. Only scenes trigger global variable changes. This is the code I used to test. Scene 1:

    Please login or register to see this code.

    Scene 2:

    Please login or register to see this code.

    Thank you for your answers and trying this out. Iv searched some for this GPS stuff in forums, but i never find an answer just ideas of stuff. And it seems like though the idea of GPS is good it doesnt work in practice at the moment. I hope Fibaro will work more on this subject after they have released 4.x. For now i think i will just stick to door sensors and use scenes in combination of if alarm is activated or not.

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