[App][Pro] FlowBits — Small bits of logic, big difference in your Flows

So to get back on this, I have no idea where this is coming from. It works here and the crash seems to be caused by an impossible situation where the app does receive arguments back from flow cards. I’ll investigate more…

In the meantime, version 1.18 is now finally released with milliseconds as a timing unit and the ability to toggle states in the set states widget.

Hi @BasMilius. Love the app and have been weaving it into more and more flows as I adjust things and find this is the easiest and neatest way to achieve something. Great work!

One minor feature request: adjust the “Label X changed” trigger flow card so that it doesn’t fire when the Label is cleared (and add a new trigger flow card “Label X cleared”).

Use case: I have speakers in most rooms in my house and an advanced flow which I use to make announcements. I currently have a text variable set up for each speaker and an announcement flow with lots of mini flows like this:

By setting the variable to NONE each time and then testing it’s not exactly NONE when the trigger fires, it still works when the announcement I want to make happens to be the same as the previous one I made to that speaker.

I want to change this to use flowbits labels so that I don’t have lots of variables cluttering up my variables list for this given I never need to refer to these values outside of flows. It would be even neater if I didn’t have to do the test for NONE. I could just trigger using the (adjusted) “Label X changed” card then use the “Clear label X” card when the announcement is done.

Of course this one example is relatively minor and there’s an easy work-around. But I actually find this quite a common design pattern which I use for lots of things so I figured it might be a good use case for flowbits.

@Jonathan_Draper Thanks for liking FlowBits! :slight_smile:

I get what you’re asking and I want to ask if you could create a feature request over at Github. One problem I have with the request is that existing flows that use the “Label X changed” card may not expect this behavior, but I agree with your suggestion. I think the way forward would be to deprecate the existing card and create a v2 version that works like you’re describing, that way existing flows will work as before.

When you created the feature request over at Github, I’ll let Copilot do the work to see how far it gets.

Thanks @BasMilius , appreciate it. I’ve created an issue on GitHub. Deprecating and adding a v2 card makes lots of sense.

You could keep the current card and add two new cards to split up the behavior.
In this way you will not break current flows.

@BasMilius Dear Developer /Bas,

I would highly appreciate if you could add at least one if not two additional comparing conditions fir sequences :

Now it is only “Sequence ‘…..’ equals ‘…’”.
I would also prefer to have Sequence ‘…..’ is lower or equal ‘…’” & Sequence ‘…..’ higher or equal ‘…’” conditions.

I am thinking about the small things that need to be happening when I’m waking up and leaving my bed. There are at least 4 or 5 things that happen every morning/time. Most of them in the same sequence/order every time but some could swap their place in the order like I disconnect my Iphone 1st from the charger instead of my apple watch (both on my nightstand) or vice versa. Or my Alarm clock begins later to play music than I already disconnected one or both of them because I woke up earlier.

All these has to/need to/ does happen every time I wake up/leave the bed to ‘not to sleep anymore” and so if all these small things happend and everyone of them set one next step in the “WakingUpFromBed” sequence then it will reach at the dnd at least a value of (step) 5 or six that is required to tell Homey that I’m not sleeping anymore.

For each small thing that needs to happen to increase one step I need to make sure the same step is not triggered twice snd so increases the sequence another one step forward again/twice. So i need to compare the current sequence value and make sure that for example disconnecting My Apple watch of iPhone from charging power only advances the value one step if the value is lower or equal to 3. Or the presence sensor above my head should only advance the sequence value in “WakingUpFromBed” if the value is above or equal to 4 and lower or equal to 5. (Because this is one of the last thing that has to happen to waking up and leave my bed for sure. And then only st least one me step has to happen to value 6 : A longer stay(5 minutes) in my lavatory or bathroom or living room without (as condition) my bedroom beeing active again for 3 minutes.

Sowhen my “WakingUpFromBed” sequence reaches a step value of 6 or higher and I’m still marked as being asleep it will change that state to awake.

At the time when my state changes to sleeping I wil set the sequence step value back to 0.

Meanwhile I will prevent that the sequence advances by any step flow to one step further and so automatically to step 0 while I’m awake.

Could you please help me. Thank you.

@DoctorBazinga Copilot is working on it as we speak :slight_smile:

Thank you.

I just wondered if you thought/considered/meant using a sequence and its steps in this manner like my “Wakingupfrombed” ?

Instead of calling it a sequence you could add a complete new part of functionality to flowbits and calling it a puzzle or Pizza/Cake. And a step would be a puzzle/pizza/cake piece. And if enough puzzle/pizza/cake pieces ah been gathered (maybe in also a specific time period/duration) for a complete puzzle/pizza/cake something has to happen. So many different occurrences can participate to add/supply the required amount of puzzle/pizza/cake pieces.

There could be even more possibilities of different occurrences that ad a piece to the puzzle than required to complete the puzzle. Like at my example there could happen 8 small different things when I wake up and get out of bed but not all a certain or necessary to happen . But at least 6 out of 8 should happen to have a pretty big chance/possibility that I awake. So 6 out 8 puzzle pieces are enough to see a clear picture (of the puzzle) :puzzle_piece:

:smiling_face_with_sunglasses:

@DoctorBazinga I mainly created sequences to add multiple features to a single light switch toggle and that’s actually also the only use case I have for them myself.

I’d say that maybe the Sets feature is also something you can look at, because it is basically the puzzle concept you’re describing. A set is active when one state is active, but there’s also a “set is fully active” trigger / condition card. It also has some time based cards that sequences don’t have.

Edit: I could add two extra cards to Sets to make it complete: “At least [N] states in [Set] became active” and “At least [N] states in [Set] are active.”.

Just additional thoughts if you would make a sort of puzzle concept/construction you could differentiate between ordinary/normal (=not so important) puzzle :puzzle_piece: elements and key elements of the puzzle (which are all at least a specified minimum number of elements required to already see/recognize/predict the whole picture.

So some occurrences are required to happen (to WakeUpFromBed) and are key elements of the puzzle while others are mostly happening too and some of them or a bunch of them together (don’t have to be all of them) are maybe also important as one key element.

A trigger could be “… key elements and …. Elements for puzzle ….. gathered “ then ……

And a required/important occurrence described in a flow can do as then “Add a key element to puzzle ….” (For example leaving the bed (area) Detected by a bed pressure mat sensor or a presence sensor above my bed)

Or a (normal) occurrence described in a flow can do then “ADD a element to puzzle ….” (For example disconnecting my IPhone from its nightstand charger. A second occurrence would be disconnecting my Apple Watch from its nightstand charger ) none of them are required to happen always when I’m waking up. But if both occurrences add a (normal/not so important/required) element to the puzzle maybe together with a third normal element (by a flow added to puzzle because my window shades go up (because it doesn’t have to be dark anymore in my bedroom) or my window is opened (for fresh air) or my Yamaha Musiccast(wifi) alarm clock begins to play.

I finally gather the specified & required 2 or 3 key elements and 3 or 4 (normal) elements for puzzle ‘WakeUpFromMyBed” as trigger for the flow that sets me awake /not sleeping at status in Homey.

And this kind multi conditions/occurrences are required to happen/be set right to trigger something are not (yet) possible I think.

Maybe something for the genius mind :brain:that already has been so creative with all this other things in flowbits. :wink:

Like you need as key elements a plane an and pilot to fly (on vacation) but not necessarily a stewardess or plane ticket ( if you fly private :small_airplane: jets). But mostly these are additional common elements that fits the puzzle that indicates/shows you’re flying (on vacation).

FlowBits 1.18.2

  • Introduces a new at least N states in set became active trigger.
  • Introduces a new at least n states in set are active.
  • This update also makes the code a bit simpler.

I’ve been using it in conjunction with a Rithum Switch Pro over the past week, to flick through different Spotify playlists but only giving up one of the eight preset slots on the switch

Really useful!

I start with a card that gives me ‘temperature is more than 20’. Then I want to trigger the same flow only after one hour
I use the card ‘Gebeurtenis’ (I think occurence?) . How do I make such a ‘gebeurtenis’?

Via the ‘Trigger event…’ card (‘Trigger gebeurtenis…‘ in Dutch). It’s in the THEN flowcards section.

Also check the app’s documentation I referred to in my answer to your question in the other topic. There is a dedicated section on Events (Gebeurtenissen in Dutch): FlowBits — Events.

Ik begrijp er helemaal niets van, blijkt.
Ik heb nu dit staan.
Op de middelste kaart moet ik een gebeurtenis invullen.
Die staat toch al op de 1e kaart?

Sorry, this one should be posted on the dutch board

You fist need to determine a unique name/reference for your event, like ‘Temp Above 20’

Then your flow would be:

WHEN

  • Temperature rises above 20 degees

AND

  • Event ‘Temp Above 20’ did not happen within 1 hour

THEN (true/blue line)

  • Trigger event ‘Temp Above 20’
  • Send email

ELSE (false/yellow line)

  • Trigger event ‘Temp Above 20’

FlowBits 1.19.0

  • Introduces a new “Calculate [formula]” flow action. Thanks @staeff!
  • Update dependencies.

FlowBits 1.19.1

  • Fixed a few off-by-one errors in time related code.
  • Fixed two set-related flow cards not being registered.
  • Improved internal logic.
  • Optimize app size.
  • Bump dependencies.

https://homey.app/a/com.basmilius.flowbits/