[FAQ][Advanced Flow] Infinite canvas. Infinite creativity

It’s a lot to write I was looking for an easy way to build the JSON object. If there’s no app perhaps one can use AF?


I really LOVE the new feature, it’s so much easier to create complex automatisation.
BUT… Is it normal that everything becomes very slow when making an advanced flow?

For example :
Before I had around 75 flows for the whole automatisation in the bathroom (Lights, Shower, Music, etc) , now I managed to build those 75 flows into 2 advanced flows, 1 for the lights, 1 for other automatisations.
since the advanced flow chart for the lights is getting bigger and bigger, I noticed that my PC can’t handle it, and I have a delay for 2 to 8sec with everything that I do… Add new things, drag existing things, even connecting 2 cards can sometimes take more than 8sec just to get the line from point A to point B.

My PC is a MSI stealth GS66, I doubt that my PC is not ‘strong’ enough for this :upside_down_face:

I often use AUTOCAD, even with this program I never experienced this kind of delay… :triumph:

Have other people also experienced this?

One experience I have had is that not all then-cards is chainable.
I have a flow where multiple timers and transitions (Chronograph app) are started or stopped.
For better overview I placed them in a chain instead of in parallell. This caused only the first timer card to be triggered. Took me a while to find that “bug”.

I understand now that this is because trying to stop a timer that has expired will return an error (not found) even if not really being an error.
So in my flow I should have connected both the error and the normal output to next card.

I like the JSON while it is very readable, but also error prone in writing it.
My solution is a bit different, but kinda similar although the parsing is a bit more work maybe…
I set a Text Logic card to the following:
<group/type>;<priority>;<message> and then I parse it like this:

text values I retrieve with the following HomeyScript code:

// LogMessage - Group
const msg = args[0];
let elm = msg.split(';')
return elm[0].trim()

2nd field, which is an integer:

// LogMessage - Level
const msg = args[0];
let elm = msg.split(';')
return parseInt(elm[1].trim())

You can create your own alternate solution like so and adjust the HomeyScript accordingly
type=<myvalue> prio=<50/high> msg=<hello there> (instead of spaces you might want to use something like a colon or semicolon to split the values)
Might be simpler than JSON in the end…

Here’s the code to split the string with type= prio=50 msg=anything you ok

const note = "type=msg prio=high msg=hello world what is going on app=myapp"
const regex = /([a-z]+=.*?)(?:(?=[a-z]+=)|$)/gi
const found = note.match(regex)

Resulting in an array with 4 elements:

["type=msg ", "prio=high ", "msg=hello world what is going on ", “app=myapp”]

There is probably some here than knows how to use a .map or .reduce to convert this array into a key-value JSON object with a nice one-liner split on the equal sign (=)

1 Like

Regarding disabling flows.
For standard flows, when issuing a disable of the flow itself, the flow will not start again but will proceed until finished, so run once.
For advanced flow the flow seems to stop too, so it will only run until the disable card is performed and the rest of the flow will not be performed.

In this example only the text “Pre disable” will be sent.
If I run it in test mode it works as expected and all texts will be sent, but not live.

1 Like

You coud use [APP][Pro] Advanced Triggers - Trigger and action cards with eventname for Advanced Flows

I converted my standard kitchen light flows to AF. Not sure which is easier to read. I think re-using a ‘when’ card is still better sometimes than drawing lines to anywhere :wink:
I have to say, the simulator clarifies it well when I get lost in the web.
The functionality:
Depending on the sun position, daylight intensity and day/evening/night scenes:
switch / dim countertop leds, central light and 3 spotlights.

1 Like

Slowly I am migrating my flows to Advanced Flows, and enjoying the process!

Having all triggers on one ‘canvas’ does make me wonder: is it possible to prioritise triggers?

As an example, a blind closes thru a Lux trigger, but I want to keep it open and push a Homey linked button to do so. But, Lux closes it again…repeat

I could include a variable per flow on the canvas, with higher numbers giving higher priority, but an alternative would be “top to bottom” priority. Or a setting per ‘when’ trigger.

What do you think?

There is no built in prioritization, you need to handle it yourself.
I use the app “Sets” for this.

How did you solve this with the old flows? With the old flows, you can’t prioritize a triger either.
I don’t know the “Sets” app, but you can/must solve this use case with a yes/no variable or a virtual switch. Or And… conditions are missing in your AF.

I struggled there too…

Before - old Homey firmware - the app State Control could handle this. Unfortunately, that App doesn’t exist anymore.

Switchable “Top down priority” would be a great addition.

Homey might seem intelligent but cant distinguish triggers that have a relationship and should prioritize or that have no relationship and should execute all.
Then if your choice was up or on for how long should that stay if below is your wifes trigger and she wanted down or off.

Just program it yourself with a flow, with variables and or timers.

1 Like


So, Top down, sex and age!

Just kidding!



Check out the Sets app.
It behaves like a bit pattern where you can check wether a “bit”/state is set or not.
Create a set called BlindState.
Then create individual states for each trigger.
(De-)Activate the states in each corresponding flow.
Create a flow that check the states in prio order.
It is also possible to activate a state temporary, for a specified period.


What I did in previous flows was if I wanted lights to be on and not be affected by the lux sensor was, when I push button to switch on the light scene I wanted that flow had a card to disable the sensor. The when I manually turned off the lights that flow had a card to reenable the sensor

Interesting. How do you unable a sensor?

Before with standard flows we also didn’t have a ability to disable devices. If you disabled flows that is still possible, nothing changed in that for AF.

Philips Hue sensors can be disabled in flow, there’s a card for that. And can be re-enabled in a second flow

1 Like

Make a flow for the lux-sensor that before changing the light (on/off) checks whether the manual switch is on or off. If on then do nothing.
A much easier way to solve this, no need for disabling.

1 Like