Send a http POST url

Hi,

Think it’s a very easy solution but I still haven’t work. What I need to communicate with a other system, to start a action, is to send a http post command. I have the http request flows but it seems to complicated in order what I need to send:

http://IP-adress/a/exe/Main/rnd/MACRO/22/FIRE

So no body’s or other values. Just a http POST command.

Any suggestions how I can get it work?

Thanks in advance!

There’s a THEN card “Logic > Make an HTTP request”

Thanks for your quick reply.

Correct, seen that option but I need to fill in header and body. Is that correct or do I need to ‘cut’ the url?

Just leave them empty.

Can remember that these fields need to be filled in on the browser panel, now on the mobile version it seems to be alright!

Let’s try to connect. But so far so good, thanks!

I needed to create a user and password to get it work. New I tried http://user:password@192.168 etc and also with https:// without succes. What is a (common) way to put credentials into a webhook or otherwise?

Thanks for the help!

You need to know how the recipient is reading your auth data.
If it’s BasicAuth, you can try to add a HeaderField field like
Authorization: Basic [base64]
Where [base64] is the Base64 ecoded text with content user:password or perhaps plain text, dependent on the recipient logic.
Reference: Authorization - HTTP | MDN

If the server supports basic authentication, http://username:password@192.168.etc will also work, provided that both username and password are properly URL-encoded.

1 Like

Thnx for your reply’s. Unfortunately didn’t succes to get it work. Hopefully the following info will help to give a better view.

To have all the info on the table, this is the reply from the support of the other system:

In the Interfaces tab of the BeoLiving Setup you have to create a user and give it access to the room in which the scene you want to Fire is set. Afterwards, when sending the HTTP command from Homey, you will have to add the credentials (user name and password you created and gave access).

General information:
This system has three parameters:

  • Base url : Base URL of destination for each HTTP Request. If you have many resources with the same base and a different endpoint, this can be configured for each resource. The URL of the request will be the concatenation of Base url + resource endpoint.
  • Headers (OPTIONAL): You can specify the Headers for each HTTP request made by the driver as JSON Object.

Eg: {“Header1”: “valueX”, “Header2”: “valueY”}. If this field is left empty the next headers are used by default: {“Accept”: “/”, “Content-Length”: “${Length}”,”Host”: “${Host URL}”}.

  • Poll url (OPTIONAL) : This field is just to set the driver as Online or Offline: If this field is not empty, the driver makes a GET HTTP Request to the Poll url every 60 seconds and the state depends on if the returned status code is 2XX Success or not. If this field is left empty, the driver state is determined by the last returned status code of a request made. In this case the driver state will be equal to Online if the returned status code is 2XX Success and Offline if not.

It works!

With help of a curl code in a terminal I learned that the account was not verified yet. After verifying it works!