I CHANGED EVERYTHING.... AGAIN!

blakadder 2019-04-08 21:27:31 +02:00
parent 2c9c669de8
commit d3c48b48cd
1 changed files with 87 additions and 9 deletions

@ -1,10 +1,88 @@
You've successfully uploaded the Sonoff-Tasmota firmware to your module.
You've successfully flashed your device with a downloaded binary of Tasmota but now you need to connect the tasmotised device to your Wi-Fi network.
1. Connect to (AC) power (Serial **NOT** connected)
2. If your WiFi was not set prior compile as described in [Upload](Upload#hints) section, configure Wifi by using one of the provided configuration modes: [Button Usage](Button-Usage) or use WPS if your router supports it.
3. Connect to the device webpage (http://\[device-ip]\/cn) NOTE: Replace [device-ip] with actual IP address of your device.
4. Select the correct module type from the configuration frontend. If your device is not listed, a [user contributed device template](User-created-templates) ([explanation](Templates)) may be available. If a [template](User-created-templates) is not available, follow the [procedure for configuring new devices](Configuration-Procedure-for-New-Devices).
5. Configure [MQTT](MQTT): broker connection, choose a unique topic (e.g. "sonoff-kitchenlight")
6. Test communication with the MQTT client of your choice
7. Integrate with the Control interface or home automation solution of your choice
8. Test your device for some time at the intended maximum intensity, check for [overheating](Thermal-considerations) and if necessary, apply some limits in your home automation solution.
# Using Web UI
## Configure Wi-Fi
Tasmota provides a wireless access point for easy Wi-Fi configuration.
>*If you flashed using Tuya Convert this is the only option to set up your device.*
<img alt="Sonoff AP" src="https://user-images.githubusercontent.com/5904370/55740053-9bc4c100-5a2a-11e9-8465-bf8e65cf0961.png" align="right" height=120></img>
Connect your device to a power source and grab your smartphone (or tablet or laptop or any other web and Wi-Fi capable device). Search for a Wi-Fi AP named **sonoff-xxxx** (where **x** is a number) and connect to it. *In this example the Wi-Fi AP is named **sonoff-7718**.*
> *Wi-Fi manager server is active for only 3 minutes. If you miss the window you might have to disconnect your device from power and reconnect.*
<img alt="Sign in to Wi-Fi Network" src="https://user-images.githubusercontent.com/5904370/55741159-e2b3b600-5a2c-11e9-96f1-94659092563e.png" align="right" width=280></img>
After you have connected to the Tasmota Wi-Fi AP open http://192.168.4.1 in a web browser.
Some devices might prompt you to *sign in to Wi-Fi network* which should also open the above address.
<img alt="Sonoff AP" src="https://user-images.githubusercontent.com/5904370/55742570-47244480-5a30-11e9-9d1b-6911f051564a.png" align="right" height="350"></img>
At this page enter the following:
**AP1 SSid** - your Wi-Fi network name<br>
>SSID's are case sensitive
**AP1 Password** - password for your Wi-Fi AP<br>
>Wi-Fi password has to be under 32 characters and without special characters (e.g. asterisks) or white spaces
*Optional:*<br>
**AP2 SSid** - alternative Wi-Fi network SSID<br>
**AP2 Password** - password for your alternative Wi-Fi AP
>*If you're not using a second Wi-Fi network you can enter an SSID without a password you can connect to as a backup in case something went wrong with your Wi-Fi credentials.*
~~Double~~ Triple check the Wi-Fi credentials and click on **Save** to apply the settings. Device will restart and connect to your home network.
## Configure MQTT
Look in your router for a newly connected device with the same name as the Wi-Fi access point. *(In this example **sonoff-7718**.)*
If you don't have access to your router you can find your newly flashed device with an IP scanner:
* [Fing](https://www.fing.com/products/) - for Android or iOS
* [Angry IP Scanner](https://angryip.org/) - open source for Linux, Windows and Mac. Requires Java.
Open the IP address with your web browser and you have full access to Tasmota.
Now is the time to set up [MQTT](MQTT) and the last remaining, but equally important, step:
## Configure module or template
Configure your device using [Templates](Templates) in **Configuration - Configure Template** or [Modules](Supported-Modules) in **Configuration - Configure Module**.
Your device running Tasmota is now ready to be [controlled](Commands), [automated](Rules) or [integrated](Home-Automation-Integrations) in your smart home solution.
# Using Serial Terminal
If you flashed the device using serial-to-USB adapter (or it is a NodeMCU/D1 mini) you can take advantage of the existing connection and configure your device over the serial connection using [Commands](commands).
First you will need a [Serial Terminal](Prerequisites#serial-terminal) program.
*In this example [Termite](https://www.compuphase.com/software_termite.htm) on Windows is used.*
Download Termite and extract the .exe file, no installation necessary. Connect your serial-to-USB adapter or NodeMCU/D1 mini to the computer.
![Termite setup](https://user-images.githubusercontent.com/5904370/55745914-abe39d00-5a38-11e9-91d8-1b8e16ed34d3.png)
Open Termite and set it to the proper COM port (*Termite selects the first available port by default*).
Set Baud rate to 115200 and Forward to none.
![First boot](https://user-images.githubusercontent.com/5904370/55746947-5e1c6400-5a3b-11e9-871f-11ac80e40205.png)
Connect your device to the serial-to-USB adapter. You should see the initial boot output in Termite.
If your screen is empty type `status` in the bottom command bar and hit enter. If you get a return message from your device similar to the one displayed under purple `status` you're all set.
To configure Tasmota you need to issue commands, some commands will reboot your device and to avoid that we will use the `Backlog` command feature.
Configure your Wi-Fi network and a secondary Wi-Fi network
```lua
Backlog ssid1 <yourssid>; password1 <your_password>; ssid2 <your_ssid2>; password2 <your_password>
```
![After restart](https://user-images.githubusercontent.com/5904370/55748616-69718e80-5a3f-11e9-8b58-4d15c1816e71.png)
Device will restart and connect to your network. It will display your devices newly assigned IP. Direct your web browser to that IP address to access the Web UI for further configuration and contol.
Configure MQTT broker address, MQTT credentials, unique device topic and OTA url to the latest official release
```
Backlog mqtthost <yourhost>; mqttuser <user>; mqttpassword <password>; topic <unique_topic>; otaurl http://thehackbox.org/tasmota/release/sonoff.bin
```
>*Keep your personal configuration in a text file and simply copy and paste the backlog commands to a newly flashed device.*
Commands and Backlog are powerful and in time you can learn to configure almost everything (NTP servers, longitude and latitude, custom device options, etc) with a few copy and paste moves.
Your device is connected to your network and to the MQTT broker. One last thing to do is configure your device using [Templates](Templates) in **Configuration - Configure Template** or [Modules](Supported-Modules) in **Configuration - Configure Module**.