This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[APP] Better logic / Variable management

2456725

Comments

  • Question for the fans. When doing compares to strings, do we want case sensitive checks or not? So is TEST equal to test and also equal to TeSt or not?
  • An other question. I only trigger change triggers when the value is different then the previous. Thus:

    Variable a=1

    In a flow variable a gets set to 1

    No trigger. 

    Are you agreeing that setting a variable to the same as it was before should not retrigger the flow? I see risks when retriggering a boolean variable.
  • I'd prefer it if it's not case sensitive, just to avoid accidentally mixen casing. 
  • MarcoF said:
    Maybe feature request or Is this possible :
    Variable changed to

    This would be Variable is. What happens is that the flow is triggered and at that point in time it evaluates against the current value in the variable manager. So either it is (changed to) a value or it is not.
  • Thanx!

    About Case sensitive;
    var car = "Test";
    car != "test"

    maybe adding a case insensitive checkbox just like elegant "Not" checkbox?
  • i prefer it if it's not case sensitive
  • MarcoF said:
    Thanx!

    About Case sensitive;
    var car = "Test";
    car != "test"

    maybe adding a case insensitive checkbox just like elegant "Not" checkbox?
    Thats not possible. The not is a standard component that reverses the logic. But that is done on a homey level. I would love to have it. Maybe I make 2 cards, 1 sensitive and 1 not so we all can choose.
  • Uranday said:
    An other question. I only trigger change triggers when the value is different then the previous. Thus:

    Variable a=1

    In a flow variable a gets set to 1

    No trigger. 

    Are you agreeing that setting a variable to the same as it was before should not retrigger the flow? I see risks when retriggering a boolean variable.
    I agree.
  • UrandayUranday Member
    edited February 2016
    An other update


    Think I'm ready for submit
  • And, submitted:)
  • You still need a cool icon for your app!
  • Found one. Not very cool, but if it's not cool enough, I'm open for options. 
  • Don't ask me! I just noticed the default smiley :)
  • Its in the appstore :)
  • Hi Uranday - I just installed your excellent app on 0.8.20, I can't seem to add variables properly. The settings page lets me create a variable name and type, but when I click on Add, nothing happens.

    Would this be due to 0.8.20? I can't compare since I only installed it now :)
  • Hi Uranday - I just installed your excellent app on 0.8.20, I can't seem to add variables properly. The settings page lets me create a variable name and type, but when I click on Add, nothing happens.

    Would this be due to 0.8.20? I can't compare since I only installed it now :)
    Try delete all variables (even if you don't have any) before adding your first variables. 
  • That did the trick! Thanks!
  • Hm - for some reason the values don't stick. I add them, they show up in the list but when I want to use them in a flow, they don't exist anymore. Navigating back to the BetterLogic settings, the list is empty again.
  • UrandayUranday Member
    edited February 2016
    I tested it. When pressing delete all and then add a value it seems to stay there. Ill do some tests in a minute with the initial load problem. Please keep in mind that a string value does only appear in string cards etc... 
  • I tried it as well but it fails to stick:

    - Delete all
    - Add Number
    - Save -> it is added
    - Browse to another page within the settings page
    - Go back to betterlogic
    - Variable isn't showing any more

    I also tested adding 2 variables; same 

    Also, sometimes, it seems Homey navigation will be a bit slower (even unresponsive for 30+ seconds ) for a while after you edited in BetterLogic.   I have to close the browser and go to the homey IP again.  If I wait long enough, it will respond, but sometimes continu to have slow responses.

    HTH


  • It seems there is a nasty bug when you do your first variable add. To work around this issue for now:

    - Remove all Better logic cards from the flows
    - Delete all variables
    - Create a variable and then start.... 

    And until my V0.0.2 comes in the appstore, never remove the last variable. If you are a new user, please before starting, first press the delete button and then continue with creating variables and flows.

    The fix is almost there and Ill push it tonight to athom. Sorry.
  • Version 0.0.2 submitted for apporval.
  • Submitted version 0.0.3. Discovered a bug after deleting a variable that was still in use by a flow. I did some monkey tests and after this fix I could not break it anymore. For the next release I'm trying to implement insights. This makes it possible to see what your variable did. In the management screen you can turn on or off insight per variable. (now just hope the api supports this)
  • Nice! It's quite the challenge to find out the current value of a certain variable - especially when it's not used in the When part of a flow.

    Do you think 0.0.3 will be in the store on Monday? :)
  • I hope so.

    Also I have an idea for AND and dOR support. A trigger card that has a multi select. If this match it triggers. Anyone has suggestions or extra feature requires like this? I'll develop this when multi select is available. 
  • What happened to 0.0.3? :)


  • Its still in processing..... Have to wait until @Athom / @Emile accepts it.
  • It is released!
  • Bug no 1: The dropdown in the AND column for the bool check is broken.... :(
Sign In or Register to comment.