mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-27 04:13:07 +02:00
Updates
This commit is contained in:
parent
e630eab6c3
commit
644b1f033e
34
components/binary_sensor/homeassistant.rst
Normal file
34
components/binary_sensor/homeassistant.rst
Normal file
@ -0,0 +1,34 @@
|
||||
Homeassistant Binary Sensor
|
||||
===========================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up homeassistant binary sensors with ESPHome that import states from your homeassistant instance.
|
||||
:image: home-assistant.png
|
||||
|
||||
The ``homeassistant`` binary sensor platform allows you to create binary sensors that **import**
|
||||
states from your Home Assistant instance using the :doc:`native API </components/api>`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
name: "Input Boolean From Home Assistant"
|
||||
entity_id: input_boolean.state_home
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name of the binary sensor.
|
||||
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :ref:`automation`
|
||||
- :apiref:`binary_sensor/homeassistant_binary_sensor.h`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
.. disqus::
|
65
components/light/partition.rst
Normal file
65
components/light/partition.rst
Normal file
@ -0,0 +1,65 @@
|
||||
Light Partition
|
||||
===============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up light partitions.
|
||||
:image: color_lens.png
|
||||
|
||||
The ``partition`` light platform allows you to combine multiple addressable light segments
|
||||
(like :doc:`fastled_clockless` or :doc:`neopixelbus`) into a single addressable light.
|
||||
This platform also allows splitting up an addressable lights into multiple segments, so that
|
||||
segments can be individually controlled.
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: partition
|
||||
name: "Partition Light"
|
||||
segments:
|
||||
# Use first LED from the light with ID light1
|
||||
- id: light1
|
||||
from: 0
|
||||
to: 0
|
||||
# Use 10 leds from light with ID light2 starting 2nd LED
|
||||
- id: light2
|
||||
from: 1
|
||||
to: 10
|
||||
|
||||
# Example for light segment source
|
||||
- platform: fastled_clockless
|
||||
id: light2
|
||||
# Other settings
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name of the light.
|
||||
- **segments** (**Required**, list): The segments this light partition controls
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The ID of the light this segment belongs to.
|
||||
- **from** (**Required**, int): The first LED to address in the segment. Counting starts with 0,
|
||||
so first LED is 0.
|
||||
- **to** (**Required**, int): The index of the last LED to address in this segment.
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
|
||||
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
|
||||
|
||||
.. note::
|
||||
|
||||
Do *not* use this platform to control each LED on your addressable light - the light
|
||||
objects have a moderate overhead and if you try to create many lights you will run out
|
||||
of memory quickly.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/fastled_clockless`
|
||||
- :doc:`/components/light/neopixelbus`
|
||||
- :apiref:`light/addressable_light.h`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
.. disqus::
|
@ -1,100 +1,100 @@
|
||||
H801 RGBW LED controller
|
||||
========================
|
||||
|
||||
The H801 is pretty afordable and easy to hack and adapt to your needs. It can be found on `Aliexpress <https://s.click.aliexpress.com/e/bbnUDBZW>`__
|
||||
`Here <http://tinkerman.cat/closer-look-h801-led-wifi-controller/>`__ is an article about the hardware for those who have an interest for more details about the board.
|
||||
It can be used as a RGB, RGBW, RGB dual white or even control 5 individual monochromatic strips if you want or combinations of these.
|
||||
|
||||
.. figure:: images/h801.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
For esphomelib, you can then use the :doc:`RGBW </components/light/rgbw>`
|
||||
and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` components using below configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphomeyaml:
|
||||
name: h801light
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
manual_ip:
|
||||
static_ip: x.x.x.x
|
||||
gateway: x.x.x.x
|
||||
subnet: 255.255.255.0
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal h801light"
|
||||
update_interval: 60s
|
||||
#RGBWarm
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: 12
|
||||
frequency: 1000 Hz
|
||||
id: pwm_b
|
||||
- platform: esp8266_pwm
|
||||
pin: 15
|
||||
frequency: 1000 Hz
|
||||
id: pwm_g
|
||||
- platform: esp8266_pwm
|
||||
pin: 13
|
||||
frequency: 1000 Hz
|
||||
id: pwm_r
|
||||
- platform: esp8266_pwm
|
||||
pin: 14
|
||||
frequency: 1000 Hz
|
||||
id: pwm_w
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "H801 Light"
|
||||
red: pwm_r
|
||||
green: pwm_g
|
||||
blue: pwm_b
|
||||
white: pwm_w
|
||||
|
||||
|
||||
Make your node in the esphome dashboard and compile/upload it. (if it fails OTA it must be uploaded manually with your favorite ESP flasher, e.g. :ref:`esphomeflasher <esphomeflasher>`)
|
||||
|
||||
.. figure:: images/gpio.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Front side of board with pins soldered on
|
||||
|
||||
.. figure:: images/back.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Back side of the board (don't melt the blue and red wire when soldering)
|
||||
|
||||
.. figure:: images/rgbwarm.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
This LED strip can be used with the sketch as-is
|
||||
|
||||
.. figure:: images/rgbw.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
For this type of led strip you have to swap the white and blue gpio numbers in the sketch
|
||||
|
||||
You will need to solder pins to the board inside the h801 (fortunately its pretty roomy and not a lot of components or stuff in the way part from the 2 wires on the back)
|
||||
|
||||
3.3v, GND, TX and RX (RX to RX and TX to TX) needs to be connected to your serial adapter, the two other pins must be shorted by a jumper or a breadboard cable when flashing.
|
||||
(Remember to remove it after flashing)
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
.. disqus::
|
||||
H801 RGBW LED controller
|
||||
========================
|
||||
|
||||
The H801 is pretty afordable and easy to hack and adapt to your needs. It can be found on `Aliexpress <https://s.click.aliexpress.com/e/bbnUDBZW>`__
|
||||
`Here <http://tinkerman.cat/closer-look-h801-led-wifi-controller/>`__ is an article about the hardware for those who have an interest for more details about the board.
|
||||
It can be used as a RGB, RGBW, RGB dual white or even control 5 individual monochromatic strips if you want or combinations of these.
|
||||
|
||||
.. figure:: images/h801.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
For esphomelib, you can then use the :doc:`RGBW </components/light/rgbw>`
|
||||
and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` components using below configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphomeyaml:
|
||||
name: h801light
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
manual_ip:
|
||||
static_ip: x.x.x.x
|
||||
gateway: x.x.x.x
|
||||
subnet: 255.255.255.0
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal h801light"
|
||||
update_interval: 60s
|
||||
#RGBWarm
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: 12
|
||||
frequency: 1000 Hz
|
||||
id: pwm_b
|
||||
- platform: esp8266_pwm
|
||||
pin: 15
|
||||
frequency: 1000 Hz
|
||||
id: pwm_g
|
||||
- platform: esp8266_pwm
|
||||
pin: 13
|
||||
frequency: 1000 Hz
|
||||
id: pwm_r
|
||||
- platform: esp8266_pwm
|
||||
pin: 14
|
||||
frequency: 1000 Hz
|
||||
id: pwm_w
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "H801 Light"
|
||||
red: pwm_r
|
||||
green: pwm_g
|
||||
blue: pwm_b
|
||||
white: pwm_w
|
||||
|
||||
|
||||
Make your node in the esphome dashboard and compile/upload it. (if it fails OTA it must be uploaded manually with your favorite ESP flasher, e.g. :ref:`esphomeflasher <esphomeflasher>`)
|
||||
|
||||
.. figure:: images/gpio.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Front side of board with pins soldered on
|
||||
|
||||
.. figure:: images/back.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Back side of the board (don't melt the blue and red wire when soldering)
|
||||
|
||||
.. figure:: images/rgbwarm.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
This LED strip can be used with the sketch as-is
|
||||
|
||||
.. figure:: images/rgbw.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
For this type of led strip you have to swap the white and blue gpio numbers in the sketch
|
||||
|
||||
You will need to solder pins to the board inside the h801 (fortunately its pretty roomy and not a lot of components or stuff in the way part from the 2 wires on the back)
|
||||
|
||||
3.3v, GND, TX and RX (RX to RX and TX to TX) needs to be connected to your serial adapter, the two other pins must be shorted by a jumper or a breadboard cable when flashing.
|
||||
(Remember to remove it after flashing)
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
.. disqus::
|
||||
|
Loading…
Reference in New Issue
Block a user