User Tools

Site Tools


projects:sonoff

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
projects:sonoff [2016/09/19 18:57] – [Sharing] adm-janprojects:sonoff [2016/09/19 20:18] – [Known Hosts / Ports] adm-jan
Line 97: Line 97:
 | Dispatch Host       | eu-disp.coolkit.cc | 52.29.61.50     | 8081              | | Dispatch Host       | eu-disp.coolkit.cc | 52.29.61.50     | 8081              |
 | deviceDispatHost       | n/a (iotgo.iteadstudio.com) | 52.29.48.55     | 443              | | deviceDispatHost       | n/a (iotgo.iteadstudio.com) | 52.29.48.55     | 443              |
 +
 +^ Hostname               ^ IP-Address     ^ DNS    ^ Port   ^ Protocol   ^ Usage              ^ Description                                         ^
 +| eu-disp.coolkit.cc     | 52.29.61.50    | TRUE   | 8081   | HTTP       | device == 1.5.0    | dispatch/register device online, receive WS host    |
 +| eu-disp.coolkit.cc     | 52.29.61.50    | TRUE   | 443    | HTTPS      | device >= 1.5.2    | dispatch/register device online, receive WS host    |
 +| iotgo.iteadstudio.com  | 52.29.48.55    | FALSE  | 8081   | WS         | device == 1.5.0    | WebSocket to control the device from apps           |
 +| iot.itead.cn           | 52.29.48.55    | FALSE  | 443    | WSS        | device >= 1.5.2    | sec. WebSocket to control the device from apps      |
 +| dl.itead.cn            | 52.28.103.75   | FALSE  | 8088   | HTTP       | device >= 1.5.0    | OTA firmware download                               |
 +| eu-ota.coolkit.cc      | 52.28.103.75   | TRUE   | 80     | HTTP       | app >= 2.1.19      | Check for updated OTA firmware                      |
 +| eu-ota.coolkit.cc      | 52.28.103.75   | TRUE   | 8080   | HTTPS      | app >= ?           | OTA other / scene                                   |
 +| eu-api.coolkit.cc      | 52.29.61.50    | TRUE   | 8080   | HTTPS      | app >= ?           | http://iotgo.iteadstudio.com/api                    |
 +| alog.umeng.com         | 110.173.196.36 | TRUE   | 80     | HTTP       | app >= 2.1.19      | Used for user tracking                              |
 +| eu-long.coolkit.cc     | 52.29.48.55    | TRUE   | 8080   | WSS        | app >= 2.1.19      | sec. WebSocket to control devices from app          |
  
 ==== libimobiledevice ==== ==== libimobiledevice ====
Line 340: Line 352:
 ==== Sharing ==== ==== Sharing ====
  
-Once you have registered a device in your account you have the option to share it to other accounts+Once you have registered a device in your account you have the option to share it to an other account
-To share a device both users need to be online. UserA initiates the process and UserB has to accept it.+To share a device both users need to be online at the same time. 
 +User-A initiates the process and User-B has to accept it
 +The whole process is carried out via WebSocket (secure/unsecure depending on your firmware).
  
-User-A sends message to the server:+User-A sends an invitation message to User-B:
 <file javascript user-a to server> <file javascript user-a to server>
 { {
Line 379: Line 393:
 <file javascript user-b to server> <file javascript user-b to server>
 { {
-    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc", +    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc",   # user api key from sender 
-    "deviceid": "10000xxxxx", +    "deviceid": "10000xxxxx",                           # device id 
-    "error": 0, +    "error": 0,                                         # no error 
-    "result": 2, +    "result": 2,                                        # success 
-    "sequence": "1474273634539",+    "sequence": "1474273634539",                        # milliseconds
     "userAgent": "app"     "userAgent": "app"
 } }
 </file> </file>
  
-<file javascript server to user a>+<file javascript server to user-a>
 { {
-    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc", +    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc",   # user api key from sender 
-    "deviceid": "10000xxxxx", +    "deviceid": "10000xxxxx",                           # device id 
-    "error": 0, +    "error": 0,                                         # no error 
-    "result": 2, +    "result": 2,                                        # success 
-    "sequence": "1474273634539",+    "sequence": "1474273634539",                        # milliseconds
 } }
 </file> </file>
 +
 +//Notice:// The sharing process is dealt out between two users and the server. The server is the router here.
 +If a device is not shared with your account, the server will not route through messages to the device.
 +On the other hand, the device does //not// know anything about it's owner or who is allowed to control it.
 +**Nothing holds you back from directly talking to a Sonoff device. It will accept any command from anyone.**
 ===== ESP8266 ===== ===== ESP8266 =====
 ==== Sonoff firmware ==== ==== Sonoff firmware ====
projects/sonoff.txt · Last modified: 2016/09/19 20:19 by adm-jan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki