mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-03-27 16:09:55 +01:00
Fix typos (#561)
This commit is contained in:
parent
684f0a41d7
commit
9b6170ac60
components
binary_sensor
captive_portal.rstclimate
cover
display
esp32_ble_beacon.rstesp32_camera.rstesphome.rstlight
logger.rstoutput
pcf8574.rstremote_receiver.rstremote_transmitter.rstsensor
ade7953.rstam2320.rstapds9960.rstas3935.rstatm90e32.rstbh1750.rstbme280.rstbme680.rstbmp085.rstbmp280.rstcustom.rstdallas.rstdht.rstdht12.rsthdc1080.rsthmc5883l.rsthomeassistant.rsthtu21d.rsthx711.rstina219.rstina3221.rstindex.rstmax31855.rstmax6675.rstmpu6050.rstms5611.rstscd30.rstsgp30.rstsht3xd.rstshtcx.rststs3x.rsttcs34725.rsttsl2561.rsttx20.rstultrasonic.rstvl53l0x.rstxiaomi_cgg1.rstxiaomi_lywsd02.rstxiaomi_lywsdcgq.rst
sim800l.rstspi.rstsx1509.rsttext_sensor
time.rstuart.rstwifi.rstcookbook
arduino_port_extender.rstbrilliant-mirabella-genio-smart-plugs.rstdisplay_time_temp_oled.rsth801.rstmirabella-genio-bulb.rstsonoff-basic-light-switch.rstsonoff-dual-light-switch.rstsonoff-fishpond-pump.rstsonoff-t1-3.rstteckin_sb50.rstzemismart-rgbw-downlights.rst
custom
devices
guides
index.rst@ -6,7 +6,7 @@ ESP32 Bluetooth Low Energy Device
|
||||
:image: bluetooth.png
|
||||
|
||||
The ``ble_presence`` binary sensor platform lets you track the presence of a
|
||||
bluetooth low energy device.
|
||||
Bluetooth Low Energy device.
|
||||
|
||||
.. figure:: images/esp32_ble-ui.png
|
||||
:align: center
|
||||
|
@ -1,8 +1,8 @@
|
||||
Homeassistant Binary Sensor
|
||||
===========================
|
||||
Home Assistant Binary Sensor
|
||||
============================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up homeassistant binary sensors with ESPHome that import states from your homeassistant instance.
|
||||
:description: Instructions for setting up Home Assistant binary sensors with ESPHome that import states from your Home Assistant instance.
|
||||
:image: home-assistant.png
|
||||
|
||||
The ``homeassistant`` binary sensor platform allows you to create binary sensors that **import**
|
||||
|
@ -8,7 +8,7 @@ MPR121 Capacitive Touch Sensor
|
||||
|
||||
The ``mpr121`` sensor platform allows you to use your MPR121
|
||||
(`datasheet <https://cdn-learn.adafruit.com/downloads/pdf/adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial.pdf>`__,
|
||||
`Adafruit`_) Capacitive Touch Sensor with esphomelib. The :ref:`I²C <i2c>` is
|
||||
`Adafruit`_) Capacitive Touch Sensor with ESPHome. The :ref:`I²C <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. figure:: images/mpr121-full.jpg
|
||||
@ -45,7 +45,7 @@ The configuration is made up of two parts: The central component, and individual
|
||||
|
||||
Base Configuration:
|
||||
|
||||
- **address** (*Optional*, integer): The i2c address of the sensor. Defaults to ``0x5A``.
|
||||
- **address** (*Optional*, integer): The I^2C address of the sensor. Defaults to ``0x5A``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor.
|
||||
- **touch_debounce** (*Optional*, integer): The minimum length before a touch is recognized. Range is from 0 to 7.
|
||||
Defaults to 0.
|
||||
@ -59,7 +59,7 @@ Binary Sensor Configuration:
|
||||
|
||||
- **name** (**Optional**, string): The name for the binary sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **channel** (*Required*, integer): The channel number at the mpr121 the touchkey is connected to.
|
||||
- **channel** (*Required*, integer): The channel number at the MPR121 the touchkey is connected to.
|
||||
- **touch_threshold** (*Optional*, integer): A per-channel override of the global touch_threshold value. If not specified, uses the global value.
|
||||
- **release_threshold** (*Optional*, integer): A per-channel override of the global release_threshold value. If not specified, uses the global value.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
@ -12,7 +12,7 @@ Component/Hub
|
||||
-------------
|
||||
|
||||
The ``pn532`` component allows you to use PN532 NFC/RFID controllers
|
||||
(`datasheet <https://cdn-shop.adafruit.com/datasheets/pn532ds.pdf>`__, `adafruit <https://www.adafruit.com/product/364>`__)
|
||||
(`datasheet <https://cdn-shop.adafruit.com/datasheets/pn532ds.pdf>`__, `Adafruit <https://www.adafruit.com/product/364>`__)
|
||||
with ESPHome. This component is a global hub that establishes the connection to the PN532 via :ref:`SPI <spi>` and
|
||||
outputs its data. Using the :ref:`PN532 binary sensors <pn532-tag>` you can then
|
||||
create individual binary sensors that track if an NFC/RFID tag is currently detected by the PN532.
|
||||
@ -25,7 +25,7 @@ See :ref:`pn532-setting_up_tags` for information on how to setup individual bina
|
||||
|
||||
As the communication with the PN532 is done using SPI for this integration, you need to set the two switches on
|
||||
the board to the SPI mode (usually by setting the first one to OFF and the second one to ON). Additionally, you need
|
||||
to have an :ref:`spi bus <spi>` in your configuration with both the **miso_pin** and **mosi_pin** set.
|
||||
to have an :ref:`SPI bus <spi>` in your configuration with both the **miso_pin** and **mosi_pin** set.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -126,7 +126,7 @@ Setting Up Tags
|
||||
---------------
|
||||
|
||||
To set up binary sensors for specific NFC tags you first have to know their unique IDs. To obtain this
|
||||
id, first set up a simple pn532 configuration without any binary sensors like above.
|
||||
id, first set up a simple PN532 configuration without any binary sensors like above.
|
||||
|
||||
When your code is running and you approach the PN532 with an NFC Tag, you should see a message like this:
|
||||
|
||||
|
@ -47,7 +47,7 @@ Base Configuration:
|
||||
Binary Sensor Configuration:
|
||||
|
||||
- **name** (**Required**, string): The name of the binary sensor.
|
||||
- **channel** (**Required**, integer): The channel number at the ttp229 the touchkey is connected to.
|
||||
- **channel** (**Required**, integer): The channel number at the TTP229 the touchkey is connected to.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
||||
@ -82,7 +82,7 @@ Base Configuration:
|
||||
Binary Sensor Configuration:
|
||||
|
||||
- **name** (**Required**, string): The name of the binary sensor.
|
||||
- **channel** (**Required**, integer): The channel number at the ttp229 the touchkey is connected to.
|
||||
- **channel** (**Required**, integer): The channel number at the TTP229 the touchkey is connected to.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
||||
|
@ -8,7 +8,7 @@ Captive Portal
|
||||
The captive portal component in ESPHome is a fallback mechanism for when connecting to the
|
||||
configured :doc:`WiFi <wifi>` fails.
|
||||
|
||||
After 1 minute of unsuccesful wifi connection attempts, the ESP will start a WiFi hotspot
|
||||
After 1 minute of unsuccessful WiFi connection attempts, the ESP will start a WiFi hotspot
|
||||
(with the credentials from your configuration)
|
||||
|
||||
.. figure:: images/captive_portal-ui.png
|
||||
|
@ -1,11 +1,11 @@
|
||||
Tcl112 Remote Climate
|
||||
TCL112 Remote Climate
|
||||
=====================
|
||||
|
||||
.. seo::
|
||||
:description: Controls a Tcl112 compatible Climate via IR
|
||||
:description: Controls a TCL112-compatible Climate via IR
|
||||
:image: air-conditioner.png
|
||||
|
||||
The ``tcl112`` climate platform allows you to control a TCL112 compatible AC unit by sending IR signals
|
||||
The ``tcl112`` climate platform allows you to control a TCL112-compatible AC unit by sending IR signals
|
||||
as your remote unit would do.
|
||||
|
||||
This component requires that you have setup a :doc:`/components/remote_transmitter`.
|
||||
|
@ -49,7 +49,7 @@ Configuration variables:
|
||||
be performed to stop the cover when the remote requests the cover to be stopped or
|
||||
when the cover has been opening/closing for the given durations.
|
||||
- **has_built_in_endstop** (*Optional*, boolean): Indicates that the cover has built in end stop
|
||||
detectors. In this configuration the ``stop_action`` is not perfomed when the open or close
|
||||
detectors. In this configuration the ``stop_action`` is not performed when the open or close
|
||||
time is completed and if the cover is commanded to open or close the corresponding actions
|
||||
will be performed without checking current state. Defaults to ``False``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
@ -129,8 +129,8 @@ Drawing Static Text
|
||||
*******************
|
||||
|
||||
The rendering engine also has a powerful font drawer which integrates seamlessly into ESPHome.
|
||||
Whereas in most arduino display projects you have to use one of a few pre-defined fonts in very
|
||||
specific sizes, with ESPHome you have the option to use **any** truetype (``.ttf``) font file
|
||||
Whereas in most Arduino display projects you have to use one of a few pre-defined fonts in very
|
||||
specific sizes, with ESPHome you have the option to use **any** TrueType (``.ttf``) font file
|
||||
at **any** size! Granted the reason for it is actually not having to worry about the licensing of font files :)
|
||||
|
||||
To use fonts you first have to define a font object in your ESPHome configuration file. Just grab
|
||||
@ -149,7 +149,7 @@ a ``.ttf`` file from somewhere on the Internet and create a ``font:`` section in
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the truetype font
|
||||
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the TrueType font
|
||||
file.
|
||||
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the font later
|
||||
in your display code.
|
||||
@ -165,7 +165,7 @@ Configuration variables:
|
||||
.. note::
|
||||
|
||||
To use fonts you will need to have the python ``pillow`` package installed, as ESPHome uses that package
|
||||
to translate the truetype files into an internal format. If you're running this as a Hass.io add-on or with
|
||||
to translate the TrueType files into an internal format. If you're running this as a Hass.io add-on or with
|
||||
the official ESPHome docker image, it should already be installed. Otherwise you need to install it using
|
||||
``pip install pillow``.
|
||||
|
||||
|
@ -165,8 +165,8 @@ The backlight can draw more power than the microcontroller output pins can suppl
|
||||
a transistor as a switch to control the power for the backlight pins.
|
||||
|
||||
With the ``lcd_pcf8574`` the backlight can be turned on by ``it.backlight()`` and off by ``it.no_backlight()`` in the
|
||||
display lamdba definition. The jumper on the PCF8574 board needs to be closed for the backlight control to work.
|
||||
Keep in mind that the display lamda runs for every ``update_interval``, so if the backlight is turned on/off there,
|
||||
display lambda definition. The jumper on the PCF8574 board needs to be closed for the backlight control to work.
|
||||
Keep in mind that the display lambda runs for every ``update_interval``, so if the backlight is turned on/off there,
|
||||
it cannot be overridden from other parts.
|
||||
|
||||
Here is one solution for a typical use-case where the backlight is turned on after a motion sensor activates and
|
||||
|
@ -61,7 +61,7 @@ Configuration variables:
|
||||
- **address** (*Optional*, int): Manually specify the :ref:`I²C <i2c>` address of the display. Defaults to 0x3C.
|
||||
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
|
||||
by this option. One of ``0°`` (default), ``90°``, ``180°``, ``270°``.
|
||||
- **brigthness** (*Optional*): Set the screen brightness in percents 0.0-1.0. Defaults to `1.0` that coresponds to 100%.
|
||||
- **brightness** (*Optional*): Set the screen brightness in percents 0.0-1.0. Defaults to `1.0` that corresponds to 100%.
|
||||
- **external_vcc** (*Optional*, boolean): Set this to true if you have the VCC pin connected to an external power supply.
|
||||
Defaults to ``false``.
|
||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
||||
@ -73,7 +73,7 @@ Configuration variables:
|
||||
|
||||
.. note::
|
||||
|
||||
To speed up the display update process you can select higher i2c frequencies.
|
||||
To speed up the display update process you can select higher I²C frequencies.
|
||||
|
||||
.. _ssd1306-spi:
|
||||
|
||||
|
@ -58,7 +58,7 @@ change the UUID to something unique. For example, you can copy this randomly gen
|
||||
Then, just compile and flash the ESP32.
|
||||
|
||||
When everything is set up correctly, you should see a show up using your iBeacon scanner of choice. On iPhones,
|
||||
this should already work from the bluetooth screen (not tested), on Android, you will need to use an app like
|
||||
this should already work from the Bluetooth screen (not tested), on Android, you will need to use an app like
|
||||
`"Beacon Scanner" <https://play.google.com/store/apps/details?id=com.bridou_n.beaconscanner>`__ by Nicolas Bridoux.
|
||||
|
||||
For using these beacons to track the location of your phone, you will need to use another app. For example, I used
|
||||
|
@ -35,7 +35,7 @@ Configuration variables:
|
||||
Connection Options:
|
||||
|
||||
- **data_pins** (**Required**, list of pins): The data lanes of the camera, this must be a list
|
||||
of 8 gpio pins.
|
||||
of 8 GPIO pins.
|
||||
- **vsync_pin** (**Required**, pin): The pin the VSYNC line of the camera is connected to.
|
||||
- **href_pin** (**Required**, pin): The pin the HREF line of the camera is connected to.
|
||||
- **pixel_clock_pin** (**Required**, pin): The pin the pixel clock line of the camera is connected to.
|
||||
@ -45,10 +45,10 @@ Connection Options:
|
||||
- **frequency** (*Optional*, float): The frequency of the external clock, must be either 20MHz
|
||||
or 10MHz. Defaults to ``20MHz``.
|
||||
|
||||
- **i2c_pins** (**Required**): The i2c control pins of the camera.
|
||||
- **i2c_pins** (**Required**): The I^2C control pins of the camera.
|
||||
|
||||
- **sda** (**Required**, pin): The SDA pin of the i2c interface. Also called ``SIOD``.
|
||||
- **scl** (**Required**, pin): The SCL pin of the i2c interface. Also called ``SIOC``.
|
||||
- **sda** (**Required**, pin): The SDA pin of the I^2C interface. Also called ``SIOD``.
|
||||
- **scl** (**Required**, pin): The SCL pin of the I^2C interface. Also called ``SIOC``.
|
||||
|
||||
- **reset_pin** (*Optional*, pin): The ESP pin the reset pin of the camera is connected to.
|
||||
If set, this will reset the camera before the ESP boots.
|
||||
|
@ -23,12 +23,12 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): This is the name of the node. It
|
||||
should always be unique in your esphome network. May only contain lowercase
|
||||
should always be unique in your ESPhome network. May only contain lowercase
|
||||
characters, digits and underscores. See :ref:`esphome-changing_node_name`.
|
||||
- **platform** (**Required**, string): The platform your board is on,
|
||||
either ``ESP32`` or ``ESP8266``. See :ref:`esphome-arduino_version`.
|
||||
- **board** (**Required**, string): The board ESPHome should
|
||||
specify for platformio. For the ESP32, choose the appropriate one
|
||||
specify for PlatformIO. For the ESP32, choose the appropriate one
|
||||
from `this list <http://docs.platformio.org/en/latest/platforms/espressif32.html#boards>`__
|
||||
and use `this list <http://docs.platformio.org/en/latest/platforms/espressif8266.html#boards>`__
|
||||
for ESP8266-based boards. *This only affects pin aliases and some internal settings*, if unsure
|
||||
@ -36,12 +36,12 @@ Configuration variables:
|
||||
|
||||
Advanced options:
|
||||
|
||||
- **arduino_version** (*Optional*): The version of the arduino framework to link the project against.
|
||||
- **arduino_version** (*Optional*): The version of the Arduino framework to link the project against.
|
||||
See :ref:`esphome-arduino_version`.
|
||||
- **build_path** (*Optional*, string): Customize where ESPHome will store the build files
|
||||
for your node. By default, ESPHome puts all platformio project files under a folder ``<NODE_NAME>/``,
|
||||
for your node. By default, ESPHome puts all PlatformIO project files under a folder ``<NODE_NAME>/``,
|
||||
but you can customize this behavior using this option.
|
||||
- **platformio_options** (*Optional*, mapping): Additional options to pass over to platformio in the
|
||||
- **platformio_options** (*Optional*, mapping): Additional options to pass over to PlatformIO in the
|
||||
platformio.ini file. See :ref:`esphome-platformio_options`.
|
||||
- **use_custom_code** (*Optional*, boolean): Whether to configure the project for writing custom components.
|
||||
This sets up some flags so that custom code should compile correctly
|
||||
@ -71,10 +71,10 @@ Automations:
|
||||
``arduino_version``
|
||||
-------------------
|
||||
|
||||
ESPHome uses the arduino framework internally to handle all low-level interactions like
|
||||
initializing the WiFi driver and so on. Unfortunately, every arduino framework version often
|
||||
ESPHome uses the Arduino framework internally to handle all low-level interactions like
|
||||
initializing the WiFi driver and so on. Unfortunately, every Arduino framework version often
|
||||
has its own quirks and bugs, especially concerning WiFi performance. With the ``arduino_version``
|
||||
option you can tell ESPHome which arduino framework to use for compiling.
|
||||
option you can tell ESPHome which Arduino framework to use for compiling.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -94,8 +94,8 @@ option you can tell ESPHome which arduino framework to use for compiling.
|
||||
# Use a specific version
|
||||
arduino_version: 2.3.0
|
||||
|
||||
For the ESP8266, you currently can manually pin the arduino version to these values (see the full
|
||||
list of arduino frameworks `here <https://github.com/esp8266/Arduino/releases>`__):
|
||||
For the ESP8266, you currently can manually pin the Arduino version to these values (see the full
|
||||
list of Arduino frameworks `here <https://github.com/esp8266/Arduino/releases>`__):
|
||||
|
||||
* `2.5.2 <https://github.com/esp8266/Arduino/releases/tag/2.5.2>`__
|
||||
* `2.5.1 <https://github.com/esp8266/Arduino/releases/tag/2.5.1>`__
|
||||
@ -105,7 +105,7 @@ list of arduino frameworks `here <https://github.com/esp8266/Arduino/releases>`_
|
||||
* `2.4.0 <https://github.com/esp8266/Arduino/releases/tag/2.4.0>`__
|
||||
* `2.3.0 <https://github.com/esp8266/Arduino/releases/tag/2.3.0>`__ (used by Tasmota etc)
|
||||
|
||||
For the ESP32, there are these arduino `framework versions <https://github.com/espressif/arduino-esp32/releases>`__:
|
||||
For the ESP32, there are these Arduino `framework versions <https://github.com/espressif/arduino-esp32/releases>`__:
|
||||
|
||||
- `1.0.2 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.2>`__
|
||||
- `1.0.1 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.1>`__ (default)
|
||||
@ -153,7 +153,7 @@ is already set up. You can however change this using the ``priority`` parameter.
|
||||
Configuration variables:
|
||||
|
||||
- **priority** (*Optional*, float): The priority to execute your custom initialization code. A higher value
|
||||
means a high priority and thus also your code being executed earlier. Please note this is an esphome-internal
|
||||
means a high priority and thus also your code being executed earlier. Please note this is an ESPhome-internal
|
||||
value and any change will not be marked as a breaking change. Defaults to ``-10``. Priorities (you can use any value between them too):
|
||||
|
||||
- ``800.0``: This is where all hardware initialization of vital components is executed. For example setting switches
|
||||
@ -208,11 +208,11 @@ This automation will be triggered on every ``loop()`` iteration (usually around
|
||||
``platformio_options``
|
||||
----------------------
|
||||
|
||||
Platformio supports a number of options in its ``platformio.ini`` file. With the ``platformio_options``
|
||||
parameter you can tell ESPHome what options to pass into the ``env`` section of the platformio file
|
||||
PlatformIO supports a number of options in its ``platformio.ini`` file. With the ``platformio_options``
|
||||
parameter you can tell ESPHome what options to pass into the ``env`` section of the PlatformIO file
|
||||
(Note you can also do this by editing the ``platformio.ini`` file manually).
|
||||
|
||||
You can view a full list of platformio options here: https://docs.platformio.org/en/latest/projectconf/section_env.html
|
||||
You can view a full list of PlatformIO options here: https://docs.platformio.org/en/latest/projectconf/section_env.html
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -228,10 +228,10 @@ You can view a full list of platformio options here: https://docs.platformio.org
|
||||
``includes``
|
||||
------------
|
||||
|
||||
With ``includes`` you can include source files in the generated platformio project.
|
||||
With ``includes`` you can include source files in the generated PlatformIO project.
|
||||
All files declared with this option are copied to the project each time it is compiled.
|
||||
|
||||
You can always look at the generated platformio project (``<CONFIG_DIR>/<NODENAME>``) to see what
|
||||
You can always look at the generated PlatformIO project (``<CONFIG_DIR>/<NODENAME>``) to see what
|
||||
is happening - and if you want you can even copy the include files directly into the ``src/`` folder.
|
||||
The ``includes`` option is only a helper option that does that for you.
|
||||
|
||||
|
@ -23,7 +23,7 @@ the config and it will list the possible devices for you in the config log.
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
# Make sure your wifi will connect
|
||||
# Make sure your WiFi will connect
|
||||
wifi:
|
||||
ssid: "ssid"
|
||||
password: "password"
|
||||
|
@ -94,7 +94,7 @@ Possible log levels are (sorted by severity):
|
||||
- ``VERY_VERBOSE``
|
||||
|
||||
- All internal messages are logged. Including all the data flowing through data buses like
|
||||
i2c, spi or uart. Warning: May cause the device to slow down and have trouble staying
|
||||
I2C, SPI or UART. Warning: May cause the device to slow down and have trouble staying
|
||||
connecting due to amount of generated messages. Color: white
|
||||
|
||||
.. _logger-manual_tag_specific_levels:
|
||||
|
@ -7,7 +7,7 @@ ESP8266 Software PWM Output
|
||||
|
||||
The ESP8266 Software PWM platform allows you to use a software PWM on
|
||||
the pins GPIO0-GPIO16 on your ESP8266. Note that this is a software PWM,
|
||||
so there can be some flickering during periods of high wifi activity. Hardware PWMs
|
||||
so there can be some flickering during periods of high WiFi activity. Hardware PWMs
|
||||
like the one on the ESP32 (see :doc:`ledc`) are preferred.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
@ -48,24 +48,24 @@ To get the highest available frequency while still getting the same bit depth it
|
||||
recommended to pick one of the following frequencies.
|
||||
|
||||
Higher bit depth means that the light has more steps available to change from one
|
||||
value to another. This is especially noteable when the light is below 10% and take
|
||||
a long transition. eg. turning slowly off.
|
||||
value to another. This is especially noticeable when the light is below 10% and takes
|
||||
a long transition, e.g. turning slowly off.
|
||||
|
||||
================================== =================================== ===================================
|
||||
**Frequency** **Bit depth** **Available steps for transitions**
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
1220hz 16 65536
|
||||
1220Hz 16 65536
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
2441hz 15 32768
|
||||
2441Hz 15 32768
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
4882hz 14 16384
|
||||
4882Hz 14 16384
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
9765hz 13 8192
|
||||
9765Hz 13 8192
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
19531hz 12 4096
|
||||
19531Hz 12 4096
|
||||
================================== =================================== ===================================
|
||||
|
||||
The ESP8266 for instance has *usually* a frequency of 1000hz with a resolution of 10 bits.
|
||||
The ESP8266 for instance has *usually* a frequency of 1000Hz with a resolution of 10 bits.
|
||||
This means that there are only 4 steps between each value.
|
||||
|
||||
.. _output-ledc-set_frequency_action:
|
||||
|
@ -17,7 +17,7 @@ The MY9231/MY9291 component represents a MY9231/MY9291 LED diver chain
|
||||
ESPHome. Communication is done with two GPIO pins (DI and DCKI) and multiple
|
||||
driver chips can be chained. There are two models with different number of
|
||||
output channels (MY9291 with 4 channels and MY9231 with 3 channels). They are
|
||||
popular driver chips used in smart light blubs:
|
||||
popular driver chips used in smart light bulbs:
|
||||
|
||||
- Sonoff B1 (MY9231)
|
||||
- Ai-Thinker AiLight WiFi light bulb (MY9291)
|
||||
@ -60,7 +60,7 @@ Configuration variables:
|
||||
Sonoff B1 configuration example
|
||||
-------------------------------
|
||||
|
||||
This component can be used with a Sonoff B1 smart light blub. To flash
|
||||
This component can be used with a Sonoff B1 smart light bulb. To flash
|
||||
the Sonoff B1, open the plastic cover and connect/solder wires to the
|
||||
PCB pads (3.3V, RX, TX, GND, GPIO0). If you connect GPIO0 to GND
|
||||
during power up, the device enters flash mode. For more information
|
||||
|
@ -4,7 +4,7 @@ SM16716 LED driver
|
||||
.. seo::
|
||||
:description: Instructions for setting up SM16716 LED drivers in ESPHome.
|
||||
:image: sm16716.png
|
||||
:keywords: SM16716, Feit Electric A19 Smart WiFi Bulb, Merkury Innovations A21 Smart Wi-Fi Bulb
|
||||
:keywords: SM16716, Feit Electric A19 Smart WiFi Bulb, Merkury Innovations A21 Smart Wi-Fi Bulb
|
||||
|
||||
.. _sm16716-component:
|
||||
|
||||
@ -15,7 +15,7 @@ The SM16716 component represents a SM16716 LED diver chain
|
||||
(`SM16716 description <https://github.com/sowbug/sm16716/blob/master/SM16716%20Datasheet%20%5BChinese%5D.pdf>`__,
|
||||
`SM16716 description <https://github.com/sowbug/sm16716/blob/master/SM16716%20Datasheet%20%5BChinese%5D.pdf>`__) in
|
||||
ESPHome. Communication is done with two GPIO pins (MOSI and SCLK) and multiple
|
||||
driver chips can be chained. It is used in some smart light blubs:
|
||||
driver chips can be chained. It is used in some smart light bulbs:
|
||||
|
||||
- Feit Electric A19 Smart WiFi Bulb
|
||||
- Merkury Innovations A21 Smart Wi-Fi Bulb
|
||||
@ -102,7 +102,7 @@ Configuration variables:
|
||||
Feit Electric A19 Smart WiFi Bulb
|
||||
---------------------------------
|
||||
|
||||
This component can be used with a Feit Electric A19 smart light blub. You can use
|
||||
This component can be used with a Feit Electric A19 smart light bulb. You can use
|
||||
tuya-convert to flash the bulb. The cold white LEDs are connected to PWM1 and the
|
||||
warm white LEDs are connected to PWM2. The RGB LEDs are connected to a SM16716
|
||||
chip that is connected to GPIO4 for clock, GPIO14 for data, and GPIO13 for power.
|
||||
|
@ -7,7 +7,7 @@ PCF8574 I/O Expander
|
||||
|
||||
The PCF8574 component allows you to use PCF8574 or PCF8575 I/O expanders
|
||||
(`datasheet <http://www.ti.com/lit/ds/symlink/pcf8574.pdf>`__,
|
||||
`Sparkfun`_) in ESPHome. It uses :ref:`I²C Bus <i2c>` for communication.
|
||||
`SparkFun`_) in ESPHome. It uses :ref:`I²C Bus <i2c>` for communication.
|
||||
|
||||
Once configured, you can use any of the 8 pins (PCF8574) or 16 pins (PCF8575) as
|
||||
pins for your projects. Within ESPHome they emulate a real internal GPIO pin
|
||||
@ -24,7 +24,7 @@ not work.
|
||||
|
||||
PCF8574 I/O Expander.
|
||||
|
||||
.. _Sparkfun: https://www.sparkfun.com/products/retired/8130
|
||||
.. _SparkFun: https://www.sparkfun.com/products/retired/8130
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -27,7 +27,7 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **pin** (**Required**, :ref:`config-pin`): The pin to receive the remote signal on.
|
||||
- **dump** (*Optional*, list): Decode and dump these remote codes in the logs (at log.level=DEBUG).
|
||||
- **dump** (*Optional*, list): Decode and dump these remote codes in the logs (at log.level=DEBUG).
|
||||
Set to ``all`` to dump all available codecs:
|
||||
|
||||
- **lg**: Decode and dump LG infrared codes.
|
||||
@ -42,8 +42,8 @@ Configuration variables:
|
||||
|
||||
- **tolerance** (*Optional*, int): The percentage that the remote signal lengths can deviate in the
|
||||
decoding process. Defaults to ``25%``.
|
||||
- **buffer_size** (*Optional*, int): The size of the internal buffer for storing the remote codes. Defaults to ``10kb``
|
||||
on the ESP32 and ``1kb`` on the ESP8266.
|
||||
- **buffer_size** (*Optional*, int): The size of the internal buffer for storing the remote codes. Defaults to ``10kB``
|
||||
on the ESP32 and ``1kB`` on the ESP8266.
|
||||
- **filter** (*Optional*, :ref:`time <config-time>`): Filter any pulses that are shorter than this. Useful for removing
|
||||
glitches from noisy signals. Defaults to ``10us``.
|
||||
- **idle** (*Optional*, :ref:`time <config-time>`): The amount of time that a signal should remain stable (i.e. not
|
||||
@ -72,10 +72,10 @@ Automations:
|
||||
RC5 remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::RC5Data`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_samsung** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
samsung remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::SamsungData`
|
||||
Samsung remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::SamsungData`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_panasonic** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
panasonic remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::PanasonicData`
|
||||
Panasonic remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::PanasonicData`
|
||||
is passed to the automation for use in lambdas.
|
||||
|
||||
.. _remote-receiver-binary-sensor:
|
||||
@ -187,7 +187,7 @@ Remote code selection (exactly one of these has to be included):
|
||||
.. note::
|
||||
|
||||
For the Sonoff RF Bridge you can use `this hack <https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack>`__
|
||||
created by the Github user wildwiz. Then use this configuration for the remote receiver/transmitter hubs:
|
||||
created by the GitHub user wildwiz. Then use this configuration for the remote receiver/transmitter hubs:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -41,7 +41,7 @@ Configuration variables:
|
||||
|
||||
- **pin** (**Required**, :ref:`config-pin`): The pin to transmit the remote signal on.
|
||||
- **carrier_duty_percent** (*Optional*, int): How much of the time the remote is on. For example, infrared
|
||||
protocols modulate the signal using a carrier signal. Set this is ``50%`` if you're working with IR leds and to
|
||||
protocols modulate the signal using a carrier signal. Set this is ``50%`` if you're working with IR LEDs and to
|
||||
``100%`` if working with other things like 433MHz transmitters.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify
|
||||
the ID used for code generation. Use this if you have multiple remote transmitters.
|
||||
|
@ -42,7 +42,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x38``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x38``.
|
||||
- **voltage** (*Optional*): Use the voltage value of the sensor in volt. All options from
|
||||
:ref:`Sensor <config-sensor>`.
|
||||
- **current_a** (*Optional*): Use the current value of the A channel in amperes. All options from
|
||||
|
@ -6,8 +6,8 @@ AM2320 Temperature+Humidity Sensor
|
||||
:image: am2320.jpg
|
||||
:keywords: am2320
|
||||
|
||||
The ``am2320`` Temperature+Humidity sensor allows you to use your am2320
|
||||
(`datasheet <https://akizukidenshi.com/download/ds/aosong/AM2320.pdf>`__) i2c-based sensor with ESPHome.
|
||||
The ``am2320`` Temperature+Humidity sensor allows you to use your AM2320
|
||||
(`datasheet <https://akizukidenshi.com/download/ds/aosong/AM2320.pdf>`__) I^2C-based sensor with ESPHome.
|
||||
|
||||
.. figure:: images/am2320-full.jpg
|
||||
:align: center
|
||||
|
@ -7,7 +7,7 @@ APDS9960 Sensor
|
||||
|
||||
The ``apds9960`` sensor platform allows you to use your APDS9960 RGB and gesture sensors
|
||||
(`datasheet <https://cdn-shop.adafruit.com/datasheets/BST-BME280_DS001-10.pdf>`__,
|
||||
`Sparkfun`_) with ESPHome.
|
||||
`SparkFun`_) with ESPHome.
|
||||
The :ref:`I²C <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
@ -15,7 +15,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Image by `Sparkfun`_.
|
||||
Image by `SparkFun`_.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -35,7 +35,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
name: "APDS960 Up Movement"
|
||||
# Repeat for each direction
|
||||
|
||||
.. _Sparkfun: https://www.sparkfun.com/products/12787
|
||||
.. _SparkFun: https://www.sparkfun.com/products/12787
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
@ -45,7 +45,7 @@ and direction binary sensors.
|
||||
|
||||
Base Configuration:
|
||||
|
||||
- **address** (*Optional*, integer): The i2c address of the sensor. Defaults to ``0x39``.
|
||||
- **address** (*Optional*, integer): The I2C address of the sensor. Defaults to ``0x39``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval
|
||||
to check the sensor. Defaults to ``60s``.
|
||||
|
||||
|
@ -6,7 +6,7 @@ AMS AS3935 Franklin Lightning Sensor
|
||||
:image: images/as3935.jpg
|
||||
:keywords: as3935
|
||||
|
||||
The ``as3935`` sensor platform allows you to use your as3935 sensor
|
||||
The ``as3935`` sensor platform allows you to use your AS3935 sensor
|
||||
(`AliExpress`_, `AMS_AS3935`_)
|
||||
in order to get notified when a thunderstorm is getting close.
|
||||
|
||||
@ -14,27 +14,27 @@ The AS3935 can detect the presence of lightning activity and provide an estimati
|
||||
on the distance to the head of the storm. The chip issues a notification through an interrupt
|
||||
pin.
|
||||
|
||||
The AS3935 can be configured to use either the SPI **or** I2C protocol for data communication.
|
||||
The AS3935 can be configured to use either the SPI **or** I^2C protocol for data communication.
|
||||
First choose which communication method you want to use for the sensor, set the SI pin for the appropriate
|
||||
level and set up the esphome integration for the chosen communication method.
|
||||
level and set up the ESPhome integration for the chosen communication method.
|
||||
|
||||
Module Pins
|
||||
-----------
|
||||
|
||||
============ ===============================================================
|
||||
Module Pin Description
|
||||
Module Pin Description
|
||||
============ ===============================================================
|
||||
VCC/VDD Positive supply voltage
|
||||
GND Ground
|
||||
SCL I²C clock bus or SPI clock bus (according to SI setting)
|
||||
MOSI I²C data bus or SPI data input bus (according to SI setting)
|
||||
MISO SPI data output bus
|
||||
CS Chip Select (active low)
|
||||
SI Select Interface (GND → SPI or VDD → I²C)
|
||||
IRQ Interrupt (out)
|
||||
EN_V Voltage Regulator Enable
|
||||
A0 I²C address selection LSB
|
||||
A1 I²C address selection MSB
|
||||
VCC/VDD Positive supply voltage
|
||||
GND Ground
|
||||
SCL I²C clock bus or SPI clock bus (according to SI setting)
|
||||
MOSI I²C data bus or SPI data input bus (according to SI setting)
|
||||
MISO SPI data output bus
|
||||
CS Chip Select (active low)
|
||||
SI Select Interface (GND → SPI or VDD → I²C)
|
||||
IRQ Interrupt (out)
|
||||
EN_V Voltage Regulator Enable
|
||||
A0 I²C address selection LSB
|
||||
A1 I²C address selection MSB
|
||||
============ ===============================================================
|
||||
|
||||
.. figure:: images/as3935.jpg
|
||||
@ -96,12 +96,12 @@ Configuration variables (shared):
|
||||
|
||||
Sensor entries:
|
||||
|
||||
- **lightning_energy** (*Optional*): Lightning energy value. According to the datasheet this is only a pure value that doesn't have any physical meaning.
|
||||
- **lightning_energy** (*Optional*): Lightning energy value. According to the datasheet this is only a pure value that doesn't have any physical meaning.
|
||||
|
||||
- **name** (**Required**, string): The name for the lightning energy sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- **distance** (*Optional*): Distance in km to the front of the storm and not the distance to a lightning strike.
|
||||
- **distance** (*Optional*): Distance in km to the front of the storm and not the distance to a lightning strike.
|
||||
|
||||
- **name** (**Required**, string): The name for the distance sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
@ -114,10 +114,10 @@ Sensor entries:
|
||||
the ID used for code generation.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
||||
Configuration variables (i^2c):
|
||||
Configuration variables (I^2C):
|
||||
-------------------------------
|
||||
|
||||
Use this if you want to use your AS3935 in i^2c mode.
|
||||
Use this if you want to use your AS3935 in I^2C mode.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -135,11 +135,11 @@ Use this if you want to use your AS3935 in i^2c mode.
|
||||
- platform: as3935
|
||||
name: "Storm Alert"
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of
|
||||
the sensor. Defaults to ``0x03`` (``A0` and ``A1`` pins pulled low).
|
||||
Another address can be ``0x02``.
|
||||
|
||||
Configuration variables (spi):
|
||||
Configuration variables (SPI):
|
||||
------------------------------
|
||||
|
||||
Use this if you want to use your AS3935 in SPI mode.
|
||||
@ -172,5 +172,5 @@ See Also
|
||||
- `Data Sheet <https://www.embeddedadventures.com/datasheets/AS3935_Datasheet_EN_v2.pdf>`__
|
||||
- `Little Arduino Projects <https://github.com/tardate/LittleArduinoProjects/tree/master/playground/AS3935>`__
|
||||
- `AMS AS3935 <https://ams.com/as3935>`__
|
||||
- `Sparkfun Library <https://github.com/sparkfun/SparkFun_AS3935_Lightning_Detector_Arduino_Library>`__
|
||||
- `SparkFun Library <https://github.com/sparkfun/SparkFun_AS3935_Lightning_Detector_Arduino_Library>`__
|
||||
- :ghedit:`Edit`
|
||||
|
@ -13,7 +13,7 @@ ESPHome. This sensor is commonly found in CircuitSetup 2 and 6 channel energy me
|
||||
Communication with the device is done via an :ref:`SPI bus <spi>`, so you need to have an ``spi:`` entry in your configuration
|
||||
with both ``mosi_pin`` and ``miso_pin`` set.
|
||||
|
||||
The atm90e32 IC can measure up to three AC voltages although typically only one
|
||||
The ATM90E32 IC can measure up to three AC voltages although typically only one
|
||||
voltage measurement would be used for the mains electricity phase of a
|
||||
household. Three current measurements are read via CT clamps.
|
||||
|
||||
@ -25,7 +25,7 @@ The `CircuitSetup 2-Channel Energy Monitor <https://circuitsetup.us/index.php/pr
|
||||
|
||||
CircuitSetup Split Single Phase Real Time Whole House Energy Meter.
|
||||
|
||||
The `CircuitSetup 6-Channel Energy Monitor <https://circuitsetup.us/index.php/product/expandable-6-channel-esp32-energy-meter/>`__ can read 6 current channels and 2 voltage channels at a time, this board has two atm90e32 ICs and requires two sensors to be configured in ESPHome.
|
||||
The `CircuitSetup 6-Channel Energy Monitor <https://circuitsetup.us/index.php/product/expandable-6-channel-esp32-energy-meter/>`__ can read 6 current channels and 2 voltage channels at a time, this board has two ATM90E32 ICs and requires two sensors to be configured in ESPHome.
|
||||
|
||||
.. figure:: images/atm90e32-cs-6chan-full.jpg
|
||||
:align: center
|
||||
@ -96,14 +96,14 @@ Calibration
|
||||
-----------
|
||||
|
||||
This sensor needs calibration to show correct values. The default gain configuration is set to use the `SCT-013-000 <https://amzn.to/2E0KVvo>`__
|
||||
current transformers, and the `Jameco Reliapro 9v AC transformer <https://amzn.to/2XcWJjI>`__.
|
||||
current transformers, and the `Jameco Reliapro 9v AC transformer <https://amzn.to/2XcWJjI>`__.
|
||||
A load which uses a known amount of current can be used to calibrate. For for a more accurate calibration use a
|
||||
`Kill-A-Watt <https://amzn.to/2TXT7jx>`__ meter or similar, mains voltages can fluctuate depending on grid load.
|
||||
|
||||
Voltage
|
||||
^^^^^^^
|
||||
|
||||
Use the expected mains voltage for your region 110V/230V or plug in the Kill-A-Watt and select voltage. See what
|
||||
Use the expected mains voltage for your region 110V/230V or plug in the Kill-A-Watt and select voltage. See what
|
||||
value the ATM90E32 sensor reports for voltage. To adjust the sensor use the calculation:
|
||||
|
||||
``New gain_voltage = (your voltage reading / ESPHome voltage reading) * existing gain_voltage value``
|
||||
|
@ -34,7 +34,7 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name for the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x23`` (address if address pin is pulled low). If the address pin is pulled high,
|
||||
the address is ``0x5C``.
|
||||
- **resolution** (*Optional*, string): The resolution of the sensor in lx. One of ``4.0``,
|
||||
|
@ -63,7 +63,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of
|
||||
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
|
||||
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
|
||||
``OFF``, ``2x``, ``4x``, ``16x``. Defaults to ``OFF``.
|
||||
@ -93,5 +93,5 @@ See Also
|
||||
- :doc:`bmp085`
|
||||
- :apiref:`bme280/bme280.h`
|
||||
- `Adafruit BME280 Library <https://github.com/adafruit/Adafruit_BME280_Library>`__ by `Adafruit <https://www.adafruit.com/>`__
|
||||
- `Sparkfun BME280 Library <https://github.com/sparkfun/SparkFun_BME280_Arduino_Library>`__ by `Sparkfun <https://www.sparkfun.com/>`__
|
||||
- `SparkFun BME280 Library <https://github.com/sparkfun/SparkFun_BME280_Arduino_Library>`__ by `SparkFun <https://www.sparkfun.com/>`__
|
||||
- :ghedit:`Edit`
|
||||
|
Before (image error) Size: 3.5 KiB After (image error) Size: 3.5 KiB |
@ -69,7 +69,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of
|
||||
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
|
||||
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
|
||||
``OFF``, ``1x``, ``3x``, ``7x``, ``15x``, ``31x``, ``63x`` and ``127x``. Defaults to ``OFF``.
|
||||
|
Before (image error) Size: 4.2 KiB After (image error) Size: 4.2 KiB |
@ -8,9 +8,9 @@ BMP085 Temperature+Pressure Sensor
|
||||
|
||||
The BMP085 sensor platform allows you to use your BMP085
|
||||
(`datasheet <https://www.sparkfun.com/datasheets/Components/General/BST-BMP085-DS000-05.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/391>`__) and BMP180
|
||||
`Adafruit <https://www.adafruit.com/product/391>`__) and BMP180
|
||||
(`datasheet <https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/1603>`__) temperature and
|
||||
`Adafruit <https://www.adafruit.com/product/1603>`__) temperature and
|
||||
pressure sensors with ESPHome. The :ref:`I²C <i2c>` is required to be set up in
|
||||
your configuration for this sensor to work.
|
||||
|
||||
|
Before (image error) Size: 2.2 KiB After (image error) Size: 2.2 KiB |
@ -53,7 +53,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of
|
||||
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
|
||||
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
|
||||
``OFF``, ``2x``, ``4x``, ``16x``. Defaults to ``OFF``.
|
||||
|
Before (image error) Size: 3.0 KiB After (image error) Size: 3.0 KiB |
@ -20,7 +20,7 @@ In this guide, we will go through creating a custom sensor component for the
|
||||
`BMP180 <https://www.adafruit.com/product/1603>`__ pressure sensor (we will only do the pressure part,
|
||||
temperature is more or less the same). During this guide, you will learn how to 1. define a custom sensor
|
||||
ESPHome can use 2. go over how to register the sensor so that it will be shown inside Home Assistant and
|
||||
3. leverage an existing arduino library for the BMP180 with ESPHome.
|
||||
3. leverage an existing Arduino library for the BMP180 with ESPHome.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -51,7 +51,7 @@ What does this mean? Well if you've coded in Arduino before you might know the t
|
||||
very often and this is where you can do things like read out sensors etc.
|
||||
|
||||
Components have something similar to that: They also have ``setup()`` and ``loop()`` methods which will be
|
||||
called by the application kind of like the arduino functions.
|
||||
called by the application kind of like the Arduino functions.
|
||||
|
||||
So, let's now take a look at some code: This is an example of a custom component class (called ``MyCustomSensor`` here):
|
||||
|
||||
@ -191,11 +191,11 @@ Step 3: BMP180 support
|
||||
Let's finally make this custom sensor useful by adding the BMP180 aspect into it! Sure, printing ``42`` is a nice number
|
||||
but it won't help with home automation :D
|
||||
|
||||
A great feature of ESPHome is that you don't need to code everything yourself. You can use any existing arduino
|
||||
A great feature of ESPHome is that you don't need to code everything yourself. You can use any existing Arduino
|
||||
library to do the work for you! Now for this example we'll
|
||||
use the `Adafruit BMP085 Library <https://platformio.org/lib/show/525/Adafruit%20BMP085%20Library>`__
|
||||
library to implement support for the BMP085 sensor. But you can find other libraries too on the
|
||||
`platformio library index <https://platformio.org/lib>`__
|
||||
`PlatformIO library index <https://platformio.org/lib>`__
|
||||
|
||||
First we'll need to add the library to our project dependencies. To do so, put ``Adafruit BMP085 Library``
|
||||
in your global ``libraries``:
|
||||
@ -242,7 +242,7 @@ Then update the sensor for BMP180 support:
|
||||
// ...
|
||||
|
||||
There's not too much going on there. First, we define the variable ``bmp`` of type ``Adafruit_BMP085``
|
||||
inside our class as a class member. This is the object the adafruit library exposes and through which
|
||||
inside our class as a class member. This is the object the Adafruit library exposes and through which
|
||||
we will communicate with the sensor.
|
||||
|
||||
In our custom ``setup()`` function we're *initializing* the library (using ``.begin()``) and in
|
||||
|
@ -2,8 +2,8 @@ Dallas Temperature Sensor
|
||||
=========================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up dallas temperature sensor hubs that can
|
||||
expose many temperature sensors on a single pin using the one wire protocol.
|
||||
:description: Instructions for setting up Dallas temperature sensor hubs that can
|
||||
expose many temperature sensors on a single pin using the 1-Wire protocol.
|
||||
:image: dallas.jpg
|
||||
:keywords: Dallas, ds18b20, onewire
|
||||
|
||||
@ -15,7 +15,7 @@ Component/Hub
|
||||
The ``dallas`` component allows you to use your
|
||||
`DS18b20 <https://www.adafruit.com/product/374>`__
|
||||
(`datasheet <https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf>`__)
|
||||
and similar One-Wire temperature sensors.
|
||||
and similar 1-Wire temperature sensors.
|
||||
|
||||
To use your :ref:`dallas sensor <dallas-sensor>`, first define a dallas “hub” with a pin and
|
||||
id, which you will later use to create the sensors. The 1-Wire bus the
|
||||
@ -48,9 +48,9 @@ Configuration variables:
|
||||
Sensors
|
||||
-------
|
||||
|
||||
The ``dallas`` sensor allows you to use ds18b20 and similar sensors.
|
||||
The ``dallas`` sensor allows you to use DS18B20 and similar sensors.
|
||||
First, you need to define a :ref:`dallas sensor component <dallas-component>`.
|
||||
The dallas sensor component (or "hub") is an internal model that defines which pins the ds18b20
|
||||
The dallas sensor component (or "hub") is an internal model that defines which pins the DS18B20
|
||||
sensors are connected to. This is because with these sensors you can actually connect multiple
|
||||
sensors to a single pin and use them all at once.
|
||||
|
||||
@ -60,7 +60,7 @@ To initialize a sensor, first supply either ``address`` **or** ``index`` to iden
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Wired Version of the DS18b20 One-Wire Temperature Sensor.
|
||||
Wired Version of the DS18B20 1-Wire Temperature Sensor.
|
||||
|
||||
.. _Adafruit: https://www.adafruit.com/product/374
|
||||
|
||||
@ -89,7 +89,7 @@ Configuration variables:
|
||||
So the first sensor will for example have index 0. :ref:`It’s recommended
|
||||
to use address instead <dallas-getting-ids>`.
|
||||
- **resolution** (*Optional*, int): An optional resolution from 8 to
|
||||
12. Higher means more accurate. Defaults to the maximum for most dallas temperature sensors: 12.
|
||||
12. Higher means more accurate. Defaults to the maximum for most Dallas temperature sensors: 12.
|
||||
- **dallas_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`dallas hub <dallas-component>`.
|
||||
Use this if you have multiple dallas hubs.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
@ -8,15 +8,15 @@ DHT Temperature+Humidity Sensor
|
||||
|
||||
The DHT Temperature+Humidity sensor allows you to use your DHT11
|
||||
(`datasheet <https://akizukidenshi.com/download/ds/aosong/DHT11.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/386>`__), DHT22
|
||||
`Adafruit <https://www.adafruit.com/product/386>`__), DHT22
|
||||
(`datasheet <https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/385>`__), AM2302
|
||||
`Adafruit <https://www.adafruit.com/product/385>`__), AM2302
|
||||
(`datasheet <https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/393>`__), RHT03
|
||||
`Adafruit <https://www.adafruit.com/product/393>`__), RHT03
|
||||
(`datasheet <https://cdn.sparkfun.com/datasheets/Sensors/Weather/RHT03.pdf>`__,
|
||||
`sparkfun <https://cdn.sparkfun.com/datasheets/Sensors/Weather/RHT03.pdf>`__) and SI7021 (one wire Sonoff version)
|
||||
`SparkFun <https://cdn.sparkfun.com/datasheets/Sensors/Weather/RHT03.pdf>`__) and SI7021 (one wire Sonoff version)
|
||||
(`datasheet <https://cdn.sparkfun.com/assets/b/1/b/8/5/Si7021-A20.pdf>`__,
|
||||
`sparkfun <https://cdn.sparkfun.com/assets/b/1/b/8/5/Si7021-A20.pdf>`__)
|
||||
`SparkFun <https://cdn.sparkfun.com/assets/b/1/b/8/5/Si7021-A20.pdf>`__)
|
||||
sensors with ESPHome.
|
||||
|
||||
.. figure:: images/dht-full.jpg
|
||||
|
@ -8,7 +8,7 @@ DHT12 Temperature+Humidity Sensor
|
||||
|
||||
The ``dht12`` Temperature+Humidity sensor allows you to use your DHT12
|
||||
(`datasheet <http://www.robototehnika.ru/file/DHT12.pdf>`__,
|
||||
`electrodragon`_) i2c-based sensor with ESPHome. This sensor is also called AM2320 by some sellers.
|
||||
`electrodragon`_) I^2C-based sensor with ESPHome. This sensor is also called AM2320 by some sellers.
|
||||
|
||||
.. figure:: images/dht12-full.jpg
|
||||
:align: center
|
||||
|
@ -8,7 +8,7 @@ HDC1080 Temperature+Humidity Sensor
|
||||
|
||||
The HDC1080 Temperature+Humidity sensor allows you to use your HDC1080
|
||||
(`datasheet <http://www.ti.com/lit/ds/symlink/hdc1080.pdf>`__,
|
||||
`adafruit <https://www.adafruit.com/product/2635>`__) sensors with
|
||||
`Adafruit <https://www.adafruit.com/product/2635>`__) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
|
@ -34,7 +34,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x1E``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x1E``.
|
||||
- **field_strength_x** (*Optional*): The field strength in microtesla along the X-Axis. All options from
|
||||
:ref:`Sensor <config-sensor>`.
|
||||
- **field_strength_y** (*Optional*): The field strength in microtesla along the Y-Axis. All options from
|
||||
|
@ -1,8 +1,8 @@
|
||||
Homeassistant Sensor
|
||||
====================
|
||||
Home Assistant Sensor
|
||||
=====================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up homeassistant sensors with ESPHome that import states from your homeassistant instance.
|
||||
:description: Instructions for setting up Home Assistant sensors with ESPHome that import states from your Home Assistant instance.
|
||||
:image: home-assistant.png
|
||||
|
||||
The ``homeassistant`` sensor platform allows you to create sensors that import
|
||||
|
@ -7,7 +7,7 @@ HTU21D Temperature+Humidity Sensor
|
||||
:keywords: HTU21D
|
||||
|
||||
The HTU21D Temperature+Humidity sensor allows you to use your HTU21D
|
||||
(`adafruit <https://www.adafruit.com/product/1899>`__) sensors with
|
||||
(`Adafruit <https://www.adafruit.com/product/1899>`__) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
|
@ -8,16 +8,16 @@ HX711 Load Cell Amplifier
|
||||
|
||||
The ``hx711`` sensor platform allows you to use your HX711
|
||||
load cell amplifier
|
||||
(`datasheet <https://www.mouser.com/ds/2/813/hx711_english-1022875.pdf>`__, `Sparkfun`_) with ESPHome
|
||||
(`datasheet <https://www.mouser.com/ds/2/813/hx711_english-1022875.pdf>`__, `SparkFun`_) with ESPHome
|
||||
|
||||
.. figure:: images/hx711-full.jpg
|
||||
:align: center
|
||||
:target: `Sparkfun`_
|
||||
:target: `SparkFun`_
|
||||
:width: 60.0%
|
||||
|
||||
HX711 Load Cell Amplifier. Image by `Sparkfun`_ licensed and re-distributed under `CC BY 2.0 <https://creativecommons.org/licenses/by/2.0/>`__.
|
||||
HX711 Load Cell Amplifier. Image by `SparkFun`_ licensed and re-distributed under `CC BY 2.0 <https://creativecommons.org/licenses/by/2.0/>`__.
|
||||
|
||||
.. _Sparkfun: https://www.sparkfun.com/products/13879
|
||||
.. _SparkFun: https://www.sparkfun.com/products/13879
|
||||
|
||||
Connect ``GND`` to ``GND``, ``VCC`` to ``3.3V`` and the other three ``MISO`` (or ``SO`` for short),
|
||||
``CS`` and ``CLOCK`` (or ``SCK``) to free GPIO pins.
|
||||
|
@ -47,7 +47,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x40``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x40``.
|
||||
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on the board for current calculation.
|
||||
Defaults to ``0.1 ohm``.
|
||||
- **max_voltage** (*Optional*, float): The maximum bus voltage you are expecting. ESPHome will use this to
|
||||
|
@ -50,7 +50,7 @@ required to be set up in your configuration for this sensor to work.
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x40``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x40``.
|
||||
- **channel_1** (*Optional*): The configuration options for the 1st channel.
|
||||
|
||||
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on this channel for current calculation.
|
||||
|
@ -347,11 +347,11 @@ Example: Converting Celsius to Fahrenheit
|
||||
-----------------------------------------
|
||||
|
||||
While I personally don’t like the Fahrenheit temperature scale, I do
|
||||
understand that having temperature values appear in the fahrenheit unit
|
||||
is quite useful to some users. ESPHome uses the celsius temperature
|
||||
understand that having temperature values appear in the Fahrenheit unit
|
||||
is quite useful to some users. ESPHome uses the Celsius temperature
|
||||
unit internally, and I’m not planning on making converting between the
|
||||
two simple (😉), but you can use this filter to convert celsius values to
|
||||
fahrenheit.
|
||||
two simple (😉), but you can use this filter to convert Celsius values to
|
||||
Fahrenheit.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -5,11 +5,11 @@ MAX31855 K-Type Thermocouple Temperature Sensor
|
||||
:description: Instructions for setting up MAX31855 Thermocouple temperature sensors.
|
||||
:image: max31855.jpg
|
||||
|
||||
The ``max31855`` temperature sensor allows you to use your max31855 thermocouple
|
||||
The ``max31855`` temperature sensor allows you to use your MAX31855 thermocouple
|
||||
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf>`__) with ESPHome
|
||||
|
||||
As the communication with the MAX31855 is done using SPI, you need
|
||||
to have an :ref:`spi bus <spi>` in your configuration with the **miso_pin** set (mosi is not required).
|
||||
to have an :ref:`SPI bus <spi>` in your configuration with the **miso_pin** set (MOSI is not required).
|
||||
|
||||
Connect ``GND`` to ``GND``, ``VCC`` to ``3.3V`` and the other three ``MISO`` (or ``SO`` for short),
|
||||
``CS`` and ``CLOCK`` (or ``CLK``) to free GPIO pins.
|
||||
|
@ -5,8 +5,8 @@ MAX6675 K-Type Thermocouple Temperature Sensor
|
||||
:description: Instructions for setting up MAX6675 Thermocouple temperature sensors.
|
||||
:image: max6675.jpg
|
||||
|
||||
The ``max6675`` temperature sensor allows you to use your max6675 thermocouple
|
||||
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf>`__, `sainsmart`_) with ESPHome
|
||||
The ``max6675`` temperature sensor allows you to use your MAX6675 thermocouple
|
||||
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf>`__, `SainSmart`_) with ESPHome
|
||||
|
||||
.. figure:: images/max6675-full.jpg
|
||||
:align: center
|
||||
@ -14,10 +14,10 @@ temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX
|
||||
|
||||
MAX6675 K-Type Thermocouple Temperature Sensor.
|
||||
|
||||
.. _sainsmart: https://www.sainsmart.com/products/max6675-module-k-type-thermocouple-thermocouple-sensor-temperature-0-1024-for-arduino
|
||||
.. _SainSmart: https://www.sainsmart.com/products/max6675-module-k-type-thermocouple-thermocouple-sensor-temperature-0-1024-for-arduino
|
||||
|
||||
As the communication with the MAX66775 is done using SPI, you need
|
||||
to have an :ref:`spi bus <spi>` in your configuration with the **miso_pin** set (mosi is not required).
|
||||
to have an :ref:`SPI bus <spi>` in your configuration with the **miso_pin** set (MOSI is not required).
|
||||
|
||||
Connect ``GND`` to ``GND``, ``VCC`` to ``3.3V`` and the other three ``MISO`` (or ``SO`` for short),
|
||||
``CS`` and ``CLOCK`` (or ``CLK``) to free GPIO pins.
|
||||
|
@ -7,7 +7,7 @@ MPU6050 Accelerometer/Gyroscope Sensor
|
||||
|
||||
The ``mpu6050`` sensor platform allows you to use your MPU6050 Accelerometer/Gyroscope
|
||||
(`datasheet <https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf>`__,
|
||||
`Sparkfun`_) sensors with
|
||||
`SparkFun`_) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
@ -23,7 +23,7 @@ new feature. Supporting all possible use-cases would be quite hard.
|
||||
|
||||
MPU6050 Accelerometer/Gyroscope Sensor.
|
||||
|
||||
.. _Sparkfun: https://www.sparkfun.com/products/11028
|
||||
.. _SparkFun: https://www.sparkfun.com/products/11028
|
||||
|
||||
.. figure:: images/mpu6050-ui.png
|
||||
:align: center
|
||||
@ -53,7 +53,7 @@ new feature. Supporting all possible use-cases would be quite hard.
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x68``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x68``.
|
||||
- **accel_x** (*Optional*): Use the X-Axis of the Accelerometer. All options from
|
||||
:ref:`Sensor <config-sensor>`.
|
||||
- **accel_y** (*Optional*): Use the Y-Axis of the Accelerometer. All options from
|
||||
|
@ -51,7 +51,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of
|
||||
the sensor. Defaults to ``0x77``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
@ -5,8 +5,8 @@ SCD30 CO₂, Temperature and Relative Humidty Sensor
|
||||
:description: Instructions for setting up SCD30 CO₂ Temperature and Relative Humidty Sensor
|
||||
:image: scd30.jpg
|
||||
|
||||
The ``scd30`` sensor platform allows you to use your Sensiron SCD30 CO₂
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/CO2/Sensirion_CO2_Sensors_SCD30_Datasheet.pdf>`__) sensors with ESPHome.
|
||||
The ``scd30`` sensor platform allows you to use your Sensiron SCD30 CO₂
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/CO2/Sensirion_CO2_Sensors_SCD30_Datasheet.pdf>`__) sensors with ESPHome.
|
||||
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. figure:: images/scd30.jpg
|
||||
@ -29,7 +29,7 @@ The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for thi
|
||||
accuracy_decimals: 1
|
||||
address: 0x61
|
||||
update_interval: 5s
|
||||
|
||||
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
@ -53,7 +53,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x61``.
|
||||
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
|
@ -5,8 +5,8 @@ SGP30 CO₂ and Volatile Organic Compound Sensor
|
||||
:description: Instructions for setting up SGP30 CO₂eq and Volatile Organic Compound sensor
|
||||
:image: sgp30.png
|
||||
|
||||
The ``sgp30`` sensor platform allows you to use your Sensiron SGP30 multi-pixel gas
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Gas/Sensirion_Gas_Sensors_SGP30_Datasheet.pdf>`__) sensors or the SVM30 breakout-boards (`product page <https://www.sensirion.com/en/environmental-sensors/gas-sensors/multi-gas-humidity-temperature-module-svm30/>`__) with ESPHome.
|
||||
The ``sgp30`` sensor platform allows you to use your Sensiron SGP30 multi-pixel gas
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Gas/Sensirion_Gas_Sensors_SGP30_Datasheet.pdf>`__) sensors or the SVM30 breakout-boards (`product page <https://www.sensirion.com/en/environmental-sensors/gas-sensors/multi-gas-humidity-temperature-module-svm30/>`__) with ESPHome.
|
||||
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. figure:: images/eco2-tvoc.png
|
||||
@ -43,7 +43,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x58``.
|
||||
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
@ -91,7 +91,7 @@ via the logs:
|
||||
The next time you upload the code, the SGP30 will be continue its operation with this baseline and you will get consistent values.
|
||||
|
||||
Please note that Sensirion recommends that after around 7 days, the baseline will need to be
|
||||
re-calibrated because the internal sensor has a slight value drift over time.
|
||||
re-calibrated because the internal sensor has a slight value drift over time.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
@ -44,7 +44,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x44``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
@ -10,11 +10,11 @@ The ``shtcx`` sensor platform Temperature+Humidity sensor allows you to use your
|
||||
`Sensirion STHC1 <https://www.sensirion.com/en/environmental-sensors/humidity-sensors/digital-humidity-sensor-for-consumer-electronics-and-iot/>`__) and
|
||||
the newer SHTC3
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Humidity/Sensirion_Humidity_Sensors_SHTC3_Datasheet.pdf>`__,
|
||||
`Sparkfun`_ ) sensors with
|
||||
`SparkFun`_ ) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. _Sparkfun: https://www.sparkfun.com/products/15074
|
||||
.. _SparkFun: https://www.sparkfun.com/products/15074
|
||||
|
||||
.. figure:: images/temperature-humidity.png
|
||||
:align: center
|
||||
@ -47,7 +47,7 @@ Configuration variables:
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x70``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
@ -28,7 +28,7 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name for the temperature sensor.
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor.
|
||||
Defaults to ``0x4A``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
@ -64,7 +64,7 @@ Configuration variables:
|
||||
values are ``1x`` (default), ``4x``, ``16x``, ``60x`` (highest gain).
|
||||
- **integration_time** (*Optional*): The amount of time the light sensor is exposed. Valid values are
|
||||
``2.4ms`` (default), ``24ms``, ``50ms``, ``101ms``, ``154ms``, ``700ms``.
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x29``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x29``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
||||
|
@ -37,7 +37,7 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name for the sensor.
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x39``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x39``.
|
||||
- **integration_time** (*Optional*, :ref:`config-time`):
|
||||
The time the sensor will take for each measurement. Longer means more accurate values. One of
|
||||
``14ms``, ``101ms``, ``402ms``. Defaults to ``402ms``.
|
||||
@ -57,6 +57,6 @@ See Also
|
||||
- :ref:`sensor-filters`
|
||||
- :doc:`bh1750`
|
||||
- :doc:`adc`
|
||||
- `SparkFun TSL2561 Arduino Library <https://github.com/sparkfun/SparkFun_TSL2561_Arduino_Library>`__ by `Sparkfun <https://sparkfun.com/>`__
|
||||
- `SparkFun TSL2561 Arduino Library <https://github.com/sparkfun/SparkFun_TSL2561_Arduino_Library>`__ by `SparkFun <https://sparkfun.com/>`__
|
||||
- :apiref:`tsl2561/tsl2561.h`
|
||||
- :ghedit:`Edit`
|
||||
|
@ -1,27 +1,27 @@
|
||||
Tx20/Tx23 Wind Speed/Direction Sensor
|
||||
TX20/TX23 Wind Speed/Direction Sensor
|
||||
=====================================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up Tx20/Tx23 wind speed and direction sensors
|
||||
:description: Instructions for setting up TX20/TX23 wind speed and direction sensors
|
||||
:image: images/tx20.jpg
|
||||
:keywords: Tx20
|
||||
:keywords: TX20
|
||||
|
||||
The ``tx20`` sensor platform allows you to use your Tx20/Tx23
|
||||
The ``tx20`` sensor platform allows you to use your TX20/TX23
|
||||
(`Amazon`_,
|
||||
`lacrosse_tx23`_)
|
||||
wind direction and speed sensors with ESPHome.
|
||||
`lacrosse_tx23`_)
|
||||
wind direction and speed sensors with ESPHome.
|
||||
The only required pin is the black or brown cable (which is used to transmit data.)
|
||||
The red cable should be connected to VCC (3.3V), green initiates the data transfer when connected to GND
|
||||
and should therefore be directly connected to GND and the yellow cable should be always connected to ground.
|
||||
The difference from the Tx20 to the Tx23 seems to be that the green cable does not matter anymore and the
|
||||
The difference from the TX20 to the TX23 seems to be that the green cable does not matter any more and the
|
||||
wind sensor is just sending a datagram every 2 seconds - pretty much the same as when the green cable was
|
||||
connected to GND in the Tx20.
|
||||
connected to GND in the TX20.
|
||||
|
||||
.. figure:: images/tx20.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Tx20 / Tx23 Wind Speed / Direction.
|
||||
TX20 / TX23 Wind Speed / Direction.
|
||||
|
||||
.. _Amazon: https://www.amazon.de/Technoline-Tx-20/dp/B01HXZ3KLA
|
||||
.. _lacrosse_tx23: https://www.lacrossetechnology.com/tx23-wind-sensor
|
||||
@ -32,10 +32,10 @@ connected to GND in the Tx20.
|
||||
sensor:
|
||||
- platform: tx20
|
||||
wind_speed:
|
||||
name: "Windspeed"
|
||||
name: "Wind speed"
|
||||
wind_direction_degrees:
|
||||
name: "Winddirection Degrees"
|
||||
pin:
|
||||
name: "Wind direction degrees"
|
||||
pin:
|
||||
number: GPIO04
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ Configuration variables:
|
||||
.. note::
|
||||
|
||||
In order to create a text sensor to show the textual representation of the wind direction
|
||||
the following config can be used. "tx20_id" needs to be replaced with the id of the Tx20 sensor.
|
||||
the following config can be used. "tx20_id" needs to be replaced with the id of the TX20 sensor.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -9,7 +9,7 @@ Ultrasonic Distance Sensor
|
||||
The ultrasonic distance sensor allows you to use simple ultrasonic
|
||||
sensors like the HC-SR04
|
||||
(`datasheet <https://www.electroschematics.com/wp-content/uploads/2013/07/HC-SR04-datasheet-version-2.pdf>`__,
|
||||
`sparkfun <https://www.sparkfun.com/products/13959>`__) with ESPHome
|
||||
`SparkFun <https://www.sparkfun.com/products/13959>`__) with ESPHome
|
||||
to measure distances. These sensors usually can’t measure anything more
|
||||
than about two meters and may sometimes make some annoying clicking
|
||||
sounds.
|
||||
|
@ -48,7 +48,7 @@ Configuration variables:
|
||||
for it to report a valid reading. Setting a lower value may increase the range of the sensor
|
||||
but also increases the chance of getting inaccurate readings. Defaults to ``0.25``.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x29``.
|
||||
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x29``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
See Also
|
||||
|
@ -2,7 +2,7 @@ Xiaomi CGG1 BLE Sensor
|
||||
======================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up Xiaomi ClearGrass CGG1 E-Ink bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:description: Instructions for setting up Xiaomi ClearGrass CGG1 E-Ink Bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:image: xiaomi_cgg1.jpg
|
||||
:keywords: Xiaomi, ClearGrass, BLE, E-Ink, Bluetooth, CGG1
|
||||
|
||||
@ -80,14 +80,14 @@ message like this one:
|
||||
Got Xiaomi CGG1 7A:80:8E:19:36:BA Got temperature=23.4°C, humidity=65.0%
|
||||
|
||||
Note that it can sometimes take some time for the first BLE broadcast to be received. You can speed
|
||||
up the process by pressing the grey bluetooth button on the back of the device.
|
||||
up the process by pressing the grey Bluetooth button on the back of the device.
|
||||
|
||||
Then just copy the address (``7A:80:8E:19:36:BA``) into a new ``sensor.xiaomi_cgg1`` platform
|
||||
entry like in the configuration example at the top.
|
||||
|
||||
.. note::
|
||||
|
||||
The ESPHome Xiaomi integration listens passively to packets the xiaomi device sends by itself.
|
||||
The ESPHome Xiaomi integration listens passively to packets the Xiaomi device sends by itself.
|
||||
ESPHome therefore has no impact on the battery life of the device.
|
||||
|
||||
See Also
|
||||
|
@ -2,7 +2,7 @@ Xiaomi LYWSD02 BLE Sensor
|
||||
=========================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up Xiaomi LYWSD02 bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:description: Instructions for setting up Xiaomi LYWSD02 Bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:image: xiaomi_lywsd02.jpg
|
||||
:keywords: Xiaomi, LYWSD02, BLE, Bluetooth
|
||||
|
||||
@ -69,14 +69,14 @@ it detects these sensors, it will automatically parse the BLE message print a me
|
||||
Got Xiaomi LYWSD02 (3F:5B:7D:82:58:4E): Temperature: 26.9°C
|
||||
|
||||
Note that it can sometimes take some time for the first BLE broadcast to be received. You can speed up
|
||||
the process by pressing the grey bluetooth button on the back of the device.
|
||||
the process by pressing the grey Bluetooth button on the back of the device.
|
||||
|
||||
Then just copy the address (``3F:5B:7D:82:58:4E``) into a new ``sensor.xiaomi_lywsd02`` platform entry like
|
||||
in the configuration example at the top.
|
||||
|
||||
.. note::
|
||||
|
||||
The ESPHome Xiaomi integration listens passively to packets the xiaomi device sends by itself.
|
||||
The ESPHome Xiaomi integration listens passively to packets the Xiaomi device sends by itself.
|
||||
ESPHome therefore has no impact on the battery life of the device.
|
||||
|
||||
See Also
|
||||
|
@ -2,7 +2,7 @@ Xiaomi LYWSDCGQ BLE Sensor
|
||||
==========================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up Xiaomi Mi Jia LYWSDCGQ bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:description: Instructions for setting up Xiaomi Mi Jia LYWSDCGQ Bluetooth-based temperature and humidity sensors in ESPHome.
|
||||
:image: xiaomi_lywsdcgq.jpg
|
||||
:keywords: Xiaomi, Mi Jia, BLE, Bluetooth, LYWSDCGQ
|
||||
|
||||
@ -78,14 +78,14 @@ it detects these sensors, it will automatically parse the BLE message print a me
|
||||
Got Xiaomi LYWSDCGQ 7A:80:8E:19:36:BA Got temperature=23.4°C, humidity=65.0%
|
||||
|
||||
Note that it can sometimes take some time for the first BLE broadcast to be received. You can speed up
|
||||
the process by pressing the grey bluetooth button on the back of the device.
|
||||
the process by pressing the grey Bluetooth button on the back of the device.
|
||||
|
||||
Then just copy the address (``7A:80:8E:19:36:BA``) into a new ``sensor.xiaomi_lywsdcgq`` platform entry like
|
||||
in the configuration example at the top.
|
||||
|
||||
.. note::
|
||||
|
||||
The ESPHome Xiaomi integration listens passively to packets the xiaomi device sends by itself.
|
||||
The ESPHome Xiaomi integration listens passively to packets the Xiaomi device sends by itself.
|
||||
ESPHome therefore has no impact on the battery life of the device.
|
||||
|
||||
See Also
|
||||
|
@ -2,24 +2,24 @@ Sim800L Component
|
||||
=================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up the SIM800L gsm module to send and receive SMS in ESPHome.
|
||||
:description: Instructions for setting up the SIM800L GSM module to send and receive SMS in ESPHome.
|
||||
:image: sim800l.jpg
|
||||
:keywords: SMS SIM800L GSM
|
||||
|
||||
The ``SIM800L`` Component provides the ability to send and receive SMS text messages. The device must be
|
||||
connected via a :doc:`UART bus </components/uart>` supporting both receiving and transmitting line.
|
||||
The uart bus must be configured at the same speed of the module which is by default 9600bps.
|
||||
connected via a :doc:`UART bus </components/uart>` supporting both receiving and transmitting line.
|
||||
The UART bus must be configured at the same speed of the module which is by default 9600bps.
|
||||
The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``.
|
||||
|
||||
.. warning::
|
||||
|
||||
If you are using the :doc:`logger` make sure you are not using the same pins for ``TX`` and ``RX`` or
|
||||
otherwise disable the uart logging with the ``baud_rate: 0`` option.
|
||||
otherwise disable the UART logging with the ``baud_rate: 0`` option.
|
||||
|
||||
.. note::
|
||||
|
||||
This module requires a power supply between 3.8V and 4.2V that can handle current spikes up
|
||||
to 2 amps, it will not work by powering from the same 3.3v power source of the ESP. However you can
|
||||
to 2 amps, it will not work by powering from the same 3.3V power source of the ESP. However you can
|
||||
connect ``TX`` and ``RX`` lines directly without any level shifter.
|
||||
|
||||
.. figure:: images/sim800l-full.jpg
|
||||
@ -46,14 +46,14 @@ Configuration variables:
|
||||
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the UART hub.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **on_sms_received** (*Optional*, :ref:`Automation <automation>`): An action to be
|
||||
performed when a sms is received. See :ref:`sim800l-on_sms_received`.
|
||||
performed when an SMS is received. See :ref:`sim800l-on_sms_received`.
|
||||
|
||||
.. _sim800l-on_sms_received:
|
||||
|
||||
``on_sms_received`` Trigger
|
||||
---------------------------
|
||||
|
||||
With this configuration option you can write complex automations whenever a sms message
|
||||
With this configuration option you can write complex automations whenever an SMS message
|
||||
is received. To use the message content, use a :ref:`lambda <config-lambda>`
|
||||
template, the message content and the sender phone number are available inside that lambda
|
||||
under the variables named ``message`` and ``sender`` respectively.
|
||||
@ -94,7 +94,7 @@ Configuration options:
|
||||
- **recipient** (***Required**, string, :ref:`templatable <config-templatable>`): The message recipient.
|
||||
number.
|
||||
- **message** (**Required**, string, :ref:`templatable <config-templatable>`): The message content.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the Sim800L if you have multiple components.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the SIM800L if you have multiple components.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -108,8 +108,8 @@ Configuration options:
|
||||
Getting started with Home Assistant
|
||||
-----------------------------------
|
||||
|
||||
The following code will get you up and running with a configuration updating received messages
|
||||
on Home Assistant and will also setup a service so you can send messages with your Sim800L.
|
||||
The following code will get you up and running with a configuration updating received messages
|
||||
on Home Assistant and will also setup a service so you can send messages with your SIM800L.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -143,7 +143,7 @@ on Home Assistant and will also setup a service so you can send messages with yo
|
||||
id(sms_sender).publish_state(sender);
|
||||
id(sms_message).publish_state(message);
|
||||
|
||||
Now your latest received sms and sender number will be displayed by the text sensors.
|
||||
Now your latest received SMS and sender number will be displayed by the text sensors.
|
||||
|
||||
To trigger the automation from Home Assistant you can invoke the service with this code:
|
||||
|
||||
|
@ -38,8 +38,8 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **clk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin used for the clock line of the SPI bus.
|
||||
- **mosi_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin used for the mosi line of the SPI bus.
|
||||
- **miso_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin used for the miso line of the SPI bus.
|
||||
- **mosi_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin used for the MOSI line of the SPI bus.
|
||||
- **miso_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin used for the MISO line of the SPI bus.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this SPI hub if you need multiple SPI hubs.
|
||||
|
||||
See Also
|
||||
|
@ -7,9 +7,9 @@ SX1509 16 channel I/O Expander with LED driver and keypad engine
|
||||
|
||||
The SX1509 component allows you to expand your I/O capabilities:
|
||||
(`datasheet <https://www.semtech.com/uploads/documents/sx1509_evk_users_guide.pdf>`__,
|
||||
`Sparkfun`_) in ESPHome. It uses :ref:`I²C Bus <i2c>` for communication.
|
||||
`SparkFun`_) in ESPHome. It uses :ref:`I²C Bus <i2c>` for communication.
|
||||
|
||||
Once configured, you can use any of the 16 pins as pins for your projects.
|
||||
Once configured, you can use any of the 16 pins as pins for your projects.
|
||||
Within ESPHome they emulate a real internal GPIO pin
|
||||
and can therefore be used with many of ESPHome's components such as the GPIO
|
||||
binary sensor or GPIO switch.
|
||||
@ -25,7 +25,7 @@ complicated components that use the pin schema will not work. For example the I2
|
||||
|
||||
SX1509 16 channel I/O Expander.
|
||||
|
||||
.. _Sparkfun: https://learn.sparkfun.com/tutorials/sx1509-io-expander-breakout-hookup-guide/all
|
||||
.. _SparkFun: https://learn.sparkfun.com/tutorials/sx1509-io-expander-breakout-hookup-guide/all
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -59,7 +59,7 @@ up to 8x8 matrix (i.e. 64 keys).
|
||||
So a value of 4 enables pins 8,9,10,11 to be used as the columns for the keypad matrix. This value must be between 1 and 8.
|
||||
- **sleep_time** (*Optional*, int): No key press within this time will set keypad engine to sleep.
|
||||
- **scan_time** (*Optional*, int): Scan time per row (must be set above debounce time).
|
||||
- **debounce_time** (*Optional*, int): The debounce time is common to all IOs.
|
||||
- **debounce_time** (*Optional*, int): The debounce time is common to all IOs.
|
||||
|
||||
.. figure:: images/sx1509-keypad.jpg
|
||||
:align: center
|
||||
@ -73,7 +73,7 @@ Attention should be paid to the capabilities of the I/O pins.
|
||||
| # | pin function | Keypad |
|
||||
| | | +
|
||||
+=====+==================+=====+========+
|
||||
| I/O | input output pwm | Row | Column |
|
||||
| I/O | input output PWM | Row | Column |
|
||||
+-----+------------------+-----+--------+
|
||||
| 0 | ✓ | ✓ | |
|
||||
+-----+------------------+-----+--------+
|
||||
@ -132,7 +132,7 @@ Configuration variables for the SX1509 keypad keys:
|
||||
- **col** (**Required**, int): The column number for this key on the keypad.
|
||||
|
||||
With the following configuration items you may use the individual pins of the SX1509 as the pins for binary_sensor, switch, or output.
|
||||
The outputs can in turn be used to add pwm enabled lights like the monochromatic light.
|
||||
The outputs can in turn be used to add PWM-enabled lights like the monochromatic light.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -142,7 +142,7 @@ The outputs can in turn be used to add pwm enabled lights like the monochromatic
|
||||
name: "SX1509 Pin #0"
|
||||
pin:
|
||||
sx1509: sx1509_hub1
|
||||
# Use pin number 0 on the sx1509
|
||||
# Use pin number 0 on the SX1509
|
||||
number: 0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
@ -153,7 +153,7 @@ The outputs can in turn be used to add pwm enabled lights like the monochromatic
|
||||
name: "SX1509 Pin #1"
|
||||
pin:
|
||||
sx1509: sx1509_hub1
|
||||
# Use pin number 1 on the sx1509
|
||||
# Use pin number 1 on the SX1509
|
||||
number: 1
|
||||
# use as output for switch
|
||||
mode: OUTPUT
|
||||
@ -164,7 +164,7 @@ The outputs can in turn be used to add pwm enabled lights like the monochromatic
|
||||
- platform: sx1509
|
||||
sx1509_id: sx1509_hub1
|
||||
id: 'sx1509_output'
|
||||
# Use pin number 2 on the sx1509
|
||||
# Use pin number 2 on the SX1509
|
||||
pin: 2
|
||||
|
||||
# lights can then use the configured output
|
||||
|
@ -1,8 +1,8 @@
|
||||
Homeassistant Text Sensor
|
||||
=========================
|
||||
Home Assistant Text Sensor
|
||||
==========================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up homeassistant text sensors with ESPHome that import states from your homeassistant instance.
|
||||
:description: Instructions for setting up Home Assistant text sensors with ESPHome that import states from your Home Assistant instance.
|
||||
:image: home-assistant.png
|
||||
|
||||
The ``homeassistant`` text sensor platform allows you to create a sensors that import
|
||||
|
@ -2,10 +2,10 @@ WiFi Info Text Sensor
|
||||
=====================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up wifi info text sensors.
|
||||
:description: Instructions for setting up WiFi info text sensors.
|
||||
:image: network-wifi.png
|
||||
|
||||
The ``wifi_info`` text sensor platform exposes different wifi information
|
||||
The ``wifi_info`` text sensor platform exposes different WiFi information
|
||||
via text sensors.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
@ -10,7 +10,7 @@ Time
|
||||
|
||||
The ``time`` component allows you to set up real time clock time sources for ESPHome.
|
||||
You can then get the current time in :ref:`lambdas <config-lambda>`.
|
||||
Currently only sntp (internet-based), homeassistant time and GPS sources are supported.
|
||||
Currently only SNTP (internet-based), Home Assistant and GPS time sources are supported.
|
||||
|
||||
Home Assistant Time Source
|
||||
--------------------------
|
||||
@ -29,10 +29,10 @@ to Home Assistant will be used to periodically synchronize the current time.
|
||||
Configuration variables:
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Specify the ID of the time for use in lambdas.
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what timezone to use with `this format
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what time zone to use with `this format
|
||||
<https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html>`__ (warning: the format is quite complicated)
|
||||
or the simpler `TZ database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__ in the form
|
||||
<Region>/<City>. ESPHome tries to automatically infer the timezone string based on the timezone of the computer
|
||||
<Region>/<City>. ESPHome tries to automatically infer the time zone string based on the time zone of the computer
|
||||
that is running ESPHome, but this might not always be accurate.
|
||||
- **on_time** (*Optional*, :ref:`Automation <automation>`): Automation to run at specific intervals using
|
||||
a cron-like syntax. See :ref:`time-on_time`.
|
||||
@ -50,11 +50,11 @@ SNTP Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Specify the ID of the time for use in lambdas.
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what timezone to use with `this format
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what time zone to use with `this format
|
||||
<https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html>`__ (warning: the
|
||||
format is quite complicated) or the simpler `TZ database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__
|
||||
in the form <Region>/<City>.
|
||||
ESPHome tries to automatically infer the timezone string based on the timezone of the computer that is running
|
||||
ESPHome tries to automatically infer the time zone string based on the time zone of the computer that is running
|
||||
ESPHome, but this might not always be accurate.
|
||||
- **servers** (*Optional*, list of strings): Choose up to 3 NTP servers that are used for the clock source.
|
||||
Defaults to ``0.pool.ntp.org``, ``1.pool.ntp.org`` and ``2.pool.ntp.org``
|
||||
@ -76,10 +76,10 @@ You first need to set up the :doc:`GPS </components/gps>` component.
|
||||
Configuration variables:
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Specify the ID of the time for use in lambdas.
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what timezone to use with `this format
|
||||
- **timezone** (*Optional*, string): Manually tell ESPHome what time zone to use with `this format
|
||||
<https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html>`__ (warning: the format is quite complicated)
|
||||
or the simpler `TZ database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__ in the form
|
||||
<Region>/<City>. ESPHome tries to automatically infer the timezone string based on the timezone of the computer
|
||||
<Region>/<City>. ESPHome tries to automatically infer the time zone string based on the time zone of the computer
|
||||
that is running ESPHome, but this might not always be accurate.
|
||||
- **on_time** (*Optional*, :ref:`Automation <automation>`): Automation to run at specific intervals using
|
||||
a cron-like syntax. See :ref:`time-on_time`.
|
||||
@ -87,7 +87,7 @@ Configuration variables:
|
||||
Use In Lambdas
|
||||
--------------
|
||||
|
||||
To get the current local time with the timezone applied
|
||||
To get the current local time with the time zone applied
|
||||
in :ref:`lambdas <config-lambda>`, just call the ``.now()`` method like so:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
@ -54,8 +54,8 @@ Configuration variables:
|
||||
Hardware UARTs
|
||||
--------------
|
||||
|
||||
Whenever possible, esphome will use the Hardware UART unit on the processor for fast and accurate communication.
|
||||
When the hardware UARTs are all occupied, esphome will fall back to a software implementation that may not
|
||||
Whenever possible, ESPHome will use the hardware UART unit on the processor for fast and accurate communication.
|
||||
When the hardware UARTs are all occupied, ESPHome will fall back to a software implementation that may not
|
||||
be accurate at higher baud rates.
|
||||
|
||||
``UART0`` is (by default) used by the :doc:`logger component </components/logger>`, using ``tx_pin: GPIO1`` and
|
||||
|
@ -45,7 +45,7 @@ Configuration variables:
|
||||
- **dns2** (*Optional*, IPv4 address): The backup DNS server to use.
|
||||
|
||||
- **use_address** (*Optional*, string): Manually override what address to use to connect
|
||||
to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the previusly configured IP address.
|
||||
to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the previously configured IP address.
|
||||
|
||||
- **ap** (*Optional*): Enable an access point mode on the node.
|
||||
|
||||
@ -83,7 +83,7 @@ ESPHome has an optional "Access Point Mode". If you include ``ap:``
|
||||
in your wifi configuration, ESPHome will automatically set up an access point that you
|
||||
can connect to. Additionally, you can specify both a "normal" station mode and AP mode at the
|
||||
same time. This will cause ESPHome to only enable the access point when no connection
|
||||
to the wifi router can be made.
|
||||
to the WiFi router can be made.
|
||||
|
||||
.. _wifi-manual_ip:
|
||||
|
||||
|
@ -58,7 +58,7 @@ individual IOs.
|
||||
auto ape_component = new ArduinoPortExpander(i2c_component, 0x08);
|
||||
return {ape_component};
|
||||
|
||||
By default the I²C address is ``0x08`` but you can change it on the arduino sketch so you can have more slaves
|
||||
By default the I²C address is ``0x08`` but you can change it on the Arduino sketch so you can have more slaves
|
||||
on the same bus.
|
||||
|
||||
Now it is time to add the ports.
|
||||
@ -103,7 +103,7 @@ Sensor
|
||||
------
|
||||
|
||||
Sensors allows for reading the analog value of an analog pin, those are from ``A0`` to ``A7`` except for
|
||||
``A4`` and ``A5``. The value returned goes from 0 to 1023 (the value returned by the arduino ``analogRead``
|
||||
``A4`` and ``A5``. The value returned goes from 0 to 1023 (the value returned by the Arduino ``analogRead``
|
||||
function).
|
||||
|
||||
Arduino analog inputs measures voltage. By default the sketch is configured to use the Arduino internal VREF
|
||||
|
@ -1,7 +1,7 @@
|
||||
Brilliant / Mirabella Genio Smart Plugs
|
||||
=======================================
|
||||
|
||||
Brilliant / Mirabella Genio Smart Plugs are a tuya based smart plugs sold by Bunnings and Kmart respectively in Australia.
|
||||
Brilliant / Mirabella Genio Smart Plugs are a Tuya-based smart plugs sold by Bunnings and Kmart respectively in Australia.
|
||||
|
||||
.. figure:: images/brilliant-mirabella-genio-smart-plugs.jpg
|
||||
:align: center
|
||||
@ -24,7 +24,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
@ -38,7 +38,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed tuya device. **This cannot be an iOS / Apple device.
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
@ -216,12 +216,12 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
pin:
|
||||
number: GPIO4
|
||||
inverted: true
|
||||
|
||||
|
||||
- platform: gpio
|
||||
name: "Mirabella Genio Smart Plug"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
|
||||
# Turn on red LED
|
||||
on_turn_on:
|
||||
- switch.turn_on: red_led
|
||||
|
@ -35,7 +35,7 @@ Software configuration
|
||||
Getting Time
|
||||
************
|
||||
|
||||
Get the time from Home Assistant to sync the onboard real-time-clock.
|
||||
Get the time from Home Assistant to sync the onboard real-time clock.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -69,7 +69,7 @@ Define the Fonts
|
||||
****************
|
||||
|
||||
- TrueType fonts are used. If you ever worked with fonts on microcontrollers you will love this!
|
||||
- Save font files in ``/config/esphome`` folder where your esphome configuration is stored.
|
||||
- Save font files in ``/config/esphome`` folder where your ESPHome configuration is stored.
|
||||
- The ``.ttf`` suffix must be lowercase and of course match your filename.
|
||||
- Selection of fonts can be a little bit tricky for small sizes to look good. Experiment and share your findings in the comments below!
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
H801 RGBW LED controller
|
||||
========================
|
||||
|
||||
The H801 is pretty afordable and easy to hack and adapt to your needs. It can be found on `Aliexpress <https://s.click.aliexpress.com/e/bbnUDBZW>`__
|
||||
The H801 is pretty affordable and easy to hack and adapt to your needs. It can be found on `AliExpress <https://s.click.aliexpress.com/e/bbnUDBZW>`__
|
||||
`Here <http://tinkerman.cat/closer-look-h801-led-wifi-controller/>`__ is an article about the
|
||||
hardware for those who have an interest for more details about the board.
|
||||
It can be used as a RGB, RGBW, RGB dual white or even control 5 individual monochromatic strips if you want or combinations of these.
|
||||
@ -60,7 +60,7 @@ and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` comp
|
||||
white: pwm_w
|
||||
|
||||
|
||||
Make your node in the esphome dashboard and compile/upload it.
|
||||
Make your node in the ESPHome dashboard and compile/upload it.
|
||||
(if it fails OTA it must be uploaded manually with your favorite ESP flasher,
|
||||
e.g. :ref:`esphome-flasher <esphome-flasher>`)
|
||||
|
||||
@ -86,12 +86,12 @@ This LED strip can be used with the sketch as-is
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
For this type of led strip you have to swap the white and blue gpio numbers in the sketch
|
||||
For this type of led strip you have to swap the white and blue GPIO numbers in the sketch.
|
||||
|
||||
You will need to solder pins to the board inside the h801 (fortunately its pretty roomy and
|
||||
not a lot of components or stuff in the way part from the 2 wires on the back)
|
||||
You will need to solder pins to the board inside the H801 (fortunately it's pretty roomy and
|
||||
not a lot of components or stuff in the way apart from the 2 wires on the back).
|
||||
|
||||
3.3v, GND, TX and RX (RX to RX and TX to TX) needs to be connected to your serial adapter, the
|
||||
3.3V, GND, TX and RX (RX to RX and TX to TX) needs to be connected to your serial adapter, the
|
||||
two other pins must be shorted throughout the flashing process by a jumper or a breadboard cable.
|
||||
(Remember to remove it after flashing)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Mirabella Genio Bulbs
|
||||
=====================
|
||||
|
||||
The Mirabella Genio is a tuya based smart bulb sold by Kmart in Australia.
|
||||
The Mirabella Genio is a Tuya-based smart bulb sold by Kmart in Australia.
|
||||
|
||||
.. figure:: images/mirabella-genio-b22-rgbw.jpg
|
||||
:align: center
|
||||
@ -24,7 +24,7 @@ firmware can be uploaded allowing you to control the bulbs via Home Assistant.
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
@ -38,7 +38,7 @@ firmware can be uploaded allowing you to control the bulbs via Home Assistant.
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed tuya device. **This cannot be an iOS / Apple device.
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
|
@ -15,23 +15,23 @@ DIY Light switch using a Sonoff Basic
|
||||
from following this guide.
|
||||
|
||||
In some countries you may need specific qualifications before you can carry out such work in
|
||||
a residentaial property.
|
||||
a residential property.
|
||||
|
||||
Background
|
||||
----------
|
||||
|
||||
Moving your entire house to smart lighting can end up being very expense, for instance if you have a
|
||||
light fitting with 5 lamps in it thats 5 expensive smart bulbs to buy just for one room! Smart bulbs
|
||||
light fitting with 5 lamps in it that's 5 expensive smart bulbs to buy just for one room! Smart bulbs
|
||||
clearly have some great advantages, dimmable, colour temperature or even full colour changing. What
|
||||
if all you're after is a cost effective way to turn them on and off?
|
||||
|
||||
The ideal solution would be to replace the light switch with one that can be controlled by home
|
||||
assistant, whilst retaining the ease of use of a standard light that would also continue to work if
|
||||
the network went down, or home assistant failed etc.
|
||||
the network went down, or Home Assistant failed etc.
|
||||
|
||||
It turns out Sonoff do exactly this product, it called a T1-UK (other country options available),
|
||||
however you soon found the touch aspect of them might not 'feel right' and certainly might not get the
|
||||
approval of other members of your household. However if this solution apeals to you, check out the
|
||||
approval of other members of your household. However if this solution appeals to you, check out the
|
||||
:doc:`Cookbook guide for T1/T2/T3</cookbook/sonoff-t1-3>`
|
||||
|
||||
The other option to consider is a standard '2 way' light switch (like you might have on an upstairs
|
||||
@ -43,7 +43,7 @@ The Solution
|
||||
|
||||
Use a 'retractive' style light switch. That is one that is spring loaded and so always returns to the
|
||||
'off' position. It's effectively a push button, that looks like a light switch. Combining this with a
|
||||
Sonoff Basic gives you the ideal solution for somewhere around £5. Thats much cheaper than buying lots
|
||||
Sonoff Basic gives you the ideal solution for somewhere around £5. That's much cheaper than buying lots
|
||||
of expensive smart bulbs, but of course you only get on / off control.
|
||||
|
||||
You will have several potential hurdles to overcome:
|
||||
@ -51,7 +51,7 @@ You will have several potential hurdles to overcome:
|
||||
1. The first is that you do need to have a neutral at the location of the Sonoff. Many houses will not have
|
||||
this as standard at the light switch.
|
||||
|
||||
2. You need enough space to accomodate your Sonoff Basic at your chosen location.
|
||||
2. You need enough space to accommodate your Sonoff Basic at your chosen location.
|
||||
|
||||
If you're lucky most of the locations will have plasterboard walls, and you will be able to simply drop a neutral
|
||||
wire down the inside of the wall to the lights switch (where you locate the Sonoff).
|
||||
@ -61,7 +61,7 @@ This can come in useful because if you remove the PCB from the plastic case it a
|
||||
|
||||
.. warning::
|
||||
|
||||
If you plan to take the pcb out of the plastic case you need to make sure its properly insulated, and that the back
|
||||
If you plan to take the PCB out of the plastic case you need to make sure it's properly insulated, and that the back
|
||||
box is deep enough to hold the PCB as well as the switch. You should also insulate the PCB, for instance by dropping it
|
||||
in a heavy duty glue lined heat shrink sleeve.
|
||||
|
||||
@ -73,7 +73,7 @@ and use the cable that ran from the light to the switch as a low voltage cable t
|
||||
|
||||
.. warning::
|
||||
|
||||
If you are going to reuse existing wiring to connect to the GPIO, you must make sure its connected directly to the switch
|
||||
If you are going to reuse existing wiring to connect to the GPIO, you must make sure it's connected directly to the switch
|
||||
and does not have mains voltage on it from another circuit.
|
||||
|
||||
Implementation
|
||||
@ -85,16 +85,16 @@ Please make sure you have read up about :doc:`the Sonoff Basic and how to flash
|
||||
As that won't be covered here.Also make sure you know your way around a soldering iron and can find the relevant information
|
||||
about the location of the GPIO pins on the Sonoff Basic if you need to.
|
||||
|
||||
If you have a Sonoff Basic V1 devices GPIO14 is alredy presented on a pin header on the PCB next to the programing pins.
|
||||
If you have a Sonoff Basic V1 devices GPIO14 is already presented on a pin header on the PCB next to the programming pins.
|
||||
On the V2 and V3 PCBs, there is a solder pad underneath the PCB that will let you get at this GPIO.
|
||||
|
||||
You have 2 choices when it comes to picking which GPIO to use. GPIO0 or GPIO14. GPIO0 is used by the push button switch on the
|
||||
the PCB so you will need to locate the right pin on the switch and solder a wire onto it if you're going to use that one. Whichever
|
||||
one you pick, you will also need to use the ground or 0v pin for the other side of the switch. Once you have soldered your wires
|
||||
one you pick, you will also need to use the ground or 0V pin for the other side of the switch. Once you have soldered your wires
|
||||
into place, a handy tip is to add a drop of glue over the wire, a little way away from the solder joint, so give some strain relief
|
||||
to the joint.
|
||||
|
||||
Now you have a pair of wires from the GPIO and 0v to your retractive switch lets look at the code.
|
||||
Now you have a pair of wires from the GPIO and 0V to your retractive switch lets look at the code.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -143,21 +143,21 @@ Now you have a pair of wires from the GPIO and 0v to your retractive switch lets
|
||||
number: GPIO13
|
||||
inverted: yes
|
||||
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change wifi
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change WiFi
|
||||
details for all your devices.
|
||||
|
||||
Although not visible day to day, there is also the status LED configured so that it can be used when setting
|
||||
up / debugging. Also a configured binary sensor to give status incase you want to perform an action / alert
|
||||
up / debugging. Also a configured binary sensor to give status in case you want to perform an action / alert
|
||||
if the light switch disconnects for any reason.
|
||||
|
||||
.. note::
|
||||
|
||||
If you wanted to use a pull cord switch (in a bathroom for instance) that works like a standard switch and
|
||||
changes state each pull (as opposed to a retractive switch that you press and let go) then you can change
|
||||
a single line *on_press:* to *on_state:* which will trigger the light toggle everytime the state of the
|
||||
a single line *on_press:* to *on_state:* which will trigger the light toggle every time the state of the
|
||||
switch changes.
|
||||
|
||||
If you do this its important that you do not use GPIO0, otherwise if the device reboots and the switch happens
|
||||
If you do this it's important that you do not use GPIO0, otherwise if the device reboots and the switch happens
|
||||
to be in the closed state the Sonoff will boot into flash mode and not work.
|
||||
|
||||
|
||||
|
@ -15,12 +15,12 @@ DIY Light switch using a Sonoff Dual
|
||||
from following this guide.
|
||||
|
||||
In some countries you may need specific qualifications before you can carry out such work in
|
||||
a residentaial property.
|
||||
a residential property.
|
||||
|
||||
Please read up on :doc:`/cookbook/sonoff-basic-light-switch` to get the background and principals of
|
||||
the this project. Its all basically the same, but with a double switch.
|
||||
the this project. It's all basically the same, but with a double switch.
|
||||
|
||||
So we will be using GPIO4 and GPIO14 for the two retractive switches, again they will both short to 0v
|
||||
So we will be using GPIO4 and GPIO14 for the two retractive switches, again they will both short to 0V
|
||||
when the switch is clicked.
|
||||
|
||||
R1
|
||||
@ -159,21 +159,21 @@ The R1 version of the Dual controls the relays via the UART, so the code gets a
|
||||
output: out_2
|
||||
|
||||
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change wifi
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change WiFi
|
||||
details for all your devices.
|
||||
|
||||
The logger baud_rate: 0 is required to make sure the logged does not send any data over the UART or it would
|
||||
mess with the relays.
|
||||
|
||||
Although not visible day to day, there is also the status LED configured so that it can be used when setting
|
||||
up / debugging. Also a configured binary sensor to give status incase you want to perform an action / alert
|
||||
up / debugging. Also a configured binary sensor to give status in case you want to perform an action / alert
|
||||
if the light switch disconnects for any reason.
|
||||
|
||||
R2
|
||||
--
|
||||
|
||||
This one is a lot simpler as it uses real GPIO for its relays. Please note this is untested, but should work!
|
||||
Its basically the same as the :doc:`T2 </cookbook/sonoff-t1-3>`
|
||||
It's basically the same as the :doc:`T2 </cookbook/sonoff-t1-3>`
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -10,16 +10,16 @@ Sonoff Fish Pond Pump
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
The Sonoff range of products containing the ESP chips from espressif has a myriad of uses and best of all, you can customize it, aka hackable.
|
||||
The Sonoff range of products containing the ESP chips from Espressif has a myriad of uses and best of all, you can customize it, aka hackable.
|
||||
This quick cookbook aims to provide a clear, simple working example.
|
||||
|
||||
This example is very basic in it's operation.
|
||||
This example is very basic in its operation.
|
||||
|
||||
* Start the pump every hour and run it for 10 minutes.
|
||||
* Manually start and stop the pump with the toggle button on the Sonoff basic.
|
||||
* Manually start and stop the pump with the toggle button on the Sonoff Basic.
|
||||
* Use a water float sensor and stop the pump if water level is too low.
|
||||
|
||||
*Some of the later Sonoff basics does not have GPIO pin available, check your board first*
|
||||
*Some of the later Sonoff Basics does not have GPIO pin available, check your board first*
|
||||
|
||||
This example is using ESPHome 1.10.1 and Home Assistant 0.85.1
|
||||
|
||||
@ -28,7 +28,7 @@ Assumptions
|
||||
|
||||
As many of the details on here a predicated on existing installations and knowledge the following is assumed:
|
||||
|
||||
* You have installed the relevant environment and it is functional (Home Assisant, ESPHome).
|
||||
* You have installed the relevant environment and it is functional (Home Assistant, ESPHome).
|
||||
* You need to create your own secrets.yaml file.
|
||||
* You are proficient in reading instructions and capable of using a search engine.
|
||||
* You will look at the documentation on this website (we may have missed something in this example).
|
||||
@ -49,7 +49,7 @@ Here is the configuration with the basic operations outlined above.
|
||||
|
||||
## Fish pond sonoff
|
||||
## filename: fishpond.yaml
|
||||
# Sonoff basic
|
||||
# Sonoff Basic
|
||||
# Button toggles pump on/off
|
||||
# Float sensor stops pump
|
||||
# Cron'd to run every hour, on the hour for 10 minutes
|
||||
@ -138,7 +138,7 @@ Here is the configuration with the basic operations outlined above.
|
||||
2. Programming
|
||||
**************
|
||||
|
||||
Follow the standard way of uploading to your Sonoff basic.
|
||||
Follow the standard way of uploading to your Sonoff Basic.
|
||||
|
||||
.. figure:: images/sonoff-fishpond-pump-1-programming.jpg
|
||||
:align: center
|
||||
@ -195,7 +195,7 @@ Wires connected for easier access to connect and disconnect water level sensor
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
This needs to be submursed, pump (bio filter) and sensor connected in single housing (icecream tub).
|
||||
This needs to be submersed, pump (bio filter) and sensor connected in single housing (icecream tub).
|
||||
|
||||
.. figure:: images/sonoff-fishpond-pump-installed.jpg
|
||||
:align: center
|
||||
@ -203,7 +203,7 @@ This needs to be submursed, pump (bio filter) and sensor connected in single hou
|
||||
|
||||
In this PVC housing the plates are secured using cabinet door magnets for easier access and maintenance.
|
||||
|
||||
* Ensure you are using a proper and compliant waterproof box to house your electrical equipment (Sonoff basic) in.
|
||||
* Ensure you are using a proper and compliant waterproof box to house your electrical equipment (Sonoff Basic) in.
|
||||
* Ensure you plan to be able to remove the unit with minimal effort should you need to manually USB reflash it again in future.
|
||||
|
||||
2.6. Home Assistant
|
||||
@ -215,5 +215,5 @@ See Also
|
||||
--------
|
||||
|
||||
- :doc:`/devices/sonoff_basic`
|
||||
- `Flashing sonoff basic <https://randomnerdtutorials.com/how-to-flash-a-custom-firmware-to-sonoff/>`__.
|
||||
- `Flashing Sonoff Basic <https://randomnerdtutorials.com/how-to-flash-a-custom-firmware-to-sonoff/>`__.
|
||||
- `Adding ESPHome to Home Assistant <https://www.home-assistant.io/components/esphome/>`__.
|
||||
|
@ -9,7 +9,7 @@ Sonoff T1/T2/T3 UK
|
||||
|
||||
Please make sure you have read up about :doc:`the Sonoff T1 / T2 / T3 and how to flash it with ESPHome </devices/sonoff_t1_uk_3gang_v1.1>`.
|
||||
|
||||
So lets get straight on with the code
|
||||
So let's get straight on with the code!
|
||||
|
||||
T1
|
||||
--
|
||||
@ -63,13 +63,13 @@ T1
|
||||
inverted: yes
|
||||
|
||||
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change wifi
|
||||
In the above code block, there is a *secrets.yaml* file so that you have just one place to change WiFi
|
||||
details for all your devices.
|
||||
|
||||
The use_address is required because the sonoff T series don't work with mDNS properly. This means that it will
|
||||
show as off line in the dashboard, and you will need to use the ip address to view the logs or upload new versions
|
||||
The use_address is required because the Sonoff T series don't work with mDNS properly. This means that it will
|
||||
show as off line in the dashboard, and you will need to use the IP address to view the logs or upload new versions
|
||||
of the firmware. You will also need to manually add the device in integrations by IP address. You will need to
|
||||
assign a fixed IP in the above configuratino, or use a fixed IP assigned fro your DHCP server.
|
||||
assign a fixed IP in the above configuration, or use a fixed IP assigned by your DHCP server.
|
||||
|
||||
See `issue #810 <https://github.com/esphome/issues/issues/810>`__ for further details.
|
||||
|
||||
|
@ -11,7 +11,7 @@ TECKIN SB50 LED Bulb
|
||||
:width: 50.0%
|
||||
|
||||
The Teckin SB50 Bulb's are a great option for lighting that can be flashed with tuya-convert. More details can be found at tuya-convert `github page <https://github.com/ct-Open-Source/tuya-convert>`__.
|
||||
Below is the esphome configuration file that will get you up and running. This assumes you have a secret.yaml with ssid,password, api_password and ota_password keys.
|
||||
Below is the ESPHome configuration file that will get you up and running. This assumes you have a secret.yaml with ssid, password, api_password and ota_password keys.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Zemismart LED RGBW/RGBWW Downlights
|
||||
===================================
|
||||
|
||||
The Zemismart LED RGBW Downlight is a tuya based downlight available from various retailers online or from `zemismart.com <https://www.zemismart.com>`__ direct.
|
||||
The Zemismart LED RGBW Downlight is a Tuya-based downlight available from various retailers online or from `zemismart.com <https://www.zemismart.com>`__ direct.
|
||||
|
||||
.. figure:: images/zemismart-rgbw-downlight.jpg
|
||||
:align: center
|
||||
@ -24,7 +24,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
@ -38,7 +38,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed tuya device. **This cannot be an iOS / Apple device.
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
@ -87,7 +87,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
via SSH and ensure your connection type is set to **SFTP**
|
||||
#. Browse to ``/root/tuya-convert/files``.
|
||||
#. Upload your compiled ``firmware.bin`` file to this directory. For command line based installs you can access the file under
|
||||
``<CONFIG_DIR>/<NODE_NAME>/.pioenvs/<NODE_NAME>/firmware.bin`` alternatively Hass.io users can download the file directly from the web ui.
|
||||
``<CONFIG_DIR>/<NODE_NAME>/.pioenvs/<NODE_NAME>/firmware.bin`` alternatively Hass.io users can download the file directly from the web UI.
|
||||
|
||||
2.7 Use tuya-convert to install ESPHome Firmware
|
||||
************************************************
|
||||
@ -95,8 +95,8 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
#. Type ``./start_flash.sh``
|
||||
#. Type ``yes`` to accept the warning.
|
||||
#. Connect your alternative WiFi device (non iOS / Apple based) to the ``vtrust-flash`` SSID using ``flashmeifyoucan`` as the password. This is the network
|
||||
being broadcast by the Pi from the tuya flash script.
|
||||
#. If you haven't already plug your downlight into a powerpoint and turn it on and follow the instructions below:
|
||||
being broadcast by the Pi from the Tuya flash script.
|
||||
#. If you haven't already plug your downlight into a power point and turn it on and follow the instructions below:
|
||||
|
||||
#. Once turned on a stable white light will be emitted.
|
||||
#. Switch off, then back on **3** times ensuring each off-on cycle is no longer 10 seconds apart and between each the light visibly turns off.
|
||||
@ -116,7 +116,7 @@ firmware can be uploaded allowing you to control the smart plugs via Home Assist
|
||||
Thanks to `@1972rx2 <https://community.home-assistant.io/u/1972rx2>`__ for creating the below ESPHome configuration
|
||||
which this cookbook article by `@cryptelli <https://community.home-assistant.io/u/cryptelli>`__ is based on.
|
||||
|
||||
Depending ion the type of your light you either need a config using my9231 driver (RGBW) or 5 pwm channels (RGBWW).
|
||||
Depending on the type of your light you either need a config using my9231 driver (RGBW) or 5 PWM channels (RGBWW).
|
||||
|
||||
3.1 Zemismart LED RGBW Downlight YAML
|
||||
*************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
Custom I²C Device
|
||||
=================
|
||||
|
||||
Lots of devices communicate using the i2c protocol. If you want to integrate
|
||||
Lots of devices communicate using the I^2C protocol. If you want to integrate
|
||||
a device into ESPHome that uses this protocol you can pretty much use almost
|
||||
all Arduino-based code because the ``Wire`` library is also available in ESPHome.
|
||||
|
||||
|
@ -152,14 +152,14 @@ Step 4: Uploading Firmware
|
||||
|
||||
In order to upload the firmware, you're first going to need to get the chip into a flash mode, otherwise
|
||||
the device will start up without accepting any firmware flash attempts. To do this, while the UART
|
||||
bridge is not connected to your USB port, press and hold the bottom-left push button labeled ``FW/IO0``
|
||||
bridge is not connected to your USB port, press and hold the bottom-left push button labelled ``FW/IO0``
|
||||
and continue to do so while plugging in the UART bridge into your computer. Keep holding the button for
|
||||
another 2-4 seconds. The 4CH should now be in a flash mode and should not blink any LED.
|
||||
|
||||
.. figure:: images/sonoff_4ch_buttons.jpg
|
||||
:align: center
|
||||
|
||||
You need to press the button labeled ``FW/IO0`` during startup.
|
||||
You need to press the button labelled ``FW/IO0`` during startup.
|
||||
|
||||
Now you can finally run the upload command:
|
||||
|
||||
@ -291,9 +291,9 @@ of the basic functions.
|
||||
output: blue_led
|
||||
|
||||
|
||||
Above example also showcases an important concept of esphome: IDs and linking. In order
|
||||
to make all components in esphome as much "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see an PWM (dimmer)
|
||||
Above example also showcases an important concept of ESPHome: IDs and linking. In order
|
||||
to make all components in ESPHome as "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see a PWM (dimmer)
|
||||
output being created with the ID ``blue_led`` for the blue LED. Later on it is then transformed
|
||||
into a :doc:`monochromatic light </components/light/monochromatic>`.
|
||||
If you additionally want the buttons to control the relays, look at `the complete Sonoff 4CH
|
||||
@ -309,7 +309,7 @@ Step 6: Finishing Up
|
||||
If you're sure everything is done with the 4CH and have double checked there's nothing that could cause a short
|
||||
in the case, you can put the front cover back on and screw everything together.
|
||||
|
||||
Now triple or even quadruple check the UART bridge is not connected to the 4CH, then comes the time when you can
|
||||
Now triple- or even quadruple-check the UART bridge is not connected to the 4CH, then comes the time when you can
|
||||
connect it.
|
||||
|
||||
Happy hacking!
|
||||
|
@ -103,7 +103,7 @@ When you're done, it should look something like this:
|
||||
:align: center
|
||||
|
||||
Now go ahead and connect the pins to your UART bridge, making sure the S20 is not plugged in as before.
|
||||
Also beware that some UART to USB bridges supply 5V on the VCC pin if it's not explicitly labeled 3.3V.
|
||||
Also beware that some UART to USB bridges supply 5V on the VCC pin if it's not explicitly labelled 3.3V.
|
||||
It's best to just use a multimeter and double check if it's unclear.
|
||||
|
||||
.. note::
|
||||
@ -209,7 +209,7 @@ of the basic functions.
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
arduino_version: 2.4.2
|
||||
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
@ -251,9 +251,9 @@ of the basic functions.
|
||||
output: s20_green_led
|
||||
|
||||
|
||||
The above example also showcases an important concept of esphome: IDs and linking. In order
|
||||
to make all components in ESPHome as much "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see an PWM (dimmer)
|
||||
The above example also showcases an important concept of ESPHome: IDs and linking. In order
|
||||
to make all components in ESPHome as "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see a PWM (dimmer)
|
||||
output being created with the ID ``s20_green_led`` for the green LED. Later on it is then transformed
|
||||
into a :doc:`monochromatic light </components/light/monochromatic>`.
|
||||
|
||||
@ -308,7 +308,7 @@ enter an OTA-only safe mode).
|
||||
If you're sure everything is done with the S20 and have double checked there's nothing that could cause a short
|
||||
in the case, you can put the front cover with the button on the base again and screw everything together.
|
||||
|
||||
Now triple or even quadruple check the UART bridge is not connected to the S20, then comes the time when you can
|
||||
Now triple- or even quadruple-check the UART bridge is not connected to the S20, then comes the time when you can
|
||||
plug it into the socket.
|
||||
|
||||
Happy hacking!
|
||||
|
@ -69,7 +69,7 @@ supplied with the Sonoff T1 UK 3 Gang before doing this step.
|
||||
plugged in before doing this step.
|
||||
|
||||
While the device is not plugged in, turn the device face down and put a narrow flat screwdriver into the slot at the bottom.
|
||||
With careful twisting motion detatch the face plate.
|
||||
With careful twisting motion detach the face plate.
|
||||
|
||||
.. figure:: images/sonoff_t1_uk_3g_back_v1.1.jpg
|
||||
:align: center
|
||||
@ -185,7 +185,7 @@ you will be able to use all of ESPHome's great features with your Sonoff T1 UK 3
|
||||
.. note::
|
||||
|
||||
While now your T1 will start up and connect to your WiFi network if you power it up from UART it will not behave normally,
|
||||
it may flash random LEDs, turn on anf off touchpads' backlight and not react on touching touchpads. This will all be fixed once you re-assemble your T1
|
||||
it may flash random LEDs, turn on and off touchpads' backlight and not react on touching touchpads. This will all be fixed once you re-assemble your T1
|
||||
and power it up from the mains power once safe to do so.
|
||||
|
||||
If above step does, however, not work, here are some steps that can help:
|
||||
@ -289,9 +289,9 @@ of the basic functions.
|
||||
output: blue_led
|
||||
|
||||
|
||||
Above example also showcases an important concept of esphome: IDs and linking. In order
|
||||
to make all components in esphome as much "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see an PWM (dimmer)
|
||||
Above example also showcases an important concept of ESPHome: IDs and linking. In order
|
||||
to make all components in ESPHome as "plug and play" as possible, you can use IDs to define
|
||||
them in one area, and simply pass that ID later on. For example, above you can see a PWM (dimmer)
|
||||
output being created with the ID ``blue_led`` for the blue LED. Later on it is then transformed
|
||||
into a :doc:`monochromatic light </components/light/monochromatic>`.
|
||||
If you additionally want the buttons to control the relays, look at `the complete Sonoff T1 UK 3 Gang
|
||||
@ -303,7 +303,7 @@ Step 6: Finishing Up
|
||||
If you're sure everything is done with the T1 UK 3 Gang and have double checked there's nothing that could cause a short
|
||||
in the case, you can put the T1 back together.
|
||||
|
||||
Now triple or even quadruple check the UART bridge is not connected to the T1 UK 3 Gang, then comes the time when you can
|
||||
Now triple- or even quadruple-check the UART bridge is not connected to the T1 UK 3 Gang, then comes the time when you can
|
||||
connect it.
|
||||
|
||||
Happy hacking!
|
||||
|
@ -91,7 +91,7 @@ The ``esphome <CONFIG> upload`` validates the configuration and uploads the most
|
||||
|
||||
.. option:: --upload-port UPLOAD_PORT
|
||||
|
||||
Manually specify the upload port/ip to use. For example ``/dev/cu.SLAB_USBtoUART``.
|
||||
Manually specify the upload port/IP to use. For example ``/dev/cu.SLAB_USBtoUART``.
|
||||
|
||||
.. option:: --host-port HOST_PORT
|
||||
|
||||
@ -127,7 +127,7 @@ See :ref:`mqtt-using_with_home_assistant`.
|
||||
|
||||
.. program:: esphome wizard
|
||||
|
||||
The ``esphome <CONFIG> wizard`` command starts the esphome configuration creation wizard.
|
||||
The ``esphome <CONFIG> wizard`` command starts the ESPHome configuration creation wizard.
|
||||
|
||||
``mqtt-fingerprint`` Command
|
||||
----------------------------
|
||||
@ -164,7 +164,7 @@ node configuration file. This is useful if you're not using MQTT discovery.
|
||||
|
||||
.. program:: esphome dashboard
|
||||
|
||||
The ``esphome <CONFIG> dashboard`` command starts the esphome dashboard server for using esphome
|
||||
The ``esphome <CONFIG> dashboard`` command starts the ESPHome dashboard server for using ESPHome
|
||||
through a graphical user interface.
|
||||
|
||||
.. option:: --port PORT
|
||||
|
@ -32,7 +32,7 @@ Syntax
|
||||
******
|
||||
|
||||
In my opinion, Markdown would have been the much better choice in hindsight, but at the time
|
||||
I was setting up the documentation good doxygen integration was key to me. Anyway, here's a quick
|
||||
I was setting up the documentation good Doxygen integration was key to me. Anyway, here's a quick
|
||||
RST primer:
|
||||
|
||||
- **Headers**: You can write titles like this:
|
||||
@ -250,7 +250,7 @@ Notes
|
||||
|
||||
Some notes about the docs:
|
||||
|
||||
- Use the english language (duh...)
|
||||
- Use the English language (duh...)
|
||||
- An image tells a thousand words, please use them wherever possible. But also don't forget to shrink them, for example
|
||||
I often use https://tinypng.com/
|
||||
- Try to use examples as often as possible (also while it's great to use highly accurate,
|
||||
@ -273,19 +273,19 @@ This is only possible for ``pip`` installs.
|
||||
git clone https://github.com/esphome/esphome.git
|
||||
git clone https://github.com/esphome/esphome-docs.git
|
||||
|
||||
# Install esphome
|
||||
# Install ESPHome
|
||||
cd esphome/
|
||||
script/setup
|
||||
# Start a new feature branch
|
||||
git checkout -b my-new-feature
|
||||
cd ..
|
||||
|
||||
Now you can open esphome in your IDE of choice (mine is CLion) with the platformio
|
||||
addons (see platformio docs for more info). Then develop the new feature with the
|
||||
Now you can open ESPHome in your IDE of choice (mine is CLion) with the PlatformIO
|
||||
addons (see PlatformIO docs for more info). Then develop the new feature with the
|
||||
guidelines below.
|
||||
|
||||
All PRs are automatically checked for some basic formatting/code mistakes with Travis.
|
||||
These checks *must* pass for your PR to be mergable.
|
||||
These checks *must* pass for your PR to be mergeable.
|
||||
|
||||
Setting Up Git Environment
|
||||
--------------------------
|
||||
@ -331,7 +331,7 @@ mark it as a draft PR in the dropdown of the green "create PR" button.
|
||||
**Review Process:** ESPHome's code base tries to have a high code standard. At the bottom
|
||||
of the Pull Request you will be able to see the "Travis" continuous integration check which
|
||||
will automatically go through your patch and try to spot errors. If the CI check fails,
|
||||
please see the travis log and fix all errors that appear there. Only PRs that pass the automated
|
||||
please see the Travis log and fix all errors that appear there. Only PRs that pass the automated
|
||||
checks can be merged!
|
||||
|
||||
**Catching up with reality**: Sometimes other commits have been made to the same files
|
||||
@ -407,7 +407,7 @@ look at the ``esphome/components/hello1/__init__.py`` file and the second entry
|
||||
|
||||
Let's leave what's written in those files for (2.), but for now you should also know that
|
||||
whenever a component is loaded, all the C++ source files in the folder of the component
|
||||
are automatically copied into the generated platformio project. So you just need to add the C++
|
||||
are automatically copied into the generated PlatformIO project. So you just need to add the C++
|
||||
source files in the folder and the ESPHome core will copy them with no additional code required
|
||||
by the integration developer.
|
||||
|
||||
@ -447,7 +447,7 @@ at examples of how similar integrations validate user input.
|
||||
|
||||
A few point on validation:
|
||||
|
||||
- ESPHome ts a lot of effort in **strict validation** - If possible, all validation methods should be as strict
|
||||
- ESPHome puts a lot of effort into **strict validation** - If possible, all validation methods should be as strict
|
||||
as possible and detect wrong user input at the validation stage (and not later).
|
||||
- All default values should be defined in the schema (and not in C++ codebase or other code parts).
|
||||
- Config keys should be descriptive - If the meaning of a key is not immediately obvious you should
|
||||
@ -491,7 +491,7 @@ for a variable to be declared first, ``yield`` will wait until that variable has
|
||||
After that, ``yield`` returns and the method will execute on the next line.
|
||||
|
||||
Next, there's a special method - ``cg.add`` - that you will often use. ``cg.add()`` does a very simple
|
||||
thing: Any C++ declared in the paranetheses of ``cg.add()`` will be added to the generated code.
|
||||
thing: Any C++ declared in the parentheses of ``cg.add()`` will be added to the generated code.
|
||||
If you do not call "add" a piece of code explicitly, it will not be added to the main.cpp file!
|
||||
|
||||
4. Runtime
|
||||
@ -570,14 +570,14 @@ Standard for the esphome-core codebase:
|
||||
- New components should dump their configuration using ``ESP_LOGCONFIG``
|
||||
at startup in ``dump_config()``
|
||||
- ESPHome uses a unified formatting tool for all source files (but this tool can be difficult to install).
|
||||
When creating a new PR in GitHub, see the travis-ci output to see what formatting needs to be changed
|
||||
When creating a new PR in GitHub, see the Travis CI output to see what formatting needs to be changed
|
||||
and what potential problems are detected.
|
||||
|
||||
- The number of external libraries should be kept to a minimum. If the component you're developing has a simple
|
||||
communication interface, please consider implementing the library natively in ESPHome.
|
||||
|
||||
- This depends on the communication interface of course - if the library is directly working
|
||||
with pins or doesn't do any I/O itself, it's ok. However if it's something like i2c, then ESPHome's
|
||||
with pins or doesn't do any I/O itself, it's ok. However if it's something like I^2C, then ESPHome's
|
||||
own communication abstractions should be used. Especially if the library accesses a global variable/state
|
||||
like ``Wire`` there's a problem because then the component may not modular (i.e. not possible
|
||||
to create two instances of a component on one ESP)
|
||||
@ -592,7 +592,7 @@ Standard for the esphome-core codebase:
|
||||
|
||||
.. note::
|
||||
|
||||
You can also run the lint and travis checks through a docker image:
|
||||
You can also run the lint and Travis checks through a docker image:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -107,7 +107,7 @@ For me to fix the issue quickly, there are some things that would be really help
|
||||
help given just that information?
|
||||
2. A snippet of the code/configuration file used is always great to reproduce this issue.
|
||||
Please read `How to create a Minimal, Complete, and Verifiable example <https://stackoverflow.com/help/mcve>`__.
|
||||
3. If it's an i2c or hardware communication issue please also try setting the
|
||||
3. If it's an I^2C or hardware communication issue please also try setting the
|
||||
:ref:`log level <logger-log_levels>` to ``VERY_VERBOSE`` as it provides helpful information
|
||||
about what is going on.
|
||||
4. Please also include what you've already tried and didn't work as that can help us track down the issue.
|
||||
@ -133,8 +133,8 @@ How do I update to the latest beta release?
|
||||
-------------------------------------------
|
||||
|
||||
ESPHome has a beta release cycle so that new releases can easily be tested before
|
||||
the changes are deployed to the stable channel. You can help test esphome (and use new features)
|
||||
by installing the esphome beta:
|
||||
the changes are deployed to the stable channel. You can help test ESPHome (and use new features)
|
||||
by installing the tested beta:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -224,11 +224,11 @@ Some steps that can help with the issue:
|
||||
in other it can make things worse). See :ref:`wifi-power_save_mode`.
|
||||
- The issue seems to happen with cheap boards more frequently. Especially the "cheap" NodeMCU
|
||||
boards from eBay which sometimes have quite bad antennas.
|
||||
- ESPHome reboots on purpose when something is not going right, e.g.
|
||||
:doc:`wifi connetion cannot be made </components/wifi>` or
|
||||
:doc:`api connetion is lost </components/api>` or
|
||||
- ESPHome reboots on purpose when something is not going right, e.g.
|
||||
:doc:`wifi connetion cannot be made </components/wifi>` or
|
||||
:doc:`api connetion is lost </components/api>` or
|
||||
:doc:`mqtt connection is lost </components/mqtt>`. So if you are facing this problem you'll need
|
||||
to explicitely set the ``reboot_timeout`` option to ``0s`` on the components being used.
|
||||
to explicitly set the ``reboot_timeout`` option to ``0s`` on the components being used.
|
||||
|
||||
|
||||
Docker Reference
|
||||
|
@ -21,7 +21,7 @@ Installing ESPHome is very easy. All you need to do is have `Python
|
||||
pip install esphome
|
||||
|
||||
Alternatively, there’s also a Docker image available for easy
|
||||
installation (the Docker hub image is only available for amd64 right now; if you have
|
||||
installation (the Docker hub image is only available for AMD64 right now; if you have
|
||||
an RPi, please install ESPHome through ``pip`` or use :doc:`the Hass.io add-on <getting_started_hassio>`:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -85,7 +85,7 @@ the device via USB and type the following command (replacing
|
||||
You should see ESPHome validating the configuration and telling you
|
||||
about potential problems. Then ESPHome will proceed to compile and
|
||||
upload the custom firmware. You will also see that ESPHome created a
|
||||
new folder with the name of your node. This is a new platformio project
|
||||
new folder with the name of your node. This is a new PlatformIO project
|
||||
that you can modify afterwards and play around with.
|
||||
|
||||
If you are running docker on Linux you can add ``--device=/dev/ttyUSB0``
|
||||
|
@ -6,7 +6,7 @@ Migrating from ESPurna
|
||||
:image: espurna.png
|
||||
|
||||
Migrating from previous ESPurna setups is very easy. You just need to have
|
||||
esphome create a binary for you and then upload that in the ESPurna web interface.
|
||||
ESPHome create a binary for you and then upload that in the ESPurna web interface.
|
||||
|
||||
Getting Binary
|
||||
--------------
|
||||
|
@ -146,7 +146,7 @@ Sensor Components
|
||||
Template Sensor, components/sensor/template, description.svg
|
||||
Total Daily Energy, components/sensor/total_daily_energy, sigma.svg
|
||||
TSL2561, components/sensor/tsl2561, tsl2561.jpg
|
||||
Tx20, components/sensor/tx20, tx20.jpg
|
||||
TX20, components/sensor/tx20, tx20.jpg
|
||||
Ultrasonic Sensor, components/sensor/ultrasonic, ultrasonic.jpg
|
||||
Uptime Sensor, components/sensor/uptime, timer.svg
|
||||
VL53L0x, components/sensor/vl53l0x, vl53l0x.svg
|
||||
@ -290,7 +290,7 @@ Climate Components
|
||||
Bang Bang Controller, components/climate/bang_bang, air-conditioner.svg
|
||||
Custom Climate, components/climate/custom, language-cpp.svg
|
||||
Coolix IR Remote, components/climate/coolix, air-conditioner.svg
|
||||
Tcl112 IR Remote, components/climate/tcl112, air-conditioner.svg
|
||||
TCL112 IR Remote, components/climate/tcl112, air-conditioner.svg
|
||||
Yashima IR Remote, components/climate/yashima, air-conditioner.svg
|
||||
|
||||
Misc Components
|
||||
@ -328,7 +328,7 @@ Additional Custom Components
|
||||
.. imgtable::
|
||||
|
||||
Generic Custom Component, custom/custom_component, language-cpp.svg
|
||||
Custom I2C Component, custom/i2c, language-cpp.svg
|
||||
Custom I²C Component, custom/i2c, language-cpp.svg
|
||||
Custom SPI Component, custom/spi, language-cpp.svg
|
||||
Custom UART Component, custom/uart, language-cpp.svg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user