- Documentation: http://www.developers.meethue.com/documentation/getting-started
- Useful Links: https://delicious.com/mathiasschopmans/hue
-
visit https://discovery.meethue.com/
- write down bridgeid (id)
- write down internalipaddress
-
visit
http://{internalipaddress}/debug/clip.html
-
Insert the following
Url: /api Body: {"devicetype":"Hue#Buildlamp"} Method: POST
When you press the POST button you should get back an error message letting you know that you have to press the link button. This is a security step so that only apps you want to control your lights can. By pressing the button on the bridge you prove that the user has physical access to the bridge.
Write the content of the JSON's success.username
down.
You can use the API with your username.
Try it with: GET /api/{username}
for example /api/27e5d1e28fefc571287bcfe2d481a63
- visit
http://www.meethue.com/en-US/api/gettoken?devicename=iPhone+5&appid=hueapp&deviceid={bridgeid}
- allow the app
- right click on “BACK TO THE APP” and write down ACCESSTOKEN inside the link it redirect to
phhueapp://sdk/login/**ACCESSTOKEN**
URL: https://www.meethue.com/api/sendmessage
Method: POST
Header: Content-Type=application/x-www-form-urlencoded
Parameters: token=**ACCESSTOKEN** (which you obtained earlier)
Body: clipmessage={ bridgeId: "**BRIDGEID**", clipCommand: { url: "/api/0/**APIENDPOINT**", method: "**METHOD**", body: **JSONCOMMAND** } }
BRIDGEID
is the same one you obtained earlierAPIENDPOINT
the same as official API/api/<username>/
by removing/api/<usename>/
partMETHOD
PUT/GET/POST/DELETE the same 4 method as official API.JSONCOMMAND
The actual command body for example{"on":true}
Current limitation is you cannot immediately know from the response whether your control command succeeded like the official API. All the response you get from calling the Sending Command Endpoint is pretty much always <200> if you are doing it correctly. But you can always pull all the status related to the Hue bridge from the getting status endpoint.
Hi! https://www.meethue.com/api/nupnp is deprecated. Use https://discovery.meethue.com/.
Source: https://developers.meethue.com/news/