# How do I run a FlowCardAction for other devices from an app?

**URL:** <https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844>\
**Category:** Questions & Help\
**Tags:** flow, programming, homey-pro\
**Created:** [September 13, 2022, 10:41pm UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844 "2022-09-13T22:41:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 13, 2022, 10:41pm UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/1 "2022-09-13T22:41:02Z")

</div>

If I use the web api playground to run the following code it works smoothly:

```auto
Homey.flow.runFlowCardAction({
      uri: 'homey:device:ccxvb-xvb-bv-bcv-ccxxxxxxxxx',
      id: 'target_temperature_set',
      args: {target_temperature:11}
    });

```

However, running the same from an app using HomeyAPIApp like this:

```auto
await this.homeyApi.flow.runFlowCardAction({
      uri: 'homey:device:ccxvb-xvb-bv-bcv-ccxxxxxxxxx',
      id: 'target_temperature_set',
      args: {target_temperature:11}
    })

```

only give me “Permission denied”

I found no permissions to set to enable this. Are there no ways to run this?

I was wondering if it was possible to use a HTTP request to [http://localhost/api/manager/flow/xxx](http://localhost/api/manager/flow/xxx) to do the same thing like I did when [bypassing permission denied for public api calls](https://community.homey.app/t/api-option-public-does-not-seem-to-have-any-effect-on-homey-pro-does-it/67324). But I can’t figure out how the API call should be constructed as runFlowCardAction does not seem to be documented… And I figure it probably will not work anyway since this command is not marked as public like I did with the app API.

Any ideas how to get the flow started?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 13, 2022, 11:37pm UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/2 "2022-09-13T23:37:17Z")

</div>

This works using HomeyScript

```auto
// send push confirmation to user
const responseC = await Homey.flow.runFlowCardCondition({
        uri: 'homey:manager:mobile',
        id: 'push_confirm',
        args: {
			    user: {
			    athomId: 'YourAthomID'
		    	},
		    text: 'Test push confirmation from HomeyScript'
        },
      });
console.log(responseC);
//return(true);

// -----------

// send push msg to user
const responseA = await Homey.flow.runFlowCardAction({
        uri: 'homey:manager:mobile',
        id: 'push_text',
        args: {
			    user: {
			    athomId: 'YourAthomID'
		    	},
		    text: 'Test push notification from HomeyScript'
        },
      });
console.log(responseA);
return(true);

```

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 14, 2022, 12:07am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/3 "2022-09-14T00:07:26Z")

</div>

Yes, thanks for the reply, but HomeyScript use the same commands as the web API playground so I suspected that would work, but that is not where the problem occurs. My problem is when you try to do this with an app, which works a little bit differently.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 14, 2022, 12:10am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/4 "2022-09-14T00:10:58Z")

</div>

Ah I see… I only know the playground has more permissions than HScript or apps

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 14, 2022, 12:12am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/5 "2022-09-14T00:12:15Z")

</div>

Yeah, it’s quite annoying. Why let us play with it if we can’t get permission to do it elsewhere?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 14, 2022, 12:21am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/6 "2022-09-14T00:21:14Z")

</div>

Numbers… when you fiddle with playground, you only have a chance to ‘demolish’ your own homey.  
But when 5000 instances of your app are installed…  
Take a look at [h.o.o.p. app](https://store.homey.community/app/nl.qluster-it.HOOP) It uses a ‘creative’ rights elevator. However, because of that, It’s not allowed to the official store. This app can change device names on the spot for instance 😉

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 14, 2022, 12:40am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/7 "2022-09-14T00:40:43Z")

</div>

But it’s weird you cannot just set a target temperature using an app? That shouldn’t need extra permissions imho.  
Maybe Björn knows a thing or two about that:

> [@\[APP\]\[PRO\] VThermo](https://community.homey.app/t/app-pro-vthermo/36442/1):
>
> Actions
> 
> ```
> Turn on
> Turn off
> Toggle on / off
> Set the target temperature
> 
> ```

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 14, 2022, 12:56am UTC](https://community.homey.app/t/how-do-i-run-a-flowcardaction-for-other-devices-from-an-app/68844/8 "2022-09-14T00:56:41Z")

</div>

> [@Peter\_Kawa](#):
>
> But it’s weird you cannot just set a target temperature using an app

I can write to the capability for temperature yes… however this was only an example.  
The real problem is that I encountered an app that does not have any writeable capabilities. The only way to change the state of the device is to use Action cards… So either I must find a way to trigger the action cards for the other app from within my app or I have to insist on the other app to change to meet my needs, which is a kind of approach I only see as a last resort 😉
