Feature Request - Add a When-card for when a JSON is received

Issue #2 resolved
Former user created an issue

Hi Arie,

As we briefly discussed in the Homey Community, I would like to request a feature for the Homey JSON Handler app.

I have a Windows laptop and I have scheduled a task to run every few minutes. This task sends a Curl command to Homey. The Curl command is as follows:

CURL -X POST http://192.168.68.63/api/app/com.internet/Computers -H "Content-type:application/json" -d "{\"ComputerName\":\"%COMPUTERNAME%\",\"UserName\":\"%USERNAME%\",\"BatteryConnectionStatus\":\"%BatteryConnectionStatus%\",\"BatteryLifeRemaining\":\"%BatteryLifeRemaining%\"}"

As you can see the subject of this JSON is "Computers" and the first header is "ComputerName" and the value is a Windows variable I send with it. Obviously the name of the computer that sends the Curl command. I had to use "\" to escape the ".

I have a screenshot of the flow attached to this request. The HTTP Request App has a when-card which listens for an incoming POST request with the value "Computers". As you can see, when that happens I use the standard Homey Logic cards to dissect the JSON data. This data is supplied to a AVD called Laptop.

When the new Homey is available the HTTP Request app wont be supported (yet).

Is it possible for you to create a when-card that I can use for incoming POST or GET request?

Homey does offer a whenp-card when a webhook is received, but that doesn't seem to work. They do however have Then-cards which I use to read it as JSON.

Hope something like this is possible.

Thanks in advance.

Regards,

Dennis van Dinter

Comments (2)

  1. arie repo owner

    Hey Dinnes,

    Since hte new HP2023 has buildin HTTP Requests cards, i am closing this ticket.

    If thats not correct in your eyes, let me know.

  2. Log in to comment