mirror of https://github.com/arendst/Tasmota.git
Created Status LED (markdown)
parent
0789aa55a0
commit
f0fb3a9b8c
|
@ -0,0 +1,34 @@
|
||||||
|
**Status LEDs** are the LEDs on the device that display its state.
|
||||||
|
|
||||||
|
Those LEDs are defined in a template or module using Led1, Led2, Led3 or Led4 (or Led1i, Led2i, Led3i or Led4i) and additionally (starting in version 6.5.0.12) using LedLink (or LedLinki). It is not recommended to assign Led and Ledi with the same number.
|
||||||
|
|
||||||
|
By default Tasmota uses the first defined Led(i) as a device status LED. Next defined LED is the power status LED which displays the status of any Relay (or other power output). Led2 and Led3
|
||||||
|
|
||||||
|
> It is possible to wire in your own LED and assign it as any of the above mentioned but that's outside the scope of this article.
|
||||||
|
|
||||||
|
### Power status LED
|
||||||
|
**Power status LED** shows the status of components (commonly relays). It is turned off by default when the relay is OFF and turned on when the relay switches ON.
|
||||||
|
|
||||||
|
> Depending on the device design, some LEDs are connected to the same GPIO as the relay. Those cannot be independently controlled since they have to follow the relay state.
|
||||||
|
|
||||||
|
### Link status LED
|
||||||
|
<img src="https://raw.githubusercontent.com/blakadder/testdocusite/master/sonoff%20blinking.gif" align=right height=90%>
|
||||||
|
|
||||||
|
**Link status LED** shows the network state, more specifically the Wi-Fi and MQTT connection status.
|
||||||
|
|
||||||
|
It blinks if the device is not connected to your Wi-Fi AP **and** MQTT broker.
|
||||||
|
You can change this behaviour with [`LedState`](commands#ledstate) or turn it off with [`SetOption31`](commands#SetOption31).
|
||||||
|
|
||||||
|
*As an example:* On a Sonoff Basic the green LED is defined as Ledi and is used as the link status LED.
|
||||||
|
|
||||||
|
## Using LedLink
|
||||||
|
Since version 6.5.0.12, a new component, LedLink (or LedLinki) is used to assign the link status LED. When LedLink(i) is assigned other LEDs are automatically linked to their corresponding relay and serve as that relay's power status LED.
|
||||||
|
|
||||||
|
- Led1(i) links to Relay(i)1
|
||||||
|
- Led2(i) links to Relay(i)2
|
||||||
|
- Led3(i) links to Relay(i)3
|
||||||
|
- Led4(i) links to Relay(i)4
|
||||||
|
|
||||||
|
### LedPower command
|
||||||
|
When you use [`LedPower`](Commands#ledpower) you take over control of that particular LED and it stops being linked to its corresponding relay and being its power status LED.
|
||||||
|
|
Loading…
Reference in New Issue