todbot / blink1

Official software for blink(1) USB RGB LED by ThingM
https://blink1.thingm.com/
Other
953 stars 237 forks source link

How to send POST or GET to control blink(1)? #664

Closed two9seven closed 2 years ago

two9seven commented 2 years ago

I am hoping to control blink1 with POST and GET commands. Is this implemented?

todbot commented 2 years ago

Hi,

Could you provide more details? What application are you using to control blink(1)? There are many.

If this is about Blink1Control2, please file an issue in the Blink1Control2 repo.

If this is about blink1-tool, please file an issue in the blink1-tool repo.

If this is a general query, there are many ways to control blink(1) with HTTP requests. One way is with the blink1-tiny-server command-line program that's part of the blink1-tool repo. Another way is with the built-in HTTP REST API that's part of Blink1Control2 desktop app.

If you prefer NodeJs, you can try node-blink1-server. Many blink(1) customers write their own HTTP-to-blink(1) gateway using the language of their choice and the corresponding blink(1) API.

two9seven commented 2 years ago

Thanks for the quick reply! I'm using Blink1Control2 with the API server turned on. image

I am using Postman to test the POST Request which fails. I get a response from a GET request, however.

I am able to change the light with the Curl commands that are documented.

two9seven commented 2 years ago

Solved my own problem by using GET. Thanks anyway!

todbot commented 2 years ago

Awesome! Let me know if you have any other questions.