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

1141517192025

Comments

  • @Uranday ;
    Is it possible to change the last set date/time into the 'human' format? I'm trying to track down why a flow doesn't work and was looking at the variable and noticed the time is displayed in Zulu time.


  • What do you mean with zulu time? Is it the wrong time zone? The Z at the end is the indication that it ends with milliseconds . 
  • From the Wikipage: 

    The time zone using UTC is sometimes denoted UTC±00:00 or by the letter Z—a reference to the equivalent nautical time zone (GMT), which has been denoted by a Z since about 1950.

    https://en.wikipedia.org/wiki/Coordinated_Universal_Time


  • You are right. Im confused with formats in c#. Weird thing is that I just see normal time. 2016-11-05 10:47:10 Guess this is a browser or OS setting?? 
  • For internal use it is better to use UTC/Zulu time. That is what the Z is meaning. Z= UTC+0
    The presentation time has to be naturally local time.  Here UTC+1.

  • Uranday said:
    You are right. Im confused with formats in c#. Weird thing is that I just see normal time. 2016-11-05 10:47:10 Guess this is a browser or OS setting?? 
    I believe this occured after updating to 0.10.9. Showed a human readable format before that. Perhaps you are still on a previous firmware.
  • Phuturist said:
    Uranday said:
    You are right. Im confused with formats in c#. Weird thing is that I just see normal time. 2016-11-05 10:47:10 Guess this is a browser or OS setting?? 
    I believe this occured after updating to 0.10.9. Showed a human readable format before that. Perhaps you are still on a previous firmware.

    Yep, update changed it. @Emile do you know what changed? 

  • DaneeDeKruyffDaneeDeKruyff Member
    edited November 2016
    Thanks for looking into it, this may indeed be different after the update to 0.10.9, I can't recall how it looked before because I never really had to check the variables  ;)
  • Uranday said:
    Phuturist said:
    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?
    @Uranday Is using BetterLogic variables in a speech card a viable feature request?

    I'll look at this when I'm back from Holliday! 

    I tried to read back in this forum but was unable to find a confirmation :wink: 
    Are we able to use BetterLogic variables in a speech card on version v0.9.6, or is this still a feature request? 
  • I think to get advice is to give more info about what you want to achieve . . 
  • To create flows that voice respond with current variable values. e.g. Say: The temperature is $TempValue$

  • U can use the build-in logic for that, not the Better logic.
    Use {{$TempValue}} after setting the "normal" logic variable.

  • U can use the build-in logic for that, not the Better logic.
    Use {{$TempValue}} after setting the "normal" logic variable.

    I am only using Beter logic as normal logic does not have a current value overview and you need to document when having a lot of various variables. Better logic is way better to use.
  • If the BL-var changes, copy it's value to a normal var:

    Then have Homey speak the normalvar:

  • If the BL-var changes, copy it's value to a normal var:

    Then have Homey speak the normalvar:

    I did consider this before you suggested it in your post, but it is kind of a overhead if you have over 50+ better logic variables. It would require too many new flows IMHO as a workaround. Better would be if Better logic would support this.
  • If the BL-var changes, copy it's value to a normal var:

    Then have Homey speak the normalvar:

    You don't have to do the two step flow for that, 
    you can use the BL var direct to say the text. Created a BL var [String], created the flow:



    Changed the Var at settings to " Twee" : 

  • What geurt says is the solution. It is not possible to integrate directly because of the architecture of homey. 

  • you can use the BL var direct to say the text. Created a BL var [String], created the flow:



    Mm, I really feel dumb now... This works as stated :smiley: 

  • you can use the BL var direct to say the text. Created a BL var [String], created the flow:
    Mm, I really feel dumb now... This works as stated :smiley: 
    No, we are all learning, exploring and discovering the undocumented and changed paths in this continuously changing labyrinth .... no-one said it did work before ;-)
  • True, you can make it say the content of a variable that way.
    But there are other scenarios where it doesn't work, because of the missing global variables.
    If you ask Homey something, it can't reply with the content of a BL-variable for example.
  • Fire69Fire69 Member
    edited November 2016
    And I just noticed another var is missing  :'(

    But now something seems really broken...
    I'm missing a number variable. So I recreate it and I verify it is listed with the other variables.
    I wait a minute (to be sure it's written to the config I guess), I reload the page and.... it's gone again!  :/

    The weird thing is that it's still listed in Insights!?  :o

    [edit]
    After a 'Delete All' and Import, I have a much bigger problem....
    When I refresh the page all my variables are gone! :cold_sweat: 
    I'm gonna reboot now and hope they come back!  :s
  • Reboot didn't solve it.  Everything was gone...
    Had to remove the app, reinstall and import everything again.
    Recreating the lost variable worked now.
  • Uranday said:
    Phuturist said:
    Uranday said:
    You are right. Im confused with formats in c#. Weird thing is that I just see normal time. 2016-11-05 10:47:10 Guess this is a browser or OS setting?? 
    I believe this occured after updating to 0.10.9. Showed a human readable format before that. Perhaps you are still on a previous firmware.

    Yep, update changed it. @Emile do you know what changed? 


    @Uranday did you get a response form @Emile, can we expect a fix for this?
  • No, no response 
  • It seems like since 1.0.1 Bitflip devices aren't updating anymore when the variable changes?
  • @Fire69 i think you are right. 
    Realized it also...
  • I did a quick scan through this topic and I couldn't find it on github either...

    But I noticed that when there is a "/" in the name of the (boolean) variable, like "tv aan/uit" or "zon op/onder" , a "not_found" error is given in insights.

    Is this an insights or a better logic issue?

    I can image that there are some special characters that can not be used when naming a variable. And since homey is now in retail stores, it can be wise to add that to the  better logic settings page. Just to prevent future questions.
  • Hi All,

    This week Ill go try and fix some bugs (found a little time laying around ;)) For now I have on the planning:
    - Rework the variable maintenance screen so it does not lose variables on editing
    - Try to fix the bitflip (unsure what is going on there, but I hope I can fix it)
    - Make the date/time human readable
    - Check what is going to do with the / in the name (and if it is a homey problem, ill do not allow it in var names).

    Does anyone else discovered an issue?
    Cheers!
  • Howdy,

    Is it possible to rename a variable? I have over 50 of them now and really regret my naming convention :(
  • Fire69 said:
    Reboot didn't solve it.  Everything was gone...
    Had to remove the app, reinstall and import everything again.
    Recreating the lost variable worked now.
    Not sure what happened here. I hope I can reproduce this problem and see what is going on! Ill keep you posted!
Sign In or Register to comment.