Merge branch 'current' into next
|
@ -2,23 +2,22 @@ name: Lint
|
|||
|
||||
on:
|
||||
push:
|
||||
# On other branches the `pull_request` trigger will be used
|
||||
branches: [current, next]
|
||||
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.6
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.6
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
run: pip install -r requirements.txt
|
||||
- name: Lint
|
||||
run: |
|
||||
python travis.py
|
||||
|
|
|
@ -6,7 +6,8 @@ __pycache__/
|
|||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
.idea
|
||||
venv
|
||||
|
||||
.vscode
|
||||
.vscode
|
||||
*.DS_Store
|
||||
/.idea/
|
||||
|
|
2
Doxygen
|
@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
|
|||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.14.2
|
||||
PROJECT_NUMBER = 1.14.4
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
|
2
Makefile
|
@ -1,5 +1,5 @@
|
|||
ESPHOME_PATH = ../esphome
|
||||
ESPHOME_REF = v1.14.2
|
||||
ESPHOME_REF = v1.14.4
|
||||
|
||||
.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://esphomelib.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
|
||||
var disqus_config = function () {
|
||||
let disqusThread = document.getElementById("disqus_thread");
|
||||
if (disqusThread === null)
|
||||
return;
|
||||
this.page.identifier = disqusThread.getAttribute('data-disqus-identifier');
|
||||
};
|
|
@ -1 +1 @@
|
|||
1.14.2
|
||||
1.14.4
|
|
@ -32,8 +32,6 @@
|
|||
A new version has been release since you last visited this page: {{ release }} 🎉
|
||||
<a id="upgrade-footer-changelog" href="/changelog/v{{ version }}.0.html">View Changelog</a>
|
||||
</div>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113203480-2"></script>
|
||||
<script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-113203480-2', {'anonymize_ip': true});</script>
|
||||
<script>
|
||||
var old = window.localStorage.getItem("version");
|
||||
if (old === null) { window.localStorage.setItem("version", "{{ version }}");
|
||||
|
|
|
@ -146,6 +146,125 @@ Release 1.14.2 - November 3
|
|||
|
||||
- esphome: Fix weird ESP8266 wifi crashes :esphomepr:`831`
|
||||
|
||||
Release 1.14.3 - November 17
|
||||
----------------------------
|
||||
|
||||
- docs: Fix typo: as3935 sensor docs :docspr:`401` by :ghuser:`TheJulianJES`
|
||||
- docs: Remove references to scan_interval :docspr:`400` by :ghuser:`marrold`
|
||||
- esphome: ESP8266 remove default opmode check :esphomepr:`835`
|
||||
- esphome: WiFi AP apply manual ip settings :esphomepr:`836`
|
||||
- esphome: Fix ESP32 rotary encoder :esphomepr:`834`
|
||||
- esphome: Fix homeassistant.service schema lambda :esphomepr:`833`
|
||||
- esphome: Update platformio libraries :esphomepr:`837`
|
||||
- docs: Update brilliant-mirabella-genio-smart-plugs.rst - Added Gosund… :docspr:`402` by :ghuser:`Taigar2015`
|
||||
- esphome: Update variable in scheduler :esphomepr:`838`
|
||||
- esphome: Fix sun calculations for negative sun declination :esphomepr:`839`
|
||||
- docs: Update diy.rst :docspr:`404` by :ghuser:`kvvoff`
|
||||
- docs: DIY Examples : add Custom ESPHome for Wofea Alarm :docspr:`405` by :ghuser:`nbergont`
|
||||
- docs: Update Mirabella Genio red LED GPIO :docspr:`406` by :ghuser:`ankycooper`
|
||||
- esphome: fix missing checks of is_playing condition :esphomepr:`844` by :ghuser:`glmnet`
|
||||
- docs: Update lcd_display.rst :docspr:`411` by :ghuser:`Destix`
|
||||
- esphome: Add wifi output_power setting :esphomepr:`853`
|
||||
- esphome: Add missing state attribute :esphomepr:`851`
|
||||
- esphome: Fix neopixelbus missing method pins :esphomepr:`848`
|
||||
- esphome: Fix sensor force_update native API :esphomepr:`847`
|
||||
- esphome: Web server CORS headers :esphomepr:`840`
|
||||
- esphome: Check DHT sensor exists before publishing :esphomepr:`850`
|
||||
- esphome: Adjust some units :esphomepr:`852`
|
||||
- esphome: Fix PZEM004T v2 :esphomepr:`846`
|
||||
- esphome: Mark python 3.5 support deprecated :esphomepr:`849`
|
||||
- docs: document the new has_position parameter for the template cover :docspr:`410` by :ghuser:`ssieb`
|
||||
- esphome: add position reporting to the template cover :esphomepr:`821` by :ghuser:`ssieb`
|
||||
- esphome: Atm90e32 pf fix :esphomepr:`841` by :ghuser:`Diramu`
|
||||
- esphome: Switch to 115200 baud upload if 460800 fails :esphomepr:`856`
|
||||
- esphome: Fix logger uart conflict check :esphomepr:`858` by :ghuser:`brandond`
|
||||
- esphome: Tuya: Fix init sequence and handle wifi test command :esphomepr:`820` by :ghuser:`brandond`
|
||||
- docs: add Topersun smart plug :docspr:`413` by :ghuser:`hmoffatt`
|
||||
- esphome: Improve WiFi disconnect messages :esphomepr:`857`
|
||||
- esphome: Fix MQTT python 3 stringify IPAddress Type :esphomepr:`864`
|
||||
- esphome: Revert ESP32 BLE Tracker defaults :esphomepr:`863`
|
||||
- esphome: Change ESP8266 default wifi output power :esphomepr:`862`
|
||||
|
||||
Release 1.14.4 - June 5
|
||||
-----------------------
|
||||
|
||||
- docs: Added Android Beacon MQTT app :docspr:`417` by :ghuser:`turbo-lab`
|
||||
- esphome: fix the problem of missing part of advertising packet when activ… :esphomepr:`868` by :ghuser:`warpzone`
|
||||
- docs: dfplayer updates :docspr:`421` by :ghuser:`glmnet`
|
||||
- docs: Fix time id conflict :docspr:`418` by :ghuser:`guiguid`
|
||||
- docs: Cookbook for Sonoff Light Switches :docspr:`407` by :ghuser:`bensuffolk`
|
||||
- esphome: fix climate_ir on receive optional :esphomepr:`897` by :ghuser:`glmnet`
|
||||
- esphome: Fix MQTT logs Int or String expected Python 3 :esphomepr:`898`
|
||||
- esphome: web_server call setup_controller :esphomepr:`899`
|
||||
- esphome: Ignore ESP32 Camera unknown framesizes :esphomepr:`901`
|
||||
- esphome: Update ESP32 BLE ADV parse to match BLE spec :esphomepr:`904`
|
||||
- esphome: Add ESP8266 core v2.6.2 :esphomepr:`905`
|
||||
- docs: Add doc for color correction of rgb* lights :docspr:`431` by :ghuser:`nickw444`
|
||||
- docs: Use .timestamp instead of .time in time docs :docspr:`435` by :ghuser:`davidjb`
|
||||
- docs: DIY Examples : Added SW420 Vibration Sensor with Remote Notifications :docspr:`436` by :ghuser:`rmooreID`
|
||||
- docs: Fix broken link :docspr:`437` by :ghuser:`richrd`
|
||||
- docs: Update getting_started_command_line.rst :docspr:`461` by :ghuser:`CyanoFresh`
|
||||
- docs: Added degree symbol output on ~ for MAX7219 :docspr:`376` by :ghuser:`cyberplant`
|
||||
- docs: change "tracker" to "presence" :docspr:`465` by :ghuser:`spattinson`
|
||||
- docs: On_sunrise was listed twice in description. :docspr:`464` by :ghuser:`Mechotronic`
|
||||
- docs: Patch 3 :docspr:`460` by :ghuser:`Valcob`
|
||||
- docs: fixed non working example :docspr:`381` by :ghuser:`danibjor`
|
||||
- docs: Added my custom component, now with correct syntax :docspr:`454` by :ghuser:`nldroid`
|
||||
- docs: faq reboot_timeout :docspr:`472` by :ghuser:`glmnet`
|
||||
- docs: my9231->bit_depth: parameter name and sonoff B1 :docspr:`489` by :ghuser:`anduchs`
|
||||
- docs: New DIY project about Cat Feeder :docspr:`439` by :ghuser:`rubengargar`
|
||||
- docs: Update diy.rst :docspr:`493` by :ghuser:`brianhanifin`
|
||||
- docs: Add my ESPHome configs :docspr:`492` by :ghuser:`nuttytree`
|
||||
- docs: Brightness feature not included in doc. :docspr:`445` by :ghuser:`tubalainen`
|
||||
- docs: remove apostrophe :docspr:`504` by :ghuser:`perjury`
|
||||
- docs: Add UART-based Mitsibishi HeatPump Component :docspr:`506` by :ghuser:`geoffdavis`
|
||||
- docs: Update pzemac.rst :docspr:`495` by :ghuser:`Francisk0`
|
||||
- docs: Fix link syntax :docspr:`507` by :ghuser:`geoffdavis`
|
||||
- docs: Typo fix :docspr:`498` by :ghuser:`napieraj`
|
||||
- docs: Fix some typos in Sonoff basic light switch :docspr:`480` by :ghuser:`kaykayehnn`
|
||||
- docs: Wrong IC :docspr:`499` by :ghuser:`Tuckie`
|
||||
- docs: small mistype fix :docspr:`477` by :ghuser:`trylika`
|
||||
- docs: Update sonoff.rst :docspr:`470` by :ghuser:`TBobsin`
|
||||
- docs: Update sonoff-t1-3.rst :docspr:`497` by :ghuser:`RockBomber`
|
||||
- docs: remove uppercase allowed in names :docspr:`487` by :ghuser:`truglodite`
|
||||
- docs: Update ssd1306.rst :docspr:`481` by :ghuser:`Valcob`
|
||||
- docs: Update board for Sonoff and link to Tasmota :docspr:`484` by :ghuser:`sillyfrog`
|
||||
- docs: Update migrate_sonoff_tasmota.rst :docspr:`483` by :ghuser:`jasonehines`
|
||||
- docs: added rgbww light using pwm driver :docspr:`482` by :ghuser:`morph027`
|
||||
- docs: add a note about the log level of dump: all :docspr:`475` by :ghuser:`drewp`
|
||||
- docs: ifan02 cookbook :docspr:`218` by :ghuser:`quazzie`
|
||||
- docs: Add documentation for cwww and rgbww constant_brightness variables. :docspr:`530` by :ghuser:`kroimon`
|
||||
- docs: remove link to Adafruit :docspr:`531` by :ghuser:`ebaschiera`
|
||||
- docs: Revert "Add documentation for cwww and rgbww constant_brightness vari… :docspr:`539` by :ghuser:`glmnet`
|
||||
- docs: Add Stepper Motor blinds to diy examples :docspr:`534` by :ghuser:`icarome`
|
||||
- docs: Update sonoff.rst :docspr:`549` by :ghuser:`MrZetor`
|
||||
- docs: Improve LEDC documentation :docspr:`557` by :ghuser:`Skaronator`
|
||||
- docs: Update wifi.rst :docspr:`562` by :ghuser:`kbouchard111`
|
||||
- docs: Add unit_of_measurement to make graphing happens :docspr:`569` by :ghuser:`deftdawg`
|
||||
- docs: Simple grammar change. :docspr:`578` by :ghuser:`mnaz`
|
||||
- docs: Fix typos :docspr:`561` by :ghuser:`mje-nz`
|
||||
- docs: Adding example of how to use a buzzer :docspr:`570` by :ghuser:`declanshanaghy`
|
||||
- docs: Deleted Warning because the component is already tested :docspr:`615` by :ghuser:`deltazerorsan`
|
||||
- docs: Update datasheet URL on SHTCX page :docspr:`598` by :ghuser:`JeffResc`
|
||||
- docs: Update datagram URL on TX20 page :docspr:`599` by :ghuser:`JeffResc`
|
||||
- docs: Update datasheet URL on SCD30 page :docspr:`600` by :ghuser:`JeffResc`
|
||||
- docs: Update datasheet URL on STS3X page :docspr:`602` by :ghuser:`JeffResc`
|
||||
- docs: Update datasheet URL on SGP30 page :docspr:`601` by :ghuser:`JeffResc`
|
||||
- docs: Update Home Assistant custom component URL on contributing guide page :docspr:`603` by :ghuser:`JeffResc`
|
||||
- docs: Update WaveShare E-Paper URL on WaveShare E-Paper page :docspr:`597` by :ghuser:`JeffResc`
|
||||
- docs: Fix copy/paste error :docspr:`574` by :ghuser:`mniess`
|
||||
- docs: Update pulse_counter.rst :docspr:`609` by :ghuser:`m1ch`
|
||||
- docs: Add smart intercom blogpost :docspr:`621` by :ghuser:`frog32`
|
||||
- docs: Minor spelling :docspr:`622` by :ghuser:`AalianKhan`
|
||||
- docs: Added NEO Coolcam :docspr:`496` by :ghuser:`nldroid`
|
||||
- docs: pzemac energy support :docspr:`514` by :ghuser:`rradar`
|
||||
- docs: Revert "pzemac energy support" :docspr:`623` by :ghuser:`glmnet`
|
||||
- docs: Changed miflora platforms :docspr:`586` by :ghuser:`Guyohms`
|
||||
- docs: Update docs to reflect ssd1327 support :docspr:`500` by :ghuser:`igg`
|
||||
- docs: Typo: NEC -> Sony :docspr:`624` by :ghuser:`gitolicious`
|
||||
- docs: Not every nodeMCU board supports 12V :docspr:`626` by :ghuser:`Laess3r`
|
||||
- docs: Revert "Update docs to reflect ssd1327 support" :docspr:`634` by :ghuser:`glmnet`
|
||||
|
||||
Notable Changes & New Features
|
||||
------------------------------
|
||||
|
||||
|
|
|
@ -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**
|
||||
|
|
|
@ -196,6 +196,27 @@ Configuration variables:
|
|||
- **max_length** (*Optional*, :ref:`config-time`): The maximum duration the click should last. Defaults to ``350ms``.
|
||||
- See :ref:`Automation <automation>`.
|
||||
|
||||
.. note::
|
||||
|
||||
Multiple ``on_click`` entries can be defined like this (see also :ref:`binary_sensor-on_multi_click`
|
||||
for more complex matching):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
# ...
|
||||
on_click:
|
||||
- min_length: 50ms
|
||||
max_length: 350ms
|
||||
then:
|
||||
- switch.turn_off: relay_1
|
||||
- min_length: 500ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
|
||||
|
||||
.. _binary_sensor-on_double_click:
|
||||
|
||||
``on_double_click``
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -41,7 +41,13 @@ two methods (:apiclass:`Climate <climate::Climate>`):
|
|||
// Send target temp to climate
|
||||
// ...
|
||||
}
|
||||
|
||||
}
|
||||
ClimateTraits traits() override {
|
||||
// The capabilities of the climate device
|
||||
auto traits = climate::ClimateTraits();
|
||||
traits.set_supports_current_temperature(true);
|
||||
traits.set_supports_auto_mode(true);
|
||||
return traits;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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``.
|
||||
- **assumed_state** (*Optional*, boolean): Whether the true state of the cover is not known.
|
||||
|
|
|
@ -6,7 +6,7 @@ DF-Player mini
|
|||
:image: crosshair-gps.png
|
||||
|
||||
The ``dfplayer`` (`datasheet <https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299>`__), component
|
||||
allows you to play sound and music stored in SD card.
|
||||
allows you to play sound and music stored in an SD card or USB flash drive.
|
||||
|
||||
.. figure:: images/dfplayer-full.jpg
|
||||
:align: center
|
||||
|
@ -20,10 +20,13 @@ in your configuration.
|
|||
Overview
|
||||
--------
|
||||
|
||||
The module can be powered by the 3V output of an NodeMCU and a powered speaker connected to
|
||||
the modules ``DAC_R``, ``DAC_I`` and ``GND`` . You can connect only the ``tx_pin`` of
|
||||
the ``uart`` bus to the module's ``RX`` but if you need feedback of playback active you will
|
||||
also need to connect the ``rx_pin`` to the module's ``TX``.
|
||||
The module can be powered by the 3.3V output of an NodeMCU. For communication you can connect only
|
||||
the ``tx_pin`` of the ``uart`` bus to the module's ``RX`` but if you need feedback of playback active
|
||||
you will also need to connect the ``rx_pin`` to the module's ``TX``.
|
||||
For best quality audio a powered stereo speaker can be connected to the modules ``DAC_R``,
|
||||
``DAC_I`` and ``GND``, alternatively the module features a built-in 3W audio amplifier, in that case
|
||||
the pins ``SPK_1`` and ``SPK_2`` should be connected to one passive speaker and a 5V 1A power supply
|
||||
will be required.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -150,9 +153,7 @@ Configuration options:
|
|||
``dfplayer.set_device`` Action
|
||||
------------------------------
|
||||
|
||||
Changes the device in use. Valid values are ``TF_CARD`` and ``USB``. *Note: only* ``TF_CARD``
|
||||
*is tested. If you connect a USB stick and found it works please create an issue at ESPHome
|
||||
GitHub*.
|
||||
Changes the device in use. Valid values are ``TF_CARD`` and ``USB``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -340,7 +341,7 @@ Sample code
|
|||
folder: !lambda 'return folder;'
|
||||
file: !lambda 'return file;'
|
||||
|
||||
- service: dfplayer_play_loo_folder
|
||||
- service: dfplayer_play_loop_folder
|
||||
variables:
|
||||
folder: int
|
||||
then:
|
||||
|
@ -348,12 +349,13 @@ Sample code
|
|||
folder: !lambda 'return folder;'
|
||||
loop: True
|
||||
|
||||
- service: dfplayer_set_device
|
||||
variables:
|
||||
device: int
|
||||
- service: dfplayer_set_device_tf
|
||||
then:
|
||||
- dfplayer.set_device:
|
||||
device: TF_CARD
|
||||
- dfplayer.set_device: TF_CARD
|
||||
|
||||
- service: dfplayer_set_device_usb
|
||||
then:
|
||||
- dfplayer.set_device: USB
|
||||
|
||||
- service: dfplayer_set_volume
|
||||
variables:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" version="1"><g stroke="#000"><path d="M190.797 72.5L175.585 88h-59l-15.517-15.5L116.585 57h59l15.212 15.5zM190.797 154l-15.212 15.5h-59L101.068 154l15.517-15.5h59l15.212 15.5zM98 75.385l15.5 15.212v45L98 151.115l-15.5-15.518v-45L98 75.385zM194 75.385l15.5 15.212v45L194 151.115l-15.5-15.518v-45L194 75.385z" fill="red" fill-rule="evenodd"/><path d="M190.797 236.057l-15.212 15.5h-59l-15.517-15.5 15.517-15.5h59l15.212 15.5zM98 157.443l15.5 15.212v45L98 233.172l-15.5-15.517v-45L98 157.443zM194 157.443l15.5 15.212v45L194 233.172l-15.5-15.517v-45l15.5-15.212z" fill="none"/><path d="M237.5 239.25a12.25 12.25 0 1 1-24.5 0 12.25 12.25 0 1 1 24.5 0z" fill="none" stroke-linecap="round"/></g></svg>
|
After Width: | Height: | Size: 760 B |
|
@ -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
|
||||
|
|
|
@ -222,6 +222,8 @@ All 7-Segment Characters
|
|||
|max72191D| ``o``
|
||||
------------------------------ ------------------------------
|
||||
|max72191C| ``u``, ``v``
|
||||
------------------------------ ------------------------------
|
||||
|max72198E| ``~``
|
||||
============================== ==============================
|
||||
|
||||
.. |max721900| image:: images/max7219/seg00.svg
|
||||
|
@ -326,6 +328,8 @@ All 7-Segment Characters
|
|||
:class: component-image
|
||||
.. |max72191C| image:: images/max7219/seg1C.svg
|
||||
:class: component-image
|
||||
.. |max72198E| image:: images/max7219/seg8E.svg
|
||||
:class: component-image
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
@ -61,6 +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°``.
|
||||
- **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.
|
||||
|
@ -68,10 +69,11 @@ Configuration variables:
|
|||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
|
||||
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
|
||||
|
||||
.. 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:
|
||||
|
||||
|
@ -141,6 +143,7 @@ Configuration variables:
|
|||
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
|
||||
to use multiple SPI buses.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
|
|
@ -6,7 +6,7 @@ Waveshare E-Paper Display
|
|||
:image: waveshare_epaper.jpg
|
||||
|
||||
The ``waveshare_epaper`` display platform allows you to use
|
||||
some E-Paper displays sold by `Waveshare <https://www.waveshare.com/product/modules/oleds-lcds/e-paper.htm>`__
|
||||
some E-Paper displays sold by `Waveshare <https://www.waveshare.com/product/displays/e-paper.htm>`__
|
||||
with ESPHome. The 2.13" `TTGO module <https://github.com/lewisxhe/TTGO-EPaper-Series>`__ with an ESP32 on the board is supported as well.
|
||||
Similar modules sold by other vendors might also work but not have been tested yet. Currently only
|
||||
single-color E-Ink displays are implemented and of those only a few modules.
|
||||
|
|
|
@ -58,12 +58,13 @@ 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
|
||||
`this guide by the owntracks <https://owntracks.org/booklet/features/beacons/>`__ app to let my Home Automation system
|
||||
know when I'm home or away.
|
||||
know when I'm home or away. Another nice Android app is `Beacon MQTT <https://turbo-lab.github.io/android-beacon-mqtt/>`__.
|
||||
It can work with multiple beacons simultaneously.
|
||||
|
||||
.. figure:: images/esp32_ble_beacon-ibeacon.png
|
||||
:align: center
|
||||
|
|
|
@ -17,15 +17,15 @@ for information on how you can find out the MAC address of a device and track it
|
|||
esp32_ble_tracker:
|
||||
|
||||
binary_sensor:
|
||||
- platform: esp32_ble_tracker
|
||||
- platform: ble_presence
|
||||
mac_address: AC:37:43:77:5F:4C
|
||||
name: "ESP32 BLE Tracker Google Home Mini"
|
||||
name: "ESP32 BLE Presence Google Home Mini"
|
||||
|
||||
sensor:
|
||||
- platform: ble_rssi
|
||||
mac_address: AC:37:43:77:5F:4C
|
||||
name: "BLE Google Home Mini RSSI value"
|
||||
- platform: xiaomi_miflora
|
||||
- platform: xiaomi_hhccjcy01
|
||||
mac_address: 94:2B:FF:5C:91:61
|
||||
temperature:
|
||||
name: "Xiaomi MiFlora Temperature"
|
||||
|
@ -37,7 +37,7 @@ for information on how you can find out the MAC address of a device and track it
|
|||
name: "Xiaomi MiFlora Soil Conductivity"
|
||||
battery_level:
|
||||
name: "Xiaomi MiFlora Battery Level"
|
||||
- platform: xiaomi_mijia
|
||||
- platform: xiaomi_lywsdcgq
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
temperature:
|
||||
name: "Xiaomi MiJia Temperature"
|
||||
|
@ -59,7 +59,7 @@ Configuration variables:
|
|||
|
||||
|
||||
- **scan_parameters** (*Optional*): Advanced parameters for configuring the scan behavior of the ESP32.
|
||||
See also `this guide by Texax Instruments <http://dev.ti.com/tirex/content/simplelink_academy_cc2640r2sdk_1_12_01_16/modules/ble_scan_adv_basic/ble_scan_adv_basic.html#scanning>`__
|
||||
See also `this guide by Texas Instruments <http://dev.ti.com/tirex/content/simplelink_academy_cc2640r2sdk_1_12_01_16/modules/ble_scan_adv_basic/ble_scan_adv_basic.html#scanning>`__
|
||||
for reference.
|
||||
|
||||
- **interval** (*Optional*, :ref:`config-time`): The interval between each consecutive scan window.
|
||||
|
|
|
@ -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 upper/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.6.3 <https://github.com/esp8266/Arduino/releases/tag/2.6.3>`__
|
||||
* `2.6.2 <https://github.com/esp8266/Arduino/releases/tag/2.6.2>`__
|
||||
|
@ -108,7 +108,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>`__
|
||||
|
||||
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.4 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.4>`__ (default)
|
||||
- `1.0.3 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.3>`__
|
||||
|
@ -158,7 +158,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
|
||||
|
@ -213,11 +213,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
|
||||
|
||||
|
@ -233,10 +233,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.
|
||||
|
||||
|
|
|
@ -59,6 +59,14 @@ Configuration variables:
|
|||
Defaults to ``.local``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
If your ethernet board is not designed with an ESP32 built in, chances are that you are going
|
||||
to use flying leads, dupont wires, etc. to connect the ethernet to the ESP32. This is
|
||||
probably to fail as the ethernet interface uses a high frequency clock signal. For more
|
||||
information and wiring details refer to the the link in the *See also* section.
|
||||
|
||||
Configuration for wESP32 board
|
||||
------------------------------
|
||||
|
||||
|
@ -83,9 +91,25 @@ Configuration for Olimex ESP32-POE
|
|||
clk_mode: GPIO17_OUT
|
||||
phy_addr: 0
|
||||
power_pin: GPIO12
|
||||
|
||||
Configuration for OpenHacks LAN8720
|
||||
-----------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin: GPIO23
|
||||
mdio_pin: GPIO18
|
||||
phy_addr: 1
|
||||
|
||||
Note: This board has an issue that might cause the ESP32 to boot in program mode. When testing, make sure you are monitoring the
|
||||
serial output and reboot the device several times to see if it boots into the program properly.
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :apiref:`ethernet/ethernet_component.h`
|
||||
- `ESP32 Ethernet PHY connection info <https://pcbartists.com/design/embedded/esp32-ethernet-phy-schematic-design/>`__
|
||||
- :ghedit:`Edit`
|
||||
|
|
|
@ -5,14 +5,6 @@ GPS Component
|
|||
:description: Instructions for setting up GPS integration in ESPHome.
|
||||
:image: crosshair-gps.png
|
||||
|
||||
.. warning::
|
||||
|
||||
This component has not been fully tested yet, if you have this component
|
||||
and can confirm it works, please create a quick new issue here
|
||||
https://github.com/esphome/issues/
|
||||
|
||||
Thanks!
|
||||
|
||||
The ``gps`` component allows you to connect GPS modules to your ESPHome project.
|
||||
Any GPS module that uses the standardized NMEA communication protocol will work.
|
||||
|
||||
|
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
@ -52,7 +52,7 @@ And in YAML:
|
|||
# Example configuration entry
|
||||
esphome:
|
||||
includes:
|
||||
- my_cover.h
|
||||
- my_light.h
|
||||
|
||||
light:
|
||||
- platform: custom
|
||||
|
|
|
@ -737,10 +737,10 @@ Available variables in the lambda:
|
|||
// it[num].get();
|
||||
|
||||
// Example: Simple color wipe
|
||||
for (int i = 1; i < it.size(); i++) {
|
||||
for (int i = it.size() - 1; i > 0; i--) {
|
||||
it[i] = it[i - 1].get();
|
||||
}
|
||||
it[0] = ESPColor::random_color();
|
||||
it[0] = ESPColor::random_color();
|
||||
|
||||
// Bonus: use .range() and .all() to set many LEDs without having to write a loop.
|
||||
it.range(0, 50) = ESPColor::BLACK;
|
||||
|
|
|
@ -35,6 +35,32 @@ The ``rgb`` light platform creates an RGB light from 3 :ref:`float output compon
|
|||
pin: D1
|
||||
# Repeat for green and blue output
|
||||
|
||||
Color Correction
|
||||
----------------
|
||||
|
||||
It is often favourable to calibrate/correct the color produced by an LED strip light as the
|
||||
perceived intensity of different colors will generally vary. This can be done by using
|
||||
:ref:`max_power <config-output>` on individual output channels:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: rgb
|
||||
name: "Living Room Lights"
|
||||
red: output_component1
|
||||
green: output_component2
|
||||
blue: output_component3
|
||||
|
||||
# Example output entry
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_component1
|
||||
pin: D1
|
||||
max_power: 80%
|
||||
# Repeat for green and blue output
|
||||
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
|
|
|
@ -18,6 +18,31 @@ The ``rgbw`` light platform creates an RGBW light from 4 :ref:`float output comp
|
|||
blue: output_component3
|
||||
white: output_component4
|
||||
|
||||
Color Correction
|
||||
----------------
|
||||
|
||||
It is often favourable to calibrate/correct the color produced by an LED strip light as the
|
||||
perceived intensity of different colors will generally vary. This can be done by using
|
||||
:ref:`max_power <config-output>` on individual output channels:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "Livingroom Lights"
|
||||
red: output_component1
|
||||
green: output_component2
|
||||
blue: output_component3
|
||||
white: output_component4
|
||||
|
||||
# Example output entry
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_component1
|
||||
pin: D1
|
||||
max_power: 80%
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
|
|
|
@ -23,6 +23,32 @@ and warm white channels will be mixed using the color temperature configuration
|
|||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
|
||||
Color Correction
|
||||
----------------
|
||||
|
||||
It is often favourable to calibrate/correct the color produced by an LED strip light as the
|
||||
perceived intensity of different colors will generally vary. This can be done by using
|
||||
:ref:`max_power <config-output>` on individual output channels:
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "Livingroom Lights"
|
||||
red: output_component1
|
||||
green: output_component2
|
||||
blue: output_component3
|
||||
white: output_component4
|
||||
|
||||
# Example output entry
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_component1
|
||||
pin: D1
|
||||
max_power: 80%
|
||||
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
|
|
@ -16,7 +16,36 @@ tuya serial component.
|
|||
The dimmer switch I got would hang if the logger was configured to use the serial port
|
||||
which meant it was bricked until I cut it open.
|
||||
|
||||
The Tuya dimmer requires a :doc:`/components/tuya` to be configured.
|
||||
There are two components, the Tuya bus and the dimmer that uses it. The :doc:`/components/tuya`
|
||||
component requires a :ref:`UART bus <uart>` to be configured. Put the ``tuya`` component in
|
||||
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
|
||||
wifi:
|
||||
ssid: "ssid"
|
||||
password: "password"
|
||||
|
||||
# Make sure logging is not using the serial port
|
||||
logger:
|
||||
baud_rate: 0
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
# Make sure you can upload new firmware OTA
|
||||
ota:
|
||||
|
||||
# My dimmer used the hardware serial port on the alternate pins
|
||||
uart:
|
||||
rx_pin: GPIO13
|
||||
tx_pin: GPIO15
|
||||
baud_rate: 9600
|
||||
|
||||
# Register the Tuya MCU connection
|
||||
tuya:
|
||||
|
||||
Here is an example output for a Tuya dimmer:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -10,7 +10,10 @@ channel <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/per
|
|||
of the ESP32 as an output component.
|
||||
|
||||
The frequency range of LEDC is from 10Hz to 40MHz - however, higher frequencies require a smaller
|
||||
bit_depth which means the output is not that accurate for frequencies above ~300kHz.
|
||||
bit depth which means the output is not that accurate for frequencies above ~300kHz.
|
||||
|
||||
Example Usage For a Light
|
||||
*************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -26,6 +29,40 @@ bit_depth which means the output is not that accurate for frequencies above ~300
|
|||
output: gpio_19
|
||||
name: "Kitchen Light"
|
||||
|
||||
Example Usage For a Piezo Buzzer
|
||||
********************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Configure the output
|
||||
output:
|
||||
- platform: ledc
|
||||
######################################################
|
||||
# One buzzer leg connected to GPIO12, the other to GND
|
||||
######################################################
|
||||
pin: GPIO12
|
||||
id: buzzer
|
||||
|
||||
# Example usage in an automation
|
||||
on_press:
|
||||
then:
|
||||
######################################################
|
||||
# Must be turned on before setting frequency & level
|
||||
######################################################
|
||||
- output.turn_on: buzzer
|
||||
######################################################
|
||||
# Frequency sets the wave size
|
||||
######################################################
|
||||
- output.ledc.set_frequency:
|
||||
id: buzzer
|
||||
frequency: "1000Hz"
|
||||
######################################################
|
||||
# level sets the %age time the PWM is on
|
||||
######################################################
|
||||
- output.set_level:
|
||||
id: buzzer
|
||||
level: "50%"
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
|
@ -33,8 +70,6 @@ Configuration variables:
|
|||
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
||||
- **frequency** (*Optional*, float): At which frequency to run the LEDC
|
||||
channel’s timer. Defaults to 1000Hz.
|
||||
- **bit_depth** (*Optional*, int): The bit depth to use for the LEDC channel. Defaults to the
|
||||
highest possible for the configured frequency.
|
||||
- All other options from :ref:`Output <config-output>`.
|
||||
|
||||
Advanced options:
|
||||
|
@ -43,6 +78,33 @@ Advanced options:
|
|||
channel <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/ledc.html#configure-channel>`__
|
||||
to use. Two adjacent channels share the same timer. Defaults to an automatic selection.
|
||||
|
||||
Recommended frequencies
|
||||
-----------------------
|
||||
|
||||
To get the highest available frequency while still getting the same bit depth it is
|
||||
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 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
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
2441Hz 15 32768
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
4882Hz 14 16384
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
9765Hz 13 8192
|
||||
---------------------------------- ----------------------------------- -----------------------------------
|
||||
19531Hz 12 4096
|
||||
================================== =================================== ===================================
|
||||
|
||||
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:
|
||||
|
||||
``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)
|
||||
|
@ -51,7 +51,7 @@ Configuration variables:
|
|||
chain. Must be in range from 3 to 1020. Defaults to 6.
|
||||
- **num_chips** (*Optional*, int): Number of chips in the chain. Must be
|
||||
in range from 1 to 255. Defaults to 2.
|
||||
- **bit_depths** (*Optional*, int): The bit depth to use for all output
|
||||
- **bit_depth** (*Optional*, int): The bit depth to use for all output
|
||||
channels in this chain. Must be one of 8, 12, 14 or 16. Defaults to 16.
|
||||
- **id** (*Optional*, :ref:`config-id`): The id to use for
|
||||
this ``my9231`` component. Use this if you have multiple MY9231/MY9291 chains
|
||||
|
@ -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
|
||||
|
@ -92,6 +92,7 @@ complete configuration for a Sonoff B1 looks like:
|
|||
clock_pin: GPIO14 # GPIO15 for AiLight
|
||||
num_channels: 6
|
||||
num_chips: 2
|
||||
bit_depth: 8
|
||||
|
||||
output:
|
||||
- platform: my9231
|
||||
|
@ -121,6 +122,56 @@ complete configuration for a Sonoff B1 looks like:
|
|||
cold_white_color_temperature: 6500 K
|
||||
warm_white_color_temperature: 2800 K
|
||||
|
||||
And here is a complete configuration for the AiThinker AiLight:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_WIFI_PASSPHRASE>
|
||||
|
||||
api:
|
||||
|
||||
logger:
|
||||
|
||||
ota:
|
||||
password: <YOUR_OTA_PASSWORD>
|
||||
|
||||
my9231:
|
||||
data_pin: GPIO13
|
||||
clock_pin: GPIO15
|
||||
num_channels: 4
|
||||
num_chips: 1
|
||||
bit_depth: 8
|
||||
|
||||
output:
|
||||
- platform: my9231
|
||||
id: output_red
|
||||
channel: 3
|
||||
- platform: my9231
|
||||
id: output_green
|
||||
channel: 2
|
||||
- platform: my9231
|
||||
id: output_blue
|
||||
channel: 1
|
||||
- platform: my9231
|
||||
id: output_cold_white
|
||||
channel: 0
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: <LIGHT_NAME>
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
white: output_cold_white
|
||||
|
||||
|
||||
.. _my9231-output:
|
||||
|
||||
Driver Output
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
Template Output
|
||||
===============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up template outputs with ESPHome.
|
||||
:image: description.png
|
||||
|
||||
The ``template`` output component can be used to create templated binary and float outputs in ESPHome.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
output:
|
||||
- platform: template
|
||||
id: outputsplit
|
||||
type: float
|
||||
write_action:
|
||||
- output.set_level:
|
||||
id: output1
|
||||
level: !lambda return state;
|
||||
- output.set_level:
|
||||
id: output2
|
||||
level: !lambda return state;
|
||||
|
||||
- platform: esp8266_pwm
|
||||
id: output1
|
||||
pin: GPIO12
|
||||
inverted: true
|
||||
- platform: esp8266_pwm
|
||||
id: output2
|
||||
pin: GPIO14
|
||||
inverted: true
|
||||
|
||||
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
||||
- **type** (**Required**, string): The type of output. One of ``binary`` and ``float``.
|
||||
- **on_write_action** (*Required*, :ref:`Action <config-action>`): The action that should
|
||||
be performed when the state of the output is updated.
|
||||
- All other options from :ref:`Output <config-output>`.
|
||||
|
||||
See :apiclass:`output::BinaryOutput` and :apiclass:`output::FloatOutput`.
|
||||
|
||||
.. warning::
|
||||
|
||||
This is an **output component** and will not be visible from the frontend. Output components are intermediary
|
||||
components that can be attached to for example lights.
|
||||
|
||||
.. _output-template-on_write_action:
|
||||
|
||||
``output.template.on_write`` Action
|
||||
-----------------------------------
|
||||
|
||||
When the state for this output is updated, the on_write action is executed.
|
||||
It is possible to access the state value inside Lambdas:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- platform: template
|
||||
id: my_output
|
||||
type: float
|
||||
write_action:
|
||||
- if:
|
||||
condition:
|
||||
lambda: return ((state > 0) && (state < .4));
|
||||
then:
|
||||
- output.turn_on: button_off
|
||||
- delay: 500ms
|
||||
- output.turn_off: button_off
|
||||
|
||||
|
||||
Complete example from the cookbook: :doc:`Sonoff Dual Light Switch</cookbook/sonoff-dual-light-switch>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/output/index`
|
||||
- :ref:`automation`
|
||||
- :ghedit:`Edit`
|
|
@ -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,8 +27,8 @@ 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. Set to ``all`` to
|
||||
dump all available codecs:
|
||||
- **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.
|
||||
- **nec**: Decode and dump NEC infrared codes.
|
||||
|
@ -43,8 +43,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.
|
||||
- **memory_blocks** (*Optional*, int): The number of RMT memory blocks used. Only used on ESP32 platfrom. Defaults to
|
||||
``3``.
|
||||
- **filter** (*Optional*, :ref:`time <config-time>`): Filter any pulses that are shorter than this. Useful for removing
|
||||
|
@ -66,7 +66,7 @@ Automations:
|
|||
NEC remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::NECData`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_sony** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
NEC remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::SonyData`
|
||||
Sony remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::SonyData`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_raw** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
raw remote code has been decoded. A variable ``x`` of type ``std::vector<int>``
|
||||
|
@ -75,10 +75,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.
|
||||
- **on_pioneer** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
pioneer remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::PioneerData`
|
||||
|
@ -197,7 +197,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
|
||||
|
||||
|
|
|
@ -29,18 +29,19 @@ remote signals.
|
|||
|
||||
# Individual switches
|
||||
switch:
|
||||
- platform: remote_transmitter
|
||||
- platform: template
|
||||
name: "Panasonic TV Off"
|
||||
panasonic:
|
||||
address: 0x4004
|
||||
command: 0x100BCBD
|
||||
turn_on_action:
|
||||
remote_transmitter.transmit_panasonic:
|
||||
address: 0x4004
|
||||
command: 0x100BCBD
|
||||
|
||||
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 Split Single Phase Energy Meter <https://circuitsetup.us/index
|
|||
|
||||
CircuitSetup Split Single Phase Real Time Whole House Energy Meter.
|
||||
|
||||
The `CircuitSetup Expandable 6 Channel Energy Meter <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 2 atm90e32 ICs and requires 2 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
|
||||
|
@ -74,7 +74,10 @@ Configuration variables:
|
|||
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 with gain_pga set to 2X, and the `Jameco Reliapro 9v 120V AC transformer <https://amzn.to/2XcWJjI>` to measure voltage and supply power to the meter boards. A load which uses a known amount of current can be used to calibrate. 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.
|
||||
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>`__.
|
||||
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
|
||||
^^^^^^^
|
||||
|
|
|
@ -7,7 +7,7 @@ BH1750 Ambient Light Sensor
|
|||
:keywords: BH1750
|
||||
|
||||
The ``bh1750`` sensor platform allows you to use your BH1750
|
||||
(`datasheet <http://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf>`__, `Adafruit`_, `mklec`_)
|
||||
(`datasheet <http://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf>`__)
|
||||
ambient light sensor with ESPHome. The :ref:`I²C bus <i2c>` is required to be set up in
|
||||
your configuration for this sensor to work.
|
||||
|
||||
|
@ -17,9 +17,6 @@ your configuration for this sensor to work.
|
|||
|
||||
BH1750 Ambient Light Sensor.
|
||||
|
||||
.. _Adafruit: https://www.adafruit.com/product/1603
|
||||
.. _mklec: http://mklec.com/modules/micro-controller-modules/bh1750-bh1750fvi-digital-light-sensor-module
|
||||
|
||||
.. figure:: images/bh1750-ui.png
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
@ -44,7 +41,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``.
|
||||
- **measurement_time** (*Optional*, int): Manually specifiy the measurement time between ``31``
|
||||
|
|
|
@ -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``.
|
||||
|
@ -78,7 +78,7 @@ Oversampling Options
|
|||
By default, the BME280 sensor measures each value 16 times when requesting a new value. You can, however,
|
||||
configure this amount. Possible oversampling values:
|
||||
|
||||
- ``NONE``
|
||||
- ``NONE`` (value is skipped)
|
||||
- ``1x``
|
||||
- ``2x``
|
||||
- ``4x``
|
||||
|
@ -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 Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -55,7 +55,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>`.
|
||||
|
||||
- **humidity** (**Required**): The information for the pressure sensor.
|
||||
- **humidity** (**Required**): The information for the humidity sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the humidity sensor.
|
||||
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
|
||||
|
@ -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``.
|
||||
|
@ -96,7 +96,7 @@ Oversampling Options
|
|||
By default, the BME680 sensor measures each value 16 times when requesting a new value. You can, however,
|
||||
configure this amount. Possible oversampling values:
|
||||
|
||||
- ``NONE``
|
||||
- ``NONE`` (value is skipped)
|
||||
- ``1x``
|
||||
- ``2x``
|
||||
- ``4x``
|
||||
|
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | 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 Width: | Height: | Size: 2.2 KiB After Width: | Height: | 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``.
|
||||
|
@ -74,7 +74,7 @@ Oversampling Options
|
|||
By default, the BMP280 sensor measures each value 16 times when requesting a new value. You can, however,
|
||||
configure this amount. Possible oversampling values:
|
||||
|
||||
- ``NONE``
|
||||
- ``NONE`` (value is skipped)
|
||||
- ``1x``
|
||||
- ``2x``
|
||||
- ``4x``
|
||||
|
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
@ -45,7 +45,7 @@ Configuration variables:
|
|||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **tvoc** (**Required**): The information for the total volatile organic compound sensor in
|
||||
parts per billion (ppm).
|
||||
parts per billion (ppb).
|
||||
|
||||
- **name** (**Required**, string): The name for the tvoc sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
|
|
|
@ -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):
|
||||
|
||||
|
@ -89,7 +89,7 @@ the latest values.
|
|||
However, there's a small problem with that approach: ``loop()`` gets called very often (about 60 times per second).
|
||||
If we would publish a new state each time that method is called we would quickly make the node unresponsive.
|
||||
|
||||
So this fix this, we will use an alternative class to :apiclass:`Component`: :apiclass:`PollingComponent`.
|
||||
So lets fix this, we will use an alternative class to :apiclass:`Component`: :apiclass:`PollingComponent`.
|
||||
This class is for situations where you have something that should get called repeatedly with some **update interval**.
|
||||
In the code above, we can simply replace :apiclass:`Component` by :apiclass:`PollingComponent` and
|
||||
``loop()`` by a special method ``update()`` which will be called with an interval we can specify.
|
||||
|
@ -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
|
||||
|
@ -65,9 +65,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.
|
||||
|
||||
|
@ -77,7 +77,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
|
||||
|
||||
|
@ -106,7 +106,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.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ for this sensor to work.
|
|||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the I²c 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
|
||||
|
@ -54,6 +54,12 @@ Configuration variables:
|
|||
- **oversampling** (*Optional*): The oversampling parameter for the sensor.
|
||||
- **range** (*Optional*): The range parameter for the sensor.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
||||
- **oversampling** (*Optional*): Number of readings to average over for each sample. One of ``1x``, ``2x``,
|
||||
``4x``, ``8x``. Defaults to ``1x``.
|
||||
- **range** (*Optional*): Select a range / gain preset. This does not affect the scale of the values published
|
||||
but allows one to avoid overflows at the cost of reading resolution. Supported values are 88µT, 130µT, 190µT,
|
||||
250µT, 400µT, 470µT, 560µT, 810µT. Default range is ±130µT.
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
Oversampling Options
|
||||
|
|
|
@ -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.
|
||||
|
|
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 19 KiB |
|
@ -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``.
|
||||
|
|
|
@ -10,7 +10,7 @@ on any pin.
|
|||
|
||||
On the ESP32, this sensor is even highly accurate because it's using the hardware `pulse counter
|
||||
peripheral <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/pcnt.html>`__
|
||||
on the ESP32.
|
||||
on the ESP32. However, due to the use of the pulse counter peripheral, a maximum of 8 channels can be used!
|
||||
|
||||
.. figure:: images/pulse-counter.png
|
||||
:align: center
|
||||
|
|
|
@ -34,7 +34,6 @@ to some pins on your board and the baud rate set to 9600.
|
|||
tx_pin: D1
|
||||
rx_pin: D2
|
||||
baud_rate: 9600
|
||||
stop_bits: 2
|
||||
|
||||
sensor:
|
||||
- platform: pzem004t
|
||||
|
|
|
@ -35,8 +35,8 @@ to some pins on your board and the baud rate set to 9600.
|
|||
|
||||
# Example configuration entry
|
||||
uart:
|
||||
tx_pin: D1
|
||||
rx_pin: D2
|
||||
rx_pin: D1
|
||||
tx_pin: D2
|
||||
baud_rate: 9600
|
||||
stop_bits: 2
|
||||
|
||||
|
|
|
@ -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/9.5_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/9_Gas_Sensors/Datasheets/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
|
||||
|
@ -96,7 +96,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``.
|
||||
|
|
|
@ -6,15 +6,15 @@ SHTCx Temperature+Humidity Sensors
|
|||
:image: shtc3.jpg
|
||||
|
||||
The ``shtcx`` sensor platform Temperature+Humidity sensor allows you to use your Sensiron SHTC1
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Humidity/Sensirion_Humidity_Sensors_SHTC1_Datasheet.pdf>`__,
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHTC1_Datasheet.pdf>`__,
|
||||
`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
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHTC3_Datasheet.pdf>`__,
|
||||
`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``.
|
||||
|
|
|
@ -6,8 +6,8 @@ STS3X Temperature Sensor
|
|||
:image: sts3x.jpg
|
||||
|
||||
The ``sts3x`` sensor platform Temperature sensor allows you to use your Sensiron STS30-DIS, STS31-DIS or STS35-DIS
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Temperature/Sensirion_Temperature_Sensors_STS3x_Datasheet.pdf>`__,
|
||||
`Sensirion STS3x <https://https://www.sensirion.com/sts3x/>`__) sensors with
|
||||
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/3_Temperature_Sensors/Sensirion_Temperature_Sensors_Table_Overview.pdf>`__,
|
||||
`Sensirion STS3x <https://www.sensirion.com/sts3x/>`__) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -81,6 +81,6 @@ See Also
|
|||
- :apiref:`tx20/tx20.h`
|
||||
- `Amazon Tx20 <https://www.amazon.de/Technoline-Tx-20/dp/B01HXZ3KLA>`__
|
||||
- `La Crosse Tx23 <https://www.lacrossetechnology.com/tx23-wind-sensor>`__
|
||||
- `Datagram Tx20 <http://www.sdpro.eu/jm/images/allegati/Tx20_Documentazione.pdf>`__
|
||||
- `Datagram Tx20 <http://www.sdpro.eu/jm/images/allegati/TX20_Documentazione.pdf>`__
|
||||
- `Datagram Tx23 <https://www.lacrossetechnology.com/tx23-wind-sensor>`__-
|
||||
- :ghedit:`Edit`
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -6,14 +6,6 @@ VL53L0X Time Of Flight Distance Sensor
|
|||
:image: vl53l0x.jpg
|
||||
:keywords: VL53L0X
|
||||
|
||||
.. note::
|
||||
|
||||
This page is incomplete and could some work. If you want to contribute, please read the
|
||||
:doc:`contributing guide </guides/contributing>`. This page is missing:
|
||||
|
||||
- An image for the front page.
|
||||
- Images/screenshots/example configs of this device being used in action.
|
||||
|
||||
The ``vl53l0x`` sensor platform allows you to use VL53L0X optical time of flight
|
||||
(`datasheet <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__,
|
||||
`ST <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__) with ESPHome
|
||||
|
@ -28,6 +20,16 @@ well enough (see also section 5 of datasheet).
|
|||
The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. figure:: images/vl53l0x-full.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
VL53L0X Time Of Flight Distance Sensor.
|
||||
|
||||
.. figure:: images/vl53l0x-ui.png
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
|
@ -51,7 +53,7 @@ Configuration variables:
|
|||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- **long_range** (*Optional*, bool): Set the sensor in long range mode. The signal_rate_limit is overruled
|
||||
to ``0.1``. Defaults to false.
|
||||
- **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,19 +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.
|
||||
|
||||
.. 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
|
||||
|
@ -44,14 +49,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.
|
||||
|
@ -92,7 +97,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::
|
||||
|
||||
|
@ -106,8 +111,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
|
||||
|
||||
|
@ -141,7 +146,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:
|
||||
|
||||
|
|
|
@ -39,8 +39,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
|
||||
|
|
|
@ -52,7 +52,7 @@ Automation:
|
|||
|
||||
- **elevation** (*Optional*, float): The elevation to cross. Defaults to 0° (horizon).
|
||||
|
||||
- **on_sunrise** (*Optional*, :ref:`Automation <automation>`): An automation to perform at sunset
|
||||
- **on_sunset** (*Optional*, :ref:`Automation <automation>`): An automation to perform at sunset
|
||||
when the sun crosses a specified angle.
|
||||
|
||||
- **elevation** (*Optional*, float): The elevation to cross. Defaults to 0° (horizon).
|
||||
|
|
|
@ -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
|
||||
|
@ -122,7 +122,7 @@ created based on a given format. If you want to get the current time attributes,
|
|||
-------------------- ---------------------------------------- ---------------------------------------- --------------------
|
||||
``.is_dst`` Is daylight savings time false, true true
|
||||
-------------------- ---------------------------------------- ---------------------------------------- --------------------
|
||||
``.time`` Unix epoch time (seconds since UTC [-2147483648 - 2147483647] (negative 1534606002
|
||||
``.timestamp`` Unix epoch time (seconds since UTC [-2147483648 - 2147483647] (negative 1534606002
|
||||
Midnight January 1, 1970) values for time past January 19th 2038)
|
||||
-------------------- ---------------------------------------- ---------------------------------------- --------------------
|
||||
``.is_valid()`` Basic check if the time is valid false, true true
|
||||
|
@ -252,7 +252,7 @@ Configuration variables:
|
|||
- **hours** (*Optional*, string): Specify for which hours of the day the automation will trigger.
|
||||
Defaults to ``*`` (all hours). Range is from 0 to 23.
|
||||
- **days_of_month** (*Optional*, string): Specify for which days of the month the automation will trigger.
|
||||
Defaults to ``*`` (all hours). Range is from 1 to 31.
|
||||
Defaults to ``*`` (all days). Range is from 1 to 31.
|
||||
- **months** (*Optional*, string): Specify for which months of the year to trigger.
|
||||
Defaults to ``*`` (all months). The month names JAN to DEC are automatically substituted.
|
||||
Range is from 1 (January) to 12 (December).
|
||||
|
|
|
@ -57,8 +57,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.
|
||||
|
||||
|
@ -67,7 +67,8 @@ Configuration variables:
|
|||
seems to have issues with WiFi where a full reboot is required to get the interface back working. Defaults to ``15min``.
|
||||
- **power_save_mode** (*Optional*, string): The power save mode for the WiFi interface.
|
||||
See :ref:`wifi-power_save_mode`
|
||||
|
||||
|
||||
- **output_power** (*Optional*, string): The amount of TX power for the WiFi interface from 10dB to 20.5dB. Default for ESP8266 is 20dB, 20.5dB might cause unexpected restarts.
|
||||
- **fast_connect** (*Optional*, boolean): If enabled, directly connects to WiFi network without doing a full scan
|
||||
first. This is required for hidden networks and can significantly improve connection times. Defaults to ``off``.
|
||||
The downside is that this option connects to the first network the ESP sees, even if that network is very far away and
|
||||
|
@ -82,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:
|
||||
|
||||
|
|
2
conf.py
|
@ -72,7 +72,7 @@ author = 'Otto Winter'
|
|||
# The short X.Y version.
|
||||
version = '1.14'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.14.2'
|
||||
release = '1.14.4'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
@ -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 devices
|
||||
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
|
||||
|
|
|
@ -40,6 +40,7 @@ After validating the sensor is working, we can proceed and add some formulas.
|
|||
return ((id(bme280_temperature).state + 273.15) / 0.0065) *
|
||||
(powf((STANDARD_SEA_LEVEL_PRESSURE / id(bme280_pressure).state), 0.190234) - 1); // in meter
|
||||
update_interval: 15s
|
||||
unit_of_measurement: 'm'
|
||||
- platform: template
|
||||
name: "Absolute Humidity"
|
||||
lambda: |-
|
||||
|
@ -50,6 +51,7 @@ After validating the sensor is working, we can proceed and add some formulas.
|
|||
((273.15 + id(bme280_temperature).state) * r); // in grams/m^3
|
||||
accuracy_decimals: 2
|
||||
update_interval: 15s
|
||||
unit_of_measurement: 'g/m³'
|
||||
|
||||
Altitude and absolute humidity:
|
||||
-------------------------------
|
||||
|
@ -74,7 +76,7 @@ converts the currently measured temperature and relative humidity to absolute hu
|
|||
Equivalent sea level pressure:
|
||||
------------------------------
|
||||
|
||||
Calculating the sea level pressure with a statically mounted sensor can be be used as reference for moving sensors as mentioned in the note above.
|
||||
Calculating the sea level pressure with a statically mounted sensor can be used as reference for moving sensors as mentioned in the note above.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -98,6 +100,7 @@ Calculating the sea level pressure with a statically mounted sensor can be be us
|
|||
return id(bme280_pressure).state / powf(1 - ((0.0065 * STANDARD_ALTITUDE) /
|
||||
(id(bme280_temperature).state + (0.0065 * STANDARD_ALTITUDE) + 273.15)), 5.257); // in hPa
|
||||
update_interval: 15s
|
||||
unit_of_measurement: 'hPa'
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.9 KiB |