mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-28 03:41:57 +01:00
Updates
This commit is contained in:
parent
02e52df1c4
commit
929a63965d
@ -8,19 +8,6 @@ ESP32 Camera Component
|
||||
The ``esp32_camera`` component allows you to use ESP32-based camera boards in ESPHome that
|
||||
directly integrate into Home Assistant through the native API.
|
||||
|
||||
.. warning::
|
||||
|
||||
Some ESP32 Camera boards have insufficient cooling and will overheat over time,
|
||||
ESPHome does only activate the camera when Home Assistant requests an image, but
|
||||
the camera until can still heat up considerably for some boards.
|
||||
|
||||
If the camera is not recognized after a reboot and the unit feels warm, try waiting for
|
||||
it to cool down and check again - if that still doesn't work try enabling the test pattern.
|
||||
|
||||
.. note::
|
||||
|
||||
The example configuration is valid for M5Stack ESP32 camera models.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
@ -100,6 +87,84 @@ Frame Settings:
|
||||
- **vertical_flip** (*Optional*, bool): Whether to flip the image vertically. Defaults to ``true``.
|
||||
- **horizontal_mirror** (*Optional*, bool): Whether to mirror the image horizontally. Defaults to ``true``.
|
||||
|
||||
Configuration for Ai-Thinker Camera
|
||||
-----------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
esp32_camera:
|
||||
external_clock:
|
||||
pin: GPIO0
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: GPIO26
|
||||
scl: GPIO27
|
||||
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
|
||||
vsync_pin: GPIO25
|
||||
href_pin: GPIO23
|
||||
pixel_clock_pin: GPIO22
|
||||
power_down_pin: GPIO32
|
||||
|
||||
# Image settings
|
||||
name: My Camera
|
||||
# ...
|
||||
|
||||
Configuration for M5Stack Camera
|
||||
--------------------------------
|
||||
|
||||
.. warning::
|
||||
|
||||
This camera board has insufficient cooling and will overheat over time,
|
||||
ESPHome does only activate the camera when Home Assistant requests an image, but
|
||||
the camera until can still heat up considerably for some boards.
|
||||
|
||||
If the camera is not recognized after a reboot and the unit feels warm, try waiting for
|
||||
it to cool down and check again - if that still doesn't work try enabling the test pattern.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
esp32_camera:
|
||||
external_clock:
|
||||
pin: GPIO27
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: GPIO25
|
||||
scl: GPIO23
|
||||
data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
|
||||
vsync_pin: GPIO22
|
||||
href_pin: GPIO26
|
||||
pixel_clock_pin: GPIO21
|
||||
reset_pin: GPIO15
|
||||
|
||||
# Image settings
|
||||
name: My Camera
|
||||
# ...
|
||||
|
||||
|
||||
Configuration for Wrover Kit Boards
|
||||
-----------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
esp32_camera:
|
||||
external_clock:
|
||||
pin: GPIO21
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: GPIO26
|
||||
scl: GPIO27
|
||||
data_pins: [GPIO4, GPIO5, GPIO18, GPIO19, GPIO36, GPIO39, GPIO34, GPIO35]
|
||||
vsync_pin: GPIO25
|
||||
href_pin: GPIO23
|
||||
pixel_clock_pin: GPIO22
|
||||
|
||||
# Image settings
|
||||
name: My Camera
|
||||
# ...
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
|
@ -46,9 +46,9 @@ Advanced options:
|
||||
platformio.ini file. See :ref:`esphome-platformio_options`.
|
||||
- **use_custom_code** (*Optional*, boolean): Whether to configure the project for writing custom components.
|
||||
This sets up some flags so that custom code should compile correctly
|
||||
- **includes** (*Optional*, list of files): A list of files to include in the main (auto-generated) sketch file
|
||||
- **includes** (*Optional*, list of files): A list of C[++] files to include in the main (auto-generated) sketch file
|
||||
for custom components. The paths in this list are relative to the directory where the YAML configuration file
|
||||
is in.
|
||||
is in. Should have file extension ``.h``
|
||||
- **libraries** (*Optional*, list of libraries): A list of `platformio libraries <https://platformio.org/lib>`__
|
||||
to include in the project. See `platformio lib install <https://docs.platformio.org/en/latest/userguide/lib/cmd_install.html>`__.
|
||||
|
||||
|
@ -10,6 +10,8 @@ the Home Assistant frontend. A fan can be switched ON or OFF, optionally
|
||||
has a speed setting (``LOW``, ``MEDIUM``, ``HIGH``) and can have an
|
||||
oscillate output.
|
||||
|
||||
This component restores its state on reboot/reset.
|
||||
|
||||
.. figure:: images/fan-ui.png
|
||||
:align: center
|
||||
:width: 70.0%
|
||||
|
@ -9,6 +9,8 @@ The ``light`` domain in ESPHome lets you create lights that will
|
||||
automatically be shown in Home Assistant’s frontend and have many
|
||||
features such as RGB colors, transitions, flashing and effects.
|
||||
|
||||
This component restores its state on reboot/reset.
|
||||
|
||||
.. _light-toggle_action:
|
||||
|
||||
``light.toggle`` Action
|
||||
@ -104,6 +106,12 @@ Configuration options:
|
||||
// perform action:
|
||||
call.perform();
|
||||
|
||||
.. note::
|
||||
|
||||
The ``red``, ``green`` and ``blue`` values only control the color of the light, not its
|
||||
brightness! If you assign ``50%`` to all RGB channels it will be interpreted as 100% on.
|
||||
Only use ``brightness`` to control the brightness of the light.
|
||||
|
||||
.. _light-turn_off_action:
|
||||
|
||||
``light.turn_off`` Action
|
||||
|
@ -51,6 +51,13 @@ Advanced Options:
|
||||
- **max_level** (*Optional*, percentage): The PWM duty cycle the maximum value (100%) will map
|
||||
to. Defaults to ``12.0%``.
|
||||
|
||||
.. note::
|
||||
|
||||
Some servos support a larger range for the level. For continuous rotation servos
|
||||
this can speed them up a bit and for absolute servos this can extend their angle range.
|
||||
You can configure the ``min_level`` and ``max_level`` options to adjust the level range
|
||||
to match your servo (Experiment with these values).
|
||||
|
||||
.. _servo-write_action:
|
||||
|
||||
``servo.write`` Action
|
||||
|
@ -8,6 +8,8 @@ all Arduino-based code because the ``SPI`` library is also available in ESPHome.
|
||||
See the other custom component guides for how to register components and make
|
||||
them publish values.
|
||||
|
||||
Please refer to the SPI library docs for more information.
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include "esphome.h"
|
||||
@ -16,18 +18,13 @@ them publish values.
|
||||
class MyCustomComponent : public Component {
|
||||
public:
|
||||
void setup() override {
|
||||
SPI.pins(SCK_PIN, MISO_PIN, MOSI_PIN);
|
||||
SPI.pins(SCK_PIN, MISO_PIN, MOSI_PIN, CS_PIN);
|
||||
SPI.begin();
|
||||
|
||||
pinMode(CS_PIN, OUTPUT);
|
||||
}
|
||||
void loop() override {
|
||||
digitalWrite(CS_PIN, LOW);
|
||||
SPI.beginTransaction(...);
|
||||
SPI.beginTransaction(...)
|
||||
|
||||
SPI.write(0x42);
|
||||
|
||||
digitalWrite(CS_PIN, HIGH);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@ Generic Sonoff
|
||||
:description: Instructions for using generic Sonoff devices with ESPHome.
|
||||
:image: sonoff.png
|
||||
|
||||
In principle ESPHome supports all Sonoff devices, but as these devices are quite expensive
|
||||
In principle ESPHome supports all Sonoff devices, but as these devices are quite cheap
|
||||
and shipping from China takes a long time, I've only set up dedicated guides for the
|
||||
:doc:`Sonoff S20 <sonoff_s20>` and :doc:`Sonoff 4CH <sonoff_4ch>`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user