mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-18 11:15:36 +01:00
317 lines
19 KiB
ReStructuredText
317 lines
19 KiB
ReStructuredText
Generic Sonoff
|
|
==============
|
|
|
|
In principle esphomelib supports all Sonoff devices, but as these devices are quite expensive
|
|
and shipping from China takes a long time, I've only set up dedicated guides for the
|
|
:doc:`Sonoff S20 <sonoff_s20>` and :doc:`Sonoff 4CH <sonoff_4ch>`.
|
|
|
|
To use sonoff devices with esphomeyaml, set the ``board`` in the
|
|
:doc:`esphomeyaml section </esphomeyaml/components/esphomeyaml>` to ``esp01_1m`` and set
|
|
``board_flash_mode`` to ``dout``.
|
|
|
|
.. code:: yaml
|
|
|
|
esphomeyaml:
|
|
name: <NAME_OF_NODE>
|
|
platform: ESP8266
|
|
board: esp01_1m
|
|
board_flash_mode: dout
|
|
|
|
After that use the following list of pin to function mappings to set up your Sonoff device.
|
|
This list has been compiled from the Sonoff Tasmota pin source file which can be found here:
|
|
https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/sonoff_template.h ❤️
|
|
|
|
Sonoff RF
|
|
^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and Red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Green LED (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Optional Sensor
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff SV
|
|
^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and Red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Green LED (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO17`` Analog Input
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff TH
|
|
^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and Red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Green LED (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Optional Sensor
|
|
================================================== ==================================================
|
|
|
|
|
|
Slampher
|
|
^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and Red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue LED (inverted)
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff Touch
|
|
^^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and Red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue LED (inverted)
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff LED
|
|
^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Green Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Red Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Cold White Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue LED (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Warm White Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO15`` Blue Channel
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff T1, Sonoff T2, Sonoff T3
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button #1 (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO2`` Optional Sensor
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Relay #3 and Blue LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Relay #2 and Blue LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO9`` Button #2 (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO10`` Button #3 (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay #1 and Blue LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue LED (inverted)
|
|
================================================== ==================================================
|
|
|
|
|
|
Arilux LC01
|
|
^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Optional Button
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO2`` RF receiver (unsupported yet)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Red Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Green Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` White Channel
|
|
================================================== ==================================================
|
|
|
|
|
|
Arilux LC11
|
|
^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Optional Button
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO2`` RF receiver (unsupported yet)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO4`` Green Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Red Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Warm White Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Cold White Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Blue Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO15`` RF Receiver (unsupported yet)
|
|
================================================== ==================================================
|
|
|
|
|
|
Arilux LC06
|
|
^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Optional Button
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Green Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO14`` Red Channel
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO15`` White Channel
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff Dual R2
|
|
^^^^^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button 0 on header (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Relay #2
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO9`` Button 1 on header (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO10`` Button on casing (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay #1
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Blue LED (inverted)
|
|
================================================== ==================================================
|
|
|
|
|
|
Sonoff S31
|
|
^^^^^^^^^^
|
|
|
|
.. table::
|
|
:class: no-center
|
|
|
|
================================================== ==================================================
|
|
``GPIO0`` Button (inverted)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO1`` ``RX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO3`` ``TX`` pin (for external sensors)
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO5`` Relay #2
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO12`` Relay and red LED
|
|
-------------------------------------------------- --------------------------------------------------
|
|
``GPIO13`` Green LED (inverted)
|
|
================================================== ==================================================
|
|
|
|
See Also
|
|
^^^^^^^^
|
|
|
|
- :doc:`sonoff_s20`
|
|
- :doc:`sonoff_4ch`
|
|
- :doc:`sonoff_basic`
|
|
- :doc:`esp8266`
|
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/devices/sonoff.rst>`__
|