diff --git a/changelog/v1.16.0.rst b/changelog/v1.16.0.rst index b1e28a9bc..24186ffb8 100644 --- a/changelog/v1.16.0.rst +++ b/changelog/v1.16.0.rst @@ -23,7 +23,7 @@ Changelog - Version 1.16.0 - February 3, 2021 ST7735, components/display/st7735, st7735.jpg MCP23SXX I/O Expander - SPI Bus, components/mcp23Sxx, mcp230xx.svg CAN Bus, components/canbus, canbus.svg - Inkplate 6, components/display/Inkplate, Inkplate.jpg + Inkplate 6, components/display/Inkplate, inkplate6.jpg Hello, hello. Jesse Hills (:ghuser:`jesserockz`) here. Yet another new name doing the next release. diff --git a/components/binary_sensor/pn532.rst b/components/binary_sensor/pn532.rst index ce1d5fad2..9f2fa96d4 100644 --- a/components/binary_sensor/pn532.rst +++ b/components/binary_sensor/pn532.rst @@ -100,7 +100,7 @@ Configuration variables: 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 `): An automation to perform when a tag is read. See :ref:`pn532-on_tag`. -- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component ` if you want +- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component ` if you want to use multiple I²C buses. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component. diff --git a/components/display/Inkplate.rst b/components/display/Inkplate.rst deleted file mode 100644 index 6fde8d32d..000000000 --- a/components/display/Inkplate.rst +++ /dev/null @@ -1,277 +0,0 @@ -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 `__ - -.. 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: inkplate6 - 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 `): 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: - 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: inkplate6 - 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 `__ by `E-radionica.com `__ -- :ghedit:`Edit` diff --git a/components/display/images/Inkplate.jpg b/components/display/images/inkplate6.jpg similarity index 100% rename from components/display/images/Inkplate.jpg rename to components/display/images/inkplate6.jpg diff --git a/components/display/index.rst b/components/display/index.rst index b3e1ff07e..448220a62 100644 --- a/components/display/index.rst +++ b/components/display/index.rst @@ -134,19 +134,21 @@ specific sizes, with ESPHome you have the option to use **any** TrueType (``.ttf 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 -a ``.ttf`` file from somewhere on the Internet and create a ``font:`` section in your configuration: +a ``.ttf`` file from somewhere on the internet and place it, for example, +inside a ``fonts`` folder next to your configuration file. + +Next, create a ``font:`` section in your configuration: .. code-block:: yaml font: - - file: "Comic Sans MS.ttf" + - file: "fonts/Comic Sans MS.ttf" id: my_font size: 20 display: # ... - Configuration variables: - **file** (**Required**, string): The path (relative to where the .yaml file is) of the TrueType font diff --git a/components/display/inkplate6.rst b/components/display/inkplate6.rst index 9c5f167c7..c30c4b9ad 100644 --- a/components/display/inkplate6.rst +++ b/components/display/inkplate6.rst @@ -3,13 +3,13 @@ Inkplate 6 .. seo:: :description: Instructions for setting up Inkplate E-Paper displays in ESPHome. - :image: inkplate.jpg + :image: inkplate6.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 `__ -.. figure:: images/inkplate.jpg +.. figure:: images/inkplate6.jpg :align: center :width: 75.0% @@ -34,25 +34,25 @@ Learn more at `Inkplate's website `__ ckv_pin: 32 sph_pin: 33 gmod_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 1 gpio0_enable_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 8 oe_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 0 spv_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 2 powerup_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 4 wakeup_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 3 vcom_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 5 .. warning:: @@ -146,7 +146,7 @@ Wi-Fi, API, and OTA configuration. - platform: gpio id: battery_read_mosfet pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 9 inverted: true @@ -197,17 +197,17 @@ Wi-Fi, API, and OTA configuration. - platform: gpio name: "Inkplate Touch Pad 1" pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 10 - platform: gpio name: "Inkplate Touch Pad 2" pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 11 - platform: gpio name: "Inkplate Touch Pad 3" pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 12 time: @@ -233,25 +233,25 @@ Wi-Fi, API, and OTA configuration. ckv_pin: 32 sph_pin: 33 gmod_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 1 gpio0_enable_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 8 oe_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 0 spv_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 2 powerup_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 4 wakeup_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 3 vcom_pin: - mcp23017: mcp23017_hub + mcp23xxx: mcp23017_hub number: 5 lambda: |- diff --git a/images/Inkplate.jpg b/images/Inkplate.jpg deleted file mode 100644 index a373c8082..000000000 Binary files a/images/Inkplate.jpg and /dev/null differ diff --git a/images/inkplate.jpg b/images/inkplate.jpg deleted file mode 100644 index a373c8082..000000000 Binary files a/images/inkplate.jpg and /dev/null differ diff --git a/components/display/images/inkplate.jpg b/images/inkplate6.jpg similarity index 100% rename from components/display/images/inkplate.jpg rename to images/inkplate6.jpg diff --git a/index.rst b/index.rst index 7e8edaff3..65a9e6bd9 100644 --- a/index.rst +++ b/index.rst @@ -306,7 +306,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 + Inkplate 6, components/display/inkplate6, inkplate6.jpg PCD8544 (Nokia 5110/ 3310), components/display/pcd8544, pcd8544.jpg Cover Components