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

This also wont work on mobile.

Hey @Jero,

Athom approved it themself.
I would asume that if they had an issue with using the type=code, the would have let me know when i submitted it for review.

And “You should really not abuse things that are not ment for your app.” i dont fully agree with, i am just trying to create the best UI/UX i can (which is pretty limited for dev’s), it just needs to work correctly (and be allowed)!
(Using the playbutton will generate an error-with-result which is then show in the box below.)

But, thanks(!) for pointing out that it doesn’t work in Default flows, and you are (ofc.) right about that.

So, i just change the “code” to “text”, since i want this to work correctly, also in default flows.

It’s in test and submitted it for review (perhaps you can get it through quickly :wink: ) .
Created flows will keep working like they did before.

The problem is this is not documented. If at some point it is changed your app breaks. It’s also confusing to users that there is a docs button for your Flow card pointing to HomeyScript’s docs. This is a bad UX I would say.

There have been plans to make this type of argument available to app developers at some point but it just has not been done yet.

You are right this should have been prevented at the review proces.

Well, i vote a Yes for this, because it would seriously improve coding and expressions within flowcards.
:heart:

Well, i’ll asume you’ll add it :stuck_out_tongue:

Yeah i know, you are right about that: i just didn’t see any way to prevent or circumvent that :stuck_out_tongue:

How do I get from my current Better Logic installation to the new Better Logic Library, with loss of variables?

You can first export your variables if you like, but, you can just update BL: variables will not be removed!

That was more piece-of-cake than I expected, … thanks!!!

1 Like

Added (in test):
A BLL expression conditional card.

image

I am trying to get a logarithmic formula to work but it is giving me “Error executing expression: Undefined symbol math”.
I am using “math.log(10000)” as a test for now, pretty simple, but not working.
What am I doing wrong?

1 Like

Which flowcard are you using?
The Math.JS card?
Then you do not need to add math. as prefix.

Or are you using the BLL expression flowcards?

1 Like

How can i format the following date:
yyyyMMddhhmmss ?

When i enter this in the format card is see below exactly what i wanted but the card itself does not save this formatting.
Or is there also a format for unixtime stamp:
‘unixtimestamp’ results in 1674949936 as formatted text, this would also work for me.

I want to use this to generate a file name, in file name : signs are not allowed, so i cannot use this.

1 Like

You need to type and then select the first choise (what you typed).

Just an idea, you can also “pre-format” your desired timestamp.
With BLL app settings, I entered your date into the DATETIMELONG *** field:
Screenshot from 2023-01-29 16-39-14

Now it is a pre-defined custom date format.


Now I can use DATETIMELONG as a pre-defined custom date, and I don’t need to remember the yyyyMMdd… string, but, that still works as well:


***) It is just a field I could ‘misuse’ for this purpose, while I don’t use the original format, which is:
Screenshot from 2023-01-29 16-48-40

1 Like

Thx for the tips, i got it working.

2 Likes

Just updated BLL to version 2.3.1:

  • Settings UI Improvements.
  • Custom datetime definitions can now be added in the Settings:
     
    image
    These definitions can than be used within a datetime format:
     
    image

Just some Better Logic!


@Peter_Kawa and @B3rt

1 Like

But it might be used by other apps to generate a datetime format (like Google Services, BLL Settings/Variables and (almost) SimpleLog.

So, now you can add your own custom format definitions :slight_smile:

1 Like

Thanks, that’s a better solution to use :grin:

1 Like

This was always the plan :wink:

Somewhere next, it will also show app-prefixes: so you can alter how data in other apps is displayed per-view or tabel etc.

First improve the variable table.

1 Like

Arie I can see you’ve added HTTP requests to the app, is it at all possible to do WSS web socket messaging, or is that too complex?

1 Like