Hourk Savet: Difference between revisions
No edit summary |
|||
Line 9: | Line 9: | ||
==Test request and respond '''Hue Bridge''', Hue:[https://www2.meethue.com/en-us]== | ==Test request and respond '''Hue Bridge''', Hue:[https://www2.meethue.com/en-us]== | ||
1. Make sure the connections are the same network. < | 1. Make sure the connections are the same network. <br> | ||
2. Find IP of Hue on the network. | 2. Find IP of Hue on the network. <br> | ||
3. Normally to connect Hue Bridge required to create username. | 3. Normally to connect Hue Bridge required to create username. <br> | ||
a. Create username in Hue | a. Create username in Hue <br> | ||
Address: http://<Hue IP address>/api/; Example http://192.168.1.0/api/ | Address: http://<Hue IP address>/api/; Example http://192.168.1.0/api/ <br> | ||
Methode: POST | Methode: POST <br> | ||
Body: {"devicetype":"my_hue_app#iphone Savet"} | Body: {"devicetype":"my_hue_app#iphone Savet"} <br> | ||
b. Hue with return the message error in JSON formate "link button not pressed" | b. Hue with return the message error in JSON formate "link button not pressed" <br> | ||
c. Go to pressed link button on Hue | c. Go to pressed link button on Hue <br> | ||
d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka | d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka <br> | ||
4. Testing with Hue | 4. Testing with Hue <br> | ||
a. Find lights by address "http://<Bridge ip address>/api/username/lights | a. Find lights by address "http://<Bridge ip address>/api/username/lights <br> | ||
b. Method GET" | b. Method GET" <br> | ||
c. You will got all lights are connected with Hue | c. You will got all lights are connected with Hue <br> | ||
d. Suppos I have a light with id "lamp1" than I want to open or close this light. | d. Suppos I have a light with id "lamp1" than I want to open or close this light. <br> | ||
Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"; Method GET | Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"; Method GET <br> | ||
Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state"; Method PUT; Body:{"on":false} | Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state"; Method PUT; Body:{"on":false} <br> |
Revision as of 13:50, 23 February 2018
Research Topic
Design and implement mega hub for smart home
Research Topic
Design and implement mega hub for smart home
Test request and respond Hue Bridge, Hue:[1]
1. Make sure the connections are the same network.
2. Find IP of Hue on the network.
3. Normally to connect Hue Bridge required to create username.
a. Create username in Hue
Address: http://<Hue IP address>/api/; Example http://192.168.1.0/api/
Methode: POST
Body: {"devicetype":"my_hue_app#iphone Savet"}
b. Hue with return the message error in JSON formate "link button not pressed"
c. Go to pressed link button on Hue
d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka
4. Testing with Hue
a. Find lights by address "http://<Bridge ip address>/api/username/lights
b. Method GET"
c. You will got all lights are connected with Hue
d. Suppos I have a light with id "lamp1" than I want to open or close this light.
Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"; Method GET
Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state"; Method PUT; Body:{"on":false}