Hourk Savet: Difference between revisions

From UNamur InfoSec
Jump to navigation Jump to search
Line 1: Line 1:
== Research Topic ==
Design and implement mega hub for smart home


== Research Topic ==
== Research Topic ==
Line 4: Line 8:


==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]==
&nbsp;  &nbsp;  &nbsp;  1.    Make sure that the Raspberry Pi is connected to the internet and that you connected the IMST iC880A over USB. <br>
&nbsp;  &nbsp;  &nbsp;  2. Download of the Open Source Driver <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  a. Install git client: <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  sudo apt-get install git <br>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  b. Create local folder:


&nbsp;  &nbsp;  &nbsp;  1. Make sure the connections are the same network
&nbsp;  &nbsp;  &nbsp;  1. Make sure the connections are the same network
&nbsp;  &nbsp;  &nbsp;  2. Find IP of Hue on the network
&nbsp;  &nbsp;  &nbsp;  2. Find IP of Hue on the network
&nbsp;  &nbsp;  &nbsp;  3. Normally to connect Hue Bridge required to create username
&nbsp;  &nbsp;  &nbsp;  3. Normally to connect Hue Bridge required to create username
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; a. Create username in Hue
  <nowiki>->Post request: http://<Hue IP address>/api/; Example http://192.168.1.0/api/
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Address: http://<Hue IP address>/api/; Example http://192.168.1.0/api/
  ->Body: {"devicetype":"my_hue_app#iphone Savet"}
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Methode: POST
  ->Hue with return the message error in JSON formate "link button not pressed"
&nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Body: {"devicetype":"my_hue_app#iphone Savet"}
  ->Go to pressed link button on Hue
&nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp;  b. Hue with return the message error in JSON formate "link button not pressed"
  ->Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka
&nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;  c. Go to pressed link button on Hue
</nowiki>
&nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;  d. Send request again you will got success message from Hue with username ID; Example: pAH0aYzrouoeq3Kn0D8qV1js9QebHiy5lq7QPka
 
&nbsp;  &nbsp;  &nbsp;  4. Testing with Hue
4. Testing with Hue
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; a. Find lights by address "http://<Bridge ip address>/api/username/lights
  <nowiki>->Find lights by address "http://<Bridge ip address>/api/username/lights; Method GET"
&nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp; b. Method GET"
  ->You will got all lights are connected with Hue
&nbsp;  &nbsp;  &nbsp; &nbsp;  &nbsp; c. You will got all lights are connected with Hue
  ->Suppos I have a light with id "lamp1" than I want to open or close this light.
&nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp; d. Suppos I have a light with id "lamp1" than I want to open or close this light.
  1. Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"; Method GET  
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Find information of this light from address "http://<bridge ip address>/api/username/lights/light_id"; Method GET  
  2. Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state"; Method PUT; Body:{"on":false} </nowiki>
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; Turn on or turn off light: Address "http://<bridge ip address>/api/username/lights/light_id/state"; Method PUT; Body:{"on":false}

Revision as of 13:44, 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}