JSON POST with App "Simple HTTP Connector For Flows"


I am trying to to use a HTTP Request app to make a JSON POST.

I am able to get it working in a software called Fiddler Webdebugger and there it looks like this:

I create a HTTP Request flow card POST JSON
and put this in the first textbox at top:

and in the second box i put:

“authorization”: “Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9……….”,
“content-type”: “application/json”,
“host”: “”,
“Content-Length”: “62”,
“entity_id”: “light.hall_uppe_tak”,
“brightness”: “0”

But when i test it in Homey i get an error: “Unexpected token: in JSON at position 3”

Does anyone know what i am doing wrong?

Best Regards Jonas

If that is literally the JSON that you’re trying to post, the issue is with the fancy quote characters that it contains ( and ). Those should be plain quote characters (").

But that won’t fix your problem, because you’re also mixing headers and data, which is not how the HTTP app works.

You need to put this in the first box:

  "method": "post",
  "protocol": "http",
  "hostname": "",
  "port": 8123,
  "path": "/api/services/light/turn_on",
  "headers": {
    "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "content-type": "application/json",
    "host": ""

Possibly as a single line:

{"method":"post","protocol":"http","hostname":"","port":8123,"path":"/api/services/light/turn_on","headers":{"authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...","content-type":"application/json","host":""}}

And this in the second:

  "entity_id": "light.hall_uppe_tak",
  "brightness": 0

Single line:


And lastly: there are a few integrations that will help integrate Home Assistant with Homey so you don’t have to use HTTP requests to control HA-managed devices:

hoi hoi

Ik heb sinds dit weekend de wifi modulle en ben er mee aan het stoeien.
Nu probeer ik de ventilator via Json aan het aansturen bv
Nu lukt het me niet in een logica te krijgen voor m’n Homey 2019.
Kan iemand mij op weg helpen?