projects:sonoff
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| projects:sonoff [2016/09/06 05:41] – [esptool.py] adm-jan | projects:sonoff [2016/09/19 20:19] (current) – [Known Hosts / Ports] adm-jan | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== tl;dr ===== | ===== tl;dr ===== | ||
| You could either configure a device with your own dispatch/ | You could either configure a device with your own dispatch/ | ||
| - | Or you could flash your own firmware using the OTA update mechanism. Currently both approaches are still theoretic. | + | Or you could flash your own firmware using the OTA update mechanism. |
| ===== Setup ===== | ===== Setup ===== | ||
| 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 | + | ^ Hostname |
| - | | apiHost | + | | eu-disp.coolkit.cc |
| - | | httpServer | + | | eu-disp.coolkit.cc |
| - | | dispatchHost | + | | iotgo.iteadstudio.com |
| - | | websocketHost | + | | iot.itead.cn |
| - | | deviceDispatHost | + | | dl.itead.cn |
| - | | otaHost | + | | eu-ota.coolkit.cc |
| - | | EU OTA Host | eu-ota.coolkit.cc | 52.28.103.75 | + | | eu-ota.coolkit.cc |
| - | | Dispatch Host | eu-disp.coolkit.cc | 52.29.61.50 | + | | eu-api.coolkit.cc |
| - | | deviceDispatHost | + | | alog.umeng.com |
| + | | eu-long.coolkit.cc | ||
| ==== libimobiledevice ==== | ==== libimobiledevice ==== | ||
| Line 316: | Line 317: | ||
| " | " | ||
| { | { | ||
| - | " | + | " |
| - | " | + | " |
| " | " | ||
| }, | }, | ||
| { | { | ||
| - | " | + | " |
| - | " | + | " |
| " | " | ||
| } | } | ||
| Line 338: | Line 339: | ||
| openssl dgst -sha256 / | openssl dgst -sha256 / | ||
| + | ==== Sharing ==== | ||
| + | |||
| + | 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 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/ | ||
| + | |||
| + | User-A sends an invitation message to User-B: | ||
| + | <file javascript user-a to server> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <file javascript server to user-b> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | //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> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <file javascript server to user-a> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | //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 ==== | ||
| Line 343: | Line 410: | ||
| I mirrored it here: {{: | I mirrored it here: {{: | ||
| ==== esptool.py ==== | ==== esptool.py ==== | ||
| - | If you ever messed around and maybe even bricked your device (like I did), use esptool to flash the firmware again: | + | If you ever messed around and maybe even bricked your device (like I did), you will need to solder and use esptool to flash the firmware again: |
| esptool.py --port / | esptool.py --port / | ||
| Line 349: | Line 416: | ||
| ==== Further reading ==== | ==== Further reading ==== | ||
| * [[http:// | * [[http:// | ||
| + | * {{ : | ||
| + | * {{ : | ||
| + | * {{ : | ||
projects/sonoff.1473140467.txt.gz · Last modified: by adm-jan
