esphome-docs/esphomeyaml/devices/sonoff.rst

319 lines
19 KiB
ReStructuredText
Raw Normal View History

2018-06-01 18:10:00 +02:00
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
2018-08-24 22:44:01 +02:00
---------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
---------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
---------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
--------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
------------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
----------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
-------------------------------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
-----------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
-----------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
-----------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
--------------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
----------
2018-06-01 18:10:00 +02:00
.. 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
2018-08-24 22:44:01 +02:00
--------
2018-06-01 18:10:00 +02:00
- :doc:`sonoff_s20`
- :doc:`sonoff_4ch`
- :doc:`sonoff_basic`
2018-06-01 18:10:00 +02:00
- :doc:`esp8266`
2018-06-04 08:17:22 +02:00
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/devices/sonoff.rst>`__
2018-10-12 16:33:22 +02:00
.. disqus::