From cd775d39be86a8fc888a0bc463478faa2d9bddc6 Mon Sep 17 00:00:00 2001 From: blakadder Date: Fri, 1 Nov 2019 18:23:34 +0100 Subject: [PATCH] lights article and minor changes --- APDS-9960.md | 4 +- Commands.md | 50 ++++++++-------- Fast-power-cycle-device-recovery.md | 9 +++ Lights.md | 57 ++++++++++++++++--- Peripherals.md | 4 +- Supported-sensors.md | 4 +- ...12B-RGB-Shield.md => WS2812B-RGB-Shield.md | 0 ...2813B-Ledstrip.md => WS2812B-and-WS2813.md | 0 WebUI.md | 18 +++--- 9 files changed, 101 insertions(+), 45 deletions(-) create mode 100644 Fast-power-cycle-device-recovery.md rename Wemos-D1-Mini-and-WS2812B-RGB-Shield.md => WS2812B-RGB-Shield.md (100%) rename Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip.md => WS2812B-and-WS2813.md (100%) diff --git a/APDS-9960.md b/APDS-9960.md index 50be1f3b..8f15955f 100644 --- a/APDS-9960.md +++ b/APDS-9960.md @@ -49,6 +49,8 @@ and in MQTT topic (according to TelePeriod): | Sensor27 | 3 ...255 | Set ATIME register for different integration times| ### Example rules +***In gesture sensing mode `Tele-APDS9960` is the trigger (APDS9960 will not work)*** + Device will be in RGBC mode until something is close to it, then it switches into gesture mode for 60 seconds. ``` Rule on APDS9960#Proximity=250 do backlog Sensor27 1; RuleTimer1 60 endon on Rules#Timer=1 do Sensor27 0 endon @@ -61,7 +63,7 @@ Rule on APDS9960#Ambient<100 do POWER ON endon Control ON/OFF, brightness and color temperature with gestures ``` -Rule on APDS9960#Long do power toggle endon on APDS9960#Up do dimmer + endon on APDS9960#Down do dimmer - endon on APDS9960#Left do ct + endon on APDS9960#Right do ct - endon +Rule on Tele-APDS9960#Long do power toggle endon on Tele-APDS9960#Up do dimmer + endon on Tele-APDS9960#Down do dimmer - endon on Tele-APDS9960#Left do ct + endon on Tele-APDS9960#Right do ct - endon ``` ## Known issues: diff --git a/Commands.md b/Commands.md index 8992b6c0..a7f02ec6 100644 --- a/Commands.md +++ b/Commands.md @@ -1,23 +1,23 @@ -* [**How to Use Commands**](#how-to-use-commands) -* [**Device Control**](#control) -* [**Management and Configuration**](#management) -* [**Wi-Fi**](#Wi-Fi) -* [**MQTT**](#mqtt) -* [**Rules**](#rules) -* [**Timers**](#timers) -* [**Sensors**](#sensor) -* [**Power Monitoring**](#power-monitoring) -* [**Lights (PWM and addressable RGB LED lights)**](#light) -* [**RF 433MHz Bridge**](#sonoff-rf-bridge) -* [**IR Remote Control**](#ir-remote) -* [**SetOption List**](#setoption-overview) -* [**Serial Bridge**](#serial-bridge) -* [**MP3 Player**](#mp3-player) -* [**Domoticz**](#domoticz) -* [**KNX IP Protocol**](#knx) -* [**Displays**](#displays) -* [**Stepper Motors**](#Stepper-Motors) -* [**Blinds, Shutters and Roller Shades**](#blinds-shutters-and-roller-shades) +- [How to Use Commands](#how-to-use-commands) + - [Control](#control) + - [Management](#management) + - [Wi-Fi](#wi-fi) + - [MQTT](#mqtt) + - [Rules](#rules) + - [Timers](#timers) + - [Sensor](#sensor) + - [Power Monitoring](#power-monitoring) + - [Light](#light) + - [Sonoff RF Bridge](#sonoff-rf-bridge) + - [IR Remote](#ir-remote) + - [SetOption overview](#setoption-overview) + - [Serial Bridge](#serial-bridge) + - [mp3-player](#mp3-player) + - [Domoticz](#domoticz) + - [KNX](#knx) + - [Displays](#displays) + - [Stepper Motors](#stepper-motors) + - [Blinds, Shutters and Roller Shades](#blinds-shutters-and-roller-shades) The Sonoff-Tasmota firmware provides three powerful man machine interfaces:
**MQTT**, **web** and **serial**. @@ -328,7 +328,7 @@ HsbColor3|`0..100` = set brightness Led\|`#RRGGBB` = set Led\ hex color value where `` is the pixel number *(aplies only to addressable LEDs)* LedTable|`0` = do not use [LED gamma correction](https://learn.adafruit.com/led-tricks-gamma-correction?view=all) *(default prior to 6.5.0.9)*
`1` = use gamma correction *(default)* Pixels|`1..512` = set amount of pixels in strip or ring and reset [`Rotation`](#rotation) *(applies only to addressable LEDs)* -RGBWWTable|Allow compensation of unbalanced PWMchannels  »6.2.1.10
Used to adjust the power of each channel in case some LEDs are brighter
`PWM1,PWM2,PWM3,PWM4,PWM5` = channel range where `PWM` = `0..255`. *(default =`255,255,255,255,255`, anything lower reduces the range)*
_Range adjustment is computed **after** Gamma correction._
Example:
`RGBWWTable 64,64,64,64,64` limits maximum power to 25% for all 5 channels. +RGBWWTable|Control compensation of unbalanced PWM channels or [White Blend Mode](White-Blend-Mode)   »6.2.1.10
`PWM1,PWM2,PWM3,PWM4,PWM5` = channel range where: `PWM` = `0..255`.
*(default =`255,255,255,255,255`)*
Range adjustment is computed **after** Gamma correction.
_Example:_
`RGBWWTable 64,64,64,64,64` limits maximum power to 25% for all 5 channels. Rotation|`` = set amount of pixels to rotate (up to `Pixels` value) *(applies only to addressable LEDs)* Scheme|Light effects
`+` = next scheme
`-` = previous scheme
`0` = single color for LED light *(default)*
`1` = start wake up sequence (same as [`Wakeup`](#wakeup))
`2` = cycle up through colors using Speed option
`3` = cycle down through colors using Speed option
`4` = random cycle through colors using Speed and Fade ||**The following schemes are usable only with addressable LEDs, e.g. WS281X, Neopixel**
`5` = clock mode ([example](https://hackaday.io/project/28194-esp-and-ws2812-based-clock))
`6` = candlelight pattern
`7` = RGB pattern
`8` = Christmas pattern
`9` = Hannukah pattern
`10` = Kwanzaa pattern
`11` = rainbow pattern
`12` = fire pattern @@ -337,7 +337,7 @@ Wakeup|Start wake up sequence from OFF to stored `Dimmer` val WakeupDuration|`1..3600` = set wake up duration in seconds White|  »6.4.0
`1..100` = set white channel brightness in single white channel lights (single W or RGBW lights) Width\|x = `1..4`
`1` - `0..4` = LED group width *([Scheme](#Scheme) `6..12` only)*
`2` - `0..32` = seconds hand width *([Scheme](#Scheme) `5` only)*
`3` - `0..32` = minutes hand width *([Scheme](#Scheme) `5` only)*
`4` - `0..32` = hour hand width *([Scheme](#Scheme) `5` only)* -See also|[`SetOption15`](#SetOption15) - Set PWM control
[`SetOption16`](#SetOption16) - Reverse Clock Scheme direction
[`SetOption17`](#SetOption17) - Show [`Color`](#Color) string as hex or decimal
[`SetOption20`](#SetOption20) - Update without turning power on
[`SetOption37`](#SetOption37) - Color remapping for led channels
[`SetOption68`](#Setoption68) - PWM Channel control +See also|[`SetOption15`](#SetOption15), [`SetOption16`](#SetOption16), [`SetOption17`](#SetOption17), [`SetOption20`](#SetOption20), [`SetOption37`](#SetOption37) and [`SetOption68`](#Setoption68) ### [Sonoff RF Bridge](Sonoff-RF-Bridge-433) @@ -379,7 +379,7 @@ SetOption10|When the device MQTT topic changes
`0` SetOption11|Swap button single and double press [functionality](Control-other-devices#double-press--hold)
`0` = disabled *(default)*
`1` = enabled SetOption12|Configuration saving to flash option
`0` = allow dynamic flash save slot rotation *(default)*
`1` = use fixed eeprom flash slot SetOption13|Allow immediate action on single button press
`0` = single, multi-press and hold button actions *(default)*
`1` = only single press action for immediate response (i.e., disable multipress detection). Disable by holding for 4 x button hold time (see [`SetOption32`](#setoption32)). -SetOption15|Set PWM control for LED lights
`0` = basic PWM control
`1` = control with [`Color`](#Color) or [`Dimmer`](#Dimmer) commands +SetOption15|Set PWM control for LED lights
`0` = basic PWM control
`1` = control with [`Color`](#Color) or [`Dimmer`](#Dimmer) commands _(default)_ SetOption16|Set addressable LED Clock scheme parameter
`0` = clock-wise mode *(default)*
`1` = counter-clock-wise mode SetOption17|Show [`Color`](#Color) string as
`0` = hex string *(default)*
`1` = comma-separated decimal string SetOption18|Set status of signal light paired with [CO2 sensor](#sensor14)
`0` = disable light *(default)*
`1` = enable light @@ -415,8 +415,8 @@ SetOption60|Enable normal sleep instead of [dynamic slee SetOption61|Force [local operation](https://github.com/arendst/Sonoff-Tasmota/pull/4562#issuecomment-446230001) when [`ButtonTopic`](#ButtonTopic) or [`SwitchTopic`](#SwitchTopic) is set.  »6.3.0.16
`0` = disable *(default)*
`1` = enable SetOption62|Set retain on Button or Switch hold messages  »6.4.1.19
`0` = disable *(default)*
`1` = don't use retain flag on `HOLD` messages SetOption63|Set relay state feedback scan at restart ([#5594](../issues/5594), [#5663](../issues/5663))  »6.5.0.9
`0` = Scan relay power feedback state at restart *(default)*
`1` = Disable relay power feedback state scanning at restart -SetOption64|Switch between `-` or `_` as sensor name separator  »6.5.0.12
`0` = sensor name index separator is "-" (hyphen) *(default)*
`1` = sensor name index separator is "_" (underscore)
*Affects DS18X20, DHT, BMP and SHT3X sensor names in tele messages* -SetOption65|Set fast power cycle detection for device reset  »6.6.0.20
`0` = fast power cycle device recovery procedure enabled *(default)*
`1` = disable fast power cycle device recovery procedure +SetOption64|Switch between `-` or `_` as sensor name separator  »6.5.0.12
`0` = sensor name index separator is `-` _(hyphen)_ *(default)*
`1` = sensor name index separator is `_` _(underscore)_
*Affects DS18X20, DHT, BMP and SHT3X sensor names in tele messages* +SetOption65|Control [fast power cycle detection](Fast-power-cycle-device-recovery)  »6.7.1
`0` = enabled *(default)*
`1` = disabled SetOption66|Set publishing TuyaReceived to MQTT  »6.7.0
`0` = disable publishing `TuyaReceived` over MQTT *(default)*
`1` = enable publishing `TuyaReceived` over MQTT SetOption67|iFan03 Buzzer control  »6.6.0.2
`0` = disable Sonoff iFan03 buzzer *(default)*
`1` = enable Sonoff iFan03 buzzer SetOption68|Multi-channel PWM instead of a single light  »6.6.0.3
`0` = Treat [PWM](#pwm) as a single light *(default)*
`1` = Treat [PWM](#pwm) as separate channels. In this mode, use [`Power`](#power) to turn lights on and off, and [`Channel`](#channel) to change the value of each channel.
[`Color`](#color) still works to set all channels at once.
***Requires restart after change*** diff --git a/Fast-power-cycle-device-recovery.md b/Fast-power-cycle-device-recovery.md new file mode 100644 index 00000000..7ad4b503 --- /dev/null +++ b/Fast-power-cycle-device-recovery.md @@ -0,0 +1,9 @@ +**Introduced in v6.7.1** + +Fast power cycle device recovery is implemented for situations where a device cannot be reset to firmware defaults (no serial access, no button). It resets all Tasmota settings (equal to [`reset 3`](commands#reset) after 4 power cycles. + +## To use: +1. Cut power from the device completely for 30 seconds +2. Power the device on and off three times with intervals lower than 10 seconds and leave it on after fourth time +3. Fast power cycle device recovery should activate and the device should be reset to firmware defaults + > If you flashed a precompiled binary you can [reconfigure](https://github.com/arendst/Tasmota/wiki/Initial-Configuration#configure-wi-fi) the device using webUI \ No newline at end of file diff --git a/Lights.md b/Lights.md index 113817e0..82b90b50 100644 --- a/Lights.md +++ b/Lights.md @@ -1,11 +1,25 @@ -Tasmota WebUI displays **Brightness** and **CT** or **White** level sliders depending on your module or the number of PWM channels configured. +Lights come in various shapes (bulb, strips, ceiling lights, ...) but in Tasmota they are separated in 3 categories: + - [Channel controlled LEDs](#channel-controlled-LEDs) + - [Addressable LEDs](#addressable-LEDs) + - [Status LEDs](#status-LEDs) -The WebUI doesn't have a color picker for RGB lights due to memory and flash size requirements to implement one. Instead use [`Color`](commands#color) to control colors. -Refer to [**light commands**](Commands#light) for all possibilities to control your lights. +## Lights in webUI +Tasmota' webUI displays only **Brightness**, **CT**, **White** or **PWM** level sliders depending on the light component, the number of PWM channels configured and SetOption used. -### Channel mapping -By default the PWM channels are mapped accordingly depending on the number of used channels: +***There are no RGB controls in the webUI.*** Use [`Color`](commands#color) commands instead. + +>The webUI doesn't have a color picker for RGB lights due to memory and flash size requirements to implement one. + +See [**light commands**](Commands#light) for how to control lights. + +## Channel controlled LEDs +Lights controlled using up to 5 channels (red, green, blue, cold white, warm white). Channels are controlled using PWM or APDM. + +### PWM +PWM (Pulse Width Modulation) is the most common method of controlling LED lights. + +These lights are configured by assigning `PWM1(i)` through `PWM5(i)` components to their GPIOs. Depending on the number of used PWMs Tasmota will recognize the light as |Channels|PWM1|PWM2|PWM3|PWM4|PWM5| |---|---|---|---|---|---| @@ -15,8 +29,35 @@ By default the PWM channels are mapped accordingly depending on the number of us |4|Red|Green|Blue|White|| |5|Red|Green|Blue|Cold White|Warm White| -When connecting more than one light strip to PWMs, you cannot control them separately in the WebUI due to the above mapping. Use [`Channel`](commands#channel) to dim each PWM channel individually. +If you require individual channel control (f.e. when connecting multiple single channel light strips to a multichannel LED controller) use [`SetOption68 1`](commands#setoption68) to control each PWM individually with sliders in webUI and [`Channel`](commands#channel) commands. -Some lights use different controllers instead of PWM (f.e. SM16716 or MY92x1). In that case channel mapping is dependent on the controller. It can be remapped using [`SetOption37`](Commands#setoption37). +For better color mixing of RGB and white channels read about [White-Blend-Mode](White Blend Mode). -For addressable LED's refer to [WS281XB article](Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip). \ No newline at end of file +### MY92xx +MY92xx [family](http://www.my-semi.com/content/products/product_list.aspx?id=2) of drivers uses Adaptive Pulse Density Modulation. + +Configured in Tasmota by assigning `MY92x1 DI` and `MY92x DCKI` components to their GPIOs (some devices might have more than one MY92xx controller) + +Channel mapping for such devices is dependent on the controllers but is easily [remapped](SetOption37---Color-channel-mapping) using [`SetOption37`](Commands#setoption37). + +### SM16716 +SM16716 LEDs, sometimes mislabelled as WS2801. + +Configured in Tasmota by assigning `SM16716 CLK`, `SM16716 DAT` and `SM16716 PWR` component to their GPIOs. + +Some SM16716 bulbs have BGR order and need [`SetOption37 54`](commands#setoption57) to work properly. + +## Addressable LEDs +Lights where each LED is individually controlled. In these lights it is possible to adjust each LEDs power, color and brightness, all just with the use of a single GPIO pin. + +WebUI shows only the brightness slider and power toggle for these lights, all other controls are available with [commands](commands#light). + +### WS2812 +Any light using WS2811, WS2812b, WS2813 or SK6812 LEDs falls into this component. They're also commonly called Neopixel lights. + +Configured in Tasmota by assigning `WS2812` component to its GPIO. + +For wiring, see instructions for [LED strip](WS2812B-and-WS2813) or [Wemos RGB shield](WS2812B-RGB-Shield). + +## Status LEDs +Special subset of lights used to convey device status such as Wi-Fi and power. [Read more...](Status-LED) \ No newline at end of file diff --git a/Peripherals.md b/Peripherals.md index 8aaf4f88..81047d1e 100644 --- a/Peripherals.md +++ b/Peripherals.md @@ -67,8 +67,8 @@ More about [general configuration](https://github.com/arendst/Sonoff-Tasmota/wik - **TX20** - La Crosse Wind (Anemometer) - sensor (GPIO) - [**VEML6070**](Wemos-D1-Mini-and-VEML6070-UV-Sensor) - UV Sensor - **VL53L0x** - Time of flight sensor (I2C) -- [**WS2812B**](Wemos-D1-Mini-and-WS2812B-RGB-Shield) - RGB Shield -- [**WS2812B/WS2813B**](Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip) - LED Strip +- [**WS2812B**](WS2812B-RGB-Shield) - RGB Shield +- [**WS2812B/WS2813B**](WS2812B-and-WS2813) - LED Strip - **Xadow, Grove** - Multi-channel Gas sensor (I2C) [Google Sheet list of supported peripherals](https://docs.google.com/spreadsheets/d/1VaZrCUjNosUQGYBX0pTVoY_rkSzEIcTP8K3052smOB4/edit?usp=sharing) diff --git a/Supported-sensors.md b/Supported-sensors.md index 98be120d..a7a2e4e8 100644 --- a/Supported-sensors.md +++ b/Supported-sensors.md @@ -62,8 +62,8 @@ - **TX20** La Crosse Wind (Anemometer) sensor (GPIO) - [**VEML6070**](Wemos-D1-Mini-and-VEML6070-UV-Sensor) UV Sensor - **VL53L0x** Time of flight sensor (I2C) -- [**WS2812B**](Wemos-D1-Mini-and-WS2812B-RGB-Shield) RGB Shield -- [**WS2812B/WS2813B**](Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip) LED Strip +- [**WS2812B**](WS2812B-RGB-Shield) RGB Shield +- [**WS2812B/WS2813B**](WS2812B-and-WS2813) LED Strip - **Xadow, Grove** Multi-channel Gas sensor (I2C) ## Expanding your devices diff --git a/Wemos-D1-Mini-and-WS2812B-RGB-Shield.md b/WS2812B-RGB-Shield.md similarity index 100% rename from Wemos-D1-Mini-and-WS2812B-RGB-Shield.md rename to WS2812B-RGB-Shield.md diff --git a/Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip.md b/WS2812B-and-WS2813.md similarity index 100% rename from Wemos-D1-Mini-and-WS2812B---WS2813B-Ledstrip.md rename to WS2812B-and-WS2813.md diff --git a/WebUI.md b/WebUI.md index 9b786841..763507ac 100644 --- a/WebUI.md +++ b/WebUI.md @@ -1,4 +1,6 @@ -Tasmota's web user interface is a practical way to control and manage your tasmotised device. +Tasmota's web user interface is a practical way to control and manage your tasmotised device. + +To access it use your device's IP address in your favorite web browser. ### Configuration Configuration menu allows you to configure everything from components to Wi-Fi and gives you the option to backup and restore the configuration in a secure location. @@ -10,22 +12,24 @@ Displays a single page loaded with information about the device including: curre An easy to use menu to initiate a firmware [upgrade](Upgrading) from an uploaded .bin or an OTA server. ### Console -Terminal access to Tasmota. Issue [commands](Commands) here or follow the information stream. Useful for debugging with [˙Weblog`](Commands#weblog) commands +Terminal access to Tasmota. Issue [commands](Commands) here or follow the information stream. Useful for debugging when using [˙Weblog 4`](Commands#weblog). ## Themes -WebUI is themable starting with »6.6.0. To apply the theme copy the entire command and send it in console or via MQTT. +WebUI is themable starting with »6.6.0 using [`WebColor`](commands#webcolor) commands. + +To apply the theme copy the entire command and send it in console or via MQTT. Dark theme (default since 7.0) -``` +```haskell WebColor {"WebColor":["#eeeeee","#181818","#4f4f4f","#000000","#dddddd","#008000","#222222","#ff0000","#008000","#ffffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#ffffff","#999999","#000000"]} ``` White theme (default until 6.7.1.) -``` +```haskell WebColor {"WebColor":["#000000","#ffffff","#f2f2f2","#000000","#ffffff","#000000","#ffffff","#ff0000","#008000","#ffffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#ffffff","#999999"]} ``` Halloween -``` -{"WebColor":["#cccccc","#3d3f41","#3d3f41","#93c763","#293134","#93c763","#293134","#ff0000","#008000","#ffffff","#ec7600","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#ffffff","#999999"]} +```haskell +WebColor {"WebColor":["#cccccc","#3d3f41","#3d3f41","#93c763","#293134","#93c763","#293134","#ff0000","#008000","#ffffff","#ec7600","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#ffffff","#999999"]} ``` \ No newline at end of file