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

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

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

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

  • 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

Thanks now it works! Super thanks!

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’
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

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

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

No quotes required.

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

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

You are fantastic. Thanks!

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”

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

I don’t think it’s possible.

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.

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