mirror of https://github.com/arendst/Tasmota.git
Document rewrite with code samples and Wifi names bolded, for clearer message.
parent
1d8cd1b2cd
commit
f8014d90a0
|
@ -1,36 +1,92 @@
|
|||
This is for the lazy people that don't want to open the device, don't want to install SDKs and don't want to compile stuff ;-). **Warning: Many of these components are very new, nothing is guaranteed to work, you might need to solder headers to recover from bugs here.**
|
||||
|
||||
# Prerequisites
|
||||
|
||||
You need
|
||||
* A standard WiFi
|
||||
* A different WiFi (which I created with a smartphone hotspot)
|
||||
* A PC or similar with python3 that can run SonOTA. On mac python3 etc can be installed like this:
|
||||
* Your **home** WiFi
|
||||
* **Temporary** WiFi (you can use smartphone hotspot) with following parameters:
|
||||
* SSID: indebuurt1
|
||||
* Password: VnsqrtnrsddbrN
|
||||
* NOTE: Please make sure hotspot uses exactly these parameters!
|
||||
* NOTE: This Wifi needs internet connectivity.
|
||||
* A PC or similar with python3 that can run SonOTA. On a Mac, python3 can be installed like this:
|
||||
```
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
brew install python3
|
||||
pip3 install tornado httplib2 netifaces
|
||||
```
|
||||
* You obviously need SonOTA:
|
||||
```
|
||||
mkdir ~/src/
|
||||
cd ~/src/
|
||||
git clone https://github.com/mirko/SonOTA.git
|
||||
pip3 -r requirements.txt
|
||||
```
|
||||
* You will also need prepackaged library of certificates and intermediate Espressif2Arduino firmwares:
|
||||
```
|
||||
cd ~/src/SonOTA
|
||||
wget -c http://cputoasters.com/ameyer/sonoff/sonota-e2a.zip
|
||||
unzip sonota-e2a.zip
|
||||
```
|
||||
* We're assuming you have at least one of the supported Sonoff devices, but make sure they are running latest Itead firmware. You can update firmware from EweLink. Make sure you run latest firmware, old firmware is known not to work with SonOTA! Really. Seriously. Honto!
|
||||
|
||||
It worked for me with these devices:
|
||||
* TH10
|
||||
* TH16
|
||||
* POW
|
||||
* T1 (use the left button to set the device to config mode)
|
||||
* Dual
|
||||
# Compatibility
|
||||
|
||||
Steps:
|
||||
* configure Sonoff using ewelink for local wifi and update the firmware. It does not work with old firmware. Really. You sometimes have to wait a few minutes for the update to be available in ewLink.
|
||||
* create wifi hotspot on smartphone for default indebuurt1/VnsqrtnrsddbrN. This needs internet connectivity.
|
||||
* on PC, extract sonota.py somwhere from the SonOTA project
|
||||
* extract http://cputoasters.com/ameyer/sonoff/sonota-e2a.zip in same dir, should create ssl and static dir (contains just a snakeoil ssl cert and the default compiled e2a binaries directly from the unmodified Espressif2Arduino source)
|
||||
* start sonota.py with your standard wifi SSID/PW and PC IP (eg ./sonota.py --wifi-ssid asdfasdf --wifi-password fidjfidfjidjf 192.168.123.123)
|
||||
* connect Sonoff, press button for 5s or so until it blinks in blocks of 3, then again 5s or so until it blinks continuously
|
||||
* connect to ITEAD-xxxx with PC
|
||||
* sonota should send some stuff
|
||||
* switch PC to standard Wifi
|
||||
* sonota should send more stuff
|
||||
* wait for a while, eg 2min, while the device is connecting to the standard wifi and downloading e2a (second part) / Tasmota
|
||||
* connect the pc to the hotspot indebuurt1 wifi
|
||||
* use `nmap 192.168.43.1-255 -p 80` or similar to find the IP of Tasmota minimal running on the device
|
||||
* use a web browser to connect, update to Tasmota standard and configure WiFi / MQTT etc
|
||||
It worked with these devices:
|
||||
* TH10 (reported by: )
|
||||
* TH16 (reported by: )
|
||||
* POW (reported by: )
|
||||
* T1 ((reported by: - use the left button to set the device to config mode)
|
||||
* Dual (reported by: lgnd33)
|
||||
* 4CH (reported by: lgnd33)
|
||||
|
||||
If there is a problem with hosting the compiled binaries of the unmodified e2a source, just tell me and I will take it down.
|
||||
# Steps:
|
||||
|
||||
* Start sonota.py with your **home** Wifi parameters and your PC IP
|
||||
```
|
||||
cd ~/src/SonOTA
|
||||
./sonota.py --wifi-ssid myhomewifi --wifi-password supersecredpassword 192.168.1.10
|
||||
```
|
||||
SonOTA should say something like:
|
||||
```
|
||||
** No ip address of the ITEAD DHCP range (10.10.7.0/24) is assigned to any of your interfaces, which means you don't appear to be connected to the IEAD WiFi network.
|
||||
** Please change into the ITEAD WiFi network (ITEAD-100001XXXX)
|
||||
** This application can be kept running.
|
||||
.......
|
||||
```
|
||||
* Sonnect Sonoff to mains, press button for 5s or so, until it blinks in blocks of 3, then again 5s or so until it blinks continuously. This will put Sonoff device in AP mode and will start ITEAD-xxxx wifi.
|
||||
* Connect your PC to ITEAD-xxxx wifi (password is always: 12345678)
|
||||
* Device and SonOTA will chat for a bit and you should see something ending with:
|
||||
```
|
||||
<< {
|
||||
"error": 0
|
||||
}
|
||||
~~ Provisioning completed
|
||||
** The IP address of <serve_host> (192.168.1.10) is not assigned to any interface on this machine.
|
||||
** Please change WiFi network to $ESSID and make sure %s is being assigned to your WiFi interface.
|
||||
** This application can be kept running.
|
||||
...
|
||||
```
|
||||
* Switch PC to your **home** Wifi. SonOTA should send more stuff, and all being OK, you should get something ending with:
|
||||
```
|
||||
(INFO) 200 GET /ota/image_user2-0x81000.bin?deviceid=xxxxxxxx2&ts=xxxxxxxx&sign=bbf6xxxxxxxx495dd2ef548d9bcddb83a319fd074d9a69a056 (192.168.1.4) 3073.26ms
|
||||
(DEBUG) << WEBSOCKET INPUT
|
||||
(DEBUG) << {
|
||||
"userAgent": "device",
|
||||
"sequence": "150393500xxxx",
|
||||
"error": 0,
|
||||
"apikey": "18ec4241-ee80-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
"deviceid": "xxxxxxxxxxxx"
|
||||
}
|
||||
(DEBUG) ~~~ device acknowledged our action request (seq 150393500xxxx) with error code 0
|
||||
```
|
||||
* Now, the device is connecting to your *temporary* Wifi and downloading minimal Sonoff-Tasmota image. This can take some time (2 minutes), after which device will reset and connect back to temporary Wifi.
|
||||
* Connect your PC to the *temporary* Wifi
|
||||
* Use NMAP to find the device's IP:
|
||||
```
|
||||
nmap 172.20.19.1-255 -p 80
|
||||
```
|
||||
* Use a web browser to connect to a new firmware on your device (note, we're not done yet ;)
|
||||
* Update to Tasmota standard image, either by using OTA via internet, or uploading image. Device will restart once again.
|
||||
* Still connected to *temporary* Wifi, login and change Wifi settings to your *home* Wifi. Device will reset.
|
||||
* Connect the PC to your *home* Wifi and find your new device.
|
||||
* You can now configure rest of the system, including correct device type, MQTT settings and everything else.
|
||||
|
|
Loading…
Reference in New Issue