Control LEDs over the 'net example with Postman

Hello All,

I have been working through the Control LEDs over the 'net example. I am able to get my light to turn on and off using the html text provided and running it through a web browser. Next I wanted to see if I could get the example going in postman. I can do Get commands no problem, but I a struggling with the post.

Here is my code:

As you can see it returns a -1 which means it doesn’t recognize the “on” I am trying to send. Do I have the argument setup wrong? I am using the exact code from the guide.

Thank you!

First remove the args from the URL, then see what happens.

Same result:

“id”: “390035000447343233323032”,
“last_app”: “”,
“connected”: true,
“return_value”: -1

Have a look in this post how the request should be formed
Sending parameters to functions using Postman (not curl)

It’s important that you have your request x-www-form-urlencoded

I’ll try to find some time to test with my own devices and post a screenshot (tomorrow).

A screenshot would be awesome! I am sure I have something very small out of place, but I just can seem to figure it out. Thanks for the help!

This is how it should look like

Mark no double quotes in args since Postman already knows this will (has to) be a string and formats it correctly.

Thank you very much! You’re amazing.


This REALLY helped me too. Thanks!