[APP][Pro] Better Logic Library - Just some better logic, variable and library management

Actually, i think its the 5 second that you want in this flow.

In the above flow, you update the value of the variable, but at the exact same time, you send the variable to your Phone. The 2 then-flowcards in the above (first) flow you showen, are fired at once, so you get the old value on your Phone.

It could have been, but its not. That was the first thing I experimented with. And since the tag does not get updated either (see first post), It had to be something else. Im not sure how BLL handle the variables, but it seems that if I dont convert it with stringify, BLL handles the new value in the variable within the app, but somehow the Tag does not get updated. :man_shrugging:

Hi.

I’m looking for a solution, where I can set a logic text field using only pre-defined values.

Can BLL provide me this solution?

I need this for the lightning in the living room, where I can have several states like:

-daytime_darkoutside
-pre_evening
-evening
-night
-evening_crochet

Based on these states I can set the brightness etc, but I don’t want to be able to have typos when checking if a logic value is exactly a certain value.

Because the flow will have many ‘If, And, Then’ using this logic, having exact select-able values will make things so much easier.

@Arie_J_Godschalk, is the post above something you would be able to implement into BLL?

Thank you.

If you need a ‘coffee’ for the effort, please let me know.

About two days ago, one of my apps failed with The Better Logic Library App is not running.So I restarted the BL app and it still failed, I tried a couple of times before removing and re-installing the app but the same result, any ideas on how to get this back working?

Maybe homey memory or storage full?

Did you also restart or even re-install the app which notified you with that error msg?
Removing apps and install them again to ‘solve’ issues is almost never necessary:
With re-install I mean install from homey.app store, without removing it in advance. This will not destroy all your devices and settings.

Storage looks ok is 1.77 of 2.6gb and memory is 927mb of 1Gb which looks tight but I would have thought was ok.

Restarting the app that notified me has seemed to work, thanks.

Steve

Hi

I’m getting hour value in the better logic mathjs calculation like this $#HH$. Before the latest update on Homey this worked, but right now it’s not giving correct values, for example at the moment the $#HH$ gives 0 as an results, though the time is actually 8:45. I have checked that the Homey clock is correct so it shouldn’t be that.

Same problem is also when trying to get the minute value with same method $#mm$

Anyone else having the same problem? Or any idea what is wrong?

Is there a reason you are using mathjs calculations?

Why not use the BLL coding with the time and date functions (see BLL app settings for more info)?

Good point. I have been using the better logic app way before this option was possible and have been using the mentality “If it works don’t touch it”. :wink:

I’ll change my flows to use the BLL coding hour and minute functions as you proposed.

Still there might be other “old” users which use this and apparently there has been some breaking changes. Is it on Homeys end or in the Better logic app?

Hi Arie

I made time values hour, minute and seconds with the time function of the BLL in a flow presented below.

When I tried to calculate this every 5s to get the more accurate seconds timevalue the result was that the loading of the Homey skyrocketed. So the previous use of $#HH$, $#mm$ and $#ss$ expression was way more efficient.

Is there some other way to do this more CPU load efficiently, so that I can use the second, minute and hour value in the calculation?

When I have a chance, I’ll have a look why MathJS date/time is not working for you.

1 Like

Well, what is do, is place all pre-defined values in variables, starting with val.

Then I can use those tags to set or check variables.