Troubleshooting advanced flow: executes manually after 2 button presses (?) and 1 "then-card" isn't activated

I’ve got an advanced flow to turn off everything. There are 2 weird things happening which I don’t know how to fix:

  1. The flow is triggered by time or manually. However it only works manually after 2 button presses in the app instead of 1.
  2. The flow won’t turn off the TV (TV-meubel). It does turn off pressing the button in the app.

Let me explain the flow step by step
Step 1: activation

  • Option A (top) : The flow is activated at 23:30. The hallway lights are dimmed using the logic card. If either me or my wife answer “no” to the push notification, the flow will stop.
  • Option B (middle): The flow will start at 22:30 if “vacation mode” (=virtual device) has been turned on.
  • Option C (bottom): The flow will start by manually activating it in the app. Most of the times it only starts after 2 presses.

Step 2: Lights and scenes are changed to show that the flow is activated

Step 3: After 15 minutes everything is turned off if the “stop-button” isn’t activated (except desks, this is done after a confirmation using a push message)

Do you mean that this flow (in the first screenshot) dims the hallway lights? Because that is not what that logic card does. I only checks whether the dim level of a specific light (I assume the hallway light) is more than 1%, or in other words: whether the light is turned on. The logic card does not actually dim the light as you indicate.

Further: if one of you confirms the push notification, but the other not, then you have to wait for 30 minutes for the other’s push notification to time out. Only then, that part of the flow continues via the error connector. That means that you have to wait for max. 30 minutes before the flow continues from the ALL card.

To be precise (sorry :wink: ): not all lights which are turned off, have a dim value of 0.
Some keep their last dim level in their tag when off.

So, if we want to check on a light’s on/off state, always use the on/off tag.

1 Like

You are correct of course :blush:.

Assuming a light is switched on, then a dim level other than 0% would actually show some light. But indeed, if you set the dim level to e.g. 40% and then turn of the light, the dim level typically remains at 40%. If you turn on the light again it will be dimmed to its last setting (40%).

Noooo I don’t want to be :face_with_peeking_eye:.
But it’s just one of those irregularities of Homey, the use of dim level conditions for light on/off states can have different, unexpected, outcome.

1 Like

Hi! Of course you’re completely right. The flow checks whether the hallway light is on before starting. I’ll think on it, but at this moment I can’t remember why I did that :sweat_smile:

Isn’t this caught by using the “any” card for the positive result together with the error result (in case of time out)?

Could you also help me on troubleshooting the mentioned problems perhaps? :smiley:

This may be due to the fact that you are initiating several actions in parallel (like switching off devices) after the ‘Stop alles uit - Thuis, Is uit’ card. This does not always work well on Homey. Try to switch them off in series, so connect them after each other.

What do you mean by ‘after 2 button presses’? Which button are you referring to? The play button to start the flow?

Thanks! I’ll put them in series and will let you know tomorrow what the result has been.

Exactly!

Regarding the 2 button presses: based on your screenshots, I don’t see why a single press would not execute the flow.

The only point where it would stop, is if the ‘Stop alles uit - Thuis, Is uit’-check would be false (that virtual button is pressed). But then, a second press on the play button would not make a difference.

Are there any other conditions you check (through AND flow cards) that are not included in the screenshots?

Nope, everything is in here.

I understand it’s a weird situation… I was wondering if it could be a performance issue. I’m willing to learn on more technical ways of troubleshooting however I only know basic coding so starting with analyzing log’s without some guidance seems overwhelming to me.

Maybe one of the THEN cards in the flow results in an error, the first time you press the play button, which halts the flow.

You can debug this by adding an ‘add a notification to the timeline’ card, to put a message on your timeline (like the flow card’s name), at each flow card and connect it to the red error connector at the bottom of each flow card. This way you can determine at which card the flow stopped.

In addition to the error output, you can also connect the other two outputs of each flow card (the true/blue and false/yellow outputs) to the time line card to check any of those took place.

1 Like