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
projects:sonoff [2016/09/19 18:54] – [Sharing] adm-janprojects:sonoff [2016/09/19 20:19] (current) – [Known Hosts / Ports] adm-jan
Line 87: Line 87:
 //Note:// Not all hosts were found defined in the app. Some where discovered by sniffing the network traffic and will differ depending on your location. //Note:// Not all hosts were found defined in the app. Some where discovered by sniffing the network traffic and will differ depending on your location.
  
-Description         ^ DNS Name          ^ IP Address      Protocol/Ports    ^ +Hostname               ^ IP-Address     DNS    ^ Port   ^ Protocol   ^ Usage              ^ Description                                         
-apiHost             | api.coolkit.cc, eu-api.coolkit.cc    | 52.29.61.50     8080              | +| eu-disp.coolkit.cc     | 52.29.61.50    TRUE   8081   HTTP       device == 1.5.0    | dispatch/register device online, receive WS host    | 
-httpServer          api.coolkit.cc    | 52.29.61.50     | HTTPS via 8080    | +| eu-disp.coolkit.cc     | 52.29.61.50    | TRUE   | 443    | HTTPS      | device >= 1.5.2    | dispatch/register device online, receive WS host    | 
-dispatchHost        disp.coolkit.cc   | n/a     8080              +iotgo.iteadstudio.com  52.29.48.55    | FALSE  | 8081   | WS         device == 1.5.0    | WebSocket to control the device from apps           
-websocketHost       long.coolkit.cc   n/a     8080              | +iot.itead.cn           52.29.48.55    FALSE  443    WSS        device >= 1.5.2    secWebSocket to control the device from apps      | 
-deviceDispatHost    disp.coolkit.cc   | n/a     443               | +| dl.itead.cn            | 52.28.103.75   | FALSE  8088   HTTP       device >= 1.5.0    OTA firmware download                               | 
-otaHost             | ota.coolkit.cc    n/a     | 8080              | +| eu-ota.coolkit.cc      52.28.103.75   | TRUE   | 80     | HTTP       app >= 2.1.19      Check for updated OTA firmware                      | 
-EU OTA Host         | eu-ota.coolkit.cc | 52.28.103.75     80, 8088              | +| eu-ota.coolkit.cc      | 52.28.103.75   TRUE   8080   HTTPS      | app >= ?           | OTA other / scene                                   | 
-Dispatch Host       | eu-disp.coolkit.cc | 52.29.61.50     8081              | +| eu-api.coolkit.cc      | 52.29.61.50    TRUE   8080   HTTPS      app >= ?           | http://iotgo.iteadstudio.com/api                    | 
-deviceDispatHost       n/a (iotgo.iteadstudio.com| 52.29.48.55     443              |+| 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 341:
 ==== 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 376: Line 379:
 //Notice:// The server used the provided email address of the recipient to lookup his user api key. //Notice:// The server used the provided email address of the recipient to lookup his user api key.
  
 +User-b accepts the invitation:
 +<file javascript user-b to server>
 +{
 +    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc",   # user api key from sender
 +    "deviceid": "10000xxxxx",                           # device id
 +    "error": 0,                                         # no error
 +    "result": 2,                                        # success
 +    "sequence": "1474273634539",                        # milliseconds
 +    "userAgent": "app"
 +}
 +</file>
 +
 +<file javascript server to user-a>
 +{
 +    "apikey": "6ffb86ec-2190-4ade-a6a9-7ead37a660fc",   # user api key from sender
 +    "deviceid": "10000xxxxx",                           # device id
 +    "error": 0,                                         # no error
 +    "result": 2,                                        # success
 +    "sequence": "1474273634539",                        # milliseconds
 +}
 +</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.1474311295.txt.gz · Last modified: 2016/09/19 18:54 by adm-jan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki