# \[APP\]\[Pro\] HTTP request flow cards - HTTP request triggers, conditions and actions for flows

**URL:** <https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684>\
**Category:** Apps\
**Tags:** app, tools\
**Created:** [September 14, 2018, 5:35pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684 "2018-09-14T17:35:39Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [January 5, 2019, 7:09am UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/21 "2019-01-05T07:09:33Z")

</div>

> [@Erik](#):
>
> Hey guys, HTTP App whitelist function will be removed in a next V2 compatible version unfortunantly

I commented on the GitHub issue as well. Would it be possible to use the public:true API. This would at least allow devices to still communicate with Homey (until Athom also kills that).

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [January 5, 2019, 9:42am UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/22 "2019-01-05T09:42:48Z")

</div>

That’s an existing feature (disable authorisation on settings screen; restart app). I’m thinking on a solution to get whitelisting working again.

---

<div class="post-metadata">

**Author:** ![Domotica-blog.nl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/domotica-blog.nl/32/69291_2.png) [@Domotica-blog.nl](https://community.homey.app/u/Domotica-blog.nl)\
**Post date:** [January 16, 2019, 2:23pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/23 "2019-01-16T14:23:22Z")

</div>

Hi Erik,

Is this APP working with the Homey v2? Because when i open de http request it can’t find my homey anymore. I’m not using the whitelist and using the extern url/cloud connection.

---

<div class="post-metadata">

**Author:** ![Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bos/32/8527_2.png) [@Bos](https://community.homey.app/u/Bos)\
**Post date:** [January 17, 2019, 7:48pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/24 "2019-01-17T19:48:20Z")

</div>

Hi All,

I try to change the status of an item in openhab. I tested this successfully in openhab with the following command:

curl -X PUT --header “Content-Type: text/plain” --header “Accept: application/json” -d “ON” “[http://192.168.178.55:8080/rest/items/check\_in/state](http://192.168.178.55:8080/rest/items/check_in/state)”

Is there a way to build this into an homey action card?  
I believe, I got stuck because openhab requires a plain text type.

thanks in advance

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 17, 2019, 7:54pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/25 "2019-01-17T19:54:00Z")

</div>

Perhaps a “POST form” card with the following string as URL (and as value just “ON”):

```auto
{"method":"put","protocol":"http:","hostname":"192.168.178.55","port":8080,"path":"/rest/items/check_in/state","headers":{"content-type":"text/plain","accept":"application/json"}}

```

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [January 17, 2019, 8:12pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/26 "2019-01-17T20:12:11Z")

</div>

Reading this: [https://community.openhab.org/t/http-binding-using-put-methods/38793](https://community.openhab.org/t/http-binding-using-put-methods/38793) I think openhab also accepts json, so something like {“state”: “ON”} on endpoint [http://192.168.178.55:8080/rest/items/check\_in](http://192.168.178.55:8080/rest/items/check_in)

---

<div class="post-metadata">

**Author:** ![Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bos/32/8527_2.png) [@Bos](https://community.homey.app/u/Bos)\
**Post date:** [January 19, 2019, 8:27pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/27 "2019-01-19T20:27:56Z")

</div>

Thanks Robert and Erik…I tried both solutions…both didn’t work.

Robert: I tried your string as URL value on a POST form card and I got a reply “Cannot read property ‘indexOf’ of null”. Altered a few things, but no results  
{“method” : ”put” , ”protocol” : ”http:” , ”hostname” : ”192.168.178.55” , ”port”:8080, ”path” : ”/rest/items/check\_in/state” , ”headers” : {“content-type” : ”text/plain” , ”accept” : ”application/json”}} and a value of {“ON”}

Erik: I tried the PUT json card and all responses were 400

Any other suggestions?

---

<div class="post-metadata">

**Author:** ![Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bos/32/8527_2.png) [@Bos](https://community.homey.app/u/Bos)\
**Post date:** [January 19, 2019, 8:29pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/28 "2019-01-19T20:29:23Z")

</div>

Sorry for the bolt text… worked partly on desktop and mobile… text entered on the desktop and send by molbile seems to become bolt

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 19, 2019, 9:04pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/29 "2019-01-19T21:04:38Z")

</div>

> [@Bos](#):
>
> {“ON”}

I don’t think `{“ON”}` is a valid value. Either try `ON`, `"ON"` or `{"state":"ON"}` (and _literally_ those values, not with fancy quote characters).

---

<div class="post-metadata">

**Author:** ![Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bos/32/8527_2.png) [@Bos](https://community.homey.app/u/Bos)\
**Post date:** [January 19, 2019, 10:01pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/30 "2019-01-19T22:01:02Z")

</div>

Unfortunatly all those values “ON”, ON and {“state”:”ON”} didn’t work.

---

<div class="post-metadata">

**Author:** ![Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bos/32/8527_2.png) [@Bos](https://community.homey.app/u/Bos)\
**Post date:** [January 20, 2019, 1:08am UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/31 "2019-01-20T01:08:15Z")

</div>

There is also a working post request to change an item in openhab. Is this request doable?

curl -X POST --header “Content-Type: text/plain” --header “Accept: application/json” -d “OFF” “[http://192.168.178.55:8080/rest/items/check\_in?api\_key=Websocket&api\_key=Websocket](http://192.168.178.55:8080/rest/items/check_in?api_key=Websocket&api_key=Websocket)”

Thanks in advance

---

<div class="post-metadata">

**Author:** ![gagga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gagga/32/14149_2.png) [@gagga](https://community.homey.app/u/gagga)\
**Post date:** [May 6, 2019, 1:04pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/32 "2019-05-06T13:04:43Z")

</div>

I have an issue with triggers. This is my setup:

 ![14](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/3/316aeb1eeb3b69822ffb1eba42fef000c1b25955.jpeg)

 ![30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/6/6660faa160ad12c321d8151ea771ddd8c7391c17.jpeg)

 ![24](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/00ee17c37fcacbbbfd37d9d5dfd062cb7abc8f3b.jpeg)

 ![42](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/024042a927dd7cd82073e434ff49cb17b1c527bc.jpeg)

Trigger “tBatteryJSON2” never gets triggered:

 ![IMG_F5DC3F9116CC-1](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/5/53338a8dc152c54e3781e008ec7bc18fe3f1ab6e.jpeg)

Any idea how to get “tBatteryJSON2” triggered?

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [May 6, 2019, 8:11pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/33 "2019-05-06T20:11:11Z")

</div>

Hi @gagga. What is the response you get from “[http://sonne.publicinsight.de/api/v1/status](http://sonne.publicinsight.de/api/v1/status)”? That uri does not work when I request it.

---

<div class="post-metadata">

**Author:** ![gagga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gagga/32/14149_2.png) [@gagga](https://community.homey.app/u/gagga)\
**Post date:** [May 6, 2019, 8:13pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/34 "2019-05-06T20:13:45Z")

</div>

[sonne.publicinsight.de](http://sonne.publicinsight.de) resolves to an internal IP address in my network (192.168.1.10). So it won’t work for you.  
From the internal network I get:  
{“BatteryCharging”:false,“BatteryDischarging”:true,“Consumption\_W”:695,“Fac”:50,“FlowConsumptionBattery”:true,“FlowConsumptionGrid”:true,“FlowConsumptionProduction”:false,“FlowGridBattery”:false,“FlowProductionBattery”:false,“FlowProductionGrid”:false,“GridFeedIn\_W”:-35,“IsSystemInstalled”:1,“Pac\_total\_W”:620,“Production\_W”:0,“RSOC”:12,“Timestamp”:“2019-05-06 22:11:57”,“USOC”:7,“Uac”:224,“Ubat”:51}

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [May 6, 2019, 8:15pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/35 "2019-05-06T20:15:36Z")

</div>

> [@gagga](#):
>
> {“BatteryCharging”:false,“BatteryDischarging”:true,“Consumption\_W”:695,“Fac”:50,“FlowConsumptionBattery”:true,“FlowConsumptionGrid”:true,“FlowConsumptionProduction”:false,“FlowGridBattery”:false,“FlowProductionBattery”:false,“FlowProductionGrid”:false,“GridFeedIn\_W”:-35,“IsSystemInstalled”:1,“Pac\_total\_W”:620,“Production\_W”:0,“RSOC”:12,“Timestamp”:“2019-05-06 22:11:57”,“USOC”:7,“Uac”:224,“Ubat”:51}

Unfortunantly that’s an invalid JSON structure. It uses the wrong type of quotes (check it with [https://jsonformatter.curiousconcept.com/](https://jsonformatter.curiousconcept.com/))

---

<div class="post-metadata">

**Author:** ![gagga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gagga/32/14149_2.png) [@gagga](https://community.homey.app/u/gagga)\
**Post date:** [May 6, 2019, 8:19pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/36 "2019-05-06T20:19:12Z")

</div>

There seems to be an issue with this forum software. If I copy the original output it is verified correctly:

 ![JSON%20Formatter%20%26%20Validator%202019-05-06%2022-18-09](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/a/a7f89196c01d10dd32f42d9c8c9a15da238e5137.jpeg)

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [May 6, 2019, 8:22pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/37 "2019-05-06T20:22:59Z")

</div>

Ok, thats kind of a relieve :).  
Are you sure the second flow is enabled?  
Can you run flow 1 manual and trigger the ‘send diagnostic report to developer’? I then will have insight in executed requests, returned responses and the jsonPath processing.

---

<div class="post-metadata">

**Author:** ![gagga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gagga/32/14149_2.png) [@gagga](https://community.homey.app/u/gagga)\
**Post date:** [May 6, 2019, 8:27pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/38 "2019-05-06T20:27:02Z")

</div>

Yes. All 3 flows are enabled.  
Diagnostic report id: 3ba3d16f-9a93-4a32-b728-4e1b7e0bc7dc

---

<div class="post-metadata">

**Author:** ![gagga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gagga/32/14149_2.png) [@gagga](https://community.homey.app/u/gagga)\
**Post date:** [May 7, 2019, 7:38pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/39 "2019-05-07T19:38:25Z")

</div>

FYI: today’s Homey update to versions 2.1.2 did not change the trigger behaviour.

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [May 19, 2019, 7:39pm UTC](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684/40 "2019-05-19T19:39:12Z")

</div>

I found the bug and fixed it in version 2.0.10, which is now awaiting approval in the app store.

[Previous page](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684.md?page=1)

[Next page](https://community.homey.app/t/app-pro-http-request-flow-cards-http-request-triggers-conditions-and-actions-for-flows/1684.md?page=3)
