From f98f7071bb9709211548b9bea39dd6e9aa7333a0 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:51:15 +1300 Subject: [PATCH 01/21] Add notes for ADC on RP2040 (#2446) --- components/sensor/adc.rst | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/components/sensor/adc.rst b/components/sensor/adc.rst index 21fa50d61..a8c03e99c 100644 --- a/components/sensor/adc.rst +++ b/components/sensor/adc.rst @@ -6,9 +6,12 @@ Analog To Digital Sensor :image: flash.svg The Analog To Digital (``adc``) Sensor allows you to use the built-in -ADC in your device to measure a voltage on certain pins. On the ESP8266 -only pin A0 (GPIO17) supports this. On the ESP32 pins GPIO32 through -GPIO39 can be used. +ADC in your device to measure a voltage on certain pins. + +- ESP8266: Only pin A0 (GPIO17) can be used. +- ESP32: GPIO32 through GPIO39 can be used. +- RP2040: GPIO26 through GPIO29 can be used. + .. figure:: images/adc-ui.png :align: center @@ -105,7 +108,7 @@ To measure the VCC voltage, set ``pin:`` to ``VCC`` and make sure nothing is con .. note:: To avoid confusion: It measures the voltage at the chip, and not at the VCC pin of the board. It should usually be around 3.3V. - + .. code-block:: yaml sensor: @@ -113,6 +116,22 @@ To measure the VCC voltage, set ``pin:`` to ``VCC`` and make sure nothing is con pin: VCC name: "VCC Voltage" +RP2040 Internal Core Temperature +-------------------------------- + +The RP2040 has an internal temperature sensor that can be used to measure the core temperature. This sensor is not available on the GPIO pins, but is available on the internal ADC. +The below code is how you can access the temperature and expose as a sensor. The filter values are taken from the RP2040 datasheet to calculate Voltage to Celcius. + +.. code-block:: yaml + + sensor: + - platform: adc + pin: TEMPERATURE + name: "Core Temperature" + unit_of_measurement: "°C" + filters: + - lambda: return 27 - (x - 0.706f) / 0.001721f; + Multiple ADC Sensors --------------------- From e070afa117103a3df471820675f0d7e2a9684de5 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:52:18 +1300 Subject: [PATCH 02/21] Bump version to 2022.11.1 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index b10530a68..fe95949b2 100644 --- a/Doxygen +++ b/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 = 2022.11.0 +PROJECT_NUMBER = 2022.11.1 # 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 diff --git a/Makefile b/Makefile index 6c1677a50..da05b2951 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2022.11.0 +ESPHOME_REF = 2022.11.1 .PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify diff --git a/_static/version b/_static/version index 4d4bb863c..8512b9247 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.11.0 \ No newline at end of file +2022.11.1 \ No newline at end of file diff --git a/conf.py b/conf.py index ab3a32ef8..4138c96e5 100644 --- a/conf.py +++ b/conf.py @@ -69,7 +69,7 @@ author = "ESPHome" # The short X.Y version. version = "2022.11" # The full version, including alpha/beta/rc tags. -release = "2022.11.0" +release = "2022.11.1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 797cabcfd187341317fc376ced8851ac17b3e5d2 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:52:40 +1300 Subject: [PATCH 03/21] Update changelog for 2022.11.1 --- changelog/2022.11.0.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog/2022.11.0.rst b/changelog/2022.11.0.rst index 219fbcfe0..945d2e60b 100644 --- a/changelog/2022.11.0.rst +++ b/changelog/2022.11.0.rst @@ -93,6 +93,10 @@ By default ESPHome tries to compile using all of the processor cores, and this a ... compile_process_limit: 1 +Release 2022.11.1 - November 17 +------------------------------- + +- Support ADC on RP2040 :esphomepr:`4040` by :ghuser:`jesserockz` Full list of changes -------------------- From 6b22309584182503234683dfac530e888315720d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:53:17 +1300 Subject: [PATCH 04/21] Update supporters for 2022.11.1 --- guides/supporters.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index 1e0a5094b..5fe228a0e 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -237,11 +237,9 @@ Contributors - `Dirk Heinke (@DirkHeinke) `__ - `Dirk Jahnke (@dirkj) `__ - `Johann V. (@divinitas) `__ -- `djwlindenaar (@djwlindenaar) `__ - `Marcos Pérez Ferro (@djwmarcx) `__ - `Dan Mannock (@dmannock) `__ - `Dmitriy Lopatko (@dmitriy5181) `__ -- `dmkif (@dmkif) `__ - `Farzad E. (@dnetguru) `__ - `DrZoid (@docteurzoidberg) `__ - `Dominik (@DomiStyle) `__ @@ -449,6 +447,7 @@ Contributors - `Johan van der Kuijl (@johanvanderkuijl) `__ - `Johboh (@Johboh) `__ - `John Erik Halse (@johnerikhalse) `__ +- `John Moxley (@johnmoxley) `__ - `JonasEr (@JonasEr) `__ - `Jonathan Adams (@jonathanadams) `__ - `Jonathan Treffler (@JonathanTreffler) `__ @@ -553,6 +552,7 @@ Contributors - `Ben Marengo (@marengaz) `__ - `Marvin Gaube (@margau) `__ - `Martynas Griškonis (@Margriko) `__ +- `maringeph (@maringeph) `__ - `Mario (@mario-tux) `__ - `Marek Marczykowski-Górecki (@marmarek) `__ - `Matthew Harrold (@marrold) `__ @@ -630,7 +630,6 @@ Contributors - `Nazar Mokrynskyi (@nazar-pc) `__ - `Bergont Nicolas (@nbergont) `__ - `NMC (@ncareau) `__ -- `Nebula (@nebula-it) `__ - `NeoAcheron (@NeoAcheron) `__ - `Mike Meessen (@netmikey) `__ - `Nick B. (@NickB1) `__ @@ -801,7 +800,6 @@ Contributors - `Ryan Hoffman (@tekmaven) `__ - `testbughub (@testbughub) `__ - `Greg Lincoln (@tetious) `__ -- `Nejc (@thedexboy) `__ - `Thomas Eckerstorfer (@TheEggi) `__ - `Theexternaldisk (@Theexternaldisk) `__ - `TheGroundZero (@TheGroundZero) `__ From 725a05229df7c221c3db658b3a346b370ff36854 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:36:15 +1300 Subject: [PATCH 05/21] Update datasheet link on scd4x (#2449) --- components/sensor/scd4x.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sensor/scd4x.rst b/components/sensor/scd4x.rst index 99955c423..04796d3d3 100644 --- a/components/sensor/scd4x.rst +++ b/components/sensor/scd4x.rst @@ -6,7 +6,7 @@ SCD4X CO₂, Temperature and Relative Humidity Sensor :image: scd4x.jpg The ``scd4x`` sensor platform allows you to use your Sensirion SCD4X CO₂ -(`datasheet `__) sensors with ESPHome. +(`datasheet `__) sensors with ESPHome. The :ref:`I²C Bus ` is required to be set up in your configuration for this sensor to work. .. figure:: images/scd4x.jpg From 86cdde13220200e60921fb956250eeb77706f2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:12:46 +0100 Subject: [PATCH 06/21] Update lcd_display.rst Remove dead link, add more explanation, note about the chipset versions, datasheet and character sets available. --- components/display/lcd_display.rst | 40 +++++++++++++++++++----------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index ba6440a70..f499d31bf 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -7,16 +7,25 @@ Character-Based LCD Display .. _lcd-pcf8574: -lcd_pcf8574 Component +The ``lcd_pcf8574`` and ``lcd_gpio`` display components allow you to use HD44780-compatible, character-based LCD displays +with ESPHome. This integration is only for LCD displays that display individual characters on a screen +(usually 16-20 columns and 2-4 rows), and not for LCD displays that can control each pixel individually. + +.. note:: + + Mltiple versions of the display exist, supporting different character sets: + + - HD44780UA00 English-Japanese which includes katakana characters and some Greek letters and mathematical symbols + - HD44780UA02 English-European which includes Greek, Cyrillic and Western European characters (with some diacritics) + + It is possible to add 8 user-defined characters too. + + +``lcd_pcf8574`` Component --------------------- -The ``lcd_pcf8574`` display platform allows you to use standard character-based LCD displays like -`this one `__ -with ESPHome. This integration is only for LCD displays that display individual characters on a screen (usually 16-20 columns -and 2-4 rows), and not for LCD displays that can control each pixel individually. - -This version of the LCD integration is for LCD displays with a PCF8574 connected to all the data pins. This has -the benefit that you only need to connect two data wires to the ESP instead of the 6 or 10 with the :ref:`lcd-gpio`. +``lcd_pcf8574`` is for LCD displays with a PCF8574 connected to all the data pins. This has the benefit that you +only need to connect two data wires to the ESP instead of the 6 or 10 with the :ref:`lcd-gpio`. As the communication with the :ref:`I²C Bus `, you need to have an ``i2c:`` section in your configuration. .. figure:: images/lcd-pcf8574.jpg @@ -56,14 +65,12 @@ Configuration variables: .. _lcd-gpio: -lcd_gpio Component +``lcd_gpio`` Component ------------------ -The ``lcd_gpio`` display platform allows you to use standard character-based LCD displays like `this one `__ -with ESPHome. This integration is only for LCD displays that display individual characters on a screen (usually 16-20 columns -and 2-4 rows), and not for LCD displays that can control each pixel individually. Also, this is the GPIO version of the LCD -integration where each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. These LCD displays are also -commonly sold with a PCF8574 chip which only need two lines to the ESP, for that see :ref:`lcd-pcf8574`. +The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a PCF8574 module. +Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers +faster refresh, especially in conjunction with an :ref:`LCD menu `. .. figure:: images/lcd-full.jpg :align: center @@ -248,7 +255,10 @@ See Also - :doc:`index` - :doc:`/components/switch/gpio` - :doc:`/components/binary_sensor/gpio` +- :ref:`lcd_menu ` - :doc:`/components/pcf8574` -- :apiref:`lcd_base/lcd_display.h` +- `HD44780U (LCD-II) datasheet `__ +- `Charset cheatsheet `__ - `Arduino LiquidCrystal Library `__ +- :apiref:`lcd_base/lcd_display.h` - :ghedit:`Edit` From 3d60ffa73c73d0e9f4f2abc485c3f3b407b24e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:13:28 +0100 Subject: [PATCH 07/21] Update index.rst Add Edit link to the bottom --- components/display_menu/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/display_menu/index.rst b/components/display_menu/index.rst index 1c680781b..abc4c71c9 100644 --- a/components/display_menu/index.rst +++ b/components/display_menu/index.rst @@ -757,3 +757,4 @@ See Also :glob: * +- :ghedit:`Edit` From 92f35cb0a2d30a97bc338f303ddab7a3f6ac4e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:13:56 +0100 Subject: [PATCH 08/21] Update lcd_menu.rst Add Edit link and LCD screens to the bottom --- components/display_menu/lcd_menu.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/display_menu/lcd_menu.rst b/components/display_menu/lcd_menu.rst index 1ee44a229..8ba5ef553 100644 --- a/components/display_menu/lcd_menu.rst +++ b/components/display_menu/lcd_menu.rst @@ -105,7 +105,10 @@ See Also -------- - :ref:`i2c` +- :ref:`lcd-pcf8574` +- :ref:`lcd-gpio` - :ref:`Display Menu ` - :doc:`/components/sensor/rotary_encoder` - :doc:`/components/binary_sensor/index` - :apiref:`lcd_menu/lcd_menu.h` +- :ghedit:`Edit` From e477822b6468c3b5b4e85499113fa994018a9888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:17:34 +0100 Subject: [PATCH 09/21] Update lcd_display.rst --- components/display/lcd_display.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index f499d31bf..c5510d19d 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -22,7 +22,7 @@ with ESPHome. This integration is only for LCD displays that display individual ``lcd_pcf8574`` Component ---------------------- +------------------------- ``lcd_pcf8574`` is for LCD displays with a PCF8574 connected to all the data pins. This has the benefit that you only need to connect two data wires to the ESP instead of the 6 or 10 with the :ref:`lcd-gpio`. @@ -66,7 +66,7 @@ Configuration variables: .. _lcd-gpio: ``lcd_gpio`` Component ------------------- +---------------------- The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a PCF8574 module. Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers @@ -255,7 +255,7 @@ See Also - :doc:`index` - :doc:`/components/switch/gpio` - :doc:`/components/binary_sensor/gpio` -- :ref:`lcd_menu ` +- :ref:`LCD Menu ` - :doc:`/components/pcf8574` - `HD44780U (LCD-II) datasheet `__ - `Charset cheatsheet `__ From 8c36f340848209083f6e2c305ed98d597ae3d3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:20:52 +0100 Subject: [PATCH 10/21] Update index.rst --- components/display_menu/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/display_menu/index.rst b/components/display_menu/index.rst index abc4c71c9..3f0e4d54e 100644 --- a/components/display_menu/index.rst +++ b/components/display_menu/index.rst @@ -757,4 +757,5 @@ See Also :glob: * + - :ghedit:`Edit` From 450d5bdf23d5f29f8be3dfab0e12ac1a24bbfddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:22:48 +0100 Subject: [PATCH 11/21] Update lcd_display.rst --- components/display/lcd_display.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index c5510d19d..757cf9402 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -21,8 +21,8 @@ with ESPHome. This integration is only for LCD displays that display individual It is possible to add 8 user-defined characters too. -``lcd_pcf8574`` Component -------------------------- +lcd_pcf8574 Component +--------------------- ``lcd_pcf8574`` is for LCD displays with a PCF8574 connected to all the data pins. This has the benefit that you only need to connect two data wires to the ESP instead of the 6 or 10 with the :ref:`lcd-gpio`. @@ -65,8 +65,8 @@ Configuration variables: .. _lcd-gpio: -``lcd_gpio`` Component ----------------------- +lcd_gpio Component +------------------ The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a PCF8574 module. Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers From 0ba89c6bb1e7ef0ce4bb66afb009b55918ba3ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:27:40 +0100 Subject: [PATCH 12/21] Update lcd_display.rst --- components/display/lcd_display.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index 757cf9402..367ba7f20 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -5,8 +5,6 @@ Character-Based LCD Display :description: Instructions for setting up character-based LCD displays. :image: lcd.jpg -.. _lcd-pcf8574: - The ``lcd_pcf8574`` and ``lcd_gpio`` display components allow you to use HD44780-compatible, character-based LCD displays with ESPHome. This integration is only for LCD displays that display individual characters on a screen (usually 16-20 columns and 2-4 rows), and not for LCD displays that can control each pixel individually. @@ -20,6 +18,7 @@ with ESPHome. This integration is only for LCD displays that display individual It is possible to add 8 user-defined characters too. +.. _lcd-pcf8574: lcd_pcf8574 Component --------------------- From 4a9743bb0acc59218ae759b572935aefd6b50502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 14:53:26 +0100 Subject: [PATCH 13/21] Update lcd_display.rst A few more fixes. --- components/display/lcd_display.rst | 108 +++++++++++++++-------------- 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index 367ba7f20..baf833386 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -13,8 +13,9 @@ with ESPHome. This integration is only for LCD displays that display individual Mltiple versions of the display exist, supporting different character sets: - - HD44780UA00 English-Japanese which includes katakana characters and some Greek letters and mathematical symbols + - HD44780UA00 English-Japanese which includes katakana characters, some Greek letters and mathematical symbols - HD44780UA02 English-European which includes Greek, Cyrillic and Western European characters (with some diacritics) + - HD44780UBxx custom, manufacturer-specific character sets It is possible to add 8 user-defined characters too. @@ -23,9 +24,9 @@ with ESPHome. This integration is only for LCD displays that display individual lcd_pcf8574 Component --------------------- -``lcd_pcf8574`` is for LCD displays with a PCF8574 connected to all the data pins. This has the benefit that you -only need to connect two data wires to the ESP instead of the 6 or 10 with the :ref:`lcd-gpio`. -As the communication with the :ref:`I²C Bus `, you need to have an ``i2c:`` section in your configuration. +``lcd_pcf8574`` is for LCD displays with a PCF8574 GPIO expander module connected to all the data pins. This has the +benefit that you only need to connect two data wires to the ESP instead of the six or ten as with the :ref:`lcd-gpio`. +The communication happens via :ref:`I²C Bus `, you need to have an ``i2c:`` section in your configuration. .. figure:: images/lcd-pcf8574.jpg :align: center @@ -46,8 +47,8 @@ As the communication with the :ref:`I²C Bus `, you need to have an ``i2c:` display: - platform: lcd_pcf8574 - dimensions: 18x4 - address: 0x3F + dimensions: 20x4 + address: 0x27 lambda: |- it.print("Hello World!"); @@ -82,7 +83,7 @@ faster refresh, especially in conjunction with an :ref:`LCD menu `. # Example configuration entry display: - platform: lcd_gpio - dimensions: 18x4 + dimensions: 20x4 data_pins: - D0 - D1 @@ -163,20 +164,62 @@ by default which means the character at the top left. Please see :ref:`display-printf` for a quick introduction into the ``printf`` formatting rules and :ref:`display-strftime` for an introduction into the ``strftime`` time formatting. +User Defined Characters +----------------------- + +The LCD display has the possibility to define up to eight user defined characters occupying the characters +``0`` to ``7`` and mirrored at ``8`` to ``15`` (i.e. ``\x08`` can be used instead of the ``\0`` that can +be problematic in strings). Each character has eight lines of five bits, with the first line on the top +and the most significant bit on the left, meaning that ``0b10000`` followed by six zeros and a ``0b00001`` +defines a dot at the upper left and lower right of the character. + +.. code-block:: yaml + + display: + - platform: lcd_pcf8574 + id: mydisplay + # ... + user_characters: + - position: 0 + data: + - 0b00000 + - 0b01010 + - 0b00000 + - 0b00100 + - 0b00100 + - 0b10001 + - 0b01110 + - 0b00000 + - position: 7 + data: + - 0b00000 + - 0b01010 + - 0b00000 + - 0b00100 + - 0b00100 + - 0b00000 + - 0b01110 + - 0b10001 + lambda: |- + it.print("Hello, world \x08 \x07!"); + +Try this `custom Character Generator `__ to design your own sybmols. + + Backlight Control ----------------- -For the GPIO based display, the backlight is lit by applying Vcc to the A pin and K connected to ground. -The backlight can draw more power than the microcontroller output pins can supply, so it is advisable to use -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 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 -turns off 90 seconds after the last activation of the sensor. +With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``A`` pin and connect ``K`` pin to ``GND``. +The backlight can draw more power than the microcontroller output pins can supply, so it is advisable to use +a transistor as a switch to control the power for the backlight pins. + +Below an example for a typical use-case where the backlight is turned on when a motion sensor activates and +turns off ``90`` seconds after the last activation of the sensor. .. code-block:: yaml @@ -209,44 +252,6 @@ turns off 90 seconds after the last activation of the sensor. - lambda: |- id(mydisplay).no_backlight(); -User Defined Characters ------------------------ - -The LCD display has the possibility to define up to eight user defined characters occupying the characters -``0`` to ``7`` and mirrored at ``8`` to ``15`` (i.e. ``\x08`` can be used instead of the ``\0`` that can -be problematic in strings). Each character has eight lines of five bits, with the first line on the top -and the most significant bit on the left, meaning that ``0b10000`` followed by six zeros and a ``0b00001`` -defines a dot at the upper left and lower right of the character. - -.. code-block:: yaml - - display: - - platform: lcd_pcf8574 - id: mydisplay - # ... - user_characters: - - position: 0 - data: - - 0b00000 - - 0b01010 - - 0b00000 - - 0b00100 - - 0b00100 - - 0b10001 - - 0b01110 - - 0b00000 - - position: 7 - data: - - 0b00000 - - 0b01010 - - 0b00000 - - 0b00100 - - 0b00100 - - 0b00000 - - 0b01110 - - 0b10001 - lambda: |- - it.print("Hello, world \x08 \x07!"); See Also -------- @@ -258,6 +263,7 @@ See Also - :doc:`/components/pcf8574` - `HD44780U (LCD-II) datasheet `__ - `Charset cheatsheet `__ +- `Custom Character Generator `__ - `Arduino LiquidCrystal Library `__ - :apiref:`lcd_base/lcd_display.h` - :ghedit:`Edit` From 083e1705f310f7b085a15c25b3b090edea9bd2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 15:12:37 +0100 Subject: [PATCH 14/21] Add files via upload --- components/display/images/lcd_gpio.svg | 10580 +++++++++++++++++++++++ 1 file changed, 10580 insertions(+) create mode 100644 components/display/images/lcd_gpio.svg diff --git a/components/display/images/lcd_gpio.svg b/components/display/images/lcd_gpio.svg new file mode 100644 index 000000000..a587ee86f --- /dev/null +++ b/components/display/images/lcd_gpio.svg @@ -0,0 +1,10580 @@ + + + + + Liquid Cristal Display 16x2, top-connector, pinout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 01 VSS / GND02 VCC / +5V03 VEE / Contrast04 RS / Register Select05 R/W / Read/Write06 E / Enable07 D0 / Data 0 (8Bit)08 D1 / Data 1 (8Bit)09 D2 / Data 2 (8Bit)10 D3 / Data 3 (8Bit)11 D4 / Data 4 (4/8Bit)12 D5 / Data 5 (4/8Bit)13 D6 / Data 6 (4/8Bit)14 D7 / Data 7 (4/8Bit)15 BLA / Backlight, Anode16 BLK / Backlight, Kathode + + + + + image/svg+xml + + + + + Openclipart + + + Liquid Cristal Display 16x2, top-connector, pinout + 2018-10-12 + Liquid Cristal Display 16x2 + https://openclipart.org/detail/84199/lcd-by-crudo + + + crudo, adlerweb + + + + + 16x2 + display + lcd + liquid cristal + panel + + + + + + + + + + + From 3b7aecebde286163ae09705f1d81c1c7767c5db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Thu, 17 Nov 2022 15:24:44 +0100 Subject: [PATCH 15/21] Update lcd_display.rst --- components/display/lcd_display.rst | 33 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index baf833386..94baf6852 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -11,13 +11,13 @@ with ESPHome. This integration is only for LCD displays that display individual .. note:: - Mltiple versions of the display exist, supporting different character sets: + Multiple versions of the display exist, supporting different character sets: - HD44780UA00 English-Japanese which includes katakana characters, some Greek letters and mathematical symbols - HD44780UA02 English-European which includes Greek, Cyrillic and Western European characters (with some diacritics) - HD44780UBxx custom, manufacturer-specific character sets - It is possible to add 8 user-defined characters too. + It is also possible to add eight user-defined characters. .. _lcd-pcf8574: @@ -32,7 +32,7 @@ The communication happens via :ref:`I²C Bus `, you need to have an ``i2c:` :align: center :width: 75.0% - The PCF8574 chip attached to the LCD Display. + The PCF8574 chip attached to the LCD Display .. figure:: images/lcd-hello_world.jpg :align: center @@ -63,6 +63,11 @@ Configuration variables: - **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +.. note:: + + If you're not seeing anything on the display, make sure you try turning the contrast potentiometer around on the + PCF8574 board. + .. _lcd-gpio: lcd_gpio Component @@ -72,11 +77,11 @@ The ``lcd_gpio`` version of this component addresses the screen directly and doe Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers faster refresh, especially in conjunction with an :ref:`LCD menu `. -.. figure:: images/lcd-full.jpg +.. figure:: images/lcd_gpio.svg :align: center :width: 75.0% - LCD Display. + LCD Display GPIO pinout .. code-block:: yaml @@ -112,6 +117,12 @@ Configuration variables: - **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +.. note:: + + If you're not seeing anything on the display, make sure you apply ``3.3V`` to the ``03`` (``VEE``) contrast control + pin of the board. You can use a potentiometer to make it adjustable. + + .. _display-lcd_lambda: Rendering Lambda @@ -157,10 +168,6 @@ by default which means the character at the top left. - platform: sntp id: my_time -.. note:: - - If you're not seeing anything on the display, make sure you try turning the contrast potentiometer around. - Please see :ref:`display-printf` for a quick introduction into the ``printf`` formatting rules and :ref:`display-strftime` for an introduction into the ``strftime`` time formatting. @@ -203,7 +210,7 @@ defines a dot at the upper left and lower right of the character. lambda: |- it.print("Hello, world \x08 \x07!"); -Try this `custom Character Generator `__ to design your own sybmols. +Try this `custom character generator `__ to design your own sybmols. Backlight Control @@ -214,9 +221,9 @@ display lambda definition. The jumper on the PCF8574 board needs to be closed fo 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. -With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``A`` pin and connect ``K`` pin to ``GND``. -The backlight can draw more power than the microcontroller output pins can supply, so it is advisable to use -a transistor as a switch to control the power for the backlight pins. +With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``15`` (``BLA``) pin and connect ``16`` (``BLK``) +pin to ``GND``. The backlight can draw more power than the microcontroller output pins can supply, so it is advisable +to use a transistor as a switch to control the power for the backlight pins. Below an example for a typical use-case where the backlight is turned on when a motion sensor activates and turns off ``90`` seconds after the last activation of the sensor. From 31853d1af5233ec22a93565c9ab7e03f8ba0e773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 18 Nov 2022 09:19:55 +0100 Subject: [PATCH 16/21] Fix of typos again --- components/display/lcd_display.rst | 43 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index 94baf6852..0c01400a9 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -2,12 +2,16 @@ Character-Based LCD Display =========================== .. seo:: - :description: Instructions for setting up character-based LCD displays. + :description: Instructions for setting up character-based HD44780 LCD displays. :image: lcd.jpg The ``lcd_pcf8574`` and ``lcd_gpio`` display components allow you to use HD44780-compatible, character-based LCD displays with ESPHome. This integration is only for LCD displays that display individual characters on a screen -(usually 16-20 columns and 2-4 rows), and not for LCD displays that can control each pixel individually. +(usually 8-40 columns and 2-4 rows), and not for LCD displays that can control each pixel individually. + +.. figure:: images/lcd-hello_world.jpg + :align: center + :width: 60.0% .. note:: @@ -32,11 +36,7 @@ The communication happens via :ref:`I²C Bus `, you need to have an ``i2c:` :align: center :width: 75.0% - The PCF8574 chip attached to the LCD Display - -.. figure:: images/lcd-hello_world.jpg - :align: center - :width: 60.0% + LCD Display with a PCF8574 board attached on the back .. code-block:: yaml @@ -65,7 +65,7 @@ Configuration variables: .. note:: - If you're not seeing anything on the display, make sure you try turning the contrast potentiometer around on the + If you're not seeing anything on the display, try turning the contrast potentiometer around on the PCF8574 board. .. _lcd-gpio: @@ -73,9 +73,9 @@ Configuration variables: lcd_gpio Component ------------------ -The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a PCF8574 module. +The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a GPIO expander module. Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers -faster refresh, especially in conjunction with an :ref:`LCD menu `. +faster refresh, especially in conjunction with an :ref:`LCD Menu `. .. figure:: images/lcd_gpio.svg :align: center @@ -103,15 +103,14 @@ Configuration variables: ************************ - **dimensions** (**Required**, string): The dimensions of the display with ``COLUMNSxROWS``. If you're not - sure, power the display up and just count them. -- **data_pins** (**Required**, list of :ref:`Pin Schemas `): A list of the data pins you - have hooked up to the LCD. The list can either be 8 items long (when you have connected all 8 data pins), or - 4 items long (if you're operating in 4-bit mode with either the first 4 data pins connected or the last 4 data + sure, power the display on, turn contrast high up and just count them. +- **data_pins** (**Required**, list of :ref:`pins `): A list of the data pins you + have hooked up to the LCD. The list can either be 4 items long (when you have connected all 8 data pins), or + 8 items long (if you're operating in 4-bit mode with either the first 4 data pins connected or the last 4 data pins connected). -- **enable_pin** (**Required**, :ref:`Pin Schema `): The pin you have ``EN`` hooked up to. -- **rs_pin** (**Required**, :ref:`Pin Schema `): The pin you have ``RS`` hooked up to. -- **rw_pin** (*Optional*, :ref:`Pin Schema `): Optionally set the pin you have ``RW`` hooked up to. - You can also just permanently connect that pin to GND. +- **enable_pin** (**Required**, :ref:`pin `): The pin you have ``E`` (``06``) hooked up to. +- **rs_pin** (**Required**, :ref:`pin `): The pin you have ``RS`` (``04``) hooked up to. +- **rw_pin** (*Optional*, :ref:`pin `): Optionally set the pin you have ``R/W`` (``05``) hooked up to. You can also just permanently connect that pin to ``GND``. - **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display. See :ref:`display-lcd_lambda` for more information. - **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``. @@ -119,7 +118,7 @@ Configuration variables: .. note:: - If you're not seeing anything on the display, make sure you apply ``3.3V`` to the ``03`` (``VEE``) contrast control + If you're not seeing anything on the display, make sure you apply ``3.3V`` to the ``VEE`` (``03``) contrast control pin of the board. You can use a potentiometer to make it adjustable. @@ -153,7 +152,7 @@ by default which means the character at the top left. // Let's write a sensor value (let's assume it's 42.1) it.printf("%.1f", id(my_sensor).state); - // Result: "42.1" (the dot will appear on the "2" segment) + // Result: "42.1" (the dot will appear on the segment showing "2") // Print a right-padded sensor value with 0 digits after the decimal it.printf("Sensor value: %8.0f", id(my_sensor).state); @@ -165,7 +164,7 @@ by default which means the character at the top left. # (Optional) For displaying time: time: - - platform: sntp + - platform: homeassistant id: my_time Please see :ref:`display-printf` for a quick introduction into the ``printf`` formatting rules and @@ -221,7 +220,7 @@ display lambda definition. The jumper on the PCF8574 board needs to be closed fo 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. -With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``15`` (``BLA``) pin and connect ``16`` (``BLK``) +With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``BLA`` (``15``) pin and connect ``BLK`` (``16``) pin to ``GND``. The backlight can draw more power than the microcontroller output pins can supply, so it is advisable to use a transistor as a switch to control the power for the backlight pins. From d06a2a3aabd2d8cd7112436b54c90e71fd051d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 18 Nov 2022 09:27:15 +0100 Subject: [PATCH 17/21] Update lcd_display.rst --- components/display/lcd_display.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/display/lcd_display.rst b/components/display/lcd_display.rst index 0c01400a9..8527c9b39 100644 --- a/components/display/lcd_display.rst +++ b/components/display/lcd_display.rst @@ -105,9 +105,9 @@ Configuration variables: - **dimensions** (**Required**, string): The dimensions of the display with ``COLUMNSxROWS``. If you're not sure, power the display on, turn contrast high up and just count them. - **data_pins** (**Required**, list of :ref:`pins `): A list of the data pins you - have hooked up to the LCD. The list can either be 4 items long (when you have connected all 8 data pins), or - 8 items long (if you're operating in 4-bit mode with either the first 4 data pins connected or the last 4 data - pins connected). + have hooked up to the LCD. The list can either be 4 items long (operating in 4-bit mode with + either the first 4 data pins connected or the last 4 data pins connected), or 8 items long (when you have + connected all 8 data pins). - **enable_pin** (**Required**, :ref:`pin `): The pin you have ``E`` (``06``) hooked up to. - **rs_pin** (**Required**, :ref:`pin `): The pin you have ``RS`` (``04``) hooked up to. - **rw_pin** (*Optional*, :ref:`pin `): Optionally set the pin you have ``R/W`` (``05``) hooked up to. You can also just permanently connect that pin to ``GND``. From ea4b8111e684f9389a500099afaef674e2944d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 18 Nov 2022 10:48:40 +0100 Subject: [PATCH 18/21] Update lcd_menu.rst --- components/display_menu/lcd_menu.rst | 37 +++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/components/display_menu/lcd_menu.rst b/components/display_menu/lcd_menu.rst index 8ba5ef553..c254331e7 100644 --- a/components/display_menu/lcd_menu.rst +++ b/components/display_menu/lcd_menu.rst @@ -1,3 +1,5 @@ +.. _lcd_menu: + LCD Menu ======== @@ -6,14 +8,13 @@ LCD Menu :image: lcd_menu.png The component provides an infrastructure for setting up a hierarchical menu -on the character based LCD displays. - +on character based LCD displays. This offers the user an interactive method to display +labels, control entities like ``switch``, ``select``, ``number`` available locally on the +ESPHome node, without the requirement of a network connection. .. figure:: images/lcd_menu.png :align: center - :width: 50.0% - -.. _lcd_menu: + :width: 60.0% Overview -------- @@ -23,10 +24,10 @@ a hierarchical menu primarily intended to be controlled either by a rotary encod with a button or a five-button joystick controller. The component needs to be connected to an instance of a character based LCD display, which -at the moment are :ref:`lcd-pcf8574` or a :ref:`lcd-gpio`. For the best results the GPIO -connection is recommended; the I²C one running at the speed according to the datasheet -(usually ``100`` kHz) or even ESPHome default (``50`` kHz) will create perceptible delays especially -when changing a numeric value using the rotary encoder. Most ``PCF8574`` adapters used with +like :ref:`lcd-pcf8574` or :ref:`lcd-gpio`. For the best results the GPIO connection is +recommended; the I²C one running at the speed according to the datasheet (usually ``100`` +kHz) or even ESPHome default (``50`` kHz) will create perceptible delays especially when +changing a numeric value using the rotary encoder. Most ``PCF8574`` adapters used with these displays will happily run at ``200`` or even ``400`` kHz though so if you are comfortable accepting risks from running your hardware out of spec, you might want to try that in your :ref:`i2c` configuration. @@ -41,7 +42,7 @@ in your :ref:`i2c` configuration. ... user_characters: - position: 0 - data: # back arrow + data: # mark_back symbol - 0b00100 - 0b01000 - 0b11110 @@ -68,22 +69,24 @@ in your :ref:`i2c` configuration. items: ... - # Encoder to provide navigation + # Rotary encoder to provide navigation sensor: - platform: rotary_encoder ... + filters: + debounce: 30ms on_anticlockwise: - display_menu.up: on_clockwise: - display_menu.down: - # A de-bounced GPIO is used to 'click' + # A debounced GPIO push button is used to 'click' binary_sensor: - platform: gpio ... filters: - - delayed_on: 10ms - - delayed_off: 10ms + - delayed_on: 30ms + - delayed_off: 30ms on_press: - display_menu.enter: @@ -95,11 +98,11 @@ Configuration variables: Code of the character used to mark menu items going back one level, a selected one, the editing mode and item leading to a submenu. Defaults to ``0x5e`` (``^``), ``0x3e`` (``>``), ``0x2a`` (``*``) and ``0x7e`` (a right arrow). As the character set lacks a good looking - up arrow, using a user defined character is advisable (use ``8`` to reference one at - position ``0`` to avoid problems with zeros in a string). + back arrow, using a user defined character is advisable for ``mark_back`` (use ``8`` to + reference one at position ``0`` to avoid problems with zeros in a string). The rest of the configuration is described in the :ref:`Display Menu ` component. -The menu inherits the dimensions of the connected LCD display and uses the whole area. +The menu inherits the dimensions of the connected LCD display and uses the entire area. See Also -------- From 4109fcf5e66c0b02d2de5e7e59f3be785ce44500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 18 Nov 2022 13:33:31 +0100 Subject: [PATCH 19/21] Add files via upload --- components/display/images/lcd_gpio.svg | 3098 ++++++++++++------------ 1 file changed, 1561 insertions(+), 1537 deletions(-) diff --git a/components/display/images/lcd_gpio.svg b/components/display/images/lcd_gpio.svg index a587ee86f..e0a4699c5 100644 --- a/components/display/images/lcd_gpio.svg +++ b/components/display/images/lcd_gpio.svg @@ -2,23 +2,23 @@ + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + width="292.02167" + height="297.63901" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> Liquid Cristal Display 16x2, top-connector, pinout + inkscape:collect="always" + x="-0.0063945028" + y="-0.025135299" + width="1.012789" + height="1.0502706"> + inkscape:collect="always" + x="-0.0080102038" + y="-0.021825226" + width="1.0160204" + height="1.0436505"> @@ -79,7 +87,7 @@ xlink:href="#linearGradient4497" gradientUnits="userSpaceOnUse" x2="315" - gradientTransform="matrix(1,0,0,22.324,-665.85702,-1799.259)" + gradientTransform="matrix(1,0,0,22.324,-395.46292,-2216.2589)" y1="81.627998" x1="315" inkscape:collect="always" /> @@ -336,61 +344,62 @@ inkscape:zoom="2.8284271" borderopacity="1.0" inkscape:current-layer="layer1" - inkscape:cx="93.015892" + inkscape:cx="90.332892" guidetolerance="4" showgrid="false" units="mm" showguides="true" bordercolor="#666666" - inkscape:window-x="0" + inkscape:window-x="-8" inkscape:guide-bbox="true" objecttolerance="4" - inkscape:window-y="25" - inkscape:window-width="2558" + inkscape:window-y="-8" + inkscape:window-width="1920" inkscape:pageopacity="0.0" inkscape:pageshadow="2" pagecolor="#ffffff" gridtolerance="4" - inkscape:cy="200.49855" + inkscape:cy="146.90144" inkscape:document-units="px" - inkscape:window-height="1361" + inkscape:window-height="1017" inkscape:window-maximized="1" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" - fit-margin-bottom="0" /> + fit-margin-bottom="0" + inkscape:pagecheckerboard="0" /> + transform="translate(-197.31143,75.516597)"> + transform="matrix(0,1,1,0,0,0)" /> + transform="matrix(0,1,1,0,0,0)" /> + transform="matrix(0,1,1,0,151.24892,-252.67709)"> @@ -425,18 +434,18 @@ + transform="rotate(90,320.66501,67.987918)"> @@ -9626,127 +9635,127 @@ + transform="matrix(0,1,1,0,151.24892,-252.67709)"> @@ -10037,7 +10046,7 @@ + x="100.89545" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#9cc6ff;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="80.858131" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#9cc6ff;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="60.820808" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#baadff;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="40.783516" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#baadff;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="20.746162" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#f8ffad;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="0.70887029" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#f8ffad;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="-19.328453" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#ffadad;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> + x="-39.365776" + y="-489.3331" + transform="rotate(90)" /> + style="fill:#b3d0d2;fill-opacity:1;stroke:none;stroke-width:0.00721247;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="rotate(90)" /> 01 VSS / GND01 VSS / GND02 VCC / +5V02 VCC / +5V03 VEE / Contrast03 VEE / Contrast04 RS / Register Select04 RS / Register Select05 R/W / Read/Write05 R/W / Read/Write06 E / Enable06 E / Enable07 D0 / Data 0 (8Bit)07 D0 / Data 0 (4/8Bit)08 D1 / Data 1 (8Bit)08 D1 / Data 1 (4/8Bit)09 D2 / Data 2 (8Bit)09 D2 / Data 2 (4/8Bit)10 D3 / Data 3 (8Bit)10 D3 / Data 3 (4/8Bit)11 D4 / Data 4 (4/8Bit)11 D4 / Data 4 (8Bit)12 D5 / Data 5 (4/8Bit)12 D5 / Data 5 (8Bit)13 D6 / Data 6 (4/8Bit)13 D6 / Data 6 (8Bit)14 D7 / Data 7 (4/8Bit)14 D7 / Data 7 (8Bit)15 BLA / Backlight, Anode15 BLA / Backlight, Anode16 BLK / Backlight, Kathode + style="stroke-width:0.200618">16 BLK / Backlight, Kathode From a858abc07963893c74287bc5902d73d9bf61d1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 18 Nov 2022 21:41:51 +0100 Subject: [PATCH 20/21] Update bluetooth_proxy.rst --- components/bluetooth_proxy.rst | 53 +++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/components/bluetooth_proxy.rst b/components/bluetooth_proxy.rst index 3e5bb8b44..5db10d5cd 100644 --- a/components/bluetooth_proxy.rst +++ b/components/bluetooth_proxy.rst @@ -5,27 +5,25 @@ Bluetooth Proxy :description: Instructions for setting up the Bluetooth Proxy in ESPHome. :image: bluetooth.svg -Home Assistant can expand its Bluetooth reach by communicating through -the Bluetooth proxy component in ESPHome. Place your ESPHome devices close to the -Bluetooth devices that you want to interact with for the best -experience. +Home Assistant can expand its Bluetooth reach by communicating through the Bluetooth proxy component in ESPHome. +The Individual device integrations in Home Assistant (such as BTHome) will receive the data from the Bluetooth +Integration in Home Assistant which automatically aggregates all ESPHome bluetooth proxies with any USB Bluetooth +Adapters you might have. This exceptional feature offers fault tolerant connection between the Bluetooth devices +and Home Assistant. -If you're looking to create a device that is just a Bluetooth Proxy, see our `Bluetooth Proxy installer `__ website. - -The Bluetooth proxy depends on :doc:`esp32_ble_tracker` so make sure to add that to your configuration. +If you're looking to create an ESPHome node that is just a Bluetooth Proxy, see +our `Bluetooth Proxy installer `__ website. .. note:: - Bluetooth proxy requires Home Assistant 2022.9 or later. - -.. note:: - - The Bluetooth proxy of ESPHome currently only provides Home Assistant with passive sensor - data that is advertised by certain devices. Not all devices are supported and ESPHome does not decode or keep a list. - To find out if your device is supported, please search for it in the `Home Assistant Integrations `__ list. - - The Individual device integrations in Home Assistant (such as BTHome) will receive the data from the Bluetooth Integration in Home Assistant - which automatically aggregates all ESPHome bluetooth proxies with any USB Bluetooth Adapters you might have. + The Bluetooth proxy of ESPHome provides Home Assistant with a maximum number of 3 simultaneous active connections. + Devices which maintain a *continuous active* connection will consume one of these constantly, whilst devices which + do *periodic disconnections and reconnections* will permit using more than 3 of them (on a statistical basis). + Passively broadcasted sensor data (that is advertised by certain devices without active connections) is received + separately from these, and is not limited to a specific number. + + Not all devices are supported and ESPHome does not decode or keep a list. To find out if your device is supported, + please search for it in the `Home Assistant Integrations `__ list. Configuration: -------------- @@ -36,6 +34,27 @@ Configuration: - **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``. Requires Home Assistant 2022.10 or later. +The Bluetooth proxy depends on :doc:`esp32_ble_tracker` so make sure to add that to your configuration. + +.. note:: + + Bluetooth proxy requires Home Assistant 2022.9 or later. + +Improving reception performance +------------------------------- + +Use a board with an Ethernet connection to the network, to offload ESP32's radio module from WiFi traffic, this gains performance on Bluetooth side. +To maximize the chances of catching advertisements of the sensors, you can set ``interval`` equal to ``window`` in :doc:`/components/esp32_ble_tracker` scan parameter settings: + +.. code-block:: yaml + + esp32_ble_tracker: + scan_parameters: + interval: 1100ms + window: 1100ms + +Avoid placing the ESP node in racks, close to routers/switches or other network equipment as EMI interference will degrade Bluetooth signal reception. For best results put as far away as possible, at least 3 meters distance from any other such equipment. Place your ESPHome devices close to the Bluetooth devices that you want to interact with for the best experience. + See Also -------- From 3253434979b45356936a3982a4fdf28894b15764 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 21 Nov 2022 11:32:46 +1300 Subject: [PATCH 21/21] Fix indentation for sgp4x (#2465) --- components/sensor/sgp4x.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sensor/sgp4x.rst b/components/sensor/sgp4x.rst index 313a5cc3b..8e375c1be 100644 --- a/components/sensor/sgp4x.rst +++ b/components/sensor/sgp4x.rst @@ -27,7 +27,7 @@ The :ref:`I²C Bus ` is required to be set up in your configuration for thi # Example configuration entry sensor: - - platform: sgp4x + - platform: sgp4x voc: name: "VOC Index" nox: