User who started the flow as variable?

Is there a way to distinct in a flow which user started it and use this as kind of a variable?

So e.g.
If user A started it → send a push notification to user B
If user B started it → send a push notification to user A

Of course I could to it with multiple flows, but thats not very handy.

Thanks for your help?

Afaik there’s no way to retreive the user who started the flow.
However, that’s not end of story;
When you replace those flows trigger with a virtual knob or switch, the user who pushed the virtual switch is known!
Use this flow card, to monitor the virtual knob / switch:

Explained:

.

To sent push messages to certain users, here’s a way to get user ID’s and save them into reusable variables:
https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981/25

@Peter_Kawa It does not work for me, can you explain which virtual switch?
In the mobile Homey App I pressed a

  • Button in an AVD by Device Capabilities
  • Virtual Device

In both cases the user and client fields are empty.

It works for me with an AVD

This is the only settings of the avd:
Screenshot from 2024-01-04 11-12-30

.
Even the device class is not adjusted:
Screenshot from 2024-01-04 11-15-24

.

Flow:

.

Output:
Screenshot from 2024-01-04 11-11-10

Thank you. No luck, fields are empty. I tried with simple flow as well. No clientID and no User.
But I cannot select for “Turned on”, but “OnOff”. Maybe we are using different versions?
Device capabilities v2.15.4 Test
Homey 10.2.0

Class: Other (Default)
image

image

image

image

YW,

‘Turned on’ seemed to be a ‘previous’ value, when I emptied it and selected it again, I also got OnOff as only choice. But that also works here, sorry.

I see we use different DC versions and Homey’s (you probably own the 2023 model?), so that must be the cause here imho
DC: v2.14.9
Homey Pro 2019, v10.0.5-rc.1

@Arie_J_Godschalk Is this possible on the HP2023? If yes, I will raise a ticket for you

Yeah, but with the testversion, i have got reports that it indeed is missing the user on the hp2023.

Was that ever fixed on HP2023? Since there is still no way to know which user started a Flow (which is ridiculous IMHO), using a virtual device would probably be an acceptable workaround

I think it’s odd we can start flows.
I prefer to use switches or buttons which start flows
Then you automatically can retrieve the ‘who’ and the ‘from which device’ with the flowcards I showed.

Except this does not work on Homey Pro 2023, only on 2019…

I see this as a temporary issue, hopefully a fix can be found.

I tried the above today, same results. The tags are not filled.
It only works on HP2023 if you do a test run in the browser. You’ll get a popup asking for a value to test run the flow. That value is correctly passed.

@Arie_J_Godschalk I guess this is something Athom has to fix? Or is it something caused by Device Capabilities?

I’ll have to take another look.

There were a lott of changes with the new homey-api which is finally live.

So now I can look for solutions to issues like this. Hopefully I can resolve it soon (although I thought it was resolved).

Ah that would be nice Arie.

If it is something Athom should fix then I’ll raise a ticket.

Actually weird that this is the only way to identify a user who started the Vdevice/flow within that flow so results can be send to their phone.

Hi Arie,

A kind reminder.
I was wondering if you’ve found something in the App or if it is something in the API.

@Peter_Kawa
If I remember it right you also have a HP2023 now?
Does your flow work on that one? Or do you get empty values as we have?

Thanks in advance!

Hi David,

Correct, it’s a 2026 model even.

I ran some tests with both “listen for” and “retrieve insghts value” cards;
Tested with different device sources:

  1. Homey (Trust klikaanklikuit app)
  2. Home Assistant (Home Assistant Community app)

a. Using the mobile phone app:

b. Using the web app:

As you can see,

  • the “retrieve insights value” card works
  • the “listen for” card doesn’t return user nor client.

Test flow:

Is it still not working for you?

Because it really should work :sweat_smile:

@Arie_J_Godschalk

Now it is working for me! Not directly from a virtual device but with the retrieve insights card.

I tried that option before but apperently I was using a wrong card that was named almost the samen :see_no_evil_monkey:

Thanks to @Peter_Kawa 's example I’ve discovered what I did wrong. Thank you very much for helping me out!
Now I can send notifications when something failed to the one who started the flow.

Tip for others to keep in mind who want to use this…
If you create a Advanced Virtual Device, make sure it is one that can create insights. I had to use a on/off switch. Not a doorbell like button because it cannot generate the insights.
You can check the insights regardless of the state or you can flip back the state of the button immediately at the start of the flow.

@Arie_J_Godschalk Thank you for making this functionality possible! I don’t know why Athom lacks this functionality natively. Home automation is for more than one person in our houses.

My pleasure, David.

On the top card the detail is in the capability type “device(tag)”
I still don’t know how to use it, apparently we can use a tag, but there it ends for me.
And probably I don’t need that card anyway​:blush: