Homey Community Forum

Simple HTTP Connector For Flows

Hi @volodeev, welcome on the forum!
Do you know how long the sid is valid?
With my app its not possible to do two calls stepping through a login/authentication within one flow. At least it’s not done yet.
But… what if we do the login call, put the response sid in a Better Logic variable and reuse that (via a token) in the second request. Is that worth trying?

Hi. Yes, I know that it’s not easy. I am not a JavaScript programmer. Therefore, I can not use HomeyScript. Help me please.

I am thinking of breaking this task down into 3 stages:

  1. post request with authorization to receive SID
  2. GET request https://lk.saures.ru/api/company/flats?sid=ea533f69-7880-4938-9fdf-522d2a929ee5
  3. GET request https://lk.saures.ru/api/meter/meters?sid=ea533f69-7880-4938-9fdf-522d2a929ee5&flat_id=4731

Hi @Erik!
The SID through Postman does not change unless cookies are deleted. With a new authorization, the SID changes, but the old SID also continues to operate.

I like your idea of ​​putting the SID in a Better Logic variable and reusing it. But … I can’t extract the SID, because I don’t know how to send an authorization request correctly. Help me please.

I am thinking of breaking this task down into 3 stages:

  1. post request with authorization to receive SID
  2. GET request https://lk.saures.ru/api/company/flats?sid=ea533f69-7880-4938-9fdf-522d2a929ee5
  3. GET request https://lk.saures.ru/api/meter/meters?sid=ea533f69-7880-4938-9fdf-522d2a929ee5&flat_id=4731

Hi, I’m new to this app.
It looks promissing in the description - but I seem to lack some examples.
I have just tried to do some simple http commands, and the Homey just responds with “Ok”, but no actions are performed, neither on devices nor on flows. A small toturial or examples would be nice.

Hi @CasperD! There are a lot examples posted on the forums. Have you checked the full app store description? (also available here: https://github.com/irritanterik/homey-http-request-actions/blob/master/README.md).
What do you want to achieve with the flow you created?

Is it possible to get through a http request your actual coördinates. For example https://www.gps-coordinaten.nl/waar-ben-ik or google maps. Would be very interesting. For me it would be a way to update rain information when i am bycicling on a different place as where Homey stays. And yes I don’t always carry Homey with me😛
I have no clue how to do this

Hi @Erik
The README, got me to where I am now, but the examples are not complete, the documentation discusses an event, but what is that in Homey environment, Homey has: Devices, Flows, Triggers.

Assuming that I have a device ‘Lamp’,
I make a http request :
Or any deviation, all responds with “Ok”, no action performed on the ‘Lamp’
Assuming that I made a flow ‘X’ (Trigger is ‘This flow started’)
Responds “Ok” but flow is not executed

And u also made the flow to receive the GET request like this?

I’m trying to use the Evaluate JSON condition card (C22) but I need to specify headers with the request. I dont seem to be able to get it right. I have tried the following in the query parameters field:

  • {“Authorization”:“Bearer somerandomstring”}
  • {‘Authorization’:‘Bearer somerandomstring’}
  • {Authorization:‘Bearer somerandomstring’}
  • {headers:{‘Authorization’:‘Bearer somerandomstring’}}
  • {headers:{Authorization:‘Bearer somerandomstring’}}

All to no avail, the app even crashes with some of these attempts. @Erik, could you explain me what I’m doing wrong and should I submit a bug due to the app crashing?

I got it to work using the node http options in the URL field but only when putting some bogus json in the query parameter field. Leaving this empty causes the app to crash.

Can anyone help me how I can send a GET command with two cookies?

It is something like “https://…{Cookie=xxx=yyy; xxx =yyy}” with the cookie in the header brackets but don’t know if the default GET card will accept this syntax.

I want to send out this GET command to a server to get a reply with a JSON file which I want to store some variables in Better Logic. Without the cookies I don’t get replied with a JSON file.

Done & figured it out:
I used the advanced options and used the ’ GET JSONpath Better Logic ( A22 )’ card and made a Better Logic variable.

in the url box I added in the sample code from the above link and modified the headers box:

“headers”:{“Cookie”:“xxx=yyy; xxx=yyy”}

1 Like

Just discovered the websocket send - just what I needed to switch my Daikin heatpump on and off. Superb work. Now the question - is there any way to read the response from the send?


Hi Phil, at this point I did not implemented a response reader or trigger based on the response.
If you could provide me with a stubbed nodejs server which mocks your heatpump responses then I will be able to add reading the ws response to the app.

I read responses via Homescript and parse the output into logic tags like this:

// read values from Sonnen battery
var url = "";
(async () => {
     const rawResponse = await fetch(url, {
        method: 'GET',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
  const content = await rawResponse.json();

  if (content.BatteryCharging != null) {
    await setTagValue("hstBatterieLaedt", {type: "boolean", title: "hst_Batterie_laedt"}, content.BatteryCharging);

  if (content.BatteryDischarging != null) {
    await setTagValue("hstBatterieEntlaedt", {type: "boolean", title: "hst_Batterie_entlaedt"}, content.BatteryDischarging);

  if (content.Consumption_W != null) {
    await setTagValue("hstConsumption_W", {type: "number", title: "hst_Hausverbrauch"}, content.Consumption_W);

  if (content.Production_W != null) {
    await setTagValue("hstProduction_W", {type: "number", title: "hst_Solarerzeugung"}, content.Production_W);

if (content.RSOC != null) {
    await setTagValue("hstRSOC", {type: "number", title: "hst_Ladezustand"}, content.RSOC);


if (content.Ubat != null) {
    await setTagValue("hstUbat", {type: "number", title: "hst_Batteriespannung"}, content.Ubat);

if (content.Pac_total_W != null) {
    await setTagValue("hstPac_total_W", {type: "number", title: "hst_Reglerspannung"}, content.Pac_total_W);

  //var currentTemp = content.currentTemp/100;
    //var setTemp = content.currentSetpoint/100;
    //var states = Array("Comfort", "Thuis", "Slapen", "Weg");
    //var state = states[content.activeState];
    //if (content.activeState == -1) {
    //  state = "Not Set";

return true;

Thanks, but that is a regular GET request, not a websocket, is this for the same heatpump as Phil?

Hi Erick, thanks for the quick response. It may take me a little while to stub a server together, nodejs is not my speciality! However below is request and response to a number of request types. Hope this helps.
Thanks, Phil

Programming the Daikin Heatpump

Using websockets (test using chrome websocket client)

Connect to endpoint: ws://

To get room temperature - send:


Response looks like:


(note the “con”:22.000000000 which is the room temperature)

To find power state:






To find target temperature:




Outdoor temperature:




Turning unit on, off, and standby. First on:



Now off: (not sure this is a good idea!)



And standby:



Setting the target temperature:







That’s not the same as mine. Some Daikin kit (mainly air conditioners) use standard GET/POST. The low-temperature heat-pumps use a different LAN controller that is only accessible via websocket.



I think I’m trying to do something simple, but I’m also pretty simple since I can’t get it to work.

I have a pihole in my network and I want to temporarily disable it via a http request:

Am I at least looking in the right direction?

Nevermind … got it working. Just a simple get was sufficient. Tried this yesterday and it didn’t work, tried it now and it did?

I have a brain melt down. Am trying to set a better logic value out of a json. Have done several similar flows, but for this it never gets through. What should the JSONpath be if I want to set a logic value out of the ‘description’-string in this json? Think I have tried all possible alternatives.

I would expect $.messages[0].description