Homey Community Forum

[APP] Better logic / Variable management (v1.0.4)

,

I think there isn’t any function in the better logic or mathjs that could divide the :-separated string into two variables. So you propably have to use homey script to do that

yeah, for now, I will run the calculation of sunrise at the sunrise time, and sunset the same. So for the next day, these times will be fine (more or less) the 1 or 2 minutes difference does not make a real large impact.

1 Like

I reported a bug to Athom. B/c it seems a Athom issue (The same problem occurred with the native Logics app in a few v5-rc versions).
A shared flow does show the AND card tags, but not the IF and THEN card tags.
See screenshot and link of the same flow.
Homey v5.0.0

1 Like

I guess it’s a Problem with Homey Firmware v4.2.
In Homey Firmware v5.0.0 it’s already fixed.

1 Like

@fantross Thanks, I was aware of that. I ran v5-rc for a few months and v5 for a few days now. For Logics tags it was recently fixed indeed, but not for BetterLogic tags unfortunately.

I don’t use BL, but you said the problem occurs with the build in logic and Better Logic. With the build in logic the problem does not occur anymore.

I never said the problem occurs with both build-in Logics AND BetterLogic…
The build-in Logics HAD a similar issue in the rc versions but it WAS solved in a later rc version.
But b/c BetterLogic has a similar issue, no, exactly the same issue now in v5.0.0
That is why I think the issue is most likely to be on Athom’s side.
Both Athom (build-in Logics) and an outside developer can’t “create” exactly the same bug imvho.

Cheers, and enjoy your Sunday!

You updated your post:

So I understood that you wrote that both, the build-in logic and B,L have the same problem.
English is not my native language. If I misunderstood, I apologize.
But this is not a reason to be directly upset.

1 Like

Don’t get me wrong, I’m not upset at all. Apologies aren’t necessary. Dutch is my native language btw.
I just wanted to explain myself better :wink: and I used caps for some words instead of Bold text. That’s all.
As I wrote before the edit, the problem with the native Logics app occurred. In the past.
Now we’re gonna drink a beer and relax.
Cheers

1 Like

It works for me as expected, did you re-share the flow as that is what I have read is necessary.

Just created something silly with a couple of Tags.:

Although I am pretty sure the used Trigger card should not be used with Tags as the names of the BetterLogic Variables should be mentioned separate by comma. (But that is a BL thing…)
So don’t use the Tags there but type Helderheid, Datum (if that where Better Logic Variables. :wink: )

1 Like

Thanks Geurt!
I’ve adjusted trigger “If a variabele has changed” and wrote the variabele names instead of picking the variabele tags, just like you suggested.
Weird but it works (flow fires after changing 1 of the var’s to true).
So this only applies to “if a variable has changed [var1, var2, var3]” card?
(And yes, written lines are of course visible in a shared flow).

So it narrows down to the THEN part imho.

With THEN cards GoogleTTS & Papertrails the “trick” to write the tagnames instead of picking tags doesn’t work (of course, bc it aren’t BL cards)
As shown in the log line below, it just shows the written tags instead of the tag values.
[[2021-02-14 17:57.20.707 Flow MusicCast service Select w.typedTags. Het Casten van 1 van de Muziek Services is gestart. Welke? -Spotify: Cast_Spotify -Youtube: Cast_Youtube -TuneIn: Cast_TuneIn]]

So, the write-the-tag-name-instead-of-pick-the-tag should be done by default within BL cards? Or just for the one “if a var has changed” card?

The pick-a-BLtag in THEN section is functional in non-BL cards, but the tagnames still aren’t shown in a shared flow.:thinking:

Here’s he adjusted flow as a shared flow:

Here’s the functional flow, see P.trails log [[2021-02-14 18:35.47.595 Flow MusicCast service Select: Spotify: true YT: false TuneIn: false ]]:

The original message was very not correct…

@Dijker Geurt, now I see how your tags show as expected, and I can reproduce that.

As long as a BL or a native Logics var or tag resides in a BL card, it is shown ok.
BL var’s / tags within other apps’ cards, show a ? sign.

Screenshot of the same flow:

1 Like

I have a simular problem and not sure how to solve it.

I want to start a flow using: One of these variables changed
I type in (for test) my logica values: gordijn_keuken_open, gordijn_terras_open
And in THEN i do something, tried send push and log etc

It simply does not work, also tried to select the tag cards but this also does not work.
When i test the flow then the flow works, but when the value changes nothing happens.

The logica values are all true/false logica values

Anyone an idea what i do wrong here?

Don’t know without showing your flow :wink:
But, I tested with 3 values and it works.

  1. I Added 3 BL boolean vars:
  2. The flow starts with BL - One of these vars has changed.
    Here you copy/paste the var names you entered at step 1. with a , as divider.
  3. (Optional) At the AND section, add 3 BL - If True (or inverted) cards, 1 for each var. Now you select your var with the Tag icon button thing.
  4. Here’s my flow: https://homey.app/f/7tQg8z

4a. Only the tags don’t show @ action cards here (and no one believes this is a bug…). Screenshot of that:

  1. The result after altering every var from false to true and to false again

I hope it’s of any use @B3rt !

i think i found the problem, i use Homey logic values on change, i suspect it only works with better logic values.

if that is the case then i can uninstall better logic because it has no use for me…

This works also with Homey logics as condition:

Without BL you can’t use “If one of these values has changed” card
With Homey logics you have to build 3 flows for every “If a variable has changed” trigger…

I made some simple flows to test the „One of these variables changed“ function, but it doesn’t work.

3 flows with Boolean variable like this

1 flow with a numeric variable like this

Flow with „One of…“ function. Output should be a message.

Sorry for the ?, but this is a bug. And for sure, I used the BL variables/tags.

So when I start/test one of the first 4 flows (= changing the variables!), nothing happens with the 5th flow. No message is shown.

EDIT: Roco find out that I did a mistake. I used the tags in the card „One of these variables changed“ instead of typing in the name of the variables.

Just tested this with variable1, variable2, variable3
No problem at all.
Make sure u type the names and don’t use tags like the tooltip says.
Variable1,(space)variable2,(space)variable3

1 Like

Hocus pocus, it works! :+1:t3:

Thanks @Rocodamelshekima!

I hate it when I make mistakes like that… :face_with_symbols_over_mouth:

3 Likes

So you missed point 2.? :crazy_face:

Although Roco mentions a divider should be [comma][space], a comma only as a divider works as well, as I just tested (but it looks awfull in the card…)

This looks better :wink: