forked from arendst/Tasmota
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from arendst/development
6.4.1.16
- Loading branch information
Showing
73 changed files
with
3,969 additions
and
2,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ build | |
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
*.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
## Sonoff-Tasmota template information | ||
Sonoff-Tasmota uses Device or Module information to control peripherals connected to GPIOs. This information is stored in the ``sonoff_template.h`` file as a device specific template. The template contains information about what GPIO should be connected to what peripheral and what GPIO may be configured online using the ``GPIO`` command or GUI Configure Module menu. In addition a device may need specific coding to process the data from these peripherals. The module number as provided by the ``Modules`` command is used to select this coding. | ||
|
||
Starting with version 6.4.1.16 Sonoff-Tasmota Modules can be extended by users online using a template. To provide easy processing by Sonoff-Tasmota a user template is written as JSON text and could look like this: | ||
|
||
{"NAME":"UserModule1","GPIO":[17,243,29,244,7,201,255,255,138,255,139,255,255],"FLAG":0,"BASE":18} | ||
|
||
The four properties with UPPERCASE property names have the following functionality: | ||
|
||
Property name | Property value description | ||
--------------|------------------------------------------------------------------------------------------------------------------- | ||
NAME | Up to 14 characters for the Module name | ||
GPIO | Up to 13 decimal numbers from 0 to 255 representing GPIO0 to GPIO5, GPIO09, GPIO10 and GPIO12 to GPIO16 | ||
FLAG | 8 bit mask flag register | ||
BASE | Module number of a hard-coded device to be used when device specific functionality is needed | ||
|
||
The above example, based on the Generic Module does not allow ADC0 input. | ||
|
||
## GPIO functionality | ||
The GPIO functionality numbers are the same is shown by command ``GPIOs``. In addition code 255 is added to select a GPIO as user configurable via the GUI Configure Module menu. | ||
|
||
## FLAG functionality | ||
The FLAG value is an 8-bit mask where each bit controls a features. Add FLAG values to set multiple bits. | ||
|
||
FLAG | Mask | Feature description | ||
-----|----------|------------------------------ | ||
1 | xxxxxxx1 | Allowing to use Analog0 (ADC0) as input if define USE_ADC_VCC in ``my_user_config.h`` is disabled | ||
2 | xxxxxx1x | Enable GUI pull-up control message | ||
4 | xxxxx1xx | Not used | ||
8 | xxxx1xxx | Not used | ||
16 | xxx1xxxx | Not used | ||
32 | xx1xxxxx | Not used | ||
64 | x1xxxxxx | Not used | ||
128 | 1xxxxxxx | Not used | ||
|
||
## BASE functionality | ||
The following table lists hard-coded device specific functionality. Notice that not all device modules need special handling. | ||
|
||
BASE | Module | Description | ||
-----|----------------|---------------------------------------------- | ||
4 | Sonoff Dual | Process relay and button via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps. Process buttons as single press only | ||
9 | Sonoff Touch | Invert ledstate 1 functionality | ||
10 | Sonoff LED | Set light type to 2 PWM channels disregarding SetOption15. Fix device specific LED instabilities by disabling GPIO04, GPIO5 and GPIO14 | ||
12 | 4 Channel | See 4 | ||
13 | Motor C/AC | Force all relays ON at Power On and disable command ``PowerOnState`` | ||
15 | EXS Relay(s) | Enable pulse latching using even/odd numbered relay pairs | ||
18 | Generic | Show Wemos specific pin information in GUI | ||
19 | H801 | Change hardware UART Tx from GPIO01 to GPIO02 | ||
20 | Sonoff SC | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps | ||
21 | Sonoff BN-SZ | Set light type to 1 PWM channel disregarding SetOption15 | ||
22 | Sonoff 4CH Pro | Button handling disregarding SetOption13 only allowing single press to enable RF learning while holding the button | ||
24 | Sonoff Bridge | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps. Process 16 buttons in web GUI. Enable EFM8BB1 firmware upload | ||
25 | Sonoff B1 | Set light type to RGBWC using MY92x1 | ||
26 | AiLight | Set light type to RGBW using MY92x1 | ||
27 | Sonoff T1 1CH | See 9 | ||
28 | Sonoff T1 2CH | See 9 | ||
29 | Sonoff T1 3CH | See 9 | ||
38 | Sonoff Dual R2 | Process buttons as single press only | ||
43 | Sonoff iFan02 | Enable command ``Fanspeed``. Disable Interlock and PulseTime. Tune status information, MQTT data and GUI. Sync with microcontroller. Process Domoticz Fan state | ||
47 | Xiaomi Philips | Process Color Temperature using PWM2 and Intensity using PWM1 | ||
53 | Tuya Dimmer | Enable and Process data via software or hardware serial interface using GPIO 148 and 149 or forced GPIO01 and GPIO03. Change baudrate to 9600 bps. Process all Buttons | ||
55 | ARMTR Dimmer | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 115200 bps. | ||
57 | PS-16-DZ | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 19200 bps. | ||
61 | YTF IR Bridge | Disable serial interface to stop loopback | ||
65 | Mi Desk Lamp | Process rotary and Button1 data specific to this device | ||
|
||
## Usage | ||
A user provided template can be stored in Sonoff-Tasmota using the ``Template`` command. It has the following options. | ||
|
||
Command | Payload | Description | ||
---------|----------|--------------------------------------- | ||
Template | | Show current user template | ||
Template | 0 | Copy active module template to user template | ||
Template | 1 .. 69 | Copy hard-coded module template to user template | ||
|
||
The following command will store a complete template based on the Generic module | ||
``Template {"NAME":"UserModule1","GPIO":[17,243,29,244,7,201,255,255,138,255,139,255,255],"FLAG":0,"BASE":18}`` | ||
|
||
The following command will update the name of a stored template | ||
``Template {"NAME":"UserModule2"}`` | ||
|
||
The following command will update the flag of a stored template | ||
``Template {"FLAG":1}`` | ||
|
||
The following command will update the base of a stored template to Generic | ||
``Template {"BASE":0}`` |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/TasmotaSerial-2.2.0/library.json → lib/TasmotaSerial-2.3.0/library.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/TasmotaSerial-2.2.0/library.properties → lib/TasmotaSerial-2.3.0/library.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=TasmotaSerial | ||
version=2.2.0 | ||
version=2.3.0 | ||
author=Theo Arends | ||
maintainer=Theo Arends <[email protected]> | ||
sentence=Implementation of software serial with hardware serial fallback for ESP8266. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ build_flags = ${esp82xx_defaults.build_flags} | |
-DVTABLES_IN_FLASH | ||
|
||
[core_2_5_0] | ||
; *** Esp8266 core for Arduino version Core 2.5.0 beta3 tested for Tasmota | ||
; *** Esp8266 core for Arduino version 2.5.0 release (still not available via platformio) | ||
platform = https://github.com/Jason2866/platform-espressif8266.git#Tasmota | ||
build_flags = ${esp82xx_defaults.build_flags} | ||
-Wl,-Teagle.flash.1m.ld | ||
|
@@ -130,12 +130,12 @@ board_build.flash_mode = dout | |
|
||
platform = ${core_active.platform} | ||
build_flags = ${core_active.build_flags} | ||
; -DUSE_CLASSIC | ||
; -DBE_MINIMAL | ||
; -DUSE_SENSORS | ||
; -DUSE_BASIC | ||
; -DUSE_KNX_NO_EMULATION | ||
; -DUSE_DISPLAYS | ||
; -DFIRMWARE_CLASSIC | ||
; -DFIRMWARE_MINIMAL | ||
; -DFIRMWARE_SENSORS | ||
; -DFIRMWARE_BASIC | ||
; -DFIRMWARE_KNX_NO_EMULATION | ||
; -DFIRMWARE_DISPLAYS | ||
; -DUSE_CONFIG_OVERRIDE | ||
|
||
; *** Fix [email protected] induced undesired all warnings | ||
|
@@ -184,7 +184,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DBE_MINIMAL | ||
build_flags = ${common.build_flags} -DFIRMWARE_MINIMAL | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
@@ -198,7 +198,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DUSE_BASIC | ||
build_flags = ${common.build_flags} -DFIRMWARE_BASIC | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
@@ -212,7 +212,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DUSE_CLASSIC | ||
build_flags = ${common.build_flags} -DFIRMWARE_CLASSIC | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
@@ -226,7 +226,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DUSE_KNX_NO_EMULATION | ||
build_flags = ${common.build_flags} -DFIRMWARE_KNX_NO_EMULATION | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
@@ -240,7 +240,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DUSE_SENSORS | ||
build_flags = ${common.build_flags} -DFIRMWARE_SENSORS | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
@@ -254,7 +254,7 @@ board = ${common.board} | |
board_build.flash_mode = ${common.board_build.flash_mode} | ||
board_build.f_cpu = ${common.board_build.f_cpu} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} -DUSE_DISPLAYS | ||
build_flags = ${common.build_flags} -DFIRMWARE_DISPLAYS | ||
monitor_speed = ${common.monitor_speed} | ||
upload_port = ${common.upload_port} | ||
upload_resetmethod = ${common.upload_resetmethod} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.