sonoff references to tasmota

blakadder 2019-11-04 01:30:35 +01:00
parent d9760a07bd
commit e48839b7b0
54 changed files with 285 additions and 293 deletions

@ -259,7 +259,7 @@ Type the following command: `TLSKey`
```
hh:mm:ss CMD: TLSKey
hh:mm:ss MQT: stat/sonoff/RESULT = {"TLSKey1":-1,"TLSKey2":-1}
hh:mm:ss MQT: stat/tasmota/RESULT = {"TLSKey1":-1,"TLSKey2":-1}
```
If both values are `-1`, it means it does not contain any key.
@ -287,7 +287,7 @@ Cut and paste the command starting with `TLSKey1 ...` into the Tasmota Web Conso
```
hh:mm:ss CMD: TLSKey1 UvBgyCuPr/lKSgwumf/8o/mIsKQPBHn3ZZAGZl4ui9E=
hh:mm:ss MQT: stat/sonoff/RESULT = {"TLSKey1":32,"TLSKey2":-1}
hh:mm:ss MQT: stat/tasmota/RESULT = {"TLSKey1":32,"TLSKey2":-1}
```
Alternative method:
@ -330,7 +330,7 @@ Copy and paste the last line starting with `TLSKey2 ...` into the Web Tasmota Co
```
hh:mm:ss CMD: TLSKey2 MIICfTCCAWWgAwIBAgIUMPd6KefJYqwIHxzgCk1kEXIjHhkwDQYJKoZIhvcNAQELBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20gSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDgwNDE5MjI1NVoXDTQ5MTIzMTIzNTk1OVowDTELMAkGA1UEBhMCRVUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASCzFZFhPXBbr6G6gbhT/rGXROhN5AHdwhxfpY55xi3c1W3TBuvUdZYdU2Urc9t4ces9Nz3UcF1xfMBvIpVqMVco2AwXjAfBgNVHSMEGDAWgBT3n7seZ1eHUIcZCcuwn0fkEad77TAdBgNVHQ4EFgQUUruspk3ohBJB8buA8qq9kQIZUs0wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQ
hh:mm:ss MQT: stat/sonoff/IR2/RESULT = {"TLSKey1":32,"TLSKey2":641}
hh:mm:ss MQT: stat/tasmota/IR2/RESULT = {"TLSKey1":32,"TLSKey2":641}
```
You need to check that both values are not "-1". The value for "TLSKey1" should always be 32. The value for "TLSKey2" varies depending on several parameters, and should be within the 640-700 bytes range.
@ -389,9 +389,9 @@ Here is an example of output you should see:
21:28:25 MQT: AWS IoT endpoint: xxxxxxxxxxxxx-ats.iot.eu-central-1.amazonaws.com
21:28:26 MQT: AWS IoT connected in 1279 ms
21:28:26 MQT: Connected
21:28:26 MQT: tele/sonoff/LWT = Online
21:28:26 MQT: cmnd/sonoff/POWER =
21:28:26 MQT: tele/sonoff/INFO1 = {"Module":"Sonoff Basic","Version":"6.5.0.14(sonoff)","FallbackTopic":
21:28:26 MQT: tele/tasmota/LWT = Online
21:28:26 MQT: cmnd/tasmota/POWER =
21:28:26 MQT: tele/tasmota/INFO1 = {"Module":"Sonoff Basic","Version":"6.5.0.14(sonoff)","FallbackTopic":
"cmnd/DVES_67B1E9_fb/","GroupTopic":"sonoffs"}
```

@ -7,7 +7,7 @@ Ambient Light Sensor IC](http://cpre.kmutnb.ac.th/esl/learning/bh1750-light-sens
| BH1750 | ESP8266 |
|---|---|
|GND |GND
|VCC |5V
|VCC |3.3V
|SDA | GPIOx
|SCL | GPIOy

@ -62,7 +62,7 @@ To enable additional shutters, `ShutterRelay<x> <value>` must be executed for ea
Disabling a shutter in the middle of the defined set of shutters will disable all other higher numbered shutters. If the disabled shutter is restored, the higher numbered shutters previously declared will also be restored. When a shutter is added or removed, a list of the active shutters, with their parameters, is output to the log. If you intend to remove shutters, explicitly remove each one beginning with the highest numbered shutter.
With four shutters, eight `Relay<x>` components are needed. If manual operation switches (`Switch<x>` or `Button<x>` pairs) are also used, additional input GPIO are required. The ESP82xx device may not have enough free GPIO to support all the shutter connections required. A GPIO expander such as a PCF8574 or MCP230xx can be used.
With four shutters, eight `Relay<x>` components are needed. If manual operation switches (`Switch<x>` or `Button<x>` pairs) are also used, additional input GPIO are required. The ESP82xx device may not have enough free GPIO to support all the shutter connections required. A GPIO expander such as a PCF8574 or [MCP230xx](MCP230xx) can be used.
Using manual operation `Switch<x>` pairs may require setting `SwitchMode<x> 4` (inverse follow) for proper switch behavior.
@ -143,7 +143,7 @@ If more than one shutter is configured, it is not possible to know which shutter
Examples:
- Publish a message with the position of the shutter:
`Rule1 ON Shutter1#Position DO Publish status/<topic>/level {"%value%"} ENDON`
`Rule1 ON Shutter1#Position DO Publish status/%topic%/level {"%value%"} ENDON`
- Open/Close or set a specific position for a shutter. This example drives the second shutter to the same position as the first shutter:
`Rule1 ON Shutter1#Position DO ShutterPosition2 %value%" ENDON`
@ -158,14 +158,14 @@ The configuration requirements changed starting with Home Assistant version 0.82
cover:
- platform: mqtt
name: "Balcony Blinds"
availability_topic: "tele/<topic>/LWT"
availability_topic: "tele/%topic%/LWT"
payload_available: "Online"
payload_not_available: "Offline"
position_topic: stat/<topic>/Shutter1
position_topic: stat/%topic%/Shutter1
position_open: 100
position_closed: 0
set_position_topic: "cmnd/<topic>/ShutterPosition1"
command_topic: "cmnd/<topic>/Backlog"
set_position_topic: "cmnd/%topic%/ShutterPosition1"
command_topic: "cmnd/%topic%/Backlog"
payload_open: "ShutterOpen1"
payload_close: "ShutterClose1"
payload_stop: "ShutterStop1"
@ -180,9 +180,9 @@ Another Home Assistant integration example:
cover:
- platform: mqtt
name: "Test"
availability_topic: "tele/<topic>/LWT"
state_topic: "stat/<topic>/RESULT"
command_topic: "cmnd/<topic>/Backlog"
availability_topic: "tele/%topic%/LWT"
state_topic: "stat/%topic%/RESULT"
command_topic: "cmnd/%topic%/Backlog"
value_template: '{{ value | int }}'
qos: 1
retain: false
@ -194,9 +194,9 @@ cover:
payload_available: "Online"
payload_not_available: "Offline"
optimistic: false
tilt_command_topic: 'cmnd/<topic>/ShutterPosition1'
tilt_status_topic: 'cmnd/<topic>/ShutterPosition1'
set_position_topic: 'cmnd/<topic>/ShutterPosition1'
tilt_command_topic: 'cmnd/%topic%/ShutterPosition1'
tilt_status_topic: 'cmnd/%topic%/ShutterPosition1'
set_position_topic: 'cmnd/%topic%/ShutterPosition1'
position_topic: "stat/sonoff-cletto/SHUTTER1"
tilt_min: 0
tilt_max: 100
@ -215,19 +215,19 @@ cover:
open_cover:
service: mqtt.publish
data:
topic: 'cmnd/<topic>/ShutterOpen1'
topic: 'cmnd/%topic%/ShutterOpen1'
close_cover:
service: mqtt.publish
data:
topic: 'cmnd/<topic>/ShutterClose1'
topic: 'cmnd/%topic%/ShutterClose1'
stop_cover:
service: mqtt.publish
data:
topic: 'cmnd/<topic>/shutterstop1'
topic: 'cmnd/%topic%/shutterstop1'
set_cover_position:
service: mqtt.publish
data_template:
topic: 'cmnd/<topic>/ShutterPosition1'
topic: 'cmnd/%topic%/ShutterPosition1'
payload: '{{position}}'
```
@ -250,9 +250,9 @@ SHT: Position in: payload 0, index 1, source 7
SHT: lastsource 7:, realpos 20000, target 0, payload 0
SHT: Start shutter in direction -1
SRC: Shutter
MQT: stat/<topic>/RESULT = {"POWER2":"ON"}
MQT: stat/<topic>/POWER2 = ON
MQT: stat/<topic>/RESULT = {"ShutterClose1":0}
MQT: stat/%topic%/RESULT = {"POWER2":"ON"}
MQT: stat/%topic%/POWER2 = ON
MQT: stat/%topic%/RESULT = {"ShutterClose1":0}
SHT: Shutter 0: Real Pos: 19000, Target 0, source: Shutter, start-pos: 100 %, direction: -1, rtcshutter: 0.5 [s]
CFG: Saved to flash at F5, Count 725, Bytes 4096
SHT: Shutter 0: Real Pos: 17000, Target 0, source: Shutter, start-pos: 100 %, direction: -1, rtcshutter: 1.5 [s]
@ -265,11 +265,11 @@ SHT: Shutter 0: Real Pos: 5000, Target 0, source: Shutter, start-pos: 100 %, dir
SHT: Shutter 0: Real Pos: 3000, Target 0, source: Shutter, start-pos: 100 %, direction: -1, rtcshutter: 8.5 [s]
SHT: Shutter 0: Real Pos: 1000, Target 0, source: Shutter, start-pos: 100 %, direction: -1, rtcshutter: 9.5 [s]
SHT: Shutter 0: Real Pos. 0, Stoppos: 0, relay: 1, direction -1, pulsetimer: 0, rtcshutter: 10.1 [s], operationtime 0
MQT: stat/<topic>/SHUTTER1 = 0
MQT: stat/%topic%/SHUTTER1 = 0
SRC: Shutter
MQT: stat/<topic>/RESULT = {"POWER2":"OFF"}
MQT: stat/<topic>/POWER2 = OFF
MQT: tele/<topic>/RESULT = {"Shutter1":{"Position":0,"direction":0}}
MQT: stat/%topic%/RESULT = {"POWER2":"OFF"}
MQT: stat/%topic%/POWER2 = OFF
MQT: tele/%topic%/RESULT = {"Shutter1":{"Position":0,"direction":0}}
CFG: Saved to flash at F4, Count 726, Bytes 4096
....
CMD: ShutterPosition 50
@ -278,9 +278,9 @@ SHT: Position in: payload 50, index 1, source 23
SHT: lastsource 23:, realpos 0, target 10000, payload 50
SHT: Start shutter in direction 1
SRC: Shutter
MQT: stat/<topic>/RESULT = {"POWER1":"ON"}
MQT: stat/<topic>/POWER1 = ON
MQT: stat/<topic>/RESULT = {"ShutterPosition1":50}
MQT: stat/%topic%/RESULT = {"POWER1":"ON"}
MQT: stat/%topic%/POWER1 = ON
MQT: stat/%topic%/RESULT = {"ShutterPosition1":50}
SHT: Shutter 0: Real Pos: 1500, Target 10000, source: Shutter, start-pos: 0 %, direction: 1, rtcshutter: 0.8 [s]
CFG: Saved to flash at FB, Count 727, Bytes 4096
SHT: Shutter 0: Real Pos: 3500, Target 10000, source: Shutter, start-pos: 0 %, direction: 1, rtcshutter: 1.8 [s]
@ -288,10 +288,10 @@ SHT: Shutter 0: Real Pos: 5500, Target 10000, source: Shutter, start-pos: 0 %, d
SHT: Shutter 0: Real Pos: 7500, Target 10000, source: Shutter, start-pos: 0 %, direction: 1, rtcshutter: 3.7 [s]
SHT: Shutter 0: Real Pos: 9500, Target 10000, source: Shutter, start-pos: 0 %, direction: 1, rtcshutter: 4.7 [s]
SHT: Shutter 0: Real Pos. 10000, Stoppos: 50, relay: 0, direction 1, pulsetimer: 0, rtcshutter: 5.0 [s], operationtime 2
MQT: stat/<topic>/SHUTTER1 = 50
MQT: stat/%topic%/SHUTTER1 = 50
SRC: Shutter
MQT: stat/<topic>/RESULT = {"POWER1":"OFF"}
MQT: stat/<topic>/POWER1 = OFF
MQT: tele/<topic>/RESULT = {"Shutter1":{"Position":50,"direction":0}}
MQT: stat/%topic%/RESULT = {"POWER1":"OFF"}
MQT: stat/%topic%/POWER1 = OFF
MQT: tele/%topic%/RESULT = {"Shutter1":{"Position":50,"direction":0}}
CFG: Saved to flash at FA, Count 728, Bytes 4096
```

@ -7,16 +7,16 @@ The binary files available on [GitHub](https://github.com/arendst/Tasmota/releas
Features that are not available in any release build have to be enabled in source code and compiled yourself. Read more about [compiling your own build](compile-your-build).
## Firmware Variants
- **sonoff.bin** *(sonoff)* supports most features. **THIS IS THE RECOMMENDED BINARY**
**sonoff-BG.bin** to **sonoff-TW.bin** the same features as _sonoff.bin_ with localized language support. *(Note: sonoff-UK.bin is for the Ukrainian language)*
- **sonoff-basic.bin** *(bas)* addresses a problem with some Sonoff Basics that lack sufficient electrical power (due to its poor design) to properly run the electronics. In this firmware variant, most sensors are disabled to minimize background tasks. This reduces the required CPU cycles in order to reduce power draw to allow the device to run reliably.
>This is the pre-compiled Tasmota binary that comes bundled within the Tuya-Convert package when you install their OTA flashing tool. If you used Tuya-Convert to flash your device, it is strongly recommended to update to `sonoff.bin`. Otherwise some crucial features (e.g., energy monitoring, auto-discovery, etc.) will not work.
- **sonoff-classic.bin** **!DISCONTINUED SINCE v6.7.0!** *(cla)* stripped down version but it allows initial installation using either [Wi-Fi Manager](Initial-Configuration#configure-wi-fi), [WPS](https://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup) or [ESP8266 SmartConfig](http://techiesms.com/iot-projects/now-no-need-enter-ssid-name-password-inside-code-esp8266-smart-config/).
- **sonoff-minimal.bin** *(min)* is a specialised build to subsequently allow OTA uploads. ***This version should NOT be used for initial installation!***
- **sonoff-sensors.bin** *(sns)* enables the same features as _sonoff.bin_ and includes support for additional sensors
- **sonoff-knx.bin** *(knx)* includes [KNX](KNX-Features) support but omits some features. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)).
- **sonoff-display.bin** *(dsp)* built for connecting displays but omits some features such as energy monitoring. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)).
- [**sonoff-ir.bin**](Tasmota-IR) *(ir)* provides almost all `IRremoteESP8266` protocols. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)) to compile [`ircustom`](Tasmota-IR).
- **tasmota.bin** *(sonoff)* supports most features. **THIS IS THE RECOMMENDED BINARY**
**tasmota-BG.bin** to **tasmota-TW.bin** the same features as _tasmota.bin_ with localized language support. *(Note: tasmota-UK.bin is for the Ukrainian language)*
- **tasmota-basic.bin** *(bas)* addresses a problem with some Sonoff Basics that lack sufficient electrical power (due to its poor design) to properly run the electronics. In this firmware variant, most sensors are disabled to minimize background tasks. This reduces the required CPU cycles in order to reduce power draw to allow the device to run reliably.
>This is the pre-compiled Tasmota binary that comes bundled within the Tuya-Convert package when you install their OTA flashing tool. If you used Tuya-Convert to flash your device, it is strongly recommended to update to `tasmota.bin`. Otherwise some crucial features (e.g., energy monitoring, auto-discovery, etc.) will not work.
- **tasmota-classic.bin** **!DISCONTINUED SINCE v6.7.0!** *(cla)* stripped down version but it allows initial installation using either [Wi-Fi Manager](Initial-Configuration#configure-wi-fi), [WPS](https://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup) or [ESP8266 SmartConfig](http://techiesms.com/iot-projects/now-no-need-enter-ssid-name-password-inside-code-esp8266-smart-config/).
- **tasmota-minimal.bin** *(min)* is a specialised build to subsequently allow OTA uploads. ***This version should NOT be used for initial installation!***
- **tasmota-sensors.bin** *(sns)* enables the same features as _tasmota.bin_ and includes support for additional sensors
- **tasmota-knx.bin** *(knx)* includes [KNX](KNX-Features) support but omits some features. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)).
- **tasmota-display.bin** *(dsp)* built for connecting displays but omits some features such as energy monitoring. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)).
- [**tasmota-ir.bin**](Tasmota-IR) *(ir)* provides almost all `IRremoteESP8266` protocols. If you need additional features, compile your own firmware (e.g., [Gitpod](Compiling-Tasmota-on-Gitpod)) to compile [`ircustom`](Tasmota-IR).
|Feature/Sensor|sonoff|bas|cla|min|sns|knx|dsp|ir|
|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|

@ -3,21 +3,21 @@
>If you [have changed](#Changing-default-button-functionality) [ButtonTopic](commands#buttontopic), [SetOption1](commands#setoption1), [SetOption11](commands#setoption11) or [SetOption13](commands#setoption13) some of the listed functionality will be changed or removed.
### 1 short press
Toggles the relay. This will blink the LED twice and send an MQTT status message like ```stat/sonoff/POWER1 ON```. If ```cmnd/sonoff/ButtonRetain on``` has been used the MQTT message will also contain the MQTT retain flag.
Toggles the relay. This will blink the LED twice and send an MQTT status message like ```stat/tasmota/POWER1 ON```. If ```cmnd/tasmota/ButtonRetain on``` has been used the MQTT message will also contain the MQTT retain flag.
### 2 short presses
Toggles the second relay (if available on the device). This will blink the LED twice and send an MQTT status message like ```stat/sonoff/POWER2 on```.
Toggles the second relay (if available on the device). This will blink the LED twice and send an MQTT status message like ```stat/tasmota/POWER2 on```.
> Since version 6.5.0.14. any device with more than one power output can be configured to act on a double press to switch the second relay (or for Blitzwolf SHP5 the USB power). To be sure not to activate accidental three button press it is wise to set `SetOption1 1`.
### 3 short presses
Start Wi-Fi smart config allowing for SSID and password configuration using an Android mobile phone with the [ESP8266 SmartConfig](https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch) app. The LED will blink during the config period. A single button press during this period will abort and restart the device. **Only in sonoff-classic.bin**
Start Wi-Fi smart config allowing for SSID and password configuration using an Android mobile phone with the [ESP8266 SmartConfig](https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch) app. The LED will blink during the config period. A single button press during this period will abort and restart the device. **Only in tasmota-classic.bin**
### 4 short presses
Start Wi-Fi manager providing an Access Point with IP address 192.168.4.1 and a web server allowing the configuration of Wi-Fi. The LED will blink during the config period. A single button press during this period will abort and restart the device.
### 5 short presses
Start Wi-Fi Protected Setup (WPS) allowing for SSID and password configuration using the router's WPS button or web page. The LED will blink during the config period. A single button press during this period will abort and restart the device. **Only in sonoff-classic.bin**
Start Wi-Fi Protected Setup (WPS) allowing for SSID and password configuration using the router's WPS button or web page. The LED will blink during the config period. A single button press during this period will abort and restart the device. **Only in tasmota-classic.bin**
### 6 short presses
Restarts the device.
@ -50,7 +50,7 @@ When changing the state of the button an MQTT message is sent to the device topi
*Example: Device topic `sonoff`, `SwitchMode 3` yields the following message.*
```MQT: cmnd/sonoff/POWER = ON```
```MQT: cmnd/tasmota/POWER = ON```
*Notice the ***`cmnd`*** instead of the `stat` at the beginning.*

@ -128,7 +128,7 @@ When changing the state of the switch an MQTT message is sent to the device topi
*Example: Device topic `sonoff`, `SwitchMode 3` yields the following message.*
```MQT: cmnd/sonoff/POWER = TOGGLE```
```MQT: cmnd/tasmota/POWER = TOGGLE```
*Notice the ***`cmnd`*** instead of the `stat` at the beginning.*

@ -265,7 +265,7 @@ Sensor13<a id="Sensor13"></a>|[INA219](http://www.ti.com/product/INA219) low vol
Sensor15<a id="Sensor15"></a>|[Automatic Baseline Correction](https://github.com/arendst/Tasmota/blob/c97ea4d9176eb7e87abff5f963a0f1c60f0a5e52/sonoff/xsns_15_mhz19.ino#L47) for [MH-Z19B](MH-Z19B) CO<sub>2</sub> sensor<BR>`0` = disabled<BR>`1` = enabled *(default)*<BR>`2` = disable and start manual calibration from 400 ppm of CO<sub>2</sub><BR>`9` = reset sensor to factory defaults<BR>`1000` = sets measurement range to 1000ppm CO<sub>2</sub><BR>`2000` = sets measurement range to 2000ppm CO<sub>2</sub><BR>`3000` = sets measurement range to 3000ppm CO<sub>2</sub><BR>`5000` = sets measurement range to 5000ppm CO<sub>2</sub>
Sensor20<a id="Sensor20"></a>|[Nova Fitness SDS011](Wemos-D1-Mini-and-Nova-Fitness-SDS011-Laser-Dust-Sensor) dust sensor.&emsp; »6.5.0.3<BR>1..255` = number of seconds before TelePeriod to poll the sensor
Sensor27<a id="Sensor27"></a>|[APDS-9960](APDS-9960) sensor commands<BR>`0` = enable light level and proximity sensor / disable gestures *(default)* <BR> `1` = enable gesture mode/ disable light level and proximity sensor<BR> `2` = enable gestures with half gain / disable light and proximity sensor<BR>`3..255` = Set [ATIME register](APDS-9960#known-issues) for different integration times
Sensor29<a id="Sensor29"></a>|MCP23008 / MCP23017 I<sup>2</sup>C GPIO Expander configuration ([additional details](MCP23008-MCP23017))<BR>`Reset<x>` = reset all pins<BR>x = `1..6`<BR>`1` = INPUT mode, no reporting, no pull-up<BR>`2` = INPUT mode, report on CHANGE, pull-up enabled<BR>`3` = INPUT mode, report on LOW, pull-up enabled<BR>`4` = INPUT mode, report on HIGH, pull-up enabled<BR>`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR>`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR><BR>`pin,pinmode{,intpullup\|outstate{,repmode}}`<br>[Continue reading...](MCP23008-MCP23017#device-configuration)
Sensor29<a id="Sensor29"></a>|MCP23008 / MCP23017 I<sup>2</sup>C GPIO Expander configuration ([additional details](MCP230xx))<BR>`Reset<x>` = reset all pins<BR>x = `1..6`<BR>`1` = INPUT mode, no reporting, no pull-up<BR>`2` = INPUT mode, report on CHANGE, pull-up enabled<BR>`3` = INPUT mode, report on LOW, pull-up enabled<BR>`4` = INPUT mode, report on HIGH, pull-up enabled<BR>`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR>`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR><BR>`pin,pinmode{,intpullup\|outstate{,repmode}}`<br>[Continue reading...](MCP230xx#device-configuration)
Sensor34<a id="Sensor34"></a>|&emsp; »6.6.0<BR>[HX711 load cell](https://github.com/bogde/HX711) sensor calibration<BR>`1` = reset display to 0<BR>`2` = start calibration<BR>`2` `<value>` = set reference weight in grams and start calibration<BR>`3` = show reference weight in grams<BR>`3` `<value>` = set reference weight in grams<BR>`4` = show calibrated scale value<BR>`4` `<value>` = set calibrated scale value<BR>`5` = show max weight in gram<BR>`5` `<value>` = set max weight in grams<BR>`6` = show single item weight in grams<BR>`6` `<value>` = set single item weight in grams. Once the item weight is set, when items are added to the scale, the telemetry message will report `Count` as the number of items on the scale<BR>`7` = save current weight to be used as start weight on restart<BR>`8` `0/1` &emsp; »6.6.0.13<BR>&emsp;`0` = disable JSON message on weight change over 4 grams<BR>&emsp;`1` = enable JSON message on weight change over 4 grams
Sensor50<a id="Sensor50"></a>|[PAJ7620](PAJ7620) gesture sensor<BR>`0` = sensor muted, no readings in Tasmota<BR>`1`= gesture mode<BR>`2` = proximity mode<BR>`3` = corner mode<br>`4` = PIN mode<br>`5` = cursor mode
Sensor53<a id="Sensor53"></a>|[Smart Meter Interface](Smart-Meter-Interface)<BR>`r` = reset the driver with a new descriptor specified with the Tasmota [Scripting](Scripting-Language) language.<BR>`c<x> <value>` = preset counter (x = `1..5`) to `value` when the driver is set to counter mode<BR>`d<x>` = disable data decoding and dump meter (x = `1..5`) data to the Console. This is used to decipher the meter's data format to define the variable encoding in the meter's descriptor.<BR>`d0` = disable data dump mode and revert to decoding mode.

@ -19,7 +19,7 @@ Gitpod has a browser extension (Chrome and Firefox) which is handy to directly l
[More information on the Gitpod browser extension](https://www.gitpod.io/docs/20_Browser_Extension/).
## Using Gitpod
After Gitpod loads the project, you will be greeted by the main window. Gitpod will then automatically compile `sonoff.bin`. Wait for the compilation to complete.
After Gitpod loads the project, you will be greeted by the main window. Gitpod will then automatically compile `tasmota.bin`. Wait for the compilation to complete.
The display consists of three panels:
1. Explorer
@ -68,8 +68,8 @@ Watch a [livestream video by digiblurDIY](https://www.youtube.com/watch?v=vod3Wo
If you already have Tasmota flashed on your device, you can use the `File Upload` OTA method to load the new firmware binary file.
1. Download [`tasmota-minimal.bin`](http://thehackbox.org/tasmota/tasmota-minimal.bin)
2. Make a backup of the device configuration using the web UI `Configuration` menu option.
3. Upload `tasmota-minimal` to your device using the web UI `Firmware Upgrade` selection. Choose `Upgrade by file upload`.
3. After `tasmota-minimal` is successfully loaded, select `Firmware Upgrade` once again and upload the new firmware file that was just compiled using Gitpod.
3. Upload `tasmota-minimal.bin` to your device using the web UI `Firmware Upgrade` selection. Choose `Upgrade by file upload`.
3. After `tasmota-minimal.bin` is successfully loaded, select `Firmware Upgrade` once again and upload the firmware file compiled using Gitpod.
#### Serial Flash
Follow the same [procedure for flashing](https://github.com/arendst/Tasmota/wiki/Flashing) as you would any new device.

@ -22,7 +22,7 @@ Listed below are a few ways to reset the device to what is set in the firmware b
The device should operate without instabilities before attempting to configure the device in any way. If the device still does not, follow these steps if you are able to configure its Wi-Fi and connect:
1. Configure the device as `Generic (18)`
2. Perform an OTA upgrade specifically to [`sonoff-minimal.bin`](http://thehackbox.org/tasmota/sonoff-minimal.bin). Taking this intermediate step ensures that the firmware will be reloaded. Since Tasmota performs a version comparison before performing the OTA update, explicitly changing the firmware that is on the device will ensure that the firmware is indeed replaced in the next step.
2. Perform an OTA upgrade specifically to [`tasmota-minimal.bin`](http://thehackbox.org/tasmota/tasmota-minimal.bin). Taking this intermediate step ensures that the firmware will be reloaded. Since Tasmota performs a version comparison before performing the OTA update, explicitly changing the firmware that is on the device will ensure that the firmware is indeed replaced in the next step.
3. Perform an OTA upgrade to the desired firmware variant.
Once the device operates reliably, begin the configuration to set the GPIO configuration (via a Template or Module). Take any further configuration steps one at a time to ensure that after each setting is applied, the device continues to operate reliably.

@ -44,7 +44,7 @@ SW to GND -- only during power up, to put the ESP in programming mode.
From here the upload is the same as for all other Tasmota devices. See the [Tasmota page](https://github.com/arendst/Tasmota/wiki/Upload) for detailed info.
**Note:** sonoff basic and classic variants do not support the serial bridge. To get this working you should use the standard sonoff.bin - NOT basic or classic.
**Note:** sonoff basic and classic variants do not support the serial bridge. To get this working you should use the standard tasmota.bin - NOT basic or classic.
After the upload was successful, unplug the device from the serial adapter. You can now desolder all the connections you have made earlier. Also remove the wire between RES1 and GND.
Then plug the board back in its housing. Be careful with the connector on the underside of the board.

@ -40,9 +40,9 @@ Sonoff provides different ways to configure Domoticz parameters. Choose the meth
2. Set ```Out topic``` to ```domoticz/out``` as hardcoded in Domoticz
3. Configure ```Idx 1``` to the value read in step 2.i
- Use MQTT and execute commands (if necessary, replace ```sonoff``` with unique topic you configured in Initital Configuration, see point 5 [there](Initital-Configuration)):
1. ```cmnd/sonoff/DomoticzInTopic``` with payload ```domoticz/in``` as hardcoded in Domoticz
2. ```cmnd/sonoff/DomoticzOutTopic``` with payload ```domoticz/out``` as hardcoded in Domoticz
3. ```cmnd/sonoff/DomoticzIdx1``` with payload value read in step 2.i
1. ```cmnd/tasmota/DomoticzInTopic``` with payload ```domoticz/in``` as hardcoded in Domoticz
2. ```cmnd/tasmota/DomoticzOutTopic``` with payload ```domoticz/out``` as hardcoded in Domoticz
3. ```cmnd/tasmota/DomoticzIdx1``` with payload value read in step 2.i
- Use the serial interface and execute commands:
1. ```DomoticzInTopic``` with ```domoticz/in``` as hardcoded in Domoticz
2. ```DomoticzOutTopic``` with ```domoticz/out``` as hardcoded in Domoticz

@ -31,7 +31,7 @@ Let's assume the default value of 50 for sleep and that a simple device such as
In this case, the main firmware loop will iterate through all the drivers and sensors once per 50 milliseconds.
Current tests suggest that a simple device such as a Sonoff Basic requires only about 9.5 milliseconds to complete one iteration of servicing all the drivers and sensors enabled in the standard sonoff.bin firmware.
Current tests suggest that a simple device such as a Sonoff Basic requires only about 9.5 milliseconds to complete one iteration of servicing all the drivers and sensors enabled in the standard tasmota.bin firmware.
The time management functionality offered by dynamic sleep will compute this time requirement automatically and allow the SDK / Arduino ESP8266 Core to service background tasks such as maintaining WiFi connectivity for the remainder of the time not spent in the main firmware loop - i.e. in the case of sleep 50 this would mean 50 milliseconds - ~9.5 milliseconds = ~40.5 milliseconds spent outside of the main firmware loop servicing SDK / ESP8266 Core functions which automatically consume fewer clock cycles when there is nothing intense for the SDK / ESP8266 Core to maintain or perform.

@ -13,7 +13,7 @@ There are two culprits of this:
After soldering out (removing) R2, the module ran smoothly and flashing Tasmota firmware was easy:
` esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 sonoff.bin
` esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
`
Connect DS18B20 to the GPIO2 (see diagram below - **soldering not necessary**, it is possible to put the wires and the resistor directly in to the female part of the connector together with ESP 01S module pins)
@ -25,7 +25,7 @@ After flashing, set up Tasmota (see images below):
Retrieving the temperature via HTTP
`http://sonoff-ip/cm?user=<USER>&password=<PASS>&cmnd=status%2010`
`http://tasmota-ip/cm?user=<USER>&password=<PASS>&cmnd=status%2010`
The temperature information will put published by MQTT to the
tele/<SONOFFDEVICE>/SENSOR in the format of:

@ -13,7 +13,7 @@ Go to the known folder and install Esptool with command ``python setup.py instal
Packages for Esptool are maintained for [Debian](https://packages.debian.org/stretch/esptool) and [Ubuntu](https://packages.ubuntu.com/cosmic/esptool) and can be installed with `sudo apt install esptool`.
## Download Tasmota
Download the latest Tasmota release firmware file [sonoff.bin](https://github.com/arendst/Tasmota/releases) to a known folder. A second source is [thehackbox](http://thehackbox.org/tasmota/release/) This source can be used for OTA too.
Download the latest Tasmota release firmware file [tasmota.bin](https://github.com/arendst/Tasmota/releases) to a known folder. A second source is [thehackbox](http://thehackbox.org/tasmota/release/) This source can be used for OTA too.
## Upload Tasmota
@ -55,10 +55,10 @@ NOTE2: It only takes a few seconds to erase 1M of flash.
### Upload firmware
Ensure the device is in firmware upload mode.
Load the downloaded Tasmota firmware file *sonoff.bin* with the following command:
Load the downloaded Tasmota firmware file *tasmota.bin* with the following command:
```
esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 sonoff.bin
esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
```
NOTE1: When the command completes the device is out of firmware upload mode!
@ -76,9 +76,9 @@ Download the latest release from [https://github.com/igrr/esptool-ck/releases](h
### Download Tasmota
Download the latest Tasmota release firmware file [sonoff.bin](https://github.com/arendst/Tasmota/releases) to a known folder (The same folder as where you have the esptool executable will work well for this process to be simpler)
Download the latest Tasmota release firmware file [tasmota.bin](https://github.com/arendst/Tasmota/releases) to a known folder (The same folder as where you have the esptool executable will work well for this process to be simpler)
If you want features from the current development codebase which has not been included in the last release please download this [sonoff.bin](http://thehackbox.org/tasmota/) to a known folder (The same folder as where you have the esptool executable will work well for this process to be simpler)
If you want features from the current development codebase which has not been included in the last release please download this [tasmota.bin](http://thehackbox.org/tasmota/) to a known folder (The same folder as where you have the esptool executable will work well for this process to be simpler)
The information posted further up in this Wiki for placing the device into bootload / firmware upgrade mode may be followed as this process does not change irrespective whether you use the Python or executable version of esptool.
@ -90,6 +90,6 @@ Erase the flash completely with the following command (substituting the COM port
Once the erase is complete, reset your device back into programming mode and then upload the firmware using the following command
`esptool -cp COM3 -cb 115200 -bm dout -cf sonoff.bin -v`
`esptool -cp COM3 -cb 115200 -bm dout -cf tasmota.bin -v`

4
FAQ.md

@ -285,7 +285,7 @@ In case you're using a template you created yourself or found in our Templates R
### Sensors don't show values
Make sure your sensor is properly wired and the GPIOs assigned.
Your vanilla `sonoff.bin` doesn't have complete sensor support. Make sure you've installed sonoff-sensors.bin that support the largest number of sensors. Some sensors require enabling in the code and compiling your own binary. See [Builds](Builds) for a comprehensive list of supported components.
Your vanilla `tasmota.bin` doesn't have complete sensor support. Make sure you've installed tasmota-sensors.bin that support the largest number of sensors. Some sensors require enabling in the code and compiling your own binary. See [Builds](Builds) for a comprehensive list of supported components.
### Timers trigger at the wrong time
Check the log in the web UI Console to see if the device's time is set correctly. There are two elements to setting the time: 1. obtaining the UTC time, and, 2. local Daylight Saving Time policies.
@ -299,7 +299,7 @@ You must also set the [`TimeZone`](Commands#timezone) and Daylight Saving Time p
If you have timers that use the sunset or sunrise times, you must set your [latitude](Commands#latitude) and [longitude](Commands#longitude) in order for these times to be calculated correctly for your location.
### Auto-discovery in Home Assistant doesn't work
The `sonoff-basic.bin` firmware binary (which comes packaged with Tuya-Convert) does not support auto-discovery. Please upgrade to `sonoff.bin` or a similar firmware variant that supports this feature.
The `tasmota-basic.bin` firmware binary (which comes packaged with Tuya-Convert) does not support auto-discovery. Please upgrade to `tasmota.bin` or a similar firmware variant that supports this feature.
Make sure its enabled in Tasmota it with `SetOption19 1` and you configured the Home Assistant MQTT integration with Discovery enabled.

@ -93,16 +93,16 @@ This is how it looks in real-life 😆
```bash
# if using Raspberry Pi 1/2 use
# esptool.py --port /dev/ttyAMA0 write_flash -fm dout 0x0 /path/to/downloaded/sonoff.bin
# esptool.py --port /dev/ttyAMA0 write_flash -fm dout 0x0 /path/to/downloaded/tasmota.bin
# if using Raspberry Pi 3 use
esptool.py --port /dev/ttyS0 write_flash -fm dout 0x0 /path/to/downloaded/sonoff.bin
esptool.py --port /dev/ttyS0 write_flash -fm dout 0x0 /path/to/downloaded/tasmota.bin
```
You should see output like this:
```bash
➜ ~ esptool.py --port /dev/ttyAMA0 write_flash -fm dout 0x0 sonoff.bin
➜ ~ esptool.py --port /dev/ttyAMA0 write_flash -fm dout 0x0 tasmota.bin
esptool.py v2.5.1
Serial port /dev/ttyAMA0
Connecting.....

@ -69,10 +69,10 @@ It only takes a few seconds to erase 1M of flash.
*When the command completes the device is not in flash mode anymore.* Repeat the process of putting your device in programming mode.
#### Upload firmware
Load the chosen Tasmota firmware file with the following command (e.g., `sonoff.bin` in this example):
Load the chosen Tasmota firmware file with the following command (e.g., `tasmota.bin` in this example):
```
esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 sonoff.bin
esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
```
Unplug your serial programming adapter or your device and plug it back in or connect to another power source. Your device is now ready for [Initial configuration](Initial-Configuration). **For proper device initialization after the firmware upload completes, power down and power up the device.**
@ -86,7 +86,7 @@ For the purpose of simplicity only the Windows version will be explained here, b
Download the latest release of [Esptool-CK](https://github.com/igrr/esptool-ck/releases) and extract the compressed file to a folder of your choice.
### Upload Tasmota
Place your chosen firmware binary file (e.g., `sonoff.bin` in the example below) in the same folder as Esptool-CK to simplify the process.
Place your chosen firmware binary file (e.g., `tasmota.bin` in the example below) in the same folder as Esptool-CK to simplify the process.
The following commands use `COM5` as an example. Change `COM5` with your port designation.
@ -100,7 +100,7 @@ esptool -cp COM5 -ce -v
#### Upload firmware
Once the erase is complete, put device back into programming mode and upload the firmware
```
esptool -cp COM5 -bm dout -cf sonoff.bin -v
esptool -cp COM5 -bm dout -cf tasmota.bin -v
```
Unplug your serial programming adapter or your device and plug it back in or connect to another power source. Your device is now ready for [Initial configuration](Initial-Configuration). **For proper device initialization after the firmware upload completes, power down and power up the device.**

@ -16,7 +16,7 @@ In most cases those pins are available on the PCB in the form of pin holes or so
If you are not careful, your own health will be in danger. Shorting your serial interface with mains AC power will fry your device and serial adapter and will also harm or destroy your computer. It is important to _**always have all mains power cables disconnected from the device**_ while being connected via serial or even while the case of the device is opened.
## Serial Connection
Each device has its pins labelled differently. If the labelling isn't visible on the PCB please refer to the devices flashing guide or search the Internet for correct pin locations. Device specific instructions and restrictions are documented in the [Device Templates Repository](https://blakadder.github.io/templates/)
Each device has its pins labelled differently. If the labelling isn't visible on the PCB please refer to the devices flashing guide or search the Internet for correct pin locations. Device specific instructions and restrictions are documented in the [Tasmota Device Templates Repository](https://blakadder.github.io/templates/)
When you have identified pins on your device, connect wires according to the table:
@ -34,7 +34,7 @@ When you have identified pins on your device, connect wires according to the tab
<img alt="Example without button" src="https://user-images.githubusercontent.com/5904370/55689595-8dbd6480-5986-11e9-81c6-a13c6b7e5971.png" height=200 align=right></img>
ESP8266 needs to be put into **Programming Mode** before the firmware can be uploaded. This is done by pulling the GPIO0 pin to GND while the chip is booting.
On most devices the installed control button is connected to GPIO0 and GND, making entering Programming Mode very easy. On others you will need to bridge the pins on the PCB or directly on the chip with a jumper wire. Device specific instructions are documented in the [Device Templates Repository](https://blakadder.github.io/templates/).
On most devices the installed control button is connected to GPIO0 and GND, making entering Programming Mode very easy. On others you will need to bridge the pins on the PCB or directly on the chip with a jumper wire. Device specific instructions are documented in [Tasmota Device Templates Repository](https://blakadder.github.io/templates/).
To put the ESP8266 into Programming Mode:

@ -77,17 +77,17 @@ Use this automation to get all your devices in sync, including power state, afte
action:
- service: mqtt.publish
data:
topic: "cmnd/sonoffs/state"
topic: "cmnd/tasmotas/state"
payload: ""
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER
topic: cmnd/tasmotas/POWER
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER2
topic: cmnd/tasmotas/POWER2
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER3
topic: cmnd/tasmotas/POWER3
```
This automation posts to the default "sonoffs" group topic. Each device will send back their status message which contains relay power and light status.
@ -120,7 +120,7 @@ Automation to have each device to push out the firmware version on Home Assistan
action:
- service: mqtt.publish
data:
topic: "cmnd/sonoffs/STATUS"
topic: "cmnd/tasmotas/STATUS"
payload: "2"
```
@ -136,7 +136,7 @@ The script:
alias: Get Sonoff New IP (sonoff)
sequence:
- data:
topic: cmnd/sonoff/ipaddress
topic: cmnd/tasmota/ipaddress
service: mqtt.publish
```
topic: cmnd/_the PROJECT NAME_/ipaddress
@ -147,7 +147,7 @@ The sensor:
sensor:
- platform: mqtt
name: "SonOff IP"
state_topic: 'stat/sonoff/RESULT'
state_topic: 'stat/tasmota/RESULT'
value_template: "{{ value_json.IPAddress1.split(' ')[1].replace('(','').replace(')','') }}"
```
Put it into a group
@ -190,10 +190,10 @@ Use POWER1, POWER2, etc when you are using a device with more than one relay (if
switch:
- platform: mqtt
name: "Sonoff power"
state_topic: "stat/sonoff/RESULT"
state_topic: "stat/tasmota/RESULT"
value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/sonoff/POWER"
availability_topic: "tele/sonoff/LWT"
command_topic: "cmnd/tasmota/POWER"
availability_topic: "tele/tasmota/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
@ -212,7 +212,7 @@ Use the [`sensor.mqtt`](https://www.home-assistant.io/components/sensor.mqtt/) c
A DHT22 Temperature and Humidity sensor connected to a Sonoff TH10 will send at ``TelePeriod`` intervals the following information to the MQTT broker:
```
tele/sonoff/SENSOR = {"Time":"2017-02-12T16:11:12", "DHT22":{"Temperature":23.9, "Humidity":34.1}}
tele/tasmota/SENSOR = {"Time":"2017-02-12T16:11:12", "DHT22":{"Temperature":23.9, "Humidity":34.1}}
```
To make the information visible in HA add the following lines to the configuration file.
```yaml
@ -220,18 +220,18 @@ To make the information visible in HA add the following lines to the configurati
sensor:
- platform: mqtt
name: "Tele Temperature"
state_topic: "tele/sonoff/SENSOR"
state_topic: "tele/tasmota/SENSOR"
value_template: "{{ value_json['DHT22'].Temperature }}"
unit_of_measurement: "°C"
availability_topic: "tele/sonoff/LWT"
availability_topic: "tele/tasmota/LWT"
payload_available: "Online"
payload_not_available: "Offline"
- platform: mqtt
name: "Tele Humidity"
state_topic: "tele/sonoff/SENSOR"
state_topic: "tele/tasmota/SENSOR"
value_template: "{{ value_json['DHT22'].Humidity }}"
unit_of_measurement: "%"
availability_topic: "tele/sonoff/LWT"
availability_topic: "tele/tasmota/LWT"
payload_available: "Online"
payload_not_available: "Offline"
```
@ -239,9 +239,9 @@ This periodic interval can be changed using the ``TelePeriod`` command (see the
#### Manual updates
Another means of sensor information retrieval from Tasmota is using the status command ``Status 10`` or ``cmnd/sonoff/status 10``. This would result in a message like:
Another means of sensor information retrieval from Tasmota is using the status command ``Status 10`` or ``cmnd/tasmota/status 10``. This would result in a message like:
```
stat/sonoff/STATUS10 {"StatusSNS":{"Time":"2017-02-11T18:06:05", "DHT22":{"Temperature":"21.8", "Humidity":"48.0"}}}
stat/tasmota/STATUS10 {"StatusSNS":{"Time":"2017-02-11T18:06:05", "DHT22":{"Temperature":"21.8", "Humidity":"48.0"}}}
```
The HA configuration would then look like this:
```yaml
@ -249,16 +249,16 @@ The HA configuration would then look like this:
sensor:
- platform: mqtt
name: "Stat Temperature"
state_topic: "stat/sonoff/STATUS10"
state_topic: "stat/tasmota/STATUS10"
value_template: "{{ value_json.StatusSNS.DHT22.Temperature }}"
unit_of_measurement: "°C"
- platform: mqtt
name: "Stat Humidity"
state_topic: "stat/sonoff/STATUS10"
state_topic: "stat/tasmota/STATUS10"
value_template: "{{ value_json.StatusSNS.DHT22.Humidity }}"
unit_of_measurement: "%"
```
The Tasmota command could be initiated by a mosquitto mqtt pub command on ``mosquitto_pub -h localhost -t 'cmnd/sonoff/status' -m '10'``
The Tasmota command could be initiated by a mosquitto mqtt pub command on ``mosquitto_pub -h localhost -t 'cmnd/tasmota/status' -m '10'``
### HTU and BMP I2C sensors

@ -78,17 +78,17 @@ Use this automation to get all your devices in sync, including power state, **im
action:
- service: mqtt.publish
data:
topic: "cmnd/sonoffs/state"
topic: "cmnd/tasmotas/state"
payload: ""
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER
topic: cmnd/tasmotas/POWER
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER2
topic: cmnd/tasmotas/POWER2
- service: mqtt.publish
data:
topic: cmnd/sonoffs/POWER3
topic: cmnd/tasmotas/POWER3
```
This automation posts to the default "sonoffs" group topic. Each device will send back their status message which contains relay power and light status.
@ -121,7 +121,7 @@ Automation to have each device to push out the firmware version on Home Assistan
action:
- service: mqtt.publish
data:
topic: "cmnd/sonoffs/STATUS"
topic: "cmnd/tasmotas/STATUS"
payload: "2"
```
@ -137,7 +137,7 @@ The script:
alias: Get Sonoff New IP (sonoff)
sequence:
- data:
topic: cmnd/sonoff/ipaddress
topic: cmnd/tasmota/ipaddress
service: mqtt.publish
```
topic: cmnd/_the PROJECT NAME_/ipaddress
@ -148,7 +148,7 @@ The sensor:
sensor:
- platform: mqtt
name: "SonOff IP"
state_topic: 'stat/sonoff/RESULT'
state_topic: 'stat/tasmota/RESULT'
value_template: "{{ value_json.IPAddress1.split(' ')[1].replace('(','').replace(')','') }}"
```
Put it into a group
@ -193,10 +193,10 @@ Configure the module, and on the Console run:\
switch:
- platform: mqtt
name: "Sonoff power"
state_topic: "stat/sonoff/RESULT"
state_topic: "stat/tasmota/RESULT"
value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/sonoff/POWER"
availability_topic: "tele/sonoff/LWT"
command_topic: "cmnd/tasmota/POWER"
availability_topic: "tele/tasmota/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
@ -215,7 +215,7 @@ Use the [`sensor.mqtt`](https://www.home-assistant.io/components/sensor.mqtt/) c
A DHT22 Temperature and Humidity sensor connected to a Sonoff TH10 will send in [`TelePeriod`](commands#teleperiod) set intervals the following information to the MQTT broker:
```
tele/sonoff/SENSOR = {"Time":"2017-02-12T16:11:12", "DHT22":{"Temperature":23.9, "Humidity":34.1}}
tele/tasmota/SENSOR = {"Time":"2017-02-12T16:11:12", "DHT22":{"Temperature":23.9, "Humidity":34.1}}
```
To make the information visible in HA add the following lines to the configuration file.
```yaml
@ -223,27 +223,27 @@ To make the information visible in HA add the following lines to the configurati
sensor:
- platform: mqtt
name: "Tele Temperature"
state_topic: "tele/sonoff/SENSOR"
state_topic: "tele/tasmota/SENSOR"
value_template: "{{ value_json['DHT22'].Temperature }}"
unit_of_measurement: "°C"
availability_topic: "tele/sonoff/LWT"
availability_topic: "tele/tasmota/LWT"
payload_available: "Online"
payload_not_available: "Offline"
- platform: mqtt
name: "Tele Humidity"
state_topic: "tele/sonoff/SENSOR"
state_topic: "tele/tasmota/SENSOR"
value_template: "{{ value_json['DHT22'].Humidity }}"
unit_of_measurement: "%"
availability_topic: "tele/sonoff/LWT"
availability_topic: "tele/tasmota/LWT"
payload_available: "Online"
payload_not_available: "Offline"
```
#### Manual updates
Another means of sensor information retrieval from Tasmota is using the status command ``Status 10`` or ``cmnd/sonoff/status 10``. This would result in a message like:
Another means of sensor information retrieval from Tasmota is using the status command ``Status 10`` or ``cmnd/tasmota/status 10``. This would result in a message like:
```
stat/sonoff/STATUS10 {"StatusSNS":{"Time":"2017-02-11T18:06:05", "DHT22":{"Temperature":"21.8", "Humidity":"48.0"}}}
stat/tasmota/STATUS10 {"StatusSNS":{"Time":"2017-02-11T18:06:05", "DHT22":{"Temperature":"21.8", "Humidity":"48.0"}}}
```
The HA configuration would then look like this:
```yaml
@ -251,16 +251,16 @@ The HA configuration would then look like this:
sensor:
- platform: mqtt
name: "Stat Temperature"
state_topic: "stat/sonoff/STATUS10"
state_topic: "stat/tasmota/STATUS10"
value_template: "{{ value_json.StatusSNS.DHT22.Temperature }}"
unit_of_measurement: "°C"
- platform: mqtt
name: "Stat Humidity"
state_topic: "stat/sonoff/STATUS10"
state_topic: "stat/tasmota/STATUS10"
value_template: "{{ value_json.StatusSNS.DHT22.Humidity }}"
unit_of_measurement: "%"
```
The Tasmota command could be initiated by a mosquitto mqtt pub command on ``mosquitto_pub -h localhost -t 'cmnd/sonoff/status' -m '10'``
The Tasmota command could be initiated by a mosquitto mqtt pub command on ``mosquitto_pub -h localhost -t 'cmnd/tasmota/status' -m '10'``
### HTU and BMP I2C sensors

@ -4,7 +4,7 @@
- Tasmota release 6.4.1
- Home Assistant 0.84.2 or later
Binary sonoff-basic.bin (which comes packaged with Tuya Convert) does not support autodiscovery. Please upgrade to sonoff.bin or similar release that supports this feature.
Binary tasmota-basic.bin (which comes packaged with Tuya Convert) does not support autodiscovery. Please upgrade to tasmota.bin or similar release that supports this feature.
## Hass configuration - General
This page describes configuring Hass and Tasmota for MQTT device discovery.
@ -47,7 +47,7 @@ Default username for the embedded broker is `homeassistant` while port defaults
As of release 0.92, the embedded broker has been marked as deprecated. This means bugs may not be fixed, and the functionality may be removed in a future release.
## Add Tasmota devices to Home Assistant
To ease Home Assistant configuration a feature called [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/) is available. _(warning: this feature is not included in `sonoff-basic.bin` and `sonoff-classic.bin`)_\
To ease Home Assistant configuration a feature called [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/) is available. _(warning: this feature is not included in `tasmota-basic.bin` and `tasmota-classic.bin`)_\
With MQTT discovery, no user interaction or configuration file edit is needed to add new devices to Hass.
Automatic discovery is currently supported for:
@ -89,7 +89,7 @@ By executing `SetOption19 1`, the automatic discovery feature is enabled and a r
To disable the automatic discovery feature and remove the retained message, execute `SetOption19 0` and the "homeassistant" topic is removed from Home Assistant and MQTT broker. The device topic will not revert to defaults. You have to manually change the topic structure back to `%prefix%/%topic%/` in [**MQTT Configuration**](MQTT).
#### :warning: Important:
This feature will change the default Tasmota topic `%prefix%/%topic%/<command>`, e.g. `cmnd/sonoff/POWER` to `%topic%/%prefix%/<command>`, e.g., `sonoff/cmnd/POWER`.
This feature will change the default Tasmota topic `%prefix%/%topic%/<command>`, e.g. `cmnd/tasmota/POWER` to `%topic%/%prefix%/<command>`, e.g., `sonoff/cmnd/POWER`.
You cannot use custom defined topics while `Setoption19` is on since it will always revert it to `%topic%/%prefix%` due to Home Assistant requirements.
## Setup Tasmota devices through Home Assistant
@ -138,7 +138,7 @@ The automation will be triggered each time Home Assistant is (re)started althoug
Note: This must use the default Tasmota topic format `%prefix%/%topic%/<command>`. After enabling SetOption19, the format will change to `%topic%/%prefix%/<command>` and those devices won't see this message.
This can also be done manually in Home Assistant UI through Developer tools - ![](https://cdn.pbrd.co/images/HY47i1b.jpg) (MQTT) by posting to topic `cmnd/sonoffs/SetOption19` with payload `1`
This can also be done manually in Home Assistant UI through Developer tools - ![](https://cdn.pbrd.co/images/HY47i1b.jpg) (MQTT) by posting to topic `cmnd/tasmotas/SetOption19` with payload `1`
```yaml
# Example automations.yaml entry
@ -149,7 +149,7 @@ This can also be done manually in Home Assistant UI through Developer tools - ![
action:
- service: mqtt.publish
data:
topic: "cmnd/sonoffs/SetOption19"
topic: "cmnd/tasmotas/SetOption19"
payload: "1"
```

@ -26,10 +26,10 @@ You will need [some tools](Prerequisites) to [prepare](Hardware-preparation) you
**2019-10-25**
[Tasmota v6.7.0](../releases/tag/v6.7.0) is released bringing support for [blind and shutters](Commands#blinds-shutters-and-roller-shades), [deep sleep and wake up pin](Support-for-Deepsleep-and-Wake-Up-PIN). [Tuya component](tuyamcu) is more customisable supporting a wider range of devices and a plethora of new sensors. Support for [Zigbee](https://github.com/arendst/Tasmota/wiki/Zigbee) devices is in a nascent stage of development.
Besides that there are bug fixes and improvements and on top of all that: better support for iFan03, Shelly 2.5, a rewrite of the light driver and the default Arduino core is now pre2.6. Last, but not least, the new sonoff-ir.bin build that has fully featured IR support but at the cost of other features.
Besides that there are bug fixes and improvements and on top of all that: better support for iFan03, Shelly 2.5, a rewrite of the light driver and the default Arduino core is now pre2.6. Last, but not least, the new tasmota-ir.bin build that has fully featured IR support but at the cost of other features.
_In with the new, out with the old!_
Some outdated features have been removed so wave goodbye to: WPS, SmartConfig, sonoff-classic.bin build and Setoptions 2, 34, 41, 44, 45, 46, 65, 66 and 69
Some outdated features have been removed so wave goodbye to: WPS, SmartConfig, tasmota-classic.bin build and Setoptions 2, 34, 41, 44, 45, 46, 65, 66 and 69
**2019-10-10**
Tasmota development branch is undergoing a big code rewrite of the light driver. Some things might break in the process, be aware of that if you're installing the daily build on a critical device and make sure to report any [issues](https://github.com/arendst/Tasmota/issues).

@ -6,7 +6,7 @@ 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="left" height=200></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**._ When it connects to the network, you may get a warning that there is no Internet connection and be prompted to connect to a different network. _Do not allow the mobile device to select a different network_.
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 **tasmota-xxxx** (where **x** is a number) and connect to it. _In this example the Wi-Fi AP is named **tasmota-7718**._ When it connects to the network, you may get a warning that there is no Internet connection and be prompted to connect to a different network. _Do not allow the mobile device to select a different network_.
> *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.*
@ -14,7 +14,7 @@ Connect your device to a power source and grab your smartphone (or tablet or lap
After you have connected to the Tasmota Wi-Fi AP, open http://192.168.4.1 in a web browser on the smartphone (or whatever device you used).
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>
<img alt="Tasmota AP" src="https://i.postimg.cc/zDdGkXR7/initial-configuration1.png" align="right" height="350"></img>
At this page you can have Tasmota scan for available Wi-Fi networks. Select the right network from the list or enter the following:
**AP1 SSid** - your Wi-Fi network name
@ -29,10 +29,10 @@ At this page you can have Tasmota scan for available Wi-Fi networks. Select the
>*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.*
Click the checkbox to see the password you enter to ensure that it is correct and that your mobile device has not inadvertently capitalized the first letter if it is supposed to be lower case nor autocorrected what you entered. ~~Double~~ **Triple check the Wi-Fi credentials** and click on **Save** to apply the settings. The device will restart and connect to your home network. The `sonoff-xxxx` network will not longer be present. Therefore your smartphone will automatically be disconnected and should connect back to its data network.
Click the checkbox to see the password you enter to ensure that it is correct and that your mobile device has not inadvertently capitalized the first letter if it is supposed to be lower case nor autocorrected what you entered. ~~Double~~ **Triple check the Wi-Fi credentials** and click on **Save** to apply the settings. The device will restart and connect to your home network. The `tasmota-xxxx` network will not longer be present. Therefore your smartphone will automatically be disconnected and should connect back to its data 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**.)*
Look in your router for a newly connected device with the same name as the Wi-Fi access point. *(In this example **tasmota-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
@ -81,7 +81,7 @@ Device will restart and connect to your network. It will display your devices ne
Configure MQTT broker address, MQTT credentials, unique device topic and OTA url to the latest official release
```lua
Backlog mqtthost <yourhost>; mqttuser <user>; mqttpassword <password>; topic <unique_topic>; otaurl http://thehackbox.org/tasmota/release/sonoff.bin
Backlog mqtthost <yourhost>; mqttuser <user>; mqttpassword <password>; topic <unique_topic>; otaurl http://thehackbox.org/tasmota/release/tasmota.bin
```
>*Keep your personal configuration in a text file and simply copy and paste the backlog commands to a newly flashed device.*

@ -12,7 +12,7 @@ If the OTA flash method does not work, you will have to solder leads to flash th
Once you get the device flashed, set up the Wi-Fi configuration and connect to the device using a browser using its IP address. To keep the device from constantly rebooting, the first configuration step you should perform is to set the module type to Generic (18).
**Configuration:**
* Digiblur's Tasmota [forked firmware](https://www.youtube.com/redirect?redir_token=_fOGibOs_MdahUVBGBUJ4_0QFpd8MTU1NzE1MTczNUAxNTU3MDY1MzM1&event=video_description&v=O5GYh470m5k&q=https%3A%2F%2Fgithub.com%2Fdigiblur%2FSonoff-Tasmota%2Fraw%2Fdevelopment%2Fgeneric%2Ftasmota-6.5.0-generic-wifiman-2.3.0.bin)
* Digiblur's Tasmota [forked firmware](https://www.youtube.com/redirect?redir_token=_fOGibOs_MdahUVBGBUJ4_0QFpd8MTU1NzE1MTczNUAxNTU3MDY1MzM1&event=video_description&v=O5GYh470m5k&q=https%3A%2F%2Fgithub.com%2Fdigiblur%2Ftasmota-Tasmota%2Fraw%2Fdevelopment%2Fgeneric%2Ftasmota-6.5.0-generic-wifiman-2.3.0.bin)
* Generic (18)
* GPIO0: Button1
* GPIO13: Led1i

@ -1,48 +1,39 @@
## LM75AD I<sup>2</sup>C Temperature Sensor
The LM75AD is an I<sup>2</sup>C temperature sensor that converts temperature directly to digital signals from -55°C to +125°C and achieves an accuracy of 0.125°C
### Features
>Some features of the LM75A chip not implemented in this driver:
>- Programmable temperature threshold and hysteresis set points
>- Stand-alone operation as thermostat at power-up
* Pin-for-pin replacement for industry standard LM75 and offers improved temperature resolution of 0.125°C and Specification of a single part over power supply range from 2.8 V to 5.5 V
* Small 8-pin package types: SO8 and TSSOP8
* I<sup>2</sup>C-bus interface with up to 8 devices on the same bus
* Power supply range from 2.8 V to 5.5 V _**(Note that for use the ESP8266 you must limit this to 3.3V as the GPIO pins of the ESP8266 are not 5V tolerant)**_
* Temperatures range from -55°C to +125°C
* 11-bit ADC that offers a temperature resolution of 0.125°C
* Temperature accuracy of:
* ±2°C from -25°C to +100°C
* ±3°C from -55°C to +125°C
* Programmable temperature threshold and hysteresis set points _**(Not used in the LM75AD driver at this stage)**_
* Supply current of 3.5µA in shutdown mode for power conservation
* Stand-alone operation as thermostat at power-up _**(Not used in the LM75AD driver at this stage)**_
* ESD protection exceeds 2000 V HBM per JESD22-A114, 200 V MM per JESD22-A115 and 1000 V CDM per JESD22-C101
* Latch-up testing is done to JEDEC Standard JESD78 which exceeds 100 mA
[LM75A Datasheet](https://www.nxp.com/docs/en/data-sheet/LM75A.pdf)
Datasheet can be found at [https://www.nxp.com/docs/en/data-sheet/LM75A.pdf](https://www.nxp.com/docs/en/data-sheet/LM75A.pdf)
## Configuration
### Wiring
| LM75AD | ESP8266 |
|---|---|
|VCC |3.3V
|GND |GND
|SDA | GPIOx
|SCL | GPIOy
|OS | not used
Breakout boards available typically look like this
The driver currently only allows the use of a single LM75AD sensor on any of the addresses configurable through pins A0, A1 and A2. These are conveniently broken out on the breakout board either as pins or as solderable joints as can be seen on the example breakout board.
![LM75AD_TOP](https://github.com/andrethomas/images/raw/master/lm75ad/board_lm75ad_top.png)
These pins need to be tied down to either GND or VCC (3.3V) and the resulting I<sup>2</sup>C address will be set during power-up according to the table: ![Address MAP](https://github.com/andrethomas/images/raw/master/lm75ad/Address_Map.png)
### Tasmota
In the _Configuration -> Configure Module_ page assign:
1. GPIOx to `I2C SDA (6)`
2. GPIOy to `I2C SCL (5)`
After a reboot the driver will detect LM75AD automatically and display Temperature.
### Breakout Boards
<table border="0"><tr><td><img src="https://github.com/andrethomas/images/raw/master/lm75ad/board_lm75ad_top.png"></img></td><td><img src="https://github.com/andrethomas/images/raw/master/lm75ad/board_lm75ad_bot.png" width=220></td></tr></table>
![LM75AD_BOTTOM](https://github.com/andrethomas/images/raw/master/lm75ad/board_lm75ad_bot.png)
Can also be used standalone if soldered to a board given the diagram is used
![Circuit](https://github.com/andrethomas/images/raw/master/lm75ad/SimpleCircuit.png)
R1 and R2 are pull-up resistors which are required by the I<sup>2</sup>C bus to operate properly. If you have other I<sup>2</sup>C sensors with pull-up resistors connected to the same I<sup>2</sup>C bus it's probably not necessary to have them.
### Hardware Configuration
For connection to the ESP8266 I<sup>2</sup>C bus it is important to connect the SCL and SDA pins according to how the Sonoff firmware was configured.
The driver must be enabled in the firmware's user_config_override.h file by ensuring that the USE_I2C and USE_LM75AD lines are defined.
The driver currently only allows the use of a single LM75AD sensor on any of the addresses configurable through pins A0, A1 and A2 - These are usually conveniently broken out on a breakout board either as pins or as solderable joins as can be seen on the example breakout board provided in the images above.
These pins need to be either tied down to GND or VCC (3.3V) and the resulting I<sup>2</sup>C address will be set during power-up according to the datasheet as follows
![Address MAP](https://github.com/andrethomas/images/raw/master/lm75ad/Address_Map.png)
### Expected Behaviour
Once connected correctly (be it using a breakout board or just manually soldered) the Sonoff Tasmota firmware should detect the sensor automatically and start pushing out telemetry data.

@ -15,7 +15,7 @@ With the device connected and in flashing mode, create a backup of the factory f
esptool.py read_flash 0x000000 0x100000 image1M.bin
esptool.py erase_flash
esptool.py write_flash -fs 1MB -fm dout 0x0 sonoff-basic.bin`
esptool.py write_flash -fs 1MB -fm dout 0x0 tasmota-basic.bin`
## Configuration
⚠️ Warning! While the below configuration is correct and working, configuring a button on GPIO14 will make the device reset itself to the default Tasmota configuration after a number of seconds.

@ -53,7 +53,7 @@ One that is complete you may want to confirm that the Tasmota firmware is findin
`I2Cscan`
You should see a response giving you an address within the range of the MCP23008/MCP23017 chip (0x20 through 0x27) which may look as follows
`MQT: stat/sonoff/RESULT = {"I2CScan":"Device(s) found at 0x20"}`
`MQT: stat/tasmota/RESULT = {"I2CScan":"Device(s) found at 0x20"}`
If the extender is not detected, check your wiring and pin configuration.
@ -76,12 +76,12 @@ Sensor29<a id="Sensor29"></a>|MCP23008 / MCP23017 I<sup>2</sup>C GPIO Expander c
Examples:
`Sensor29 Reset1`
`MQT: stat/sonoff/RESULT = {"Sensor29_D99":{"MODE":1,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":""}}`
`MQT: stat/tasmota/RESULT = {"Sensor29_D99":{"MODE":1,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":""}}`
Pin and State is reported as 99 because it is set across all pins.
Mode should correspond with the reset pinmode option used.
`Sensor29 0,?`
`MQT: stat/sonoff/RESULT = {"Sensor29_D0":{"MODE":1,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":"ON"}}`
`MQT: stat/tasmota/RESULT = {"Sensor29_D0":{"MODE":1,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":"ON"}}`
Confirming that the pin is in pinmode 1 and that the pull-up resistor is not enabled.
INT_MODE indicates the interrupt mode for pins which are interrupt enabled (pinmode 2 through 4) - In the example above it is disabled for pin mode 1 (INPUT without INTERRUPT)
The current STATE of the pin as ON or OFF is reported as at the time the command is issued is also reported.
@ -105,7 +105,7 @@ Pull-up resistor support is valid for all modes from 1 through 4
Default telemetry logging will occur for all pins as per the configured logging interval of the ESP8266 as configured in the Tasmota firmware options. The telemetry logging will push out to log and MQTT a JSON as follows:
```
tele/sonoff/SENSOR = {"Time":"2018-08-18T16:13:47","MCP230XX": "D0":0,"D1":0,"D2":1,"D3":0,"D4":0,"D5":0,"D6":0,"D7":1}}
tele/tasmota/SENSOR = {"Time":"2018-08-18T16:13:47","MCP230XX": "D0":0,"D1":0,"D2":1,"D3":0,"D4":0,"D5":0,"D6":0,"D7":1}}
```
Again, this will depend on whether an MCP23008 or MCP23017 is used insofar that the number of pins/bits reported will be 8 (0 to 7) or 16 (0 to 15) respectively.
@ -116,11 +116,11 @@ Interrupts will report for individual pins as and when the conditions which were
Interrupt message on HIGH for input pin 0
```
MQT: stat/sonoff/RESULT = {"Time":"2018-08-19T16:04:50","MCP230XX_INT":{"D0":1,"MS":301}}
MQT: stat/tasmota/RESULT = {"Time":"2018-08-19T16:04:50","MCP230XX_INT":{"D0":1,"MS":301}}
```
Interrupt message on LOW for input pin 1
```
MQT: stat/sonoff/RESULT = {"Time":"2018-08-19T16:04:50","MCP230XX_INT":{"D1":0,"MS":519}}
MQT: stat/tasmota/RESULT = {"Time":"2018-08-19T16:04:50","MCP230XX_INT":{"D1":0,"MS":519}}
```
The state of the pin captured during the interrupt is reported as Dx=y where x is the pin number and y is the state of the pin. In addition the number of milliseconds since the last interrupt occurred for the particular pin is also reported as MS=xx where xx is the number of milliseconds recorded.
@ -134,16 +134,16 @@ Where xx = the pin number from 0 through 7 (MCP23008) or 0 through 15 (MCP23017)
The complete output for an interrupt enabled pin would look like this:
```
MQT: stat/sonoff/RESULT = {"Time":"2018-08-19T16:08:28","MCP230XX_INT":{"D0":0,"MS":217353}}
MQT: stat/tasmota/RESULT = {"Time":"2018-08-19T16:08:28","MCP230XX_INT":{"D0":0,"MS":217353}}
SRC: Rule
RSL: Group 0, Index 1, Command EVENT, Data MCPINT_D0=0
MQT: stat/sonoff/RESULT = {"Event":"Done"}
MQT: stat/tasmota/RESULT = {"Event":"Done"}
```
```
MQT: stat/sonoff/RESULT = {"Time":"2018-08-19T16:08:46","MCP230XX_INT":{"D0":1,"MS":18101}}
MQT: stat/tasmota/RESULT = {"Time":"2018-08-19T16:08:46","MCP230XX_INT":{"D0":1,"MS":18101}}
SRC: Rule
RSL: Group 0, Index 1, Command EVENT, Data MCPINT_D0=1
MQT: stat/sonoff/RESULT = {"Event":"Done"}
MQT: stat/tasmota/RESULT = {"Event":"Done"}
```
The latter makes it possible to integrate interrupt responses with rules for example:
@ -188,7 +188,7 @@ If you want to reduce the number of interrupt polls per second you may use the I
Will give you the current setting via JSON response as follows:
`MQT: stat/sonoff/RESULT = {"MCP230xx_INTPRI":{"D_99":0}}`
`MQT: stat/tasmota/RESULT = {"MCP230xx_INTPRI":{"D_99":0}}`
To change the value you may use command as follows:
@ -288,7 +288,7 @@ sensor29 0,6,1 // Configure pin 0 as INVERTED OUTPUT and default to OFF on rese
Confirmation will be sent using MQT, for example:
```
MQT: stat/sonoff/RESULT = {"Sensor29_D2":{"MODE":5,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":"OFF"}}
MQT: stat/tasmota/RESULT = {"Sensor29_D2":{"MODE":5,"PULL_UP":"OFF","INT_MODE":"DISABLED","STATE":"OFF"}}
```
The only difference between pinmode 5 and pinmode 6 is that pinmode 5 will result in normal output state, i.e. pin will be LOW when OFF whereas pinmode 6 will cause the pin to be HIGH when OFF. This is useful when using relays which have inverted inputs.
@ -304,9 +304,9 @@ sensor29 0,T // Toggle the current state of pin from ON to OFF, or OFF to ON
Telemetry response will be provided accordingly, for example:
```
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"ON","STATE":"ON"}}
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"OFF","STATE":"OFF"}}
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"TOGGLE","STATE":"ON"}}
MQT: stat/tasmota/RESULT = {"S29cmnd_D0":{"COMMAND":"ON","STATE":"ON"}}
MQT: stat/tasmota/RESULT = {"S29cmnd_D0":{"COMMAND":"OFF","STATE":"OFF"}}
MQT: stat/tasmota/RESULT = {"S29cmnd_D0":{"COMMAND":"TOGGLE","STATE":"ON"}}
```
`COMMAND = Command which was sent`
@ -316,8 +316,8 @@ MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"TOGGLE","STATE":"ON"}}
Telemetry data is provided for pins which are enabled for output. For example, if pin 0 was enabled for OUTPUT the following additional telemetry message will be sent by MQTT at the same time as the normal telemetry interval occurs which reports the current states of pins.
```
MQT: tele/sonoff/SENSOR = {"Time":"2018-08-18T16:41:20","MCP230XX":{"D0":0,"D1":0,"D2":1,"D3":0,"D4":0,"D5":0,"D6":0,"D7":0}}
MQT: tele/sonoff/SENSOR = {"Time":"2018-08-18T16:41:20","MCP230_OUT": {"OUT_D4":"OFF","END":1}}
MQT: tele/tasmota/SENSOR = {"Time":"2018-08-18T16:41:20","MCP230XX":{"D0":0,"D1":0,"D2":1,"D3":0,"D4":0,"D5":0,"D6":0,"D7":0}}
MQT: tele/tasmota/SENSOR = {"Time":"2018-08-18T16:41:20","MCP230_OUT": {"OUT_D4":"OFF","END":1}}
```
Note the MCP230XX telemetry which provides the current logic state of all the pins and then the second MQT telemetry as MCP230_OUT which indicates the current state of pins configured for OUTPUT - In this case pin 4 or D4

@ -1,33 +1,33 @@
Sonoff responds to the following MQTT commands using MQTT Topic for ```cmnd/sonoff/<command>``` and MQTT Message/Payload for ```<parameter>```:
Sonoff responds to the following MQTT commands using MQTT Topic for ```cmnd/tasmota/<command>``` and MQTT Message/Payload for ```<parameter>```:
- The relay can be controlled with ```cmnd/sonoff/power on```, ```cmnd/sonoff/power off``` or ```cmnd/sonoff/power toggle```. Sonoff will send a MQTT status message like ```stat/sonoff/POWER ON```.
- The relay can be controlled with ```cmnd/tasmota/power on```, ```cmnd/tasmota/power off``` or ```cmnd/tasmota/power toggle```. Sonoff will send a MQTT status message like ```stat/tasmota/POWER ON```.
- The power state message can be sent with the retain flag set. Enable this with ```cmnd/sonoff/PowerRetain on```.
- The power state message can be sent with the retain flag set. Enable this with ```cmnd/tasmota/PowerRetain on```.
- The telemetry messages can also be sent with the retain flag, but this is a compile time option. See [#1071](https://github.com/arendst/Tasmota/issues/1071).
- For Sonoff Dual or 4CH the relays need to be addressed with `cmnd/sonoff/power<x>`, where `<x>` is the relay number from 1 to 2 (Dual) or from 1 to 4 (4CH).
- For Sonoff Dual or 4CH the relays need to be addressed with `cmnd/tasmota/power<x>`, where `<x>` is the relay number from 1 to 2 (Dual) or from 1 to 4 (4CH).
- The MQTT topic can be changed with ```cmnd/sonoff/topic sonoff1``` which reboots sonoff and makes it available for MQTT commands like ```cmnd/sonoff1/power on```.
- The MQTT topic can be changed with ```cmnd/tasmota/topic sonoff1``` which reboots sonoff and makes it available for MQTT commands like ```cmnd/sonoff1/power on```.
- The OTA firmware location can be made known to sonoff with ```cmnd/sonoff/otaurl http://domus1:80/api/sonoff/sonoff.ino.bin``` where domus1 is your web server hosting the firmware. Reset to default with ```cmnd/sonoff/otaurl 1```.
- The OTA firmware location can be made known to sonoff with ```cmnd/tasmota/otaurl http://domus1:80/api/sonoff/sonoff.ino.bin``` where domus1 is your web server hosting the firmware. Reset to default with ```cmnd/tasmota/otaurl 1```.
- Upgrade OTA firmware with ```cmnd/sonoff/upgrade 1```.
- Upgrade OTA firmware with ```cmnd/tasmota/upgrade 1```.
- Show all status information with ```cmnd/sonoff/status 0```.
- Show all status information with ```cmnd/tasmota/status 0```.
- The button can send a MQTT message to the broker that in turn will switch the relay. To configure this you need to perform ```cmnd/sonoff/ButtonTopic sonoff``` where sonoff equals to Topic. The message can also be provided with the retain flag by ```cmnd/sonoff/ButtonRetain on```.
- The button can send a MQTT message to the broker that in turn will switch the relay. To configure this you need to perform ```cmnd/tasmota/ButtonTopic sonoff``` where sonoff equals to Topic. The message can also be provided with the retain flag by ```cmnd/tasmota/ButtonRetain on```.
- Sonoff Pow status can be retrieved with ```cmnd/sonoff/status 8``` or periodically every 5 minutes using ```cmnd/sonoff/TelePeriod 300```.
- Sonoff Pow status can be retrieved with ```cmnd/tasmota/status 8``` or periodically every 5 minutes using ```cmnd/tasmota/TelePeriod 300```.
- When a Sonoff Pow threshold like PowerLow has been met a message ```tele/sonoff/POWER_LOW ON``` will be sent. When the error is corrected a message ```tele/sonoff/POWER_LOW OFF``` will be sent.
- When a Sonoff Pow threshold like PowerLow has been met a message ```tele/tasmota/POWER_LOW ON``` will be sent. When the error is corrected a message ```tele/tasmota/POWER_LOW OFF``` will be sent.
While most MQTT commands will result in a message in JSON format the power status feedback will always be returned like ```stat/sonoff/POWER ON``` too.
While most MQTT commands will result in a message in JSON format the power status feedback will always be returned like ```stat/tasmota/POWER ON``` too.
Telemetry data will be sent by prefix ```tele``` like ```tele/sonoff/SENSOR {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}```
Telemetry data will be sent by prefix ```tele``` like ```tele/tasmota/SENSOR {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}```
## MQTT Topic definition
Until version 5.0.5 the MQTT topic was defined rigidly by using the commands ``Prefix<x>`` and ``Topic`` resulting in a command topic string like ``cmnd/sonoff/Power``.
Until version 5.0.5 the MQTT topic was defined rigidly by using the commands ``Prefix<x>`` and ``Topic`` resulting in a command topic string like ``cmnd/tasmota/Power``.
Starting with version 5.0.5 the MQTT topic is more flexible using command ``FullTopic`` and tokens to be placed within the user definable string up to 100 characters in size. The provided tokens are:
- ``%prefix%`` to be dynamically substituted by one of three prefixes as defined by commands ``Prefix1`` (default: "cmnd"), ``Prefix2`` (default: "stat") and ``Prefix3`` (default: "tele").

@ -191,7 +191,7 @@ if not client.is_connected:
print("problem connecting to the MQTT server; please check your settings")
sys.exit(1)
# edit subscribe and publish lines and use yours like "stat/sonoff/POWER"
# edit subscribe and publish lines and use yours like "stat/tasmota/POWER"
client.subscribe("stat/my_house_living_room/POWER")
client.publish("cmnd/my_house_living_room/power","1")
@ -207,7 +207,7 @@ client.publish("cmnd/my_house_living_room/status",None)
# now wait for a time stamp from the sonoff; this could take an hour
client.subscribe("tele/my_house_living_room/+")
# if using sonoff-sensors.bin next section will not work unless you replace "STATE" with "SENSOR"
# if using tasmota-sensors.bin next section will not work unless you replace "STATE" with "SENSOR"
while 1:
if last_topic.startswith("tele/") and last_topic.endswith("STATE"):
locate_time = last_payload.find(b'"Time":')

32
MQTT.md

@ -7,10 +7,10 @@ If you flashed a precompiled .bin or didn't enter MQTT info in `user_config_over
Go to **Configuration -> Configure Other** and make sure **"MQTT Enable"** box is checked.<BR>
Once MQTT is enabled you need to set it up using **Configuration -> Configure MQTT**.
>While here, you might as well change the Friendly Name into something more descriptive than generic "Sonoff". *This is a must for Home Assistant autodiscovery feature.*
>While here, you might as well change the Friendly Name into something more descriptive than generic "Tasmota". *This is a must for Home Assistant autodiscovery feature.*
![Enable MQTT](https://user-images.githubusercontent.com/5904370/53055478-24ea5d80-34a8-11e9-8f5e-17f4ef4c4fd3.png)
![Configure MQTT ](https://user-images.githubusercontent.com/5904370/53048775-d3d16e00-3495-11e9-8917-70b56451ebeb.png)
![Enable MQTT](https://i.postimg.cc/6QDQnH2X/mqtt-config1.png)
![Configure MQTT ](https://i.postimg.cc/y8LggXy1/mqtt-config2.png)
For a basic setup you only need to set **Host**, **User** and **Password** but it is recommended to change **Topic** to avoid issues. Each device should have a unique **Topic**.
@ -68,34 +68,34 @@ By looking at the [commands](commands) table we can learn about the [Power](comm
### Examples
In the following examples `%topic%` is `sonoff` for demonstration purposes:
- The relay can be controlled with `cmnd/sonoff/power on`, ```cmnd/sonoff/power off``` or ```cmnd/sonoff/power toggle```. Sonoff will send a MQTT status message like ```stat/sonoff/POWER ON```.
- The relay can be controlled with `cmnd/tasmota/power on`, ```cmnd/tasmota/power off``` or ```cmnd/tasmota/power toggle```. Sonoff will send a MQTT status message like ```stat/tasmota/POWER ON```.
- The power state message can be sent with the retain flag set. Enable this with ```cmnd/sonoff/PowerRetain on```.
- The power state message can be sent with the retain flag set. Enable this with ```cmnd/tasmota/PowerRetain on```.
- The telemetry messages can also be sent with the retain flag, but this is a compile time option. See [#1071](https://github.com/arendst/Tasmota/issues/1071).
- For sonoff dual or 4CH the relays need to be addressed with ```cmnd/sonoff/power{n}```, where {n} is the relay number from 1 to 2 (Sonoff Dual) or from 1 to 4 (Sonoff 4CH). `cmnd/sonoff/power4 off` turns off the 4th relay on a Sonoff 4CH.
- For sonoff dual or 4CH the relays need to be addressed with ```cmnd/tasmota/power{n}```, where {n} is the relay number from 1 to 2 (Sonoff Dual) or from 1 to 4 (Sonoff 4CH). `cmnd/tasmota/power4 off` turns off the 4th relay on a Sonoff 4CH.
- MQTT topic can be changed with ```cmnd/sonoff/topic sonoff1``` which reboots sonoff and changes the `%topic%` to `sonoff1`. From that point on MQTT commands should look like ```cmnd/sonoff1/power on```.
- MQTT topic can be changed with ```cmnd/tasmota/topic sonoff1``` which reboots sonoff and changes the `%topic%` to `sonoff1`. From that point on MQTT commands should look like ```cmnd/sonoff1/power on```.
- The OTA firmware location can be made known to sonoff with ```cmnd/sonoff/otaurl http://thehackbox.org/tasmota/release/sonoff.bin```. Reset to default with ```cmnd/sonoff/otaurl 1```.
- The OTA firmware location can be made known to sonoff with ```cmnd/tasmota/otaurl http://thehackbox.org/tasmota/release/tasmota.bin```. Reset to default with ```cmnd/tasmota/otaurl 1```.
- Upgrade OTA firmware from the OtaUrl server with ```cmnd/sonoff/upgrade 1```.
- Upgrade OTA firmware from the OtaUrl server with ```cmnd/tasmota/upgrade 1```.
- Show all status information with ```cmnd/sonoff/status 0```.
- Show all status information with ```cmnd/tasmota/status 0```.
- The button can send a MQTT message to the broker that in turn will switch the relay. To configure this you need to perform ```cmnd/sonoff/ButtonTopic sonoff``` where sonoff equals to Topic. The message can also be provided with the retain flag by ```cmnd/sonoff/ButtonRetain on```.
- The button can send a MQTT message to the broker that in turn will switch the relay. To configure this you need to perform ```cmnd/tasmota/ButtonTopic sonoff``` where sonoff equals to Topic. The message can also be provided with the retain flag by ```cmnd/tasmota/ButtonRetain on```.
- Sonoff Pow status can be retreived with ```cmnd/sonoff/status 8``` or periodically every 5 minutes using ```cmnd/sonoff/TelePeriod 300```.
- Sonoff Pow status can be retreived with ```cmnd/tasmota/status 8``` or periodically every 5 minutes using ```cmnd/tasmota/TelePeriod 300```.
- When a Sonoff Pow threshold like PowerLow has been met a message ```tele/sonoff/POWER_LOW ON``` will be sent. When the error is corrected a message ```tele/sonoff/POWER_LOW OFF``` will be sent.
- When a Sonoff Pow threshold like PowerLow has been met a message ```tele/tasmota/POWER_LOW ON``` will be sent. When the error is corrected a message ```tele/tasmota/POWER_LOW OFF``` will be sent.
While most MQTT commands will result in a message in JSON format the power status feedback will always be returned like ```stat/sonoff/POWER ON``` too.
While most MQTT commands will result in a message in JSON format the power status feedback will always be returned like ```stat/tasmota/POWER ON``` too.
Telemetry data will be sent by prefix ```tele``` like ```tele/sonoff/SENSOR {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}```
Telemetry data will be sent by prefix ```tele``` like ```tele/tasmota/SENSOR {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}```
## MQTT Topic definition
Until version 5.0.5, the MQTT topic was defined rigidly by using the commands ``Prefix<x>`` and ``Topic`` resulting in a command topic string like ``cmnd/sonoff/Power``.
Until version 5.0.5, the MQTT topic was defined rigidly by using the commands ``Prefix<x>`` and ``Topic`` resulting in a command topic string like ``cmnd/tasmota/Power``.
Starting with version 5.0.5, the MQTT topic is more flexible using command ``FullTopic`` and tokens to be placed within the user definable string (100 character limit). The tokens are substituted dynamically at run-time. The available substitution tokens are:
- ``%prefix%`` = one of three prefixes as defined by commands ``Prefix1`` *(default = `cmnd`)*, ``Prefix2`` *(default = `stat`)* and ``Prefix3`` *(default = `tele`)*.

@ -16,7 +16,7 @@ You may wish to create a subfolder for the firmware files.
Use the IP address of this local web server to OTA flash Tasmota. You can determine your IP address [here](https://www.whatismybrowser.com/detect/what-is-my-local-ip-address). For example,
```bash
http://192.168.1.123/sonoff-basic.bin
http://192.168.1.123/tasmota-basic.bin
```
Issue this command to stop the web server when your are done flashing:

@ -67,9 +67,9 @@ Tasmota will scan for a new card detect 4 times per second and if found will rep
The output on the console will look similar to the below when a new card is detected
```
18:23:24 MQT: tele/sonoff/SENSOR = {"Time":"2019-01-10T18:23:24","PN532":{"UID":"94D8FC5F", "DATA":""}}
18:23:24 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:23:25 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:23:24 MQT: tele/tasmota/SENSOR = {"Time":"2019-01-10T18:23:24","PN532":{"UID":"94D8FC5F", "DATA":""}}
18:23:24 MQT: stat/tasmota/RESULT = {"Event":"Done"}
18:23:25 MQT: stat/tasmota/RESULT = {"Event":"Done"}
```
The UID of the card/tag is reported and any text stored in BLOCK 1 of a Mifare Classic card (up to 15 characters in length) is reported in the `DATA` field of the JSON sent via telemetry. Please note that the `DATA` field cannot contain spaces.
@ -95,7 +95,7 @@ When a card is presented to the PN532 under normal operating conditions up to 3
The first is the immediate telemetry generated which looks as follows
```
18:31:39 MQT: tele/sonoff/SENSOR = {"Time":"2019-01-10T18:31:39","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
18:31:39 MQT: tele/tasmota/SENSOR = {"Time":"2019-01-10T18:31:39","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
```
Since this is an immediate telemetry generation as opposed to the sensor data you would normally be expected to be presented when the telemetry period occurs, this telemetry data is not directly usable on the device itself. It is generated and immediately transmitted over MQTT and the purpose of this is so that immediate action may be taken by any home automation software you are using with the data obtained from the card/tag as opposed to waiting for the telemetry period to expire and be sent with normal telemetry data.
@ -108,12 +108,12 @@ Example rule for responding to a specific UID on the device when a card/tag matc
Example output/result:
```
18:39:20 MQT: tele/sonoff/SENSOR = {"Time":"2019-01-10T18:39:20","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
18:39:20 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:39:20 MQT: tele/tasmota/SENSOR = {"Time":"2019-01-10T18:39:20","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
18:39:20 MQT: stat/tasmota/RESULT = {"Event":"Done"}
18:39:20 RUL: EVENT#PN532_UID=94D8FC5F performs "power on"
18:39:20 MQT: stat/sonoff/RESULT = {"POWER":"ON"}
18:39:20 MQT: stat/sonoff/POWER = ON
18:39:20 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:39:20 MQT: stat/tasmota/RESULT = {"POWER":"ON"}
18:39:20 MQT: stat/tasmota/POWER = ON
18:39:20 MQT: stat/tasmota/RESULT = {"Event":"Done"}
```
Example rule for responding to a specific DATA content that was previously programmed to one or more cards using the `Sensor40 S,xxxx` command
@ -121,10 +121,10 @@ Example rule for responding to a specific DATA content that was previously progr
`on EVENT#PN532_DATA=ILOVETASMOTA do power on endon`
```
18:41:12 MQT: tele/sonoff/SENSOR = {"Time":"2019-01-10T18:41:12","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
18:41:13 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:41:13 MQT: stat/sonoff/RESULT = {"Event":"Done"}
18:41:12 MQT: tele/tasmota/SENSOR = {"Time":"2019-01-10T18:41:12","PN532":{"UID":"94D8FC5F", "DATA":"ILOVETASMOTA"}}
18:41:13 MQT: stat/tasmota/RESULT = {"Event":"Done"}
18:41:13 MQT: stat/tasmota/RESULT = {"Event":"Done"}
18:41:13 RUL: EVENT#PN532_DATA=ILOVETASMOTA performs "power on"
18:41:13 MQT: stat/sonoff/RESULT = {"POWER":"ON"}
18:41:13 MQT: stat/sonoff/POWER = ON
18:41:13 MQT: stat/tasmota/RESULT = {"POWER":"ON"}
18:41:13 MQT: stat/tasmota/POWER = ON
```

@ -6,7 +6,7 @@ More about [general configuration](Sensor-Configuration).
*Some of the articles were written originally for D1 mini but the information still applies except the wiring instructions*
- [**ADC**](ADC) - Analog input over A0 pin
- **ADS1x15** - A/D Converter (I<sup>2</sup>C)
- [**AM2301 (DHT21), AM2302 (DHT22), AM2321)**](AM2301) - Temperature and Humidity Sensor (Single wire)
- [**AM2301 (DHT21), AM2302 (DHT22), AM2321)**](AM2301) - Temperature and Humidity Sensor (single wire)
- [**AM312**](PIR-Motion-Sensors#AM312) - PIR Motion Sensor (single wire)<img src="https://i.postimg.cc/qRLyPy1n/APDS-9960-1-720x533.jpg" align=right>
- [**APDS-9960**](APDS-9960) - Ambient Light, RGB Color and Proximity Sensor with Gesture Detection
- [**AZ-7798**](Wemos-D1-Mini-and-AZ-Instrument-7798-CO2-Meter-Datalogger) - CO<sub>2</sub> Meter Datalogger
@ -19,7 +19,7 @@ More about [general configuration](Sensor-Configuration).
- **CCS811** - Gas and Air Quality sensor (I<sup>2</sup>C)
- [**Chirp! Soil Moisture Sensor**](Moisture-Sensor-and-Chirp!-Sensor) - Moisture Sensor (I<sup>2</sup>C)
- [**DHT11**](DHT11) - Temperature and Humidity Sensor<img src="https://user-images.githubusercontent.com/5904370/53279561-cfb18480-3711-11e9-9889-76ab1d6eafcb.png" width="200" align="right">
- **[DS18x20](DS18x20)** - Temperature sensor (single wire)
- **[DS18x20](DS18x20)** - Temperature sensor (1-Wire)
- [**DS3231**](DS3231) - Real-Time-Clock (I<sup>2</sup>C)
- [**HM16/HM17**](iBeacon-driver) - Bluetooth iBeacon reader (serial)
- **HR-E** - Water Meter Encoder interface (serial)
@ -35,9 +35,9 @@ More about [general configuration](Sensor-Configuration).
- **MAX31855** - Thermocouple Sensor (SPI)
- **MAX31865** - RTD Temperature Sensor Amplifier (SPI)
- **MAX44009** - Ambient Light Sensor (I<sup>2</sup>C)
- [**MCP23008 / MCP23017**](MCP23008-MCP23017) - I/O Expander (I<sup>2</sup>C)
- [**MGC3130**](MGC3130) - 3D Tracking and Gesture Controller
- [**MH-Z19B**](MH-Z19B) - CO<sub>2</sub> Sensor<img src="https://user-images.githubusercontent.com/5904370/53279635-54040780-3712-11e9-8c83-970280003b6d.png" width="200" align="right" />
- [**MCP23008 / MCP23017**](MCP230xx) - I/O Expander (I<sup>2</sup>C)
- [**MGC3130**](MGC3130) - 3D Tracking and Gesture Controller<img src="https://user-images.githubusercontent.com/5904370/53279635-54040780-3712-11e9-8c83-970280003b6d.png" width="200" align="right" />
- [**MH-Z19B**](MH-Z19B) - CO<sub>2</sub> Sensor
- **MLX90614** - MLX IR Temperature sensor (I<sup>2</sup>C)
- [**MPR121**](MPR121) - Proximity Capacitive Touch Sensor Controller (I<sup>2</sup>C)
- **MPU6050** - 3-Axis Gyroscope and 3-Axis Accelerometer sensor (I<sup>2</sup>C)

@ -33,11 +33,11 @@ You could use any kind of wire but [jumper wires](http://blog.sparkfuneducation.
### Computer with Linux, Windows or MacOS
You need a computer with a USB port to upload the firmware to your device and configure it.
### Smartphone
Tasmota installed from a precompiled binary needs to be configured to work with your Wi-Fi network before you can access the Tasmota Web UI. This is usually done by connecting to a Tasmota Wi-Fi Access Point with your smartphone (or tablet or computer with Wi-Fi).
Tasmota installed from a precompiled binary needs to be configured to work with your Wi-Fi network before you can access the Tasmota web UI. This is usually done by connecting to a Tasmota Wi-Fi Access Point with your smartphone (or tablet or computer with Wi-Fi).
## Needed Software
### Tasmota firmware
Download a Tasmota binary (.bin) file. If you're not sure which binary is the right one for you consult the [builds table](Builds) or just start with `sonoff.bin`.
Download a Tasmota binary (.bin) file. If you're not sure which binary is the right one for you consult the [builds table](Builds) or just start with `tasmota.bin`.
The latest _**development**_ binary files are available on the [OTA server](http://thehackbox.org/tasmota). The latest merged development code is compiled hourly. The latest _**master**_ release binary files can be downloaded from [GitHub](https://github.com/arendst/Tasmota/releases) or from the [OTA server](http://thehackbox.org/tasmota/release/).

@ -25,12 +25,12 @@ Copy Tasmota firmware binary files in 'tools/fw' directory. A set of pre-built f
Configure your Tasmota device with your firmware server URL:
```
Firmware Upgrade -> Upgrade by web server:
http://<ip_address>:5000/sonoff.bin
http://<ip_address>:5000/tasmota.bin
```
or use the following command:
```
Backlog OTAURL http://<ip_address>:5000/sonoff.bin; Upgrade 1
Backlog OTAURL http://<ip_address>:5000/tasmota.bin; Upgrade 1
```
## Usage

@ -10,7 +10,7 @@ Tasmota provides a Rule feature heavily inspired by the _ESPEasy_ implementation
## Introduction
Rules perform actions based on triggers (e.g., switch state change, temperature threshold, events like system boot, a defined timer elapsing, custom defined events, etc.) They are stored in flash and therefore will survive a reboot.
> Most pre-compiled binaries ([builds](Builds)) have the Rules feature enabled. The exception being `sonoff-minimal.bin` and `sonoff-classic.bin`. *If you are compiling your own firmware, in order to use rules, include `#define USE_RULES` in `user_config_override.h`.*
> Most pre-compiled binaries ([builds](Builds)) have the Rules feature enabled. The exception being `tasmota-minimal.bin` and `tasmota-classic.bin`. *If you are compiling your own firmware, in order to use rules, include `#define USE_RULES` in `user_config_override.h`.*
## Rule Syntax
**Nested rules are not supported.**

@ -48,7 +48,7 @@ Tasmota WEB config (Generic)
**IMPORTANT:** in order to have an accurate measurement of Voltage/Current/Power, you have to calibrate the internal meter with a well know load (like lamp or hair dryer) using this [detailed procedure](Power-monitoring-calibration).
## Update from my side
I managed to flash two Aisirer plugs using pre-compiled sonoff binaries, since my plugs had only 1M flash. I used 3.3V connected directly to the ESP board. I had some trouble with WLAN connectivity which caused the relays to pulse, so I switched to 2.3.0 core, which seems default again since a few releases. This runs quite well.
I managed to flash two Aisirer plugs using pre-compiled tasmota.binaries, since my plugs had only 1M flash. I used 3.3V connected directly to the ESP board. I had some trouble with WLAN connectivity which caused the relays to pulse, so I switched to 2.3.0 core, which seems default again since a few releases. This runs quite well.
Configure as BlitzWolf SHP(45) Module and also the power measurement is working.
## Update from nos86

@ -91,7 +91,7 @@ SonOTA should say something like:
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 (http://sonoff.maddox.co.uk/tasmota/sonoff.bin), or uploading image. Device will restart once again. Not upgrading to the standard image will result in not being able to store config values and more, as this is just an intermediate image.
* Update to Tasmota standard image, either by using OTA via internet (http://sonoff.maddox.co.uk/tasmota/tasmota.bin), or uploading image. Device will restart once again. Not upgrading to the standard image will result in not being able to store config values and more, as this is just an intermediate image.
* 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.

@ -35,9 +35,9 @@ If you have problems to program the 4CH Pro, you might find below tips useful:
3. Use an active USB HUB if your computer delivers not enough ampere
- External power source will stabilize the 4CH-pro and you can increase upload speed back to 115200.
- Using a Laptop instead of a Desktop Tower might also do the trick as Laptops have a battery to deliver more ampere.
4. you can not flash it with sonoff-minimal.bin, you need to flash it with sonoff.bin ! Using esptool following commands might be usefull (you need to change com port)
4. you can not flash it with tasmota-minimal.bin, you need to flash it with tasmota.bin ! Using esptool following commands might be usefull (you need to change com port)
to clear: esptool.exe -cp COM6 -cb 115200 -ce -v
to program: esptool.exe -cp COM6 -bm dout -cf sonoff.bin -v
to program: esptool.exe -cp COM6 -bm dout -cf tasmota.bin -v
## 4CH Pro DIPSwitch Configuration

@ -30,9 +30,9 @@ As Sonoff DIY is enabled by connecting GPIO16 to GND it may well be possible tha
- The utility should discover the device
- Select the device and toggle it `ON` and `OFF` to verify you are connected to the right device
- Select `Firmware flash` (`Brush machine` on newer versions of the tool)
- Select a Tasmota binary (e.g., [`sonoff-basic.bin`](http://thehackbox.org/tasmota/020300/sonoff-basic.bin)) or your own self-compiled binary. It must fit in the available free program space. You can use the 2.3.0 Core for this initial flash since it has the smallest program memory footprint. _**Do NOT use the sonoff-minimal pre-compiled binary**_ as it does not allow you to change any settings.
- Select a Tasmota binary (e.g., [`tasmota-basic.bin`](http://thehackbox.org/tasmota/020300/tasmota-basic.bin)) or your own self-compiled binary. It must fit in the available free program space. You can use the 2.3.0 Core for this initial flash since it has the smallest program memory footprint. _**Do NOT use the sonoff-minimal pre-compiled binary**_ as it does not allow you to change any settings.
> You may wish to [compile your own firmware](https://github.com/arendst/Tasmota/wiki/Compiling-Tasmota-on-Gitpod) with all the features you require and disabling the features you do not. This will usually result in a "full" binary that is under 500k. You can use the resulting firmware file instead of the pre-compiled `sonoff-basic.bin`.
> You may wish to [compile your own firmware](https://github.com/arendst/Tasmota/wiki/Compiling-Tasmota-on-Gitpod) with all the features you require and disabling the features you do not. This will usually result in a "full" binary that is under 500k. You can use the resulting firmware file instead of the pre-compiled `tasmota-basic.bin`.
- Select the device in the flash pop-up and then select OK
- Tasmota will be uploaded and started
@ -50,12 +50,12 @@ This procedure is recommended for MacOS, but also works for Linux.
- OS with `curl` and a network services discovery tool (e.g., `mDNS` for MacOS or `avahi-browse` for Linux)
- `sonoffDiy` SSID on your local network. Use a router/access point or configure your laptop/smartphone as a hotspot with the proper SSID and password.
- A `<webServer>` available on the same local network. Very simple web servers like `SimpleHTTPServer` will not work. For Mac, the [OSX built-in web server](Mac-OSX-Local-Web-Server-for-Tasmota-Firmware-Binaries) is recommended.
- A Tasmota binary (e.g., [`sonoff-basic.bin`](http://thehackbox.org/tasmota/020300/sonoff-basic.bin)) or your own self-compiled binary. It must fit in the available free program space. You can use the 2.3.0 Core for this initial flash since it has the smallest program memory footprint. _**Do NOT use the sonoff-minimal pre-compiled binary**_ as it does not allow you to change any settings.
>You may wish to [compile your own firmware](https://github.com/arendst/Tasmota/wiki/Compiling-Tasmota-on-Gitpod) with all the features you require and disabling the features you do not. This will usually result in a "full" binary that is under 500k. You can use the resulting firmware file instead of the pre-compiled `sonoff-basic.bin`. This way you will not have to perform the secondary OTA firmware update. _**Nevertheless, it is still recommended that you perform a `Reset 5` immediately after the Sonoff DIY flash completes.**_
- A Tasmota binary (e.g., [`tasmota-basic.bin`](http://thehackbox.org/tasmota/020300/tasmota-basic.bin)) or your own self-compiled binary. It must fit in the available free program space. You can use the 2.3.0 Core for this initial flash since it has the smallest program memory footprint. _**Do NOT use the sonoff-minimal pre-compiled binary**_ as it does not allow you to change any settings.
>You may wish to [compile your own firmware](https://github.com/arendst/Tasmota/wiki/Compiling-Tasmota-on-Gitpod) with all the features you require and disabling the features you do not. This will usually result in a "full" binary that is under 500k. You can use the resulting firmware file instead of the pre-compiled `tasmota-basic.bin`. This way you will not have to perform the secondary OTA firmware update. _**Nevertheless, it is still recommended that you perform a `Reset 5` immediately after the Sonoff DIY flash completes.**_
Upload the firmware file to the `<webServer>` available on the same local network.
- SHA256 `<SHAsum>` of firmware binary file
> `$ shasum -a 256 sonoff-basic.bin`
> `$ shasum -a 256 tasmota-basic.bin`
**_`1da0e89be4c01df033fa6da9d0c1db58c3deea354d7ad194f607d1f518db48f9`_**
@ -101,7 +101,7 @@ This procedure is recommended for MacOS, but also works for Linux.
**_`{"seq":2,"error":0}`_**
- Flash firmware at `/zeroconf/ota_flash`
> `$ curl http://<deviceIP>:8081/zeroconf/ota_flash -XPOST --data '{"deviceid":"<deviceID>","data":{"downloadUrl": "http://<webServer>/sonoff-basic.bin", "sha256sum": "<SHAsum>"} }'`
> `$ curl http://<deviceIP>:8081/zeroconf/ota_flash -XPOST --data '{"deviceid":"<deviceID>","data":{"downloadUrl": "http://<webServer>/tasmota-basic.bin", "sha256sum": "<SHAsum>"} }'`
**_`{"seq":2,"error":0}`_**
- Ping the device for about 30 seconds until it has rebooted
@ -110,8 +110,8 @@ This procedure is recommended for MacOS, but also works for Linux.
Once the firmware upload completes and the device restarts, the usual `sonoff-xxxx` SSID should now be available.
1. Set up Wi-Fi to connect your device to your network
2. **_Perform a `Reset 5` to wipe any flash remnants BEFORE attempting a Tasmota OTA flash for the first time_**
3. If you flashed `sonoff-basic.bin`, it is recommended that you upgrade to the firmware and Core variant that is needed for your device and use case (e.g., `sonoff.bin`). You _**must perform this update**_ using the local `File upload` OTA. **Do not use a web OTA** for this step. Download the firmware file from the [repository](http://thehackbox.org/tasmota) to your computer.
> **_Some users have reported that upgrading via web OTA from `sonoff-basic.bin` to another binary has resulted in an unresponsive device which has required a wired flash to recover._**
3. If you flashed `tasmota-basic.bin`, it is recommended that you upgrade to the firmware and Core variant that is needed for your device and use case (e.g., `tasmota.bin`). You _**must perform this update**_ using the local `File upload` OTA. **Do not use a web OTA** for this step. Download the firmware file from the [repository](http://thehackbox.org/tasmota) to your computer.
> **_Some users have reported that upgrading via web OTA from `tasmota-basic.bin` to another binary has resulted in an unresponsive device which has required a wired flash to recover._**
4. Once the desired firmware is on the device, continue the regular Tasmota setup process. Use the the appropriate Template from the [repository](https://blakadder.github.io/templates) to assign the device components to the GPIO pins. For example, the [Sonoff Mini template](https://blakadder.github.io/templates/sonoff_mini.html) assigns these GPIO:
<BR>GPIO | Tasmota<BR>Component | Device<BR>Function

@ -38,8 +38,8 @@ Using the TX T1 1-3 device template will work. A new T0 template is forthcoming.
## Start-to-Finish Flashing Guide
### [Flashing](Flashing)
1. Connect the device's serial interface pins to the [Serial-to-USB adapter](Prerequisites#serial-to-usb-adapter-with-33v-supply). **Be sure that your adapter is set to supply 3.3v**. Place a jumper wire from GND to the side of R19 nearest the screw hole cutout - this is connected to GPIO0.
2. Download `sonoff.bin` from http://thehackbox.org/tasmota
3. Have [`NodeMCU PyFlasher`](Flashing#nodemcu-pyflasher) running with the correct settings. Be sure to select `DOUT` and `Erase flash - yes`. Select the right COM port for your serial-to-USB adapter and select `sonoff.bin` from the folder where you downloaded the file.
2. Download `tasmota.bin` from http://thehackbox.org/tasmota
3. Have [`NodeMCU PyFlasher`](Flashing#nodemcu-pyflasher) running with the correct settings. Be sure to select `DOUT` and `Erase flash - yes`. Select the right COM port for your serial-to-USB adapter and select `tasmota.bin` from the folder where you downloaded the file.
4. Plug the serial adapter into the USB port and click the `Flash` button on `NodeMCU PyFlasher`.
5. When you get the flash complete, remove the GND jumper wire from GPIO0.
6. Cycle power on your device by disconnecting the serial adapter from the USB port for a couple of seconds and plugging it back in.

@ -5,7 +5,7 @@ Please see the [Hardware Preparation](https://github.com/arendst/Tasmota/wiki/Ha
Next, please see the [Flashing](https://github.com/arendst/Tasmota/wiki/Flashing) page for general information on the flashing process.
Flash the latest version of [`sonoff.bin`](http://thehackbox.org/tasmota/json/sonoff.bin):
Flash the latest version of [`tasmota.bin`](http://thehackbox.org/tasmota/json/tasmota.bin):
1. Connect your serial flashing device pins to the iFan03 (for connection locations see the pin out on the left hand side of the picture below).
![](https://github.com/tim-dcl/BRUH3-Home-Assistant-Configuration/blob/master/IMG_20190817_155847511_HDR.jpg)

@ -53,15 +53,15 @@ _(logging level `5`)_
When MQTT connects at 13:08:38, this sets the system to READY.
```
13:08:43 MQT: tele/sonoff/INFO3 = {"RestartReason":"Deep-Sleep Wake"}
13:08:43 MQT: tele/tasmota/INFO3 = {"RestartReason":"Deep-Sleep Wake"}
13:08:44 APP: Boot Count 84
13:08:44 CFG: Saved to flash at F4, Count 96, Bytes 3824
```
In this example, TELEPERIOD is 10. Therefore when TELEPERIOD is reached, telemetry reporting occurs.
```
13:08:48 MQT: tele/sonoff/STATE = {"Time":"2019-09-04T13:08:48","Epoch":1567595328,"Uptime":"0T00:00:14","UptimeSec":14,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":1,"Wifi":{"AP":1,"SSId":"MyWLAN","BSSId":"AA:FF:AA:AA:AA:AA","Channel":11,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:08","DeepSleep":300,"Heap":25160}}
13:08:48 MQT: tele/sonoff/SENSOR = {"Time":"2019-09-04T13:08:48","Epoch":1567595328,"ANALOG":{"A0":8}}
13:08:48 MQT: tele/tasmota/STATE = {"Time":"2019-09-04T13:08:48","Epoch":1567595328,"Uptime":"0T00:00:14","UptimeSec":14,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":1,"Wifi":{"AP":1,"SSId":"MyWLAN","BSSId":"AA:FF:AA:AA:AA:AA","Channel":11,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:08","DeepSleep":300,"Heap":25160}}
13:08:48 MQT: tele/tasmota/SENSOR = {"Time":"2019-09-04T13:08:48","Epoch":1567595328,"ANALOG":{"A0":8}}
```
DATETIME is set. Status and telemetry sent. Now start shutdown procedure.

@ -28,7 +28,7 @@
- **MAX31855** Thermocouple Sensor (SPI)
- **MAX31865** RTD Temperature Sensor Amplifier (SPI)
- **MAX44009** Ambient Light Sensor (I<sup>2</sup>C)
- [**MCP23008 / MCP23017**](MCP23008-MCP23017) I/O Expander (I<sup>2</sup>C)
- [**MCP23008 / MCP23017**](MCP230xx) I/O Expander (I<sup>2</sup>C)
- [**MGC3130**](MGC3130) 3D Tracking and Gesture Controller
- [**MH-Z19B**](MH-Z19B) CO<sub>2</sub> Sensor<img src="https://user-images.githubusercontent.com/5904370/53279635-54040780-3712-11e9-8c83-970280003b6d.png" width="250" align="right" />
- **MLX90614** MLX IR Temperature sensor (I<sup>2</sup>C)

@ -31,25 +31,25 @@ Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
Example:
**Pioneer Vol+**
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"PIONEER","Bits":64,"Data":"0xA55A50AFA55A50AF","DataLSB":"0xA55A0AF5A55A0AF5","Repeat":0}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"PIONEER","Bits":64,"Data":"0xA55A50AFA55A50AF","DataLSB":"0xA55A0AF5A55A0AF5","Repeat":0}}`
**Pioneer Vol-**
`tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"PIONEER","Bits":64,"Data":"0xA55AD02FA55AD02F","DataLSB":"0xA55A0BF4A55A0BF4","Repeat":0}}`
`tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"PIONEER","Bits":64,"Data":"0xA55AD02FA55AD02F","DataLSB":"0xA55A0BF4A55A0BF4","Repeat":0}}`
Toshiba (NEC): **Channel 1**
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FD807F","DataLSB":"0x40BF01FE","Repeat":0}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FD807F","DataLSB":"0x40BF01FE","Repeat":0}}`
Toshiba (NEC): **Channel 2**
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FD40BF","DataLSB":"0x40BF02FD","Repeat":0}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FD40BF","DataLSB":"0x40BF02FD","Repeat":0}}`
Toshiba (NEC): **Channel 3**
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FDC03F","DataLSB":"0x40BF03FC","Repeat":0}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x02FDC03F","DataLSB":"0x40BF03FC","Repeat":0}}`
As you can see above, `"DataLSB"` are easier to decode than `"Data"`. The third byte contains the command, and the fourth byte is the third with all bits reversed.
Example of HVAC message:
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"MITSUBISHI_HEAVY_152","Bits":152,"Data":"0xAD513CE51A08F705FA02FDC03F08F700FF807F","Repeat":0,"IRHVAC":{"Vendor":"MITSUBISHI_HEAVY_152","Model":-1,"Power":"on","Mode":"auto","Celsius":"on","Temp":22,"FanSpeed":"medium","SwingV":"off","SwingH":"off","Quiet":"off","Turbo":"off","Econo":"off","Light":"off","Filter":"off","Clean":"off","Beep":"off","Sleep":-1}}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"MITSUBISHI_HEAVY_152","Bits":152,"Data":"0xAD513CE51A08F705FA02FDC03F08F700FF807F","Repeat":0,"IRHVAC":{"Vendor":"MITSUBISHI_HEAVY_152","Model":-1,"Power":"on","Mode":"auto","Celsius":"on","Temp":22,"FanSpeed":"medium","SwingV":"off","SwingH":"off","Quiet":"off","Turbo":"off","Econo":"off","Light":"off","Filter":"off","Clean":"off","Beep":"off","Sleep":-1}}}`
`MQT: tele/sonoff/IR1/RESULT = {"IrReceived":{"Protocol":"COOLIX","Bits":24,"Data":"0xB25F78","DataLSB":"0x4DFA1E","Repeat":0,"IRHVAC":{"Vendor":"COOLIX","Model":-1,"Power":"on","Mode":"auto","Celsius":"on","Temp":22,"FanSpeed":"medium","SwingV":"off","SwingH":"off","Quiet":"off","Turbo":"off","Econo":"off","Light":"on","Filter":"off","Clean":"on","Beep":"off","Sleep":-1}}}`
`MQT: tele/tasmota/IR1/RESULT = {"IrReceived":{"Protocol":"COOLIX","Bits":24,"Data":"0xB25F78","DataLSB":"0x4DFA1E","Repeat":0,"IRHVAC":{"Vendor":"COOLIX","Model":-1,"Power":"on","Mode":"auto","Celsius":"on","Temp":22,"FanSpeed":"medium","SwingV":"off","SwingH":"off","Quiet":"off","Turbo":"off","Econo":"off","Light":"on","Filter":"off","Clean":"on","Beep":"off","Sleep":-1}}}`
`RSL: RESULT = {"Time":"2019-09-09T21:52:35","IrReceived":{"Protocol":"PANASONIC_AC","Bits":216,"Data":"0x0220E004000000060220E00400032C805F06000EE0000081000089","Repeat":0,"IRHVAC":{"Vendor":"PANASONIC_AC","Model":2,"Power":"on","Mode":"auto","Celsius":"on","Temp":22,"FanSpeed":"medium","SwingV":"auto","SwingH":"middle","Quiet":"off","Turbo":"off","Econo":"off","Light":"off","Filter":"off","Clean":"off","Beep":"off","Sleep":-1}}}`

@ -9,7 +9,7 @@ Two Teckin SP23s (marked V1.2) [purchased from Amazon UK](https://www.amazon.co.
Two additional Teckin SP23s were [purchased from Amazon UK](https://www.amazon.co.uk/TECKIN-Outlet-Wireless-Control-Required/dp/B07CVJYV3G) (July 2019) and successfully flashed using Tuya-Convert. Upgrading to Tasmota 6.6 and using BlitzWolf SHP configuration was problematic - LED's did not show power status - but downgrading to 6.3 and using BlitzWolf SHP2 as above gave perfect performance. The units were not disassembled so there was no way of determining board version.
A set of 4 Teckin SP23s were [purchased from Amazon UK](https://www.amazon.co.uk/gp/product/B07QN5XY89) (Sept 2019) and they flashed without issues using Tuya-Convert. This device functions properly with sonoff.bin 6.6.0 (LED flashing blue when ON) with the [template in the repository](https://blakadder.github.io/templates/teckin-sp23.html).
A set of 4 Teckin SP23s were [purchased from Amazon UK](https://www.amazon.co.uk/gp/product/B07QN5XY89) (Sept 2019) and they flashed without issues using Tuya-Convert. This device functions properly with tasmota.bin 6.6.0 (LED flashing blue when ON) with the [template in the repository](https://blakadder.github.io/templates/teckin-sp23.html).
Two devices purchased on Amazon ES were already patched, but have been successfully flashed with the `new-sdk` branch of [kueblc's tuya-convert fork](https://github.com/kueblc/tuya-convert).

@ -57,7 +57,7 @@ end quote
if you care led 2 is blue and led 1 is red
I flashed the standard sonoff.bin file to it with out any problems with both the esptools and with arduino
I flashed the standard tasmota.bin file to it with out any problems with both the esptools and with arduino
the one benefit to using arduino is that I was able to configure my wifi in advance
I hope to update this and clean it up but I thought I should get it up here as I found nothing about this plug before I forget to post and I can't remember any details.

@ -16,7 +16,7 @@ Tasmota is based on esp8266/Arduino.
A few days ago [esp8266/Arduino version 2.4.0](https://github.com/esp8266/Arduino) was released. Tasmota and it's supporting libraries as available in the lib folder will compile and run just fine.
Among many fixes this version also uses more flash space which makes it _almost_ impossible to easily OTA update Tasmota. A solution was developed months ago and involves an intermediate step using the sonoff-minimal.bin image available in all latest releases.
Among many fixes this version also uses more flash space which makes it _almost_ impossible to easily OTA update Tasmota. A solution was developed months ago and involves an intermediate step using the tasmota-minimal.bin image available in all latest releases.
Now that this step has _almost_ become mandatory it opens up the possibility to add some more functionality to Tasmota in the future.

@ -6,9 +6,9 @@
[Tuya-Convert](https://github.com/ct-Open-Source/tuya-convert) is the most successful method of flashing Tuya modules without opening the device and soldering.
Tuya-Convert comes with `sonoff-basic.bin` and [installs it by default](https://github.com/ct-Open-Source/tuya-convert#flash-third-party-firmware). That version is very limited and doesn't support all of the features required for normal use and it is necessary to immediately upgrade the firmware after completing the Tuya-Convert process.
Tuya-Convert comes with `tasmota-basic.bin` and [installs it by default](https://github.com/ct-Open-Source/tuya-convert#flash-third-party-firmware). That version is very limited and doesn't support all of the features required for normal use and it is necessary to immediately upgrade the firmware after completing the Tuya-Convert process.
**We recommend the [`sonoff-wifiman.bin`](http://thehackbox.org/tasmota/sonoff-wifiman.bin) build** which is small enough to use as the third-party binary during the conversion. It includes nearly all Tasmota features required for normal operation while removing superfluous I2C sensors, IR and RF support for size. It has pre set [`WifiConfig`](commands#wificonfig)`= 2` so the device will revert to [Wi-Fi Manager mode](https://github.com/tzapu/WiFiManager/blob/master/README.md#how-it-works) if it cannot connect to the configured Wi-Fi network. Naturally you can upgrade to any other build of the firmware if needed.
**We recommend the [`tasmota-wifiman.bin`](http://thehackbox.org/tasmota/tasmota-wifiman.bin) build** which is small enough to use as the third-party binary during the conversion. It includes nearly all Tasmota features required for normal operation while removing superfluous I2C sensors, IR and RF support for size. It has pre set [`WifiConfig`](commands#wificonfig)`= 2` so the device will revert to [Wi-Fi Manager mode](https://github.com/tzapu/WiFiManager/blob/master/README.md#how-it-works) if it cannot connect to the configured Wi-Fi network. Naturally you can upgrade to any other build of the firmware if needed.
**To ensure Tasmota runs reliably execute the command [`reset 5`](commands#reset) after Tuya-Convert is finished and Tasmota is up and running.** Doing this removes fragments of the original firmware left in flash which can create issues in the future. After all that is done you can proceed with the needed [configuration](initial-configuration) of your device.

@ -6,7 +6,7 @@ Don't forget to share what you have discovered and tested here in wiki :smiley:
functionId and dpId Setup:
```
stat/sonoff/RESULT = [{"fnId":11, "dpId":1},{"fnId":12, "dpId":101},{"fnId":13, "dpId":103}]
stat/tasmota/RESULT = [{"fnId":11, "dpId":1},{"fnId":12, "dpId":101},{"fnId":13, "dpId":103}]
```
`55aa0007000501010001010f` -> auto power mode is on (TBD)

@ -13,7 +13,7 @@ The PZEM-004T together with a HW-655 Relay provide a good clamp-on energy monito
* DuPont Connectors & 22 AWG wire
## Preparation
Install TASMOTA ([sonoff.bin](http://thehackbox.org/tasmota/020502/sonoff.bin)) is sufficient) on the ESP-01 and confirm it is functional before connecting the PZEM-004T to its serial interface. Use of pins other that the default hardware serial GPIO (01 & 03) ([requires 2.4.2 ESP Core or higher](https://github.com/arendst/Tasmota/wiki/What's-New#version-6303-20181105)) in order for TASMOTA to emulate a serial interface using software serial.
Install TASMOTA ([tasmota.bin](http://thehackbox.org/tasmota/020502/tasmota.bin)) is sufficient) on the ESP-01 and confirm it is functional before connecting the PZEM-004T to its serial interface. Use of pins other that the default hardware serial GPIO (01 & 03) ([requires 2.4.2 ESP Core or higher](https://github.com/arendst/Tasmota/wiki/What's-New#version-6303-20181105)) in order for TASMOTA to emulate a serial interface using software serial.
## Hardware connections
<img src="https://user-images.githubusercontent.com/34340210/51444410-2536e380-1cc5-11e9-8989-b181c2851863.png" height="400" /><br>

@ -1,6 +1,7 @@
Easily upgrade Tasmota to a newer version or different build while keeping all your settings.
The first rule of upgrading: _**If it ain't broke, don't fix it!**_ In other words, ensure that there is a good reason to mess with a working installation (e.g., a need to use a new feature or address a found problem fixed in a more current version).
_**The first rule of upgrading: If it ain't broke, don't fix it!**_
In other words, ensure that there is a good reason to mess with a working installation (e.g., a need to use a new feature or address a found problem fixed in a more current version).
Any time you upgrade it is highly recommended that you [back up your device settings](#device-settings). This is found in the web UI under the `Configuration` menu.
@ -30,7 +31,7 @@ If you want to upgrade to the latest release version click the first **Start Upg
![image](https://user-images.githubusercontent.com/5904370/55827075-ac983400-5b09-11e9-83d7-e6d576676db6.png)
During this process Tasmota will download the new firmware from the url and install it. It might need to download **`sonoff-minimal.bin`** first but all that happens automatically. All you have to do is **wait 2 to 5 minutes**.
During this process Tasmota will download the new firmware from the url and install it. It might need to download **`tasmota-minimal.bin`** first but all that happens automatically. All you have to do is **wait 2 to 5 minutes**.
After the upgrade is completed you can reconnect back to the Web UI and check the firmware version on the bottom of the page.
@ -38,20 +39,20 @@ After the upgrade is completed you can reconnect back to the Web UI and check th
If you wish to switch to a different [build](Builds) you have to change OtaUrl to the desired binary from our [OTA Server](http://thehackbox.org/tasmota/).
It is possible to create your own simple http OTA server (https is not supported) using Python and perform upgrades from there.
Install Python and from the folder where the binary (make sure `sonoff-minimal.bin` is located there too) is located run :
Install Python and from the folder where the binary resides (make sure `tasmota-minimal.bin` is located there too) run:
```
python -m http.server 8000
```
Change your OtaUrl to http://ipoftheserver:8000/yourbinary.bin and start the upgrade process.
## Upgrade by file upload
This process requires you to have a minimal build ([`sonoff-minimal.bin`](http://thehackbox.org/tasmota/sonoff-minimal.bin)) of the firmware since the upload process needs the space in flash memory to upload the new binary.
This process requires you to have a minimal build ([`tasmota-minimal.bin`](http://thehackbox.org/tasmota/release/tasmota-minimal.bin)) of the firmware since the upload process needs the space in flash memory to upload the new binary.
When you try to immediately upgrade to a new binary without using minimal firmware you will be greeted with this error.
![Upload error](https://user-images.githubusercontent.com/5904370/55827974-b327ab00-5b0b-11e9-968b-a654c4241ee9.png)
Browse to the minimal binary with **Choose File**. The chosen filename should be visible. *In our example we use **`sonoff-minimal.bin`***
Browse to the minimal binary with **Choose File**. The chosen filename should be visible. *In our example we use **`tasmota-minimal.bin`***
![minimal upgrade](https://user-images.githubusercontent.com/5904370/55828203-29c4a880-5b0c-11e9-8315-dff8a3aa9134.png)
@ -59,7 +60,7 @@ Wait until the device restarts. Web UI will display this warning message on top.
![minimal message](https://user-images.githubusercontent.com/5904370/55828993-e834fd00-5b0d-11e9-9221-b106f622c9fb.png)
Go to **Firmware Upgrade** again. This time browse to the binary you want to upgrade to with **Choose File** and click **Start upgrade**. *In our example we use **`sonoff-sensors.bin`***
Go to **Firmware Upgrade** again. This time browse to the binary you want to upgrade to with **Choose File** and click **Start upgrade**. *In our example we use **`tasmota-sensors.bin`***
![image](https://user-images.githubusercontent.com/5904370/55827836-68a62e80-5b0b-11e9-830b-9240d83ba11e.png)
@ -69,7 +70,7 @@ Your device can be upgraded using [commands](Commands) via MQTT, web requests or
[OtaUrl](Commands#OtaUrl) is used to set your OTA address.
```lua
otaurl http://thehackbox.org/tasmota/sonoff-sensors.bin
otaurl http://thehackbox.org/tasmota/tasmota-sensors.bin
```
*In this example we chose a development branch version with additional sensors support*

@ -136,8 +136,8 @@ See [development build changelog](https://github.com/arendst/Tasmota/blob/develo
* Add Http#Initialized rule trigger
* Add System#Save rule trigger executed just before a planned restart
* Add support for single JSON value pair allowing for trigger such as SSerialReceived#Data=on
* Add define USE_COUNTER to reduce program size in sonoff-basic.bin and sonoff-minimal.bin
* Add define USE_DHT to reduce program size in sonoff-basic.bin
* Add define USE_COUNTER to reduce program size in tasmota-basic.bin and tasmota-minimal.bin
* Add define USE_DHT to reduce program size in tasmota-basic.bin
* Add defines USE_EMULATION_WEMO and USE_EMULATION_HUE to control emulation features
* Add Toggle functionality to button double press when more devices are detected
* Add device OverTemp (>73 Celsius) detection to Energy Monitoring devices with temperature sensor
@ -321,10 +321,10 @@ To keep Tasmota this small I had to reduce redundancy as much as possible. I als
This worked kind of fine until version 2.4.0 of the [ESP8266/Arduino board manager](https://github.com/esp8266/Arduino) came along. This version needs an extra 22k for it's libraries and functionality. To provide easy OTA updates I had to tweak Tasmota even further to the point that major features like Emulation almost had to be disabled by default.
Luckily the ESP8266/Arduino board manager software adjusts it's free flash space based on the current program space. This means that a small program has more OTA flash space to use than a large program. I used this feature by providing the sonoff-minimal.bin firmware image containing only MQTT and a webserver which allows for larger Tasmota images by using a two step OTA approach.
Luckily the ESP8266/Arduino board manager software adjusts it's free flash space based on the current program space. This means that a small program has more OTA flash space to use than a large program. I used this feature by providing the tasmota-minimal.bin firmware image containing only MQTT and a webserver which allows for larger Tasmota images by using a two step OTA approach.
- First OTA upload the _sonoff-minimal.bin_ image in the small free space area
- Then OTA upload the final _sonoff.bin_ image in the larger free space area
- First OTA upload the _tasmota-minimal.bin_ image in the small free space area
- Then OTA upload the final _tasmota.bin_ image in the larger free space area
This process is now automated if used with an external OTA server.

@ -92,7 +92,7 @@ then
case "queryFW" :
actionsBroker.publishMQTT( "cmnd/" + device_id + "/status", "2")
case "upgrade" : {
actionsBroker.publishMQTT( "cmnd/" + device_id + "/otaurl", "http://sonoff.maddox.co.uk/tasmota/sonoff-DE.bin") // Replace DE with your country code or use sonoff.bin or other tasmota specialized firmware
actionsBroker.publishMQTT( "cmnd/" + device_id + "/otaurl", "http://thehackbox.org/tasmota/release/tasmota.bin") // Replace with your preferred build
actionsBroker.publishMQTT( "cmnd/" + device_id + "/upgrade", "1")
}
}
@ -251,7 +251,7 @@ then
case "queryFW" :
publish("broker", "cmnd/" + device_id + "/status", "2")
case "upgrade" : {
publish("broker", "cmnd/" + device_id + "/otaurl", "http://thehackbox.org/tasmota/sonoff.bin")
publish("broker", "cmnd/" + device_id + "/otaurl", "http://thehackbox.org/tasmota/tasmota.bin")
publish("broker", "cmnd/" + device_id + "/upgrade", "1")
}
}