mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
commit
aecbe0510c
2
Doxygen
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.16.0b3
|
||||
PROJECT_NUMBER = 1.16.0b4
|
||||
|
||||
# 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
2
Makefile
@ -1,5 +1,5 @@
|
||||
ESPHOME_PATH = ../esphome
|
||||
ESPHOME_REF = v1.16.0b3
|
||||
ESPHOME_REF = v1.16.0b4
|
||||
|
||||
.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.16.0b3
|
||||
1.16.0b4
|
@ -41,7 +41,7 @@ Changelog - Version 1.15.0 - September 13, 2020
|
||||
PID Controller, components/climate/pid, function.svg
|
||||
IR Remote Climate, components/climate/ir_climate, air-conditioner-ir.svg
|
||||
HTTP Request, components/http_request, connection.svg
|
||||
MCP3008 8-Channel 10-Bit A/D Converter, components/mcp3008, mcp3008.png
|
||||
MCP3008 8-Channel 10-Bit A/D Converter, components/mcp3008, mcp3008.jpg
|
||||
SN74HC595 I/O Expander, components/sn74hc595, sn74hc595.jpg
|
||||
TM1651 Battery Display, components/tm1651, tm1651_battery_display.jpg
|
||||
RF Bridge, components/rf_bridge, rf_bridge.jpg
|
||||
|
@ -245,3 +245,16 @@ All changes
|
||||
- docs: Add hint for swapped data and clock pin :docspr:`914` by :ghuser:`DirkHeinke`
|
||||
- docs: Update nextion.rst :docspr:`912` by :ghuser:`wernight`
|
||||
- docs: Update mirabella-genio-bulb.rst to show potential use of GPIO14 instead of GPIO13 for specific monochromatic dimmable globes :docspr:`911` by :ghuser:`imeekle`
|
||||
- esphome: Whirlpool ac :esphomepr:`1467` by :ghuser:`mmanza`
|
||||
- esphome: Bump pytest-mock from 3.3.1 to 3.5.1 :esphomepr:`1458` by :ghuser:`dependabot[bot]`
|
||||
- esphome: Add rc522 i2c :esphomepr:`1432` by :ghuser:`glmnet` (new-integration)
|
||||
- docs: add rc522 i2c config variant :docspr:`933` by :ghuser:`glmnet`
|
||||
- esphome: make time components polling components :esphomepr:`1443` by :ghuser:`badbadc0ffee`
|
||||
- docs: add cli link :docspr:`937` by :ghuser:`glmnet`
|
||||
- esphome: Updated Mcp3008 to support reference_voltage and voltage_sampler::VoltageSampler :esphomepr:`1387` by :ghuser:`SenexCrenshaw` (breaking-change)
|
||||
- docs: Updated Mcp3008 to support reference_voltage and voltage_sampler::VoltageSampler :docspr:`874` by :ghuser:`SenexCrenshaw`
|
||||
- docs: cli.rst add --help :docspr:`939` by :ghuser:`foxsam21`
|
||||
- esphome: Add NDEF reading and writing to PN532 :esphomepr:`1351` by :ghuser:`jesserockz` (new-integration)
|
||||
- docs: Add docs for pn532 NDEF functionality :docspr:`936` by :ghuser:`jesserockz`
|
||||
- esphome: Inkplate 6 support for ESPHome :esphomepr:`1283` by :ghuser:`davidzovko` (new-integration)
|
||||
- docs: Adding Inkplate 6 docs :docspr:`778` by :ghuser:`nitko12`
|
||||
|
@ -77,9 +77,11 @@ if the tag is changed or goes away for one cycle of ``update_interval``.
|
||||
The parameter ``x`` this trigger provides is of type ``std::string`` and is the tag UID in the format
|
||||
``74-10-37-94``. The configuration below will for example publish the tag ID on the MQTT topic ``pn532/tag``.
|
||||
|
||||
See :ref:`pn532-ndef_reading` below for how to use the second ``tag`` parameter that is provided to this trigger.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pn532:
|
||||
pn532_...:
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
@ -92,7 +94,7 @@ using :ref:`api-homeassistant_tag_scanned_action`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pn532:
|
||||
pn532_...:
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
@ -103,7 +105,7 @@ Alternatively you could also send the value directly to Home Assistant via a
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pn532:
|
||||
pn532_...:
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
@ -167,10 +169,82 @@ When your code is running and you approach the PN532 with an NFC Tag, you should
|
||||
Then copy this id and create a ``binary_sensor`` entry as in the configuration example. Repeat this process for
|
||||
each tag.
|
||||
|
||||
.. _pn532-ndef:
|
||||
|
||||
NDEF
|
||||
====
|
||||
|
||||
The PN532 supports reading and writing NDEF formatted data into the cards.
|
||||
|
||||
.. _pn532-ndef_reading:
|
||||
|
||||
NDEF reading
|
||||
------------
|
||||
|
||||
The following example will read an NFC tag that has been formatted and written using the Home Assistant Companion
|
||||
App and send it to Home Assistant using the :ref:`api-homeassistant_tag_scanned_action`. The ``tag`` variable is
|
||||
supplied to the ``on_tag`` trigger and any actions that run and can be used as below.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pn532_...:
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
- homeassistant.tag_scanned: !lambda |
|
||||
if (!tag.has_ndef_message()) {
|
||||
return x;
|
||||
}
|
||||
auto message = tag.get_ndef_message();
|
||||
auto records = message->get_records();
|
||||
for (auto &record : records) {
|
||||
std::string payload = record->get_payload();
|
||||
size_t pos = payload.find("https://www.home-assistant.io/tag/");
|
||||
if (pos != std::string::npos) {
|
||||
return payload.substr(pos + 34);
|
||||
}
|
||||
}
|
||||
return x;
|
||||
|
||||
.. _pn532-ndef_writing:
|
||||
|
||||
NDEF Writing
|
||||
------------
|
||||
|
||||
The following example can be used to write a (pseudo) random UUID to the tag in the same format as the
|
||||
Home Assistant Companion App does.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char alphanum[] = "0123456789abcdef";
|
||||
std::string uri = "https://www.home-assistant.io/tag/";
|
||||
for (int i = 0; i < 8; i++)
|
||||
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
|
||||
uri += "-";
|
||||
for (int j = 0; j < 3; j++) {
|
||||
for (int i = 0; i < 4; i++)
|
||||
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
|
||||
uri += "-";
|
||||
}
|
||||
for (int i = 0; i < 12; i++)
|
||||
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
|
||||
auto message = new nfc::NdefMessage();
|
||||
message->add_uri_record(uri);
|
||||
ESP_LOGD("ndef", "Writing payload: %s", uri.c_str());
|
||||
id(pn532_board).write_mode(message);
|
||||
- wait_until:
|
||||
not:
|
||||
pn532.is_writing:
|
||||
- logger.log: "Finished writing tag"
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`index`
|
||||
- :doc:`rdm6300`
|
||||
- :doc:`rc522`
|
||||
- :apiref:`pn532/pn532.h`
|
||||
- :ghedit:`Edit`
|
||||
|
@ -13,8 +13,8 @@ Component/Hub
|
||||
|
||||
The ``rc522`` component allows you to use RC522 RFID controllers
|
||||
(`datasheet <hthttps://www.nxp.com/docs/en/data-sheet/MFRC522.pdff>`__, `Ali Express <https://es.aliexpress.com/item/1260729519.html>`__)
|
||||
with ESPHome. This component is a global hub that establishes the connection to the RC522 via :ref:`SPI <spi>` and
|
||||
outputs its data. Using the :ref:`RC522 binary sensors <rc522-tag>` you can then
|
||||
with ESPHome. This component is a global hub that establishes the connection to the RC522 via either :ref:`SPI <spi>` or
|
||||
:ref:`I²C <i2c>` and outputs its data. Using the :ref:`RC522 binary sensors <rc522-tag>` you can then
|
||||
create individual binary sensors that track if an RFID tag is currently detected by the RC522.
|
||||
|
||||
.. figure:: images/rc522-full.jpg
|
||||
@ -23,20 +23,37 @@ create individual binary sensors that track if an RFID tag is currently detected
|
||||
|
||||
See :ref:`rc522-setting_up_tags` for information on how to setup individual binary sensors for this component.
|
||||
|
||||
As the communication with the RC522 is done using SPI you need to have an :ref:`SPI bus <spi>` in your configuration with both
|
||||
the **miso_pin** and **mosi_pin** set.
|
||||
The RC522 supports SPI, I²C and UART communication protocols, ESPHome can use either SPI or I²C.
|
||||
|
||||
* If you have a module like the image above, it can only be used in SPI mode (`unless hacked <https://forum.arduino.cc/index.php?topic=442750.0>`__)
|
||||
and you need to have an :ref:`SPI bus <spi>` in your configuration with both the **miso_pin** and **mosi_pin** set.
|
||||
|
||||
* If you have a RC522 which communicates via I²C like in the M5 Stack then you need to have an :ref:`I²C <i2c>` bus configured.
|
||||
|
||||
SPI Option
|
||||
**********
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
spi:
|
||||
clk_pin: D0
|
||||
miso_pin: D1
|
||||
mosi_pin: D2
|
||||
|
||||
rc522_spi:
|
||||
cs_pin: D3
|
||||
update_interval: 1s
|
||||
cs_pin: GPIO15
|
||||
|
||||
binary_sensor:
|
||||
- platform: rc522
|
||||
uid: 74-10-37-94
|
||||
name: "RC522 RFID Tag"
|
||||
|
||||
I²C Option
|
||||
**********
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
i2c:
|
||||
|
||||
rc522_i2c:
|
||||
cs_pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
- platform: rc522
|
||||
@ -46,18 +63,31 @@ the **miso_pin** and **mosi_pin** set.
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
|
||||
is connected to.
|
||||
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin connected to the RST line. Some tests
|
||||
shows the RC522 working okay without this.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The duration of each scan on the RC522. This affects the
|
||||
duration that the individual binary sensors stay active when they're found.
|
||||
If a device is not found within this time window, it will be marked as not present. Defaults to 1s.
|
||||
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform
|
||||
when a tag is read. See :ref:`rc522-on_tag`.
|
||||
If a device is not found within this time window, it will be marked as not present. Defaults to ``1s``.
|
||||
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a tag is read. See
|
||||
:ref:`rc522-on_tag`.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.
|
||||
|
||||
SPI Only:
|
||||
^^^^^^^^^
|
||||
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
|
||||
is connected to.
|
||||
- **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 for this component.
|
||||
|
||||
|
||||
I²C Only:
|
||||
^^^^^^^^^
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x28``.
|
||||
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component <i2c>` if you want
|
||||
to use multiple I²C buses.
|
||||
|
||||
|
||||
.. _rc522-on_tag:
|
||||
|
||||
@ -73,7 +103,7 @@ The parameter ``x`` this trigger provides is of type ``std::string`` and is the
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
rc522:
|
||||
rc522_spi: # or rc522_i2c
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
@ -86,7 +116,7 @@ using :ref:`api-homeassistant_tag_scanned_action`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
rc522:
|
||||
rc522_spi: # or rc522_i2c
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
@ -108,7 +138,7 @@ unique id (``uid``) is currently being detected by the RC522 or not.
|
||||
miso_pin: D1
|
||||
mosi_pin: D2
|
||||
|
||||
rc522_spi:
|
||||
rc522_spi: # or rc522_i2c
|
||||
cs_pin: D3
|
||||
update_interval: 1s
|
||||
|
||||
@ -149,5 +179,5 @@ See Also
|
||||
- :doc:`index`
|
||||
- :doc:`rdm6300`
|
||||
- :doc:`pn532`
|
||||
- :apiref:`rc522_spi/rc522_spi.h`
|
||||
- :apiref:`rc522/rc522.h`
|
||||
- :ghedit:`Edit`
|
||||
|
277
components/display/Inkplate.rst
Normal file
277
components/display/Inkplate.rst
Normal file
@ -0,0 +1,277 @@
|
||||
Inkplate 6
|
||||
==========
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up Inkplate E-Paper displays in ESPHome.
|
||||
:image: Inkplate.jpg
|
||||
|
||||
All-in-one e-paper display ``Inkplate 6``
|
||||
Inkplate 6 is a powerful, Wi-Fi enabled ESP32 based six-inch e-paper display – recycled from a Kindle e-reader. Its main feature is simplicity.
|
||||
Learn more at `Inkplate's website <https://inkplate.io/>`__
|
||||
|
||||
.. figure:: images/Inkplate.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
Inkplate 6
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example minimal configuration entry
|
||||
|
||||
mcp23017:
|
||||
- id: mcp23017_hub
|
||||
address: 0x20
|
||||
|
||||
display:
|
||||
- platform: inkplate
|
||||
id: inkplate_display
|
||||
greyscale: false
|
||||
partial_updating: false
|
||||
update_interval: 60s
|
||||
|
||||
ckv_pin: 32
|
||||
sph_pin: 33
|
||||
gmod_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 1
|
||||
gpio0_enable_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 8
|
||||
oe_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 0
|
||||
spv_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 2
|
||||
powerup_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 4
|
||||
wakeup_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 3
|
||||
vcom_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 5
|
||||
|
||||
.. warning::
|
||||
|
||||
When using the Inkplate epaper module, the GPIO pin numbers above *cannot be changed* as they are
|
||||
hardwired within the module/PCB.
|
||||
|
||||
.. warning::
|
||||
|
||||
Inkplate module cannot perform partial update if 3 bit mode is on.
|
||||
It just ignores the function call in that case.
|
||||
|
||||
|
||||
Configuration variables
|
||||
***********************
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **greyscale** (*Optional*, boolean): Makes the screen display 3 bit colors. Defaults to ``False``
|
||||
- **partial_updating** (*Optional*, boolean): Makes the screen update partially, which is faster, but leaves burnin. Defaults to ``False``
|
||||
- **full_update_every** (*Optional*, int): When partial updating is enabled, forces a full screen update after chosen number of updates. Defaults to ``10``
|
||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
||||
See :ref:`display-engine` for more information.
|
||||
- **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`.
|
||||
|
||||
- **ckv_pin** (**Required**, :ref:`config-pin`): The CKV pin for the Inkplate display.
|
||||
- **gmod_pin** (**Required**, :ref:`config-pin`): The GMOD pin for the Inkplate display.
|
||||
- **gpio0_enable_pin** (**Required**, :ref:`config-pin`): The GPIO0 Enable pin for the Inkplate display.
|
||||
- **oe_pin** (**Required**, :ref:`config-pin`): The OE pin for the Inkplate display.
|
||||
- **powerup_pin** (**Required**, :ref:`config-pin`): The Powerup pin for the Inkplate display.
|
||||
- **sph_pin** (**Required**, :ref:`config-pin`): The SPH pin for the Inkplate display.
|
||||
- **spv_pin** (**Required**, :ref:`config-pin`): The SPV pin for the Inkplate display.
|
||||
- **vcom_pin** (**Required**, :ref:`config-pin`): The VCOM pin for the Inkplate display.
|
||||
- **cl_pin** (*Optional*, :ref:`config-pin`): The CL pin for the Inkplate display.
|
||||
Defaults to GPIO0.
|
||||
- **le_pin** (*Optional*, :ref:`config-pin`): The LE pin for the Inkplate display.
|
||||
Defaults to GPIO2.
|
||||
|
||||
- **display_data_0_pin** (*Optional*, :ref:`config-pin`): The Data 0 pin for the Inkplate display.
|
||||
Defaults to GPIO4.
|
||||
- **display_data_1_pin** (*Optional*, :ref:`config-pin`): The Data 1 pin for the Inkplate display.
|
||||
Defaults to GPIO5.
|
||||
- **display_data_2_pin** (*Optional*, :ref:`config-pin`): The Data 2 pin for the Inkplate display.
|
||||
Defaults to GPIO18.
|
||||
- **display_data_3_pin** (*Optional*, :ref:`config-pin`): The Data 3 pin for the Inkplate display.
|
||||
Defaults to GPIO19.
|
||||
- **display_data_4_pin** (*Optional*, :ref:`config-pin`): The Data 4 pin for the Inkplate display.
|
||||
Defaults to GPIO23.
|
||||
- **display_data_5_pin** (*Optional*, :ref:`config-pin`): The Data 5 pin for the Inkplate display.
|
||||
Defaults to GPIO25.
|
||||
- **display_data_6_pin** (*Optional*, :ref:`config-pin`): The Data 6 pin for the Inkplate display.
|
||||
Defaults to GPIO26.
|
||||
- **display_data_7_pin** (*Optional*, :ref:`config-pin`): The Data 7 pin for the Inkplate display.
|
||||
Defaults to GPIO27.
|
||||
|
||||
|
||||
Complete example
|
||||
****************
|
||||
|
||||
The following is a complete example YAML configuration that does a few things beyond the usual
|
||||
Wi-Fi, API, and OTA configuration.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: inkplate
|
||||
platform: ESP32
|
||||
board: esp-wrover-kit
|
||||
|
||||
logger:
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR WIFI SSID>
|
||||
password: <YOUR WIFI PASSWORD>
|
||||
ap:
|
||||
ssid: Inkplate-AP
|
||||
password: '12345678'
|
||||
|
||||
captive_portal:
|
||||
|
||||
ota:
|
||||
|
||||
api:
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: "Inkplate Reboot"
|
||||
id: reboot
|
||||
|
||||
- platform: gpio
|
||||
id: battery_read_mosfet
|
||||
pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 9
|
||||
inverted: true
|
||||
|
||||
- platform: template
|
||||
name: "Inkplate Greyscale mode"
|
||||
lambda: return id(inkplate_display).get_greyscale();
|
||||
turn_on_action:
|
||||
- lambda: id(inkplate_display).set_greyscale(true);
|
||||
turn_off_action:
|
||||
- lambda: id(inkplate_display).set_greyscale(false);
|
||||
|
||||
- platform: template
|
||||
name: "Inkplate Partial Updating"
|
||||
lambda: return id(inkplate_display).get_partial_updating();
|
||||
turn_on_action:
|
||||
- lambda: id(inkplate_display).set_partial_updating(true);
|
||||
turn_off_action:
|
||||
- lambda: id(inkplate_display).set_partial_updating(false);
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: battery_voltage
|
||||
update_interval: never
|
||||
attenuation: 11db
|
||||
pin: 35
|
||||
- platform: template
|
||||
name: "Inkplate Battery Voltage"
|
||||
lambda: |-
|
||||
id(battery_read_mosfet).turn_on();
|
||||
delay(1);
|
||||
float adc = id(battery_voltage).sample();
|
||||
id(battery_read_mosfet).turn_off();
|
||||
return adc;
|
||||
filters:
|
||||
- multiply: 2
|
||||
|
||||
i2c:
|
||||
|
||||
mcp23017:
|
||||
- id: mcp23017_hub
|
||||
address: 0x20
|
||||
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: "Inkplate Status"
|
||||
id: system_status
|
||||
|
||||
- platform: gpio
|
||||
name: "Inkplate Touch Pad 1"
|
||||
pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 10
|
||||
- platform: gpio
|
||||
name: "Inkplate Touch Pad 2"
|
||||
pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 11
|
||||
- platform: gpio
|
||||
name: "Inkplate Touch Pad 3"
|
||||
pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 12
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
id: esptime
|
||||
|
||||
font:
|
||||
- file: "Helvetica.ttf"
|
||||
id: helvetica_96
|
||||
size: 96
|
||||
- file: "Helvetica.ttf"
|
||||
id: helvetica_48
|
||||
size: 48
|
||||
|
||||
|
||||
display:
|
||||
- platform: inkplate
|
||||
id: inkplate_display
|
||||
greyscale: false
|
||||
partial_updating: false
|
||||
update_interval: 60s
|
||||
|
||||
ckv_pin: 32
|
||||
sph_pin: 33
|
||||
gmod_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 1
|
||||
gpio0_enable_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 8
|
||||
oe_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 0
|
||||
spv_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 2
|
||||
powerup_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 4
|
||||
wakeup_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 3
|
||||
vcom_pin:
|
||||
mcp23017: mcp23017_hub
|
||||
number: 5
|
||||
|
||||
lambda: |-
|
||||
it.fill(COLOR_ON);
|
||||
|
||||
it.print(100, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_LEFT, "ESPHome");
|
||||
|
||||
it.strftime(400, 300, id(helvetica_48), COLOR_OFF, TextAlign::CENTER, "%Y-%m-%d", id(esptime).now());
|
||||
it.strftime(400, 400, id(helvetica_96), COLOR_OFF, TextAlign::CENTER, "%H:%M", id(esptime).now());
|
||||
|
||||
if (id(system_status).state) {
|
||||
it.print(700, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_RIGHT, "Online");
|
||||
} else {
|
||||
it.print(700, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_RIGHT, "Offline");
|
||||
}
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`index`
|
||||
- `Arduino Inkplate 6 library <https://github.com/e-radionicacom/Inkplate-6-Arduino-library>`__ by `E-radionica.com <https://e-radionica.com/>`__
|
||||
- :ghedit:`Edit`
|
BIN
components/display/images/Inkplate.jpg
Normal file
BIN
components/display/images/Inkplate.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
components/sensor/images/mcp3008.jpg
Normal file
BIN
components/sensor/images/mcp3008.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -3,20 +3,17 @@ MCP3008 I/O Expander
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up MCP3008 10 Bit Analog to Digital Converter in ESPHome.
|
||||
:image: mcp3008.png
|
||||
|
||||
.. 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.
|
||||
- Formal documentation of the mcp3008 sensor entry (parent, update_interval, number, etc.)
|
||||
- See Dallas sensor for reference model
|
||||
:keywords: MCP3008
|
||||
:image: images/mcp3008.jpg
|
||||
|
||||
The Microchip Technology Inc. MCP3008
|
||||
devices are successive approximation 10-bit Analogto-Digital (A/D) converters with on-board sample and
|
||||
hold circuitry. Each pin will respond with a 0-1023 result depending on the voltage it is reading
|
||||
hold circuitry.
|
||||
|
||||
.. figure:: images/mcp3008.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
|
||||
MCP3008
|
||||
-------
|
||||
@ -29,6 +26,14 @@ It uses the :ref:`SPI Bus <spi>` for communication.
|
||||
Once configured, you can use any of the 8 pins as
|
||||
sensors for your projects.
|
||||
|
||||
Each pin will respond with a voltage calculated off of the reference_voltage (default is 3.3v).
|
||||
It calculates the voltage by multplying the reference_voltage * value on the pin (basically the percentage of VREF)
|
||||
|
||||
Most configurations will set the reference_voltage = VREF (pin 13 on the chip)
|
||||
|
||||
If you want just the scaled value you can use the read_data function
|
||||
``float MCP3008::read_data(uint8_t pin)``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
@ -41,10 +46,10 @@ sensors for your projects.
|
||||
# See `resistance` and `ntc` platorms for other options
|
||||
sensor:
|
||||
- platform: mcp3008 # Attached to pin 0 of the MCP3008.
|
||||
# The result will be a reading from 0-1023
|
||||
reference_voltage: 3.19
|
||||
update_interval: 1s
|
||||
id: freezer_temp_source
|
||||
number: 0 # pin number
|
||||
number: 0 # MCP3008 pin number
|
||||
- platform: resistance
|
||||
id: freezer_resistance_sensor
|
||||
sensor: freezer_temp_source
|
||||
@ -61,14 +66,21 @@ sensors for your projects.
|
||||
|
||||
Configuration variables:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
MCP3008 Component
|
||||
*****************
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP3008 component.
|
||||
- **cs_pin** (**Required**, int): The SPI cable select pin to use
|
||||
|
||||
MCP3008 Sensor Component
|
||||
************************
|
||||
- **id** (**Required**, :ref:`config-id`): The id of the parent MCP3008 component.
|
||||
- **number** (**Required**, int): The pin number of the MCP3008
|
||||
- **reference_voltage** (*Optional*, float): The reference voltage. Defaults to ``3.3V``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``1s``.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :ref:`spi`
|
||||
- :apiref:`mcp3008/mcp3008.h`
|
||||
- :ghedit:`Edit`
|
||||
|
2
conf.py
2
conf.py
@ -72,7 +72,7 @@ author = 'Otto Winter'
|
||||
# The short X.Y version.
|
||||
version = '1.16'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.16.0b3'
|
||||
release = '1.16.0b4'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -20,7 +20,18 @@ ESPHome's command line interface always has the following format
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
esphome livingroom.yaml kitchen.yaml run
|
||||
esphome livingroom.yaml kitchen.yaml run
|
||||
|
||||
``--help`` Option
|
||||
--------------------
|
||||
|
||||
.. option:: -h|--help
|
||||
|
||||
Output possible <commands> and [arguments].
|
||||
Note: you can also use ``--help`` for any command to get arguments specific to that command.
|
||||
.. code-block:: console
|
||||
|
||||
esphome <some_command> --help
|
||||
|
||||
``--verbose`` Option
|
||||
--------------------
|
||||
@ -208,4 +219,3 @@ through a graphical user interface.
|
||||
If set, opens the dashboard UI in a browser once the server is up and running.
|
||||
|
||||
|
||||
|
||||
|
@ -187,6 +187,7 @@ After that, you will be able to access the dashboard through ``localhost:6052``.
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`cli`
|
||||
- :doc:`ESPHome index </index>`
|
||||
- :doc:`getting_started_hassio`
|
||||
- :ghedit:`Edit`
|
||||
|
@ -140,7 +140,7 @@ Contributors
|
||||
- `Achilleas Pipinellis (@axilleas) <https://github.com/axilleas>`__ - 1 contribution
|
||||
- `Kamil Trzciński (@ayufan) <https://github.com/ayufan>`__ - 7 contributions
|
||||
- `Nicholas Peters (@Azimath) <https://github.com/Azimath>`__ - 2 contributions
|
||||
- `Florian Mösch (@badbadc0ffee) <https://github.com/badbadc0ffee>`__ - 5 contributions
|
||||
- `Florian Mösch (@badbadc0ffee) <https://github.com/badbadc0ffee>`__ - 6 contributions
|
||||
- `balk77 (@balk77) <https://github.com/balk77>`__ - 2 contributions
|
||||
- `Paulus Schoutsen (@balloob) <https://github.com/balloob>`__ - 41 contributions
|
||||
- `Andrew Zaborowski (@balrog-kun) <https://github.com/balrog-kun>`__ - 7 contributions
|
||||
@ -186,12 +186,13 @@ Contributors
|
||||
- `Dave Wongillies (@davewongillies) <https://github.com/davewongillies>`__ - 1 contribution
|
||||
- `David De Sloovere (@DavidDeSloovere) <https://github.com/DavidDeSloovere>`__ - 3 contributions
|
||||
- `David Beitey (@davidjb) <https://github.com/davidjb>`__ - 1 contribution
|
||||
- `David Zovko (@davidzovko) <https://github.com/davidzovko>`__ - 1 contribution
|
||||
- `Debashish Sahu (@debsahu) <https://github.com/debsahu>`__ - 1 contribution
|
||||
- `declanshanaghy (@declanshanaghy) <https://github.com/declanshanaghy>`__ - 3 contributions
|
||||
- `deftdawg (@deftdawg) <https://github.com/deftdawg>`__ - 1 contribution
|
||||
- `Rsan (@deltazerorsan) <https://github.com/deltazerorsan>`__ - 1 contribution
|
||||
- `Mickaël Le Baillif (@demikl) <https://github.com/demikl>`__ - 2 contributions
|
||||
- `dependabot[bot] (@dependabot[bot]) <https://github.com/dependabot[bot]>`__ - 41 contributions
|
||||
- `dependabot[bot] (@dependabot[bot]) <https://github.com/dependabot[bot]>`__ - 43 contributions
|
||||
- `Destix (@Destix) <https://github.com/Destix>`__ - 1 contribution
|
||||
- `Alain Turbide (@Dilbert66) <https://github.com/Dilbert66>`__ - 2 contributions
|
||||
- `Mark (@Diramu) <https://github.com/Diramu>`__ - 1 contribution
|
||||
@ -229,12 +230,13 @@ Contributors
|
||||
- `Eric Hiller (@erichiller) <https://github.com/erichiller>`__ - 1 contribution
|
||||
- `Ernst Klamer (@Ernst79) <https://github.com/Ernst79>`__ - 1 contribution
|
||||
- `escoand (@escoand) <https://github.com/escoand>`__ - 7 contributions
|
||||
- `esphomebot (@esphomebot) <https://github.com/esphomebot>`__ - 7 contributions
|
||||
- `esphomebot (@esphomebot) <https://github.com/esphomebot>`__ - 8 contributions
|
||||
- `Evan Coleman (@evandcoleman) <https://github.com/evandcoleman>`__ - 3 contributions
|
||||
- `Malte Franken (@exxamalte) <https://github.com/exxamalte>`__ - 2 contributions
|
||||
- `Fabian Affolter (@fabaff) <https://github.com/fabaff>`__ - 28 contributions
|
||||
- `C W (@fake-name) <https://github.com/fake-name>`__ - 2 contributions
|
||||
- `Christian Ferbar (@ferbar) <https://github.com/ferbar>`__ - 2 contributions
|
||||
- `foxsam21 (@foxsam21) <https://github.com/foxsam21>`__ - 1 contribution
|
||||
- `Fractal147 (@Fractal147) <https://github.com/Fractal147>`__ - 1 contribution
|
||||
- `Francis-labo (@Francis-labo) <https://github.com/Francis-labo>`__ - 1 contribution
|
||||
- `Francisk0 (@Francisk0) <https://github.com/Francisk0>`__ - 1 contribution
|
||||
@ -252,7 +254,7 @@ Contributors
|
||||
- `Giovanni (@Gio-dot) <https://github.com/Gio-dot>`__ - 2 contributions
|
||||
- `gitolicious (@gitolicious) <https://github.com/gitolicious>`__ - 16 contributions
|
||||
- `The Gitter Badger (@gitter-badger) <https://github.com/gitter-badger>`__ - 1 contribution
|
||||
- `Guillermo Ruffino (@glmnet) <https://github.com/glmnet>`__ - 185 contributions
|
||||
- `Guillermo Ruffino (@glmnet) <https://github.com/glmnet>`__ - 187 contributions
|
||||
- `Giorgos Logiotatidis (@glogiotatidis) <https://github.com/glogiotatidis>`__ - 1 contribution
|
||||
- `Germain Masse (@gmasse) <https://github.com/gmasse>`__ - 2 contributions
|
||||
- `Jelle Raaijmakers (@GMTA) <https://github.com/GMTA>`__ - 1 contribution
|
||||
@ -286,7 +288,7 @@ Contributors
|
||||
- `Joshua Dadswell (@jdads1) <https://github.com/jdads1>`__ - 1 contribution
|
||||
- `jeff-h (@jeff-h) <https://github.com/jeff-h>`__ - 2 contributions
|
||||
- `Jeff Rescignano (@JeffResc) <https://github.com/JeffResc>`__ - 11 contributions
|
||||
- `Jesse Hills (@jesserockz) <https://github.com/jesserockz>`__ - 52 contributions
|
||||
- `Jesse Hills (@jesserockz) <https://github.com/jesserockz>`__ - 53 contributions
|
||||
- `Jonathan Jefferies (@jjok) <https://github.com/jjok>`__ - 1 contribution
|
||||
- `Jeppe Ladefoged (@jladefoged) <https://github.com/jladefoged>`__ - 2 contributions
|
||||
- `Jonathan Martens (@jmartens) <https://github.com/jmartens>`__ - 1 contribution
|
||||
@ -365,6 +367,7 @@ Contributors
|
||||
- `Maarten (@mjkl-gh) <https://github.com/mjkl-gh>`__ - 1 contribution
|
||||
- `mjoshd (@mjoshd) <https://github.com/mjoshd>`__ - 2 contributions
|
||||
- `mknjc (@mknjc) <https://github.com/mknjc>`__ - 2 contributions
|
||||
- `mmanza (@mmanza) <https://github.com/mmanza>`__ - 1 contribution
|
||||
- `mnaz (@mnaz) <https://github.com/mnaz>`__ - 1 contribution
|
||||
- `Michael Nieß (@mniess) <https://github.com/mniess>`__ - 1 contribution
|
||||
- `Matt N. (@mnoorenberghe) <https://github.com/mnoorenberghe>`__ - 1 contribution
|
||||
@ -450,7 +453,7 @@ Contributors
|
||||
- `Nils Schulte (@Schnilz) <https://github.com/Schnilz>`__ - 1 contribution
|
||||
- `Ville Skyttä (@scop) <https://github.com/scop>`__ - 5 contributions
|
||||
- `sekkr1 (@sekkr1) <https://github.com/sekkr1>`__ - 1 contribution
|
||||
- `SenexCrenshaw (@SenexCrenshaw) <https://github.com/SenexCrenshaw>`__ - 6 contributions
|
||||
- `SenexCrenshaw (@SenexCrenshaw) <https://github.com/SenexCrenshaw>`__ - 7 contributions
|
||||
- `Sergio (@sergio303) <https://github.com/sergio303>`__ - 2 contributions
|
||||
- `Sergio Mayoral Martínez (@sermayoral) <https://github.com/sermayoral>`__ - 2 contributions
|
||||
- `sethcohn (@sethcohn) <https://github.com/sethcohn>`__ - 1 contribution
|
||||
@ -535,4 +538,4 @@ Contributors
|
||||
- `ZabojnikM (@ZabojnikM) <https://github.com/ZabojnikM>`__ - 1 contribution
|
||||
- `San (@zhujunsan) <https://github.com/zhujunsan>`__ - 1 contribution
|
||||
|
||||
*This page was last updated January 12, 2021.*
|
||||
*This page was last updated January 17, 2021.*
|
||||
|
BIN
images/Inkplate.jpg
Normal file
BIN
images/Inkplate.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
images/mcp3008.jpg
Normal file
BIN
images/mcp3008.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 70 KiB |
@ -133,6 +133,7 @@ Sensor Components
|
||||
MAX31856, components/sensor/max31856, max31856.jpg
|
||||
MAX31865, components/sensor/max31865, max31865.jpg
|
||||
MAX6675, components/sensor/max6675, max6675.jpg
|
||||
MCP3008, components/sensor/mcp3008, mcp3008.jpg
|
||||
MCP9808, components/sensor/mcp9808, mcp9808.jpg
|
||||
MH-Z19, components/sensor/mhz19, mhz19.jpg
|
||||
MPU6050, components/sensor/mpu6050, mpu6050.jpg
|
||||
@ -290,6 +291,7 @@ Display Components
|
||||
ST7789V, components/display/st7789v, st7789v.jpg
|
||||
ILI9341, components/display/ili9341, ili9341.jpg
|
||||
Waveshare E-Paper, components/display/waveshare_epaper, waveshare_epaper.jpg
|
||||
Inkplate 6, components/display/Inkplate, Inkplate.jpg
|
||||
PCD8544 (Nokia 5110/ 3310), components/display/pcd8544, pcd8544.jpg
|
||||
|
||||
Cover Components
|
||||
@ -356,7 +358,6 @@ Misc Components
|
||||
PCF8574 I/O Expander, components/pcf8574, pcf8574.jpg
|
||||
MCP230XX I/O Expander - I²C Bus, components/mcp230xx, mcp230xx.svg
|
||||
MCP23SXX I/O Expander - SPI Bus, components/mcp23Sxx, mcp230xx.svg
|
||||
MCP3008 8-Channel 10-Bit A/D Converter, components/mcp3008, mcp3008.png
|
||||
SX1509 I/O Expander, components/sx1509, sx1509.jpg
|
||||
SN74HC595 I/O Expander, components/sn74hc595, sn74hc595.jpg
|
||||
SIM800L, components/sim800l, sim800l.jpg
|
||||
|
Loading…
Reference in New Issue
Block a user