# How to send a "curl" command from Homey to a device?

**URL:** <https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240>\
**Category:** Questions & Help\
**Created:** [July 10, 2020, 2:50pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240 "2020-07-10T14:50:23Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 10, 2020, 2:50pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/1 "2020-07-10T14:50:23Z")

</div>

Dear all,  
I have had my Homey Pro for 24 hours - but despite many googleings I cannot find an answer.  
I wish to send a command from homey - this is Volumio command.  
curl 192.168.1.127/api/v1/commands/?cmd=play  
I wish to have this in a flow like;  
when X happens  
then send the above commando  
I guess there is a simple way to do it but I cannot figure.  
Many thanks in advance.  
Henrik

---

<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:** [July 10, 2020, 2:54pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/2 "2020-07-10T14:54:52Z")

</div>

Find the flow action card _“Logic — Perform a web request”_

---

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 10, 2020, 2:59pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/3 "2020-07-10T14:59:27Z")

</div>

Thanks. I found that. But still cannot figure out how use it. It states:  
Method: I guess post  
URL: I guess the curl commando - but does not seem to work.  
Tags  
Breadtext:  
Delay:  
Please guide me!  
/Henrik

---

<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:** [July 10, 2020, 3:03pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/4 "2020-07-10T15:03:07Z")

</div>

- `curl` defaults to `GET`, so use that for method
- URL is just that, the URL: `http://192.168.1.127/api/v1/commands/?cmd=play`
- Breadtext: leave empty
- Delay: don’t set

---

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 10, 2020, 3:11pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/5 "2020-07-10T15:11:28Z")

</div>

Thanks now it works! Super thanks!

---

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 12, 2020, 12:44pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/6 "2020-07-12T12:44:05Z")

</div>

Hi again,  
Do you by any chance know how to change volume?  
Documentation says: volumio.local/api/v1/commands/?cmd=volume&volume=80  
And others have had issues and qoutes should be used:  
curl ‘localhost:3000/api/v1/commands/?cmd=volume&volume=20’  
I have tried - none works in homey:  
‘[http://192.168.1.127/api/v1/commands/?cmd=volume&volume=20’](http://192.168.1.127/api/v1/commands/?cmd=volume&volume=20%E2%80%99)  
and  
http://‘192.168.1.127/api/v1/commands/?cmd=volume&volume=20’

From my computer this works:  
curl ‘192.168.1.127/api/v1/commands/?cmd=volume&volume=20’

Thanks in advance

Henrik

---

<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:** [July 12, 2020, 12:45pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/7 "2020-07-12T12:45:31Z")

</div>

The quotes are required for shell commands, but the Homey flow card just needs a URL:

```auto
http://192.168.1.127/api/v1/commands/?cmd=volume&volume=20

```

No quotes required.

---

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 12, 2020, 12:51pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/8 "2020-07-12T12:51:15Z")

</div>

> [@robertklep](#):
>
> `http://192.168.1.127/api/v1/commands/?cmd=volume&volume=20`

No. That does not work I get failure message: Cannot read trim of undefined.  
Henrik

---

<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:** [July 12, 2020, 12:57pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/9 "2020-07-12T12:57:30Z")

</div>

Add a space (just a single space) to the “Headers” field, apparently it’s not allowed to leave it empty.

---

<div class="post-metadata">

**Author:** ![Henrik\_Artman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_artman/32/17176_2.png) [@Henrik\_Artman](https://community.homey.app/u/Henrik_Artman)\
**Post date:** [July 12, 2020, 1:05pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/10 "2020-07-12T13:05:36Z")

</div>

You are fantastic. Thanks!

---

<div class="post-metadata">

**Author:** ![Semyon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/semyon/32/12658_2.png) [@Semyon](https://community.homey.app/u/Semyon)\
**Post date:** [August 17, 2020, 5:07am UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/11 "2020-08-17T05:07:34Z")

</div>

Hi all.  
help with sending the request.  
how to send curl command to door station ?

working curl command

curl --user admin:password digest “[http://192.168.1.111/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Remote](http://192.168.1.111/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Remote)”

didn’t find homey tools to send request with digest authorization support.

---

<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:** [August 17, 2020, 8:19am UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/12 "2020-08-17T08:19:19Z")

</div>

> [@Semyon](#):
>
> didn’t find homey tools to send request with digest authorization support.

I don’t think it’s possible.

---

<div class="post-metadata">

**Author:** ![Raytestrak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/raytestrak/32/3299_2.png) [@Raytestrak](https://community.homey.app/u/Raytestrak)\
**Post date:** [November 22, 2020, 3:12pm UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/13 "2020-11-22T15:12:00Z")

</div>

Not the cleanest solution and probably not suited for you, but I have openwrt running on my router. Via the custom command option I trigger a shell scripts for more complex (curl) commands. That custom command can be called via a GET command in Homey.

---

<div class="post-metadata">

**Author:** ![Semyon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/semyon/32/12658_2.png) [@Semyon](https://community.homey.app/u/Semyon)\
**Post date:** [November 23, 2020, 3:51am UTC](https://community.homey.app/t/how-to-send-a-curl-command-from-homey-to-a-device/32240/14 "2020-11-23T03:51:18Z")

</div>

Thanks!  
I executed a curl request via php. Php called a get request.
