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

17810121325

Comments

  • Ah, yeah, I see what you mean. The variable can only be dragged to the say something card when the variable is in the if column. If it was available in the and column then it would be possible.
  • Exactly.
  • And a different example (different feature request)... would be cool to be able to do things like:

    1. When [You say something that starts with "Say hi to"] then [Put the rest of the text into a variable] and [Say: "Hello" <variable>]

    So that, when I say: "OK Homey, say hi to John", Homey will reply with "Hello John". Wouldn't that be cool?  ;)
  • Good idea, like a replace function on a string.
  • Bumblez said:
    Question/feature request:

    What would it take, to be able to do something like this:

    If [I say something: "What is the temperature"]  and [TempValue > 0]  then [Say: The temperature is $TempValue]
    or even
    If [I say something: "What is the temperature"]  then [Say: The temperature is $TempValue]

    ? any chance of something like this happening, or does this require a significant change in the Flow editor first?


    To revisit this, this is possible with the built in logic:

    A 'standard' variable can be retreived with {{$variable}}

  • I tried that... can't get it to work. {{$variablename}} in my flows just results in Homey saying "variablename"
  • Make sure Variablename is a standard variable, not a Better Logic one. Also don't forget to actually set it somewhere :)
  • Hmm... standard variables and Better Logic variables are not compatible? So I can't use the Better Logic cards on those variables? That's disappointing. I hope that will be improved.
    Is there anything like the 'variable management' screen of Better Logic for standard variables too?
  • Bumblez said:
    I tried that... can't get it to work. {{$variablename}} in my flows just results in Homey saying "variablename"
    That's strange, the screenshots work for me. What if you put a number in the variable, not the tag from the sensor? I found out that when the variable holds no value, the variable name is spoken (And use the built in logic, not Better Logic)
  • Yeah, got it to work now. I was still using my Better Logic variables, I hadn't understood that standard variables and Better Logic variables were incompatible.
  • Better logic runs the test flow stable now for 12 hours. I'll keep it running for some more time. 
  • Is there a way to create a When card that is able to filter out rapid successive variable updates? 

    Several Kaku transmitters sometimes generate multiple triggers, it would make a decent workaround if the Better Logic app would consider 4 updates of the same variable in a 5 second window a single update :)
  • Bumblez said:
    Question/feature request:

    What would it take, to be able to do something like this:

    If [I say something: "What is the temperature"]  and [TempValue > 0]  then [Say: The temperature is $TempValue]
    or even
    If [I say something: "What is the temperature"]  then [Say: The temperature is $TempValue]

    ? any chance of something like this happening, or does this require a significant change in the Flow editor first?


    To revisit this, this is possible with the built in logic:

    A 'standard' variable can be retreived with {{$variable}}

    no flow needed , just see "oke homey het is koud wat is de temperatuur"  or "oke homey het is warm wat is de temperatuur"  homey triggers build in koud en warm 
  • casedacaseda Member
    edited April 2016
    @MartijnDeRhoter ;;;;;
    I did it with using the Better Variables and the countdown app

    Variable "kaku cooldown"
    Countdown "kaku cooldown"

    EDIT made it into images:
    Trigger Flow:


    Then just make a flow that sets the kaku cooldown back to false after the 3 seconds, this is reuseable with all your kaku flows that you add to the trigger part:


  • @MartijnDeRhoter ;
    @caseda ;

    For the time being  I created a  workaround  Debouncer within the flow for the Kaku Doorbel:

  • @GeurtDijker ;
    @caseda ;

    Thanks both, I'll try it all! :)
  • casedacaseda Member
    edited April 2016
    @GeurtDijker ;;
    your way does work as well, except if the trigger of kaku continuous after the 3 seconds it still wil be triggered. (will not happen much, but could happen.
    My way it resets the counter every time the kaku sends a signal within these 3 seconds.
    You can't press any kaku button within these 3 seconds (even though you could change it to 1 or 2 seconds), but that only stops those bully kids that try to "rape" your doorbell, +&+  :smiley: 
  • PandaPanda Member
    Bumblez said:
    Question/feature request:

    What would it take, to be able to do something like this:

    If [I say something: "What is the temperature"]  and [TempValue > 0]  then [Say: The temperature is $TempValue]
    or even
    If [I say something: "What is the temperature"]  then [Say: The temperature is $TempValue]

    ? any chance of something like this happening, or does this require a significant change in the Flow editor first?


    To revisit this, this is possible with the built in logic:

    A 'standard' variable can be retreived with {{$variable}}

    no flow needed , just see "oke homey het is koud wat is de temperatuur"  or "oke homey het is warm wat is de temperatuur"  homey triggers build in koud en warm 
    When asking Homey, It is cold what temperature is it I get the response I'm sorry, but you don't seem to have thermostats.

    So I guess this flow is needed.
  • I would like to get/set the value of my better logic variable using an http request from another server. When I try the http method to see the current value of my boolean variable named "tv" the response is:{"status":401,"result":"no_auth_method_found"}
    I have tried these URL's:
    http://homey-ipadress/api/app/net.i-dev.betterlogic/tv
    https://xxx.homey.athom.com/api/manager/settings/app/net.i-dev.betterlogic/tv
    Did I miss something? I did create the variable and I can use it in my flows.
  • BumblezBumblez Member
    edited April 2016
    Panda said:
    When asking Homey, It is cold what temperature is it I get the response I'm sorry, but you don't seem to have thermostats.

    So I guess this flow is needed.
    I have the same problem; the built-in triggers don't work for me (ThermoSmart, which should be fully supported). What type of thermostat do you have?
  • PandaPanda Member
    I don't have any thermostat, we have central heating in our apartment. I currently use a Fibaro motion sensor and will place a Danfoss lc-13 on my radiator.
  • I would like to get/set the value of my better logic variable using an http request from another server. When I try the http method to see the current value of my boolean variable named "tv" the response is:{"status":401,"result":"no_auth_method_found"}
    I have tried these URL's:
    http://homey-ipadress/api/app/net.i-dev.betterlogic/tv
    https://xxx.homey.athom.com/api/manager/settings/app/net.i-dev.betterlogic/tv
    Did I miss something? I did create the variable and I can use it in my flows.
    There is authentication that you should enable. You can do this to provide the bearer token. This tutorial explains a bit about how to do this:

    https://forum.athom.com/discussion/996/tutorial-using-tasker-and-the-homey-api
  • posthokposthok Member
    edited April 2016
    Great app!!!.
    Please could you add a way to calculate time?
    for example 17:00 minus 1 hour
  • posthok said:
    Great app!!!.
    Please could you add a way to calculate time?
    for example 17:00 minus 1 hour
    What do you want to do? Let me help think how you can do this (or give me an better understanding about what I should build).
  • posthok said:
    Great app!!!.
    Please could you add a way to calculate time?
    for example 17:00 minus 1 hour
    There is already a way of doing this using the mathjs stuff and the $timenow variable. See for example: https://forum.athom.com/discussion/comment/15118/#Comment_15118
  • Phuturist said:
    posthok said:
    Great app!!!.
    Please could you add a way to calculate time?
    for example 17:00 minus 1 hour
    There is already a way of doing this using the mathjs stuff and the $timenow variable. See for example: https://forum.athom.com/discussion/comment/15118/#Comment_15118
    btw, this has a problem with DST.
  • Phuturist said:
    posthok said:
    Great app!!!.
    Please could you add a way to calculate time?
    for example 17:00 minus 1 hour
    There is already a way of doing this using the mathjs stuff and the $timenow variable. See for example: https://forum.athom.com/discussion/comment/15118/#Comment_15118
    Thanx i'll give it a try.
  • Is there a way to manipulate strings with Better Logic?

    I have a variable that contains this "2016-04-29T19:04:09+00:00" and I need just the time. Alternatively, can that be done using a JSON body? The HTTP GET uses $.results.time to populate the variable, I couldn't find the syntax that would request (and get) a substring.
  • posthokposthok Member
    I'm on 8.29 and today i lost my variable's again.
    Stopping an starting and reinstalling the better logic app did'nt help.
    I't not the first time i lost my variables, but normally after a reboot they apear again.
    Is this homey or better logic?

  • UrandayUranday Member
    posthok said:
    I'm on 8.29 and today i lost my variable's again.
    Stopping an starting and reinstalling the better logic app did'nt help.
    I't not the first time i lost my variables, but normally after a reboot they apear again.
    Is this homey or better logic?


    This is a bug fixed in the latest version of homey. There where some issues with garbage collection. 
Sign In or Register to comment.