mirror of https://github.com/arendst/Tasmota.git
template to use when #define necessary
parent
7b7f34d524
commit
c822c19674
|
@ -1,11 +1,11 @@
|
|||
This driver adds support to wirelessly control blinds and roller shades connected to regular ON/OFF motors or stepper motors.
|
||||
|
||||
To use this feature, you must compile your own firmware binary. Use any of the [available compilation methods](https://github.com/arendst/Sonoff-Tasmota/wiki/Flashing#flashing-and-compiling-from-source) you prefer. Add the following compiler directives to `user_config_override.h`:
|
||||
**This feature is not included in precompiled binaries.** To use it you must [compile your build](compile-your-build). Add the following to `user_config_override.h`:
|
||||
```
|
||||
#ifndef USE_SHUTTER
|
||||
#define USE_SHUTTER // (+6k code)
|
||||
#define USE_SHUTTER // Add Shutter support (+6k code)
|
||||
#endif
|
||||
```
|
||||
----
|
||||
This driver adds support to wirelessly control blinds and roller shades connected to regular ON/OFF motors or stepper motors.
|
||||
|
||||
The device must have at least two relays (e.g., a [Sonoff Dual R2](#sonoff-dual-r2-required-configuration)). Otherwise the shutter feature will not work.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Many times one just needs to download a pre-compiled binary and perform the nece
|
|||
|
||||
The binary files available on [GitHub](https://github.com/arendst/Sonoff-Tasmota/releases) are for the current master release version only. These master release binaries are also available from the [OTA server](http://thehackbox.org/tasmota/release/). However, the latest development branch code binaries are only available from the [OTA server](http://thehackbox.org/tasmota/).
|
||||
|
||||
Features that are not available in any release build have to be enabled in source code and compiled yourself. If you opt to self-compile your own binary file(s), you must ensure that the appropriate feature `#define` variable is defined in `user_config_override.h` in order for that code to be compiled into your binary.
|
||||
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**
|
||||
|
|
51
Displays.md
51
Displays.md
|
@ -1,37 +1,6 @@
|
|||
**This feature is not included in precompiled binaries.** To use it you must [compile your build](compile-your-build). Add the following to `user_config_override.h`:
|
||||
|
||||
## Display Commands
|
||||
|
||||
|Command | Parameters
|
||||
|:--- | :---
|
||||
<a id="Display"> </a> Display | Show current display setting as a JSON payload
|
||||
<a id="DisplayAddress"> </a> DisplayAddress | `0..255` Set display module address
|
||||
<a id="DisplayDimmer"> </a> DisplayDimmer | `0` Turn the display off<BR> `1..100` Turn the display on<BR>`0..100` Set display luminosity *(only on 8x8 Dot-Matrix displays)*
|
||||
<a id="DisplayMode"> </a> DisplayMode | `0..5` Set to display [predefined content](#displaymode-parameters) according to display type
|
||||
<a id="DisplayModel"> </a> DisplayModel | Set display model:<BR>`1` = [I<sup>2</sup>C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)<BR>`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default I<sup>2</sup>C addresses `0x3C`, `0x3D`)<BR>`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix<BR>`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD<BR>`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3-wire SPI)<BR>`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3-wire SPI)<BR>`7` = [SH1106](https://www.ebay.de/itm/1-3-OLED-Display-Weis-SH1106-128x64-I2C-Modul-Arduino-Raspberry-Pi/162572755829?hash=item25da176375:g:hdgAAOSwQKZdQZ10) OLED 128x64 (default I<sup>2</sup>C address `0x3c`)<BR>`8` = [ILI9488](https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board) TFT 480x320 (capacitive touch, hardware 3-wire SPI)<BR>`9` = [SSD1351](https://www.ebay.de/itm/1-5-128x128-OLED-Display-Modul-RGB-SPI-Interface-Arduino-Raspberry-Pi/123256209315?hash=item1cb2a47fa3:g:WtsAAOSwZb5bTfjF) color OLED 128x128 (hardware 3-wire SPI)<BR>`10` = [RA8867](https://www.buydisplay.com/default/spi-7-inch-tft-lcd-dislay-module-1024x600-ra8876-optl-touch-screen-panel) TFT LCD 1024x600 (capacitive touch, hardware 4-wire SPI)
|
||||
<a id="DisplayRefresh"> </a> DisplayRefresh | `1..7` Set time in seconds to update predefined content when using `DisplayMode` ≠ `0`
|
||||
<a id="DisplaySize"> </a> DisplaySize | `1..4` Set display scale-up size *(SSD1306 and ILI9341 only)*
|
||||
<a id="DisplayRotate"> </a> DisplayRotate | Set rotation angle<BR> `0` = 0°<BR> `1` = 90°<BR> `2` = 180°<BR> `3` = 270°
|
||||
<a id="DisplayText"> </a> DisplayText | `<value>` - See [DisplayText use](displays#displaytext-use)
|
||||
<a id="DisplayCols"> </a> DisplayCols | `1..44` Set number of display columns *(for display modes>0)*
|
||||
<a id="DisplayRows"> </a> DisplayRows | `1..32` Set number of display rows *(for display modes>0)*
|
||||
<a id="DisplayFont"> </a> DisplayFont | Specify the current font<BR>`0` use classic GFX font<BR>`1` = 12<BR>`2` = 24<BR>`3` = 8 (opt)<BR>`7` use RA8876 internal font
|
||||
<a id="DisplayWidth"> </a> DisplayWidth | Specify the display width in pixels *(SSD1306 only)*
|
||||
<a id="DisplayHeight"> </a> DisplayHeight | Specify the display height in pixels *(SSD1306 only)*
|
||||
|
||||
## DisplayMode Parameters
|
||||
|
||||
The display driver is able to display predefined setups of text or user defined text. To display text using `DisplayText` set `DisplayMode` to `0`, or set `DisplayMode` to `1` for the HT16K33 dot-matrix display.
|
||||
|
||||
Parameter | LCD Display | OLED Display | TFT Display
|
||||
------------ | ---------------------- | ----------------------------------- | ----------------------------
|
||||
0 | DisplayText | DisplayText | DisplayText
|
||||
1 | Time/Date | Time/Date | Time/Date
|
||||
2 | Local sensors | Local sensors | Local sensors
|
||||
3 | MQTT and Time/Date | Local sensors and Time/Date | Local sensors and Time/Date
|
||||
4 | Local sensors | MQTT and local sensors | MQTT and local sensors
|
||||
5 | MQTT and Time/Date | MQTT, local sensors and Time/Date | MQTT, local sensors and Time/Date
|
||||
|
||||
## Compilation \#define Directives Used
|
||||
## \#define directives
|
||||
|
||||
Feature | Description
|
||||
| -- | -- |
|
||||
|
@ -51,6 +20,22 @@ SHOW_SPLASH | Enable initialization splash message on the display
|
|||
USE_AWATCH | Enables analog watch support
|
||||
USE_GRAPH | Enable line charts. Also requires `NUM_GRAPHS`
|
||||
|
||||
----
|
||||
## [Display Commands](commands#displays)
|
||||
|
||||
## DisplayMode Parameters
|
||||
|
||||
The display driver is able to display predefined setups of text or user defined text. To display text using `DisplayText` set `DisplayMode` to `0`, or set `DisplayMode` to `1` for the HT16K33 dot-matrix display.
|
||||
|
||||
Parameter | LCD Display | OLED Display | TFT Display
|
||||
------------ | ---------------------- | ----------------------------------- | ----------------------------
|
||||
0 | DisplayText | DisplayText | DisplayText
|
||||
1 | Time/Date | Time/Date | Time/Date
|
||||
2 | Local sensors | Local sensors | Local sensors
|
||||
3 | MQTT and Time/Date | Local sensors and Time/Date | Local sensors and Time/Date
|
||||
4 | Local sensors | MQTT and local sensors | MQTT and local sensors
|
||||
5 | MQTT and Time/Date | MQTT, local sensors and Time/Date | MQTT, local sensors and Time/Date
|
||||
|
||||
# DisplayText Use
|
||||
|
||||
The `DisplayText` command is used to display text as well as graphics and graphs on LCD, OLED and e-Paper
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# Please use this exact paragraph (formatting and links) at the beginning of an article for a feature that is not included in precompiled builds
|
||||
|
||||
**This feature is not included in precompiled binaries.** To use it you must [compile your build](compile-your-build). Add the following to `user_config_override.h`:
|
||||
```
|
||||
#ifndef USE_SHUTTER
|
||||
#define USE_SHUTTER // Add Shutter support (+6k code)
|
||||
#endif
|
||||
```
|
||||
----
|
|
@ -106,7 +106,7 @@ esptool -cp COM5 -bm dout -cf sonoff.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.**
|
||||
|
||||
# Flashing and compiling from source
|
||||
Tutorials for setting up development environments if you want to modify the code or default settings and compile your own binaries.
|
||||
Tutorials for setting up development environments if you want to modify the code or default settings and [compile your own binaries](compile-your-build).
|
||||
- [**PlatformIO**](PlatformIO) - setup and configure [PlatformIO](https://platformio.org) for Tasmota compilation and upload
|
||||
- [**PlatformIO CLI**](PlatformIO-CLI) - how to flash Tasmota using the PlatformIO command line interface on Linux
|
||||
- [**PlatformIO-Core**](Create-your-own-Firmware-Build-without-IDE) - automate firmware builds using PlatformIO-Core and flash with esptool
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Deep sleep support for up to 1 day (i.e., 86,400 seconds) ([`DeepSleepTime`](Commands#deepsleeptime)).
|
||||
|
||||
:warning: **This feature is disabled by default. To enable it, you have to compile your own firmware.** :warning:
|
||||
**This feature is not included in precompiled binaries.** To use it you must [compile your build](compile-your-build). Add the following to `user_config_override.h`:
|
||||
|
||||
Add the following compiler directives to `user_config_override.h`:
|
||||
```
|
||||
#ifndef USE_DEEPSLEEP
|
||||
#define USE_DEEPSLEEP # adds +1k flash size
|
||||
#define USE_DEEPSLEEP // Add support for deepsleep (+1k code)
|
||||
#endif
|
||||
```
|
||||
----
|
||||
Deep sleep support for up to 1 day (i.e., 86,400 seconds) ([`DeepSleepTime`](Commands#deepsleeptime)).
|
||||
|
||||
The ESP8266 has a limitation of a maximum of ~71 minutes deep sleep. To overcome the limitation, a short wake-up is performed - the device will wake up every hour for <0.3 seconds until the deep sleep time is reached. The remaining deep sleep time is decremented, and the device is then put back in deep sleep again. The remaining time is stored in RTC memory. As long as the device is powered (e.g., via the battery), this should work fine. Flash memory is not used because of how often this has to occur (every hour) and the time it takes for the flash to be ready takes much longer than the total time to write to the RTC.
|
||||
|
||||
|
|
Loading…
Reference in New Issue