Hourk Savet: Difference between revisions

From UNamur InfoSec
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:
&nbsp;  &nbsp;  &nbsp;  3. Normally to connect Hue Bridge required to create username. <br>
&nbsp;  &nbsp;  &nbsp;  3. Normally to connect Hue Bridge required to create username. <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  a. Create username in Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  a. Create username in Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Address: http://<Hue IP address>/api/; Example http://192.168.1.0/api/ <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; <nowiki>Address:http://<Hue IP address>/api/; Example http://192.168.1.0/api/ </nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Methode: POST <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Methode: POST <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Body: {"devicetype":"my_hue_app#iphone Savet"} <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; <nowiki>Body: {"devicetype":"my_hue_app#iphone Savet"}</nowiki> <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  b. Hue with return the message error in JSON formate "link button not pressed" <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  b. Hue with return the message error in JSON formate "link button not pressed" <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  c. Go to pressed link button on Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  c. Go to pressed link button on Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka <br>
&nbsp;  &nbsp;  &nbsp;  4. Testing with Hue <br>
&nbsp;  &nbsp;  &nbsp;  4. Testing with Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; a. Find lights by address "http://<Bridge ip address>/api/username/lights <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; a. Find lights by <nowiki>address "http://<Bridge ip address>/api/username/lights</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; b. Method GET" <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; b. <nowiki>Method GET"</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; c. You will got all lights are connected with Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; c. You will got all lights are connected with Hue <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; d. Suppos I have a light with id "lamp1" than I want to open or close this light. <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; d. Suppos I have a light with id "lamp1" than I want to open or close this light. <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  i. Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id" <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  i. Find information of this light from <nowiki>address "http://<bridge ip address>/api/username/lights/light_id"</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  ii. Method GET <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  ii. <nowiki>Method GET</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  iii. Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state" <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  iii. Turn on or turn off light: <nowiki>address "http://<bridge ip address>/api/username/lights/light_id/state"</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  iv. Method PUT <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  iv. <nowiki>Method PUT</nowiki><br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  v. Body:{"on":false} <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  v. <nowiki>Body:{"on":false}</nowiki><br>

Revision as of 14:03, 23 February 2018

Research Topic

Design and implement Mega Hub

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.
              i. Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"
              ii. Method GET
              iii. Turn on or turn off light: address "http://<bridge ip address>/api/username/lights/light_id/state"
              iv. Method PUT
              v. Body:{"on":false}