Remove migrated items from Cookbook (#2816)
* remove migrated documentation All of these are present now on our https://devices.esphome.io/ site. The missing ones were pushed with https://github.com/esphome/esphome-devices/pull/385, and the rest ones were already in, thus removing here the duplicates. * Update modbus.rst * Update modbus.rst * Update modbus_controller.rst * Update ltr390.rst * Update ltr390.rst * Update modbus_controller.rst * fix broken links * Update index.rst * Update index.rst
@ -44,7 +44,7 @@ See Also
|
||||
- :doc:`/components/switch/modbus_controller`
|
||||
- :doc:`/components/number/modbus_controller`
|
||||
- :doc:`/components/output/modbus_controller`
|
||||
- :doc:`EPEVER MPPT Solar Charge Controller Tracer-AN Series</cookbook/tracer-an>`
|
||||
- `EPEVER MPPT Solar Charge Controller (Tracer-AN Series) <https://devices.esphome.io/devices/epever_mptt_tracer_an>`__
|
||||
- `Modbus RTU Protocol Description <https://www.modbustools.com/modbus.html>`__
|
||||
- :ref:`uart`
|
||||
- :apiref:`modbus/modbus.h`
|
||||
|
@ -529,6 +529,6 @@ See Also
|
||||
- :doc:`/components/switch/modbus_controller`
|
||||
- :doc:`/components/number/modbus_controller`
|
||||
- :doc:`/components/output/modbus_controller`
|
||||
- :doc:`EPEVER MPPT Solar Charge Controller Tracer-AN Series</cookbook/tracer-an>`
|
||||
- `EPEVER MPPT Solar Charge Controller (Tracer-AN Series) <https://devices.esphome.io/devices/epever_mptt_tracer_an>`__
|
||||
- `Modbus RTU Protocol Description <https://www.modbustools.com/modbus.html>`__
|
||||
- :ghedit:`Edit`
|
||||
|
@ -111,7 +111,7 @@ See Also
|
||||
|
||||
- :doc:`/components/sensor/bh1750`
|
||||
- :doc:`/components/sensor/tsl2561`
|
||||
- :doc:`/cookbook/temt6000`
|
||||
- `TEMT6000 <https://devices.esphome.io/devices/temt6000>`__
|
||||
- :ref:`sensor-filters`
|
||||
- :apiref:`ltr390/ltr390.h`
|
||||
- :ghedit:`Edit`
|
||||
|
@ -271,5 +271,5 @@ See Also
|
||||
- :doc:`/components/binary_sensor/modbus_controller`
|
||||
- :doc:`/components/text_sensor/modbus_controller`
|
||||
- :doc:`/components/switch/modbus_controller`
|
||||
- :doc:`EPEVER MPPT Solar Charge Controller Tracer-AN Series</cookbook/tracer-an>`
|
||||
- `EPEVER MPPT Solar Charge Controller (Tracer-AN Series) <https://devices.esphome.io/devices/epever_mptt_tracer_an>`__
|
||||
- :ghedit:`Edit`
|
||||
|
@ -1,63 +0,0 @@
|
||||
.. seo::
|
||||
:description: AirGradient DIY Air Quality Sensor
|
||||
:image: air_gradient_diy_air_quality_sensor.jpg
|
||||
:keywords: Air Quality Sensor DIY
|
||||
|
||||
AirGradient DIY Air Quality Sensor
|
||||
==================================
|
||||
|
||||
.. figure:: images/air_gradient_diy_air_quality_sensor.jpg
|
||||
:align: center
|
||||
:width: 100.0%
|
||||
|
||||
AirGradient has created a DIY Air Quality sensor.
|
||||
They offer a PCB, PCB + components kit, etc.
|
||||
A pretty neat package.
|
||||
To use this you have to run their software but you can use the kit with ESPHome as well!
|
||||
|
||||
Here is what it can measure:
|
||||
|
||||
- **Temperature**
|
||||
- **Humidity**
|
||||
- **Air particles PM2.5**
|
||||
- **Carbon Dioxide**
|
||||
|
||||
Additionally:
|
||||
|
||||
- There is a display so show off your data or whatever you desire from Home Assistant
|
||||
- You can download a 3D printable case including a wall mount bracket
|
||||
|
||||
|
||||
ESPHome Configuration
|
||||
---------------------
|
||||
Documentation:
|
||||
|
||||
- `Blog Article: Measuring Air Quality in your Home Office <https://www.ajfriesen.com/measuring-air-quality-in-your-home-office/>`__
|
||||
- `ESPHome code with a setup guide for Home Assistant <https://github.com/ajfriesen/ESPHome-AirGradient>`__
|
||||
- `AirGradient Shop for the PCB or PCB plus components <https://www.airgradient.com/diyshop/>`__
|
||||
- `AirGradient Setup Guide (3D printeable case, setup guide, etc.) <https://www.airgradient.com/diy/>`__
|
||||
|
||||
`YAML configuration <https://github.com/ajfriesen/ESPHome-AirGradient/blob/main/air-gradient-diy.yaml>`__
|
||||
|
||||
Soldering and setup video:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Cmr5VNALRAg" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/devices/nodemcu_esp8266`
|
||||
- :doc:`/components/display/ssd1306`
|
||||
- :doc:`/components/i2c`
|
||||
- :doc:`/components/uart`
|
||||
- :doc:`/components/sensor/sht3xd`
|
||||
- :doc:`/components/sensor/pmsx003`
|
||||
- :doc:`/components/sensor/senseair`
|
||||
- :doc:`/components/wifi`
|
||||
- :doc:`/components/api`
|
||||
- :doc:`/components/logger`
|
||||
- :doc:`/components/ota`
|
||||
- :doc:`/components/switch/safe_mode`
|
||||
- :ghedit:`Edit`
|
@ -1,121 +0,0 @@
|
||||
BLE iTag Button
|
||||
===============
|
||||
|
||||
.. seo::
|
||||
:description: Receive events from a cheap BLE keyring button.
|
||||
:image: bluetooth.svg
|
||||
|
||||
This example shows how to use a cheap BLE keyring tag to trigger arbitrary
|
||||
events. An ESP32 is used, which provides a BLE peripheral.
|
||||
|
||||
.. figure:: images/esp32_ble_itag.png
|
||||
:align: center
|
||||
:width: 40%
|
||||
|
||||
These tags can be had for a couple of dollars each and run for several months
|
||||
on a coin cell. Using the BLE features of ESPHome, you can use these as small
|
||||
and cheap remotes to control any automation.
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
Use the configuration block below for a basic setup which will provide a
|
||||
binary_sensor that is momentarily turned on when the button is pressed.
|
||||
|
||||
You will need to find the MAC address of your tag. See the documentation
|
||||
for :doc:`/components/ble_client` for how to find this out. You may also
|
||||
wish to change the name and id fields where appropriate to suit your
|
||||
device(s).
|
||||
|
||||
Note that a maximum of three devices are supported due to limitations in
|
||||
the ESP32's BLE stack.
|
||||
|
||||
Configuration example:
|
||||
------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
# Replace with the MAC address of your device.
|
||||
- mac_address: FF:FF:20:00:0F:15
|
||||
id: itag_black
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: black_button
|
||||
name: "Black iTag Button"
|
||||
filters:
|
||||
delayed_off: 200ms
|
||||
|
||||
sensor:
|
||||
# This entry registers and awaits notifications for the
|
||||
# characteristic that signals button presses. Each time
|
||||
# a notification is received, the corresponding binary_sensor
|
||||
# is briefly toggled.
|
||||
- platform: ble_client
|
||||
type: characteristic
|
||||
ble_client_id: itag_black
|
||||
name: "Black iTag btn"
|
||||
service_uuid: 'ffe0'
|
||||
characteristic_uuid: 'ffe1'
|
||||
notify: true
|
||||
update_interval: never
|
||||
on_notify:
|
||||
then:
|
||||
- binary_sensor.template.publish:
|
||||
id: black_button
|
||||
state: ON
|
||||
- binary_sensor.template.publish:
|
||||
id: black_button
|
||||
state: OFF
|
||||
# This entry queries the battery level. Some tags may not
|
||||
# support this characteristic, you will see 'Unknown' in the
|
||||
# HA frontend.
|
||||
- platform: ble_client
|
||||
type: characteristic
|
||||
ble_client_id: itag_black
|
||||
name: "Black iTag Battery"
|
||||
service_uuid: '180f'
|
||||
characteristic_uuid: '2a19'
|
||||
icon: 'mdi:battery'
|
||||
unit_of_measurement: '%'
|
||||
# This entry queries polls the RSSI when the tag is connected.
|
||||
- platform: ble_client
|
||||
type: rssi
|
||||
ble_client_id: itag_black
|
||||
name: "Black iTag RSSI"
|
||||
|
||||
Explanation
|
||||
-----------
|
||||
|
||||
The first thing enabled is the ``esp32_ble_tracker`` component. This sets up
|
||||
the BLE stack on the device and listens for available devices.
|
||||
|
||||
Next, the ``ble_client`` component will listen to devices discovered by
|
||||
the tracker, and establish a connection to the given device when it is
|
||||
available.
|
||||
|
||||
The ``binary_sensor`` provides a template sensor which will export to the
|
||||
HA frontend the sensor that's switched by the BLE tag's button.
|
||||
|
||||
The first entry in the ``sensor`` component is used to configure the specific
|
||||
Service and Characteristic UUIDs for an iTag's button. It also enables BLE
|
||||
notifications and sets up an automation to toggle the ``binary_sensor`` when
|
||||
a notification is received from the tag. Automatic updates are disabled, there
|
||||
is no point querying the tag for the device state, as we will be immediately
|
||||
notified when the button is pressed.
|
||||
|
||||
The next ``sensor`` entry listens for a well-known Service and Chacteristic
|
||||
that is used by many BLE devices to give battery level information. This sensor
|
||||
will be exposed in the HA frontend to determine the state of the tag's battery.
|
||||
Note that many tags will not provide this service, so you will not see a valid
|
||||
value. If not, you can remove this from the config.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/ble_client`
|
||||
- :doc:`/components/sensor/ble_client`
|
||||
- :ghedit:`Edit`
|
@ -1,89 +0,0 @@
|
||||
BRUH Multisensor
|
||||
================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for re-creating a BRUH multisensor using ESPHome.
|
||||
:image: bruh.png
|
||||
|
||||
The BRUH Multisensor is a great introductory project into Home Automation with an
|
||||
amazing setup tutorial. And fortunately ESPHome has complete support for all the
|
||||
stuff used by the Multisensor 🎉
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/jpjfVc-9IrQ" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
||||
|
||||
Thank you very much to `@jackjohnsonuk <https://github.com/jackjohnsonuk>`__ for providing this
|
||||
configuration file 😀
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: <NODE_NAME>
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
ota:
|
||||
|
||||
sensor:
|
||||
- platform: dht
|
||||
pin: D7
|
||||
temperature:
|
||||
name: "Multisensor Temperature"
|
||||
humidity:
|
||||
name: "Multisensor Humidity"
|
||||
- platform: adc
|
||||
pin: A0
|
||||
name: "Multisensor Brightness"
|
||||
unit_of_measurement: lux
|
||||
filters:
|
||||
- lambda: |-
|
||||
return (x / 10000.0) * 2000000.0;
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
name: "Multisensor Motion"
|
||||
device_class: motion
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: D1
|
||||
id: redgpio
|
||||
- platform: esp8266_pwm
|
||||
pin: D2
|
||||
id: greengpio
|
||||
- platform: esp8266_pwm
|
||||
pin: D3
|
||||
id: bluegpio
|
||||
|
||||
light:
|
||||
- platform: rgb
|
||||
name: "Multisensor Light"
|
||||
red: redgpio
|
||||
green: greengpio
|
||||
blue: bluegpio
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/devices/nodemcu_esp8266`
|
||||
- :doc:`pir`
|
||||
- :doc:`temt6000`
|
||||
- :doc:`/components/light/rgb`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/components/sensor/dht`
|
||||
- :doc:`/components/sensor/adc`
|
||||
- :doc:`/components/binary_sensor/gpio`
|
||||
- :ghedit:`Edit`
|
@ -1,124 +0,0 @@
|
||||
Etekcity Voltson (ESW01-EU)
|
||||
===========================
|
||||
|
||||
.. seo::
|
||||
:description: Configure an Etekcity Voltson and calculate the missing current sensor
|
||||
:image: esw01-eu.jpg
|
||||
:keywords: Etekcity, Voltson, ESW01, ESW01-EU, HLW8012, Home Assistant, ESPHome
|
||||
|
||||
|
||||
The Etekcity Voltson brings a 10A relay, two LEDs (blue and yellow), a push button and a :doc:`/components/sensor/hlw8012`
|
||||
in a very small package and at a reasonable price.
|
||||
|
||||
.. note::
|
||||
|
||||
There are quite a few hardware revisions out there. Also reginal versions like US, UK and EU are different.
|
||||
|
||||
Flashing
|
||||
--------
|
||||
|
||||
Opening the case for flashing varies a lot for different hardware revisions. Mine was easy as it had two tiny T5 Torx screws in the front and four Philipps screws inside.
|
||||
Once you have opened the case, remove the PCB from it and attach your TTL as follows:
|
||||
|
||||
5V and GND go to the bottom:
|
||||
|
||||
.. figure:: images/esw01-eu-pcb-bottom.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
On the opposite side, T12 is TX, T13 is RX. During boot you need to connect T11 and T16 pads to GND. Easiest is to flash with pogo pins.
|
||||
|
||||
.. figure:: images/esw01-eu-pcb-top.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
As the Voltson has its SEL pin permanently pulled high, we are unable to switch from voltage measurement to current measurement.
|
||||
This will be circumvented by defining the initial mode to be voltage measurement (see :doc:`/components/sensor/hlw8012` documentation)
|
||||
and calculating the current with `Ohm's law <https://en.wikipedia.org/wiki/Ohm%27s_law>`_: ``P (watts) = V (volts) x I (amps)``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: voltson
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
### you wifi and other settings here ###
|
||||
|
||||
### pins ###
|
||||
# D1 GPIO5 | LED blue | status_led
|
||||
# D0 GPIO16 | LED yellow | led1
|
||||
# D5 GPIO14 | SW1 | button1
|
||||
# D2 GPIO4 | REL1 | relay1
|
||||
# D6 GPIO12 | HLW8012/CF1 | cf1_pin
|
||||
# D7 GPIO13 | HLW8012/CF | cf_pin
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO5
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
id: relay1
|
||||
pin: GPIO4
|
||||
- platform: gpio
|
||||
id: led1
|
||||
pin: GPIO16
|
||||
|
||||
switch:
|
||||
- platform: output
|
||||
name: "Voltson Relay"
|
||||
id: switch1
|
||||
output: relay1
|
||||
on_turn_on:
|
||||
- output.turn_on: led1
|
||||
on_turn_off:
|
||||
- output.turn_off: led1
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: button1
|
||||
pin:
|
||||
number: GPIO14
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch1
|
||||
|
||||
sensor:
|
||||
- platform: hlw8012
|
||||
sel_pin: 0 # not connected
|
||||
cf_pin: GPIO13
|
||||
cf1_pin: GPIO12
|
||||
voltage:
|
||||
id: hlw8012_voltage
|
||||
name: "HLW8012 Voltage"
|
||||
power:
|
||||
id: hlw8012_power
|
||||
name: "HLW8012 Power"
|
||||
on_value:
|
||||
- sensor.template.publish:
|
||||
id: hlw8012_current_calculated
|
||||
state: !lambda 'return id(hlw8012_power).state / id(hlw8012_voltage).state;'
|
||||
update_interval: 10s
|
||||
initial_mode: VOLTAGE
|
||||
change_mode_every: 4294967295 # basically never
|
||||
- platform: template
|
||||
id: hlw8012_current_calculated
|
||||
name: "HLW8012 Current (calculated)"
|
||||
unit_of_measurement: A
|
||||
accuracy_decimals: 2
|
||||
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/sensor/hlw8012`
|
||||
- :ghedit:`Edit`
|
@ -1,80 +0,0 @@
|
||||
Geiger counter RadiationD v1.1 (CAJOE)
|
||||
======================================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up RadiationD v1.1(CAJOE) sensor in ESPHome and calculate the current radation level.
|
||||
:image: radiationD-v1-1-cajoe_small.jpg
|
||||
:keywords: Radiation Geiger counter
|
||||
|
||||
With the help of :doc:`/components/sensor/pulse_counter` and the RadiationD v1.1(CAJOE) you can make your own Geiger counter, which will give you
|
||||
a more or less precise messurement of the current radation level. But it should be good enough to warn you about critical events.
|
||||
|
||||
|
||||
Assembly:
|
||||
---------
|
||||
|
||||
.. figure:: images/radiationD-v1-1-cajoe_small.jpg
|
||||
:align: center
|
||||
:width: 100.0%
|
||||
|
||||
The first step is to connect the sensor.
|
||||
|
||||
You just need to connect the +5V, the ground and a GPIO pin to the ESP.
|
||||
In my case I used the pin 34 for the signal. (The print on the PCB is wrong VIN is the signal.)
|
||||
This setup should give you the pulse of each messurement or count. For more information check the Video of `Andreas Spiess <https://www.youtube.com/watch?v=K28Az3-gV7E>`__.
|
||||
|
||||
Housing:
|
||||
*********
|
||||
I just 3D printed an small housing the avoid touching the high voltage Geiger Mueller tube.
|
||||
`Counter Tube Case <https://www.thingiverse.com/thing:5425224>`__
|
||||
(The tube should not be in direct sunlight. So maybe you will need another case.)
|
||||
|
||||
|
||||
Configuration:
|
||||
---------------
|
||||
|
||||
The block :doc:`/components/sensor/pulse_counter` will count the radation events per minute.
|
||||
With the found specs of the tube you will be able to calculate the radiation in μSv/h.
|
||||
|
||||
It's just the counts per minute (CPM) times the factor of your Geiger Mueller tube you're using. It should be the J305ß, which comes with the PCB.
|
||||
(To make sure - check your printing on the tube)
|
||||
|
||||
μSv/h = (CPM - Tube noise) * Factor
|
||||
According to the video of `Andreas Spiess <https://www.youtube.com/watch?v=K28Az3-gV7E>`__ the tube should have about 12 CPM as background noise.
|
||||
|
||||
.. note::
|
||||
|
||||
The current version of the pack comes with the J305ß Geiger tube which detectes Beta and Gamma radiation. Specifications:
|
||||
Manufacturer: North Optic Radiation Detection: β, γ Length: 111mm Diameter: 11mm Recommended Voltage: 350V Plateau Voltage: 360-440V
|
||||
Sensitivy γ (60Co): 65cps/(μR/s)
|
||||
Sensitivy γ (equivalent Sievert): 108cpm / (μSv/h)
|
||||
Max cpm: 30000
|
||||
cps/mR/h: 18
|
||||
cpm/m/h: 1080
|
||||
cpm/μSv/h: 123.147092360319
|
||||
Factor: 0.00812037037037
|
||||
|
||||
|
||||
`Source: opengeiger.de/LibeliumDoku.pdf <http://www.opengeiger.de/LibeliumDoku.pdf>`__.
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sensor:
|
||||
- platform: pulse_counter
|
||||
pin: 34
|
||||
name: "Radiation"
|
||||
unit_of_measurement: 'μSv/h'
|
||||
count_mode:
|
||||
rising_edge: DISABLE
|
||||
falling_edge: INCREMENT
|
||||
filters:
|
||||
- offset: -12.0 # J305ß Geiger Mueller tube background noise 0.2 pulses / sec x 60 sec = 12 CPM (Counts per Minute)
|
||||
- multiply: 0.00812037037037 # Factor: 0.00812037037037
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/sensor/pulse_counter`
|
||||
- :ghedit:`Edit`
|
@ -1,167 +0,0 @@
|
||||
H801 RGBW LED controller
|
||||
========================
|
||||
|
||||
The H801 is pretty affordable and easy to hack and adapt to your needs. It can be found on `AliExpress <https://s.click.aliexpress.com/e/bbnUDBZW>`__
|
||||
and other sites. The board is based on an `ESP8266EX <https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf>`__ chip.
|
||||
|
||||
It has 5 seperate PWM outputs (each driven by a `DTU35N06 <http://www.din-tek.jp/Upload/Product%20Doc/Datasheet/DTU35N06.pdf>`__ MOSFET rated
|
||||
for 106W max power), and can be used as a :doc:`RGB </components/light/rgb>` / :doc:`RGBW </components/light/rgbw>` /
|
||||
:doc:`RGBWW </components/light/rgbww>` / :doc:`RGBCT </components/light/rgbct>` controller or configured with any combination of up to
|
||||
five :doc:`individual monochromatic PWM </components/light/monochromatic>` lights.
|
||||
See `A closer look at the H801 LED WiFi Controller <https://tinkerman.cat/post/closer-look-h801-led-wifi-controller>`__ for more details on the hardware.
|
||||
|
||||
.. figure:: images/h801.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Sample configuration
|
||||
--------------------
|
||||
|
||||
You can use the :doc:`RGBWW </components/light/rgbww>` and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` components using below configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: h801light
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: 12
|
||||
frequency: 1000 Hz
|
||||
id: pwm_b
|
||||
- platform: esp8266_pwm
|
||||
pin: 13
|
||||
frequency: 1000 Hz
|
||||
id: pwm_g
|
||||
- platform: esp8266_pwm
|
||||
pin: 15
|
||||
frequency: 1000 Hz
|
||||
id: pwm_r
|
||||
- platform: esp8266_pwm
|
||||
pin: 14
|
||||
frequency: 1000 Hz
|
||||
id: pwm_w1
|
||||
- platform: esp8266_pwm
|
||||
pin: 4
|
||||
frequency: 1000 Hz
|
||||
id: pwm_w2
|
||||
light:
|
||||
- platform: rgbww
|
||||
name: "H801 Light"
|
||||
red: pwm_r
|
||||
green: pwm_g
|
||||
blue: pwm_b
|
||||
cold_white: pwm_w1
|
||||
warm_white: pwm_w2
|
||||
|
||||
For :doc:`RGBW </components/light/rgbw>` lights, the ``pwm_w2`` output is not used (and can be removed):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "H801 Light"
|
||||
red: pwm_r
|
||||
green: pwm_g
|
||||
blue: pwm_b
|
||||
white: pwm_w1
|
||||
|
||||
Flashing
|
||||
--------
|
||||
|
||||
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:`esphome-flasher <esphome-flasher>`)
|
||||
|
||||
You will need to solder pins to the board inside the H801 (fortunately it's pretty roomy and
|
||||
not a lot of components or stuff in the way apart 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 throughout the flashing process by a jumper or a breadboard cable.
|
||||
(Remember to remove it after flashing)
|
||||
|
||||
.. figure:: images/h801-board-front.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Front side of board with pins soldered on
|
||||
|
||||
.. figure:: images/h801-board-back.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Back side of the board (don't melt the blue and red wire when soldering)
|
||||
|
||||
Add A PIR(Motion) Sensor
|
||||
------------------------
|
||||
|
||||
It's possible to use the header that was soldered on for flashing as an input.
|
||||
The example below uses the TX pin as a PIR motion sensor input:
|
||||
|
||||
.. figure:: images/h801-pir_sensor.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
H801 shown with PIR connected to header pins
|
||||
|
||||
The following can be appended to the YAML file for your H801 to configure the TX pin as a motion
|
||||
sensor input.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO3
|
||||
name: "GPIO3-TX Motion"
|
||||
device_class: motion
|
||||
|
||||
Pinout
|
||||
------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Function
|
||||
- ESP Pin
|
||||
* - R (PWM1)
|
||||
- GPIO15
|
||||
* - G (PWM2)
|
||||
- GPIO13
|
||||
* - B (PWM3)
|
||||
- GPIO12
|
||||
* - W1 (PWM4)
|
||||
- GPIO14
|
||||
* - W2 (PWM5)
|
||||
- GPIO4
|
||||
* - Jumper J3
|
||||
- GPIO0
|
||||
* - RX
|
||||
- GPIO2
|
||||
* - TX
|
||||
- GPIO3
|
||||
* - LED D1 (red)
|
||||
- GPIO5
|
||||
* - LED D2 (green)
|
||||
- GPIO1
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/rgb`
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/light/rgbww`
|
||||
- :doc:`/components/light/rgbct`
|
||||
- :doc:`/components/light/monochromatic`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
@ -1,65 +0,0 @@
|
||||
.. seo::
|
||||
:description: IAQ (Indoor Air Quality) Board
|
||||
:image: iaq_board2.jpg
|
||||
:keywords: IAQ Board
|
||||
|
||||
IAQ (Indoor Air Quality) Board
|
||||
==============================
|
||||
|
||||
.. figure:: images/iaq_board2.jpg
|
||||
:align: center
|
||||
:width: 100.0%
|
||||
|
||||
IAQ Board is a DIY device for measuring internal air quality running with esphome. It's quite small and is based on a custom PCB where part of the components are soldered and connected.
|
||||
|
||||
Here is what it can measure:
|
||||
|
||||
- **Temperature / Humidity / Pressure**
|
||||
- **Air particles PM1, PM2.5, PM10**
|
||||
- **Carbon Dioxide with NDIR sensor**
|
||||
- **Air Quality Index by EPA, based on 24h average PM2.5 particles**
|
||||
- **Ambient light**
|
||||
- **Total VOC (volatile organic compound)**
|
||||
- **equivalent CO2 (not very correct compared with the NDIR sensor, but it's provided by the VOC sensor)**
|
||||
|
||||
On top of that:
|
||||
|
||||
- **At least one OLED display to show the data (can have one more on the top of the MCU board)**
|
||||
- **three RGB wide angle LEDs with auto brightness. LED1 indicates PM2.5, LED2 - Air quality index, LED3 - CO2.**
|
||||
- **auto night dimming of the displays and LEDs (can be disabled)**
|
||||
- **MIN/MAX values of Temperature, PM2.5 and CO2, and 24h average PM2.5 value.**
|
||||
- **multi function button for selection of the data to show on the display**
|
||||
|
||||
ESPHome Configuration
|
||||
---------------------
|
||||
Full documentation (PCB, Schematic, esphome yaml config) is published here: `https://github.com/nkitanov/iaq_board <https://github.com/nkitanov/iaq_board>`__
|
||||
|
||||
YAML configuration is about 700 lines and can be downloaded from here: `iaq_board.yaml <https://github.com/nkitanov/iaq_board/blob/master/firmware/iaq_board.yaml>`__
|
||||
|
||||
.. figure:: images/iaq_board1.jpg
|
||||
:align: center
|
||||
:width: 100.0%
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/X75OGs2TTT8" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/devices/nodemcu_esp8266`
|
||||
- :doc:`/components/display/ssd1306`
|
||||
- :doc:`/components/sensor/bme280`
|
||||
- :doc:`/components/sensor/ee895`
|
||||
- :doc:`/components/sensor/pmsx003`
|
||||
- :doc:`/components/sensor/mhz19`
|
||||
- :doc:`/components/sensor/sgp30`
|
||||
- :doc:`/components/sensor/sgp4x`
|
||||
- :doc:`/components/sensor/tsl2561`
|
||||
- :doc:`/components/binary_sensor/gpio`
|
||||
- :doc:`/components/sensor/template`
|
||||
- :doc:`/components/light/neopixelbus`
|
||||
- :doc:`/guides/automations`
|
||||
- :doc:`/components/i2c`
|
||||
- :doc:`/components/uart`
|
||||
- :ghedit:`Edit`
|
@ -1,214 +0,0 @@
|
||||
Sonoff iFan02
|
||||
=============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for using Sonoff ifan02 in ESPHome.
|
||||
:keywords: Fan, Sonoff, ifan02
|
||||
:image: fan.svg
|
||||
|
||||
Sonoff iFan02 is a driver for ceiling fans with lights.
|
||||
By replacing the old driver with iFan02, your non-smart led ceiling fan will be converted to a smart ceiling fan.
|
||||
For more information see `iFan02 <https://www.itead.cc/sonoff-ifan02-wifi-smart-ceiling-fan-with-light.html>`__
|
||||
|
||||
This configuration will expose a :doc:`/components/light/binary` and a :doc:`/components/fan/speed`.
|
||||
|
||||
To get this working in ESPHome you first need to create a :doc:`/components/output/custom` to control the iFan02.
|
||||
|
||||
Create an ifan02.h file:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#include "esphome.h"
|
||||
using namespace esphome;
|
||||
|
||||
class IFan02Output : public Component, public FloatOutput {
|
||||
public:
|
||||
void write_state(float state) override {
|
||||
if (state < 0.3) {
|
||||
// OFF
|
||||
digitalWrite(5, LOW);
|
||||
digitalWrite(4, LOW);
|
||||
digitalWrite(15, LOW);
|
||||
} else if (state < 0.6) {
|
||||
// low speed
|
||||
digitalWrite(5, HIGH);
|
||||
digitalWrite(4, LOW);
|
||||
digitalWrite(15, LOW);
|
||||
} else if (state < 0.9) {
|
||||
// medium speed
|
||||
digitalWrite(5, HIGH);
|
||||
digitalWrite(4, HIGH);
|
||||
digitalWrite(15, LOW);
|
||||
} else {
|
||||
// high speed
|
||||
digitalWrite(5, HIGH);
|
||||
digitalWrite(4, LOW);
|
||||
digitalWrite(15, HIGH);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Then you need to set it up with yaml.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: ifan02
|
||||
includes:
|
||||
- ifan02.h
|
||||
on_boot:
|
||||
priority: 225
|
||||
# turn off the light as early as possible
|
||||
then:
|
||||
- light.turn_off: ifan02_light
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
logger:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: vbutton_light
|
||||
pin:
|
||||
number: GPIO0
|
||||
inverted: true
|
||||
on_press:
|
||||
then:
|
||||
- light.toggle: ifan02_light
|
||||
|
||||
- platform: gpio
|
||||
id: vbutton_relay_1
|
||||
pin:
|
||||
number: GPIO9
|
||||
inverted: true
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: fan_relay1
|
||||
- switch.turn_on: update_fan_speed
|
||||
|
||||
- platform: gpio
|
||||
id: vbutton_relay_2
|
||||
pin:
|
||||
number: GPIO10
|
||||
inverted: true
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: fan_relay2
|
||||
- switch.turn_on: update_fan_speed
|
||||
|
||||
- platform: gpio
|
||||
id: vbutton_relay_3
|
||||
pin:
|
||||
number: GPIO14
|
||||
inverted: true
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: fan_relay3
|
||||
- switch.turn_on: update_fan_speed
|
||||
|
||||
output:
|
||||
- platform: custom
|
||||
type: float
|
||||
outputs:
|
||||
id: fanoutput
|
||||
lambda: |-
|
||||
auto ifan02_fan = new IFan02Output();
|
||||
App.register_component(ifan02_fan);
|
||||
return {ifan02_fan};
|
||||
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: light_output
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "iFan02 Light"
|
||||
output: light_output
|
||||
id: ifan02_light
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: update_fan_speed
|
||||
optimistic: true
|
||||
turn_on_action:
|
||||
then:
|
||||
- delay: 200ms
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- switch.is_off: fan_relay1
|
||||
- switch.is_off: fan_relay2
|
||||
- switch.is_off: fan_relay3
|
||||
then:
|
||||
- fan.turn_off: ifan02_fan
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- switch.is_on: fan_relay1
|
||||
- switch.is_off: fan_relay2
|
||||
- switch.is_off: fan_relay3
|
||||
then:
|
||||
- fan.turn_on:
|
||||
id: ifan02_fan
|
||||
speed: 1
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- switch.is_on: fan_relay1
|
||||
- switch.is_on: fan_relay2
|
||||
- switch.is_off: fan_relay3
|
||||
then:
|
||||
- fan.turn_on:
|
||||
id: ifan02_fan
|
||||
speed: 2
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- switch.is_on: fan_relay1
|
||||
- switch.is_off: fan_relay2
|
||||
- switch.is_on: fan_relay3
|
||||
then:
|
||||
- fan.turn_on:
|
||||
id: ifan02_fan
|
||||
speed: 3
|
||||
- switch.turn_off: update_fan_speed
|
||||
|
||||
- platform: gpio
|
||||
pin: GPIO5
|
||||
id: fan_relay1
|
||||
|
||||
- platform: gpio
|
||||
pin: GPIO4
|
||||
id: fan_relay2
|
||||
|
||||
- platform: gpio
|
||||
pin: GPIO15
|
||||
id: fan_relay3
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
output: fanoutput
|
||||
id: ifan02_fan
|
||||
speed_count: 3
|
||||
name: "iFan02 Fan"
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/binary`
|
||||
- :doc:`/components/fan/index`
|
||||
- :doc:`/components/fan/speed`
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/custom`
|
||||
- :doc:`/guides/automations`
|
||||
- :ghedit:`Edit`
|
@ -1,105 +0,0 @@
|
||||
Ilonda Wifi Smart Fish Feeder (L88)
|
||||
===================================
|
||||
|
||||
Ilonda Wifi Smart Fish Feeder (L88) is a Tuya-based device sold by Amazon (not only under Ilonda, but also under other brand names).
|
||||
|
||||
.. figure:: images/ilonda-wifi-smart-fish-feeder.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Originally intended to be used with its companion app, once flashed using `tuya-convert <https://github.com/ct-Open-Source/tuya-convert>`__, ESPHome generated
|
||||
firmware can be uploaded allowing you to control the Wifi Smart Fish Feeder via Home Assistant.
|
||||
|
||||
Wifi Smart Fish Feeder Configuration
|
||||
------------------------------------
|
||||
|
||||
Thanks to the amazing `Tasmota template <https://templates.blakadder.com/ilonda_L88.html>`__,
|
||||
managed to build a fully working esphome configuration. This assumes you have a secret.yaml with ssid and password keys.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: wifi_smart_fish_feeder
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
# Binary Sensor to allow relay to be switched when physical button is pressed
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: button
|
||||
pin:
|
||||
number: GPIO4
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: True
|
||||
name: 'Switch feeder'
|
||||
on_press:
|
||||
- switch.turn_on: relay
|
||||
|
||||
- platform: status
|
||||
name: "Status"
|
||||
|
||||
switch:
|
||||
# Switch to turn feeder on for 3 seconds/off and turn on/off LED
|
||||
- platform: gpio
|
||||
name: 'Relay feeder'
|
||||
id: relay
|
||||
pin: GPIO14
|
||||
on_turn_on:
|
||||
- light.turn_on: led
|
||||
- delay: 3s
|
||||
- switch.turn_off: relay
|
||||
- light.turn_off: led
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
sensor:
|
||||
# Feeder counter
|
||||
- platform: pulse_meter
|
||||
pin: GPIO12
|
||||
name: 'Counter/min'
|
||||
unit_of_measurement: 'time(s)'
|
||||
internal: true
|
||||
total:
|
||||
unit_of_measurement: 'time(s)'
|
||||
name: 'Counter feeder'
|
||||
|
||||
# To allow led to be controlled via GPIO
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: blue_led
|
||||
pin:
|
||||
number: GPIO5
|
||||
inverted: true
|
||||
|
||||
# LED control
|
||||
light:
|
||||
- platform: monochromatic
|
||||
output: blue_led
|
||||
id: led
|
||||
|
||||
|
||||
You can now add your Wifi Smart Fish Feeder to Home Assistant via the configurations page, look for 'ESPHome' under the Integrations option and click 'Configure'.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/binary_sensor/gpio`
|
||||
- :doc:`/components/switch/gpio`
|
||||
- :doc:`/components/sensor/pulse_meter`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/components/light/monochromatic`
|
||||
- :doc:`/guides/automations`
|
||||
- `Fish Feeder diagrams and pictures <https://community.openhab.org/t/ilonda-fish-feeder-openhab/99190>`__.
|
||||
- :ghedit:`Edit`
|
Before Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 447 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -1,141 +0,0 @@
|
||||
IWOOLE Table Lamp
|
||||
===================================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for flashing and configuring IWOOLE Table Lamps.
|
||||
|
||||
The IWOOLE Table Lamp is a RGBW lamp normally configured using the Tuya Smart App.
|
||||
It is available from various retailers online or directly from `iwoole.com <https://www.iwoole.com/product/category/wifi-smart-table-lamp/>`__.
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp.png
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
1. Device overview
|
||||
==================
|
||||
.. note::
|
||||
|
||||
The following information relates to the desk model depicted above. A free-standing version and a desk version with a longer arm are available. They are likely to share the same internals and configuration, but I can not be certain.
|
||||
|
||||
My device had no external markings at all.
|
||||
|
||||
The device is a basic 4-channel PWM RGBW light in a simple elegant housing.
|
||||
The LEDs are not individually addressable.
|
||||
No other sensors, outputs or status LEDs are available.
|
||||
|
||||
The MOSFETs for the different color channels are connected as follows:
|
||||
|
||||
- GPIO04: White
|
||||
- GPIO12: Green
|
||||
- GPIO13: Blue
|
||||
- GPIO14: Red
|
||||
|
||||
1.1 Internal markings
|
||||
----------------------
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_internal_1.jpg
|
||||
:align: center
|
||||
:width: 40.0%
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_internal_2.jpg
|
||||
:align: center
|
||||
:width: 40.0%
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_internal_3.jpg
|
||||
:align: center
|
||||
:width: 40.0%
|
||||
|
||||
2. ESPHome configuration
|
||||
========================
|
||||
Since there is only one RGBW light to configure the .yaml file is fairly straightforward.
|
||||
Alternatively, you could configure each channel as a separate light if desired.
|
||||
I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along with the configuration below.
|
||||
|
||||
2.1 Example configuration
|
||||
-------------------------
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: "IWOOLE Table Lamp"
|
||||
#ESP type is ESP8266EX with 1MB flash
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
# Insert wifi and api configuration here
|
||||
|
||||
# Configuration for IWOOLE PWM light
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "Light"
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
white: output_white
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_red
|
||||
pin: GPIO14
|
||||
- platform: esp8266_pwm
|
||||
id: output_green
|
||||
pin: GPIO12
|
||||
- platform: esp8266_pwm
|
||||
id: output_blue
|
||||
pin: GPIO13
|
||||
- platform: esp8266_pwm
|
||||
id: output_white
|
||||
pin: GPIO4
|
||||
|
||||
3. Flashing
|
||||
===========
|
||||
|
||||
.. warning::
|
||||
|
||||
The circuit inside will be exposed to mains voltage. Do not connect your device to the mains when flashing. Flashing this device via a serial connection will involve precarious soldering and cutting through insulating heat-shrink tubing which will have to be replaced.
|
||||
If you are uncomfortable with this, or are not confident around mains voltage, do not attempt to do this! Using the Tuya-convert method is preferred.
|
||||
|
||||
1. Disconnect the device from mains voltage!
|
||||
2. Open the device. The plastic and aluminum halves can be separated by twisting the plastic part counter-clockwise. If you're okay with a few scuffs you can also use a screwdriver (or a spudger) to separate the two halves.
|
||||
3. Remove the two screws holding the round plate with the LEDs. It is connected to the main PCB with a little cable. Make note of the orientation of this connection to ensure you reconnect it correctly later.
|
||||
4. Carefully remove the heat-shrink tubing around the two main PCBs.
|
||||
5. Like any ESP device, to flash this chip using serial you'll need 3V3, GND, RX, TX and GPIO0
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_connections_top.jpg
|
||||
:align: left
|
||||
:width: 60.0%
|
||||
|
||||
There are pads available for 3V3 and GPIO0 on the back. I have tried to find easier solder points on the front, marked in the image above.
|
||||
Be aware that the pin labeled VCC does not carry 3V3, but 24V DC. If, for any reason, you wanted to connect any other sensor or component, the exposed pin for GPIO5 can be used, in addition to RX (GPIO3) and TX (GPIO1).
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_connections_bottom.jpg
|
||||
:align: left
|
||||
:width: 60.0%
|
||||
|
||||
I have made the following connections, I used the pad for GPIO0 because I did not know of the other connection point yet.
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_wires_top.jpg
|
||||
:align: left
|
||||
:width: 60.0%
|
||||
|
||||
.. figure:: images/iwoole_rgbw_table_lamp_wires_bottom.jpg
|
||||
:align: left
|
||||
:width: 60.0%
|
||||
|
||||
6. Flash the chip as you would with any other, using `ESPHome-Flasher <https://github.com/esphome/esphome-flasher>`__ or any other tool of your choosing. While this is not meant as a tutorial on flashing ESP chips, some general hints:
|
||||
|
||||
- Always double-check your connections, and don't change any when the ESP is powered. I fried one of these mood lights this way.
|
||||
- Ensure GPIO0 is connected to ground to get the device into programming mode, but also don't forget to disconnect this when you expect the device to start in normal mode.
|
||||
- When working with a breadboard, an FTDI adapter and jumper wires, it is very easy for something to become disconnected. Try to use as few wires as possible.
|
||||
|
||||
7. Re-apply some heat-shrink tubing or cover the PCBs in electrical tape. Make sure none of the traces or solder joints are exposed anymore. Re-connect the LEDs (see cable orientation in one of the images above).
|
||||
|
||||
8. Screw down the plate with LEDs and close the device.
|
||||
|
||||
See Also
|
||||
========
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
@ -62,5 +62,4 @@ See Also
|
||||
|
||||
- `Awesome article explaining how PIR Sensors work <https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/how-pirs-work>`__.
|
||||
- :doc:`/components/binary_sensor/gpio`
|
||||
- :doc:`bruh`
|
||||
- :ghedit:`Edit`
|
||||
|
@ -46,6 +46,5 @@ See Also
|
||||
|
||||
- :doc:`/components/switch/gpio`
|
||||
- :doc:`/components/output/gpio`
|
||||
- :doc:`/cookbook/garage-door`
|
||||
- `How do relays work <https://www.explainthatstuff.com/howrelayswork.html>`__.
|
||||
- :ghedit:`Edit`
|
||||
|
@ -1,88 +0,0 @@
|
||||
TECKIN SB50 LED Bulb
|
||||
====================
|
||||
|
||||
.. seo::
|
||||
:description: ESPHome configuration for Teckin SB50 LED Bulb.
|
||||
:image: teckin_sb50.jpg
|
||||
:keywords: Teckin SB50
|
||||
|
||||
.. figure:: images/teckin_sb50.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
.. warning::
|
||||
|
||||
It is not currently possible to flash these bulbs with ``tuya-convert`` due to shipping with an updated/patched firmware.
|
||||
Please check `this issue <https://github.com/ct-Open-Source/tuya-convert/issues/483>`__ for details and progress on a workaround.
|
||||
|
||||
The Teckin SB50 Bulb's are a great option for lighting that could previously be flashed with tuya-convert. More details can be found at tuya-convert `github page <https://github.com/ct-Open-Source/tuya-convert>`__.
|
||||
Below is the ESPHome configuration file that will get you up and running. This assumes you have a ``secret.yaml`` with ssid, password, api_password and ota_password keys.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
devicename: <Enter a name for your light here>
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable logging to ESPHome
|
||||
logger:
|
||||
# Disable logging to serial
|
||||
baud_rate: 0
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
# Setup OTA
|
||||
ota:
|
||||
|
||||
# Define output pins
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_red
|
||||
pin: GPIO4
|
||||
- platform: esp8266_pwm
|
||||
id: output_green
|
||||
pin: GPIO12
|
||||
- platform: esp8266_pwm
|
||||
id: output_blue
|
||||
pin: GPIO14
|
||||
- platform: esp8266_pwm
|
||||
id: output_warm_white
|
||||
pin: GPIO13
|
||||
- platform: esp8266_pwm
|
||||
id: output_cold_white
|
||||
pin: GPIO5
|
||||
|
||||
# Define a light entity
|
||||
light:
|
||||
- platform: rgbww
|
||||
name: $devicename
|
||||
id: $devicename
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
warm_white: output_warm_white
|
||||
cold_white: output_cold_white
|
||||
cold_white_color_temperature: 6200 K
|
||||
warm_white_color_temperature: 2800 K
|
||||
color_interlock: true # avoids simultaneous RGB and W/W
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/devices/nodemcu_esp8266`
|
||||
- :doc:`/cookbook/mirabella-genio-bulb`
|
||||
- :doc:`/components/light/rgb`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/components/binary_sensor/gpio`
|
||||
- :ghedit:`Edit`
|
@ -1,74 +0,0 @@
|
||||
TEMT6000
|
||||
========
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up TEMT6000 ambient light sensors in ESPHome using the ADC sensor component.
|
||||
:image: temt6000.jpg
|
||||
:keywords: TEMT6000
|
||||
|
||||
The TEMT6000 is a simple and cheap ambient light sensor. The sensor itself
|
||||
changes its resistance based on how much light hits the sensor. In order
|
||||
for us to read this resistance the breakout boards you can buy these chips on
|
||||
often have a small constant value resistor and three pins: ``GND``, ``VCC`` and
|
||||
``SIG``. Connect ``VCC`` to ``3.3V``, ``GND`` to ``GND`` and ``SIG`` to any
|
||||
available :doc:`analog pin </components/sensor/adc>`.
|
||||
|
||||
.. figure:: images/temt6000-header.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
To get the brightness the sensor measures, we then simply have to measure the voltage
|
||||
on the ``SIG`` (also called ``OUT``) pin using the :doc:`/components/sensor/adc`
|
||||
and convert those voltage measurements to illuminance values in lux using a formula:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
pin: A0
|
||||
name: "TEMT6000 Illuminance"
|
||||
device_class: illuminance
|
||||
unit_of_measurement: lx
|
||||
filters:
|
||||
- lambda: |-
|
||||
return (x / 10000.0) * 2000000.0;
|
||||
|
||||
.. figure:: images/temt6000-pins.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
Pins on the TEMT6000. Connect ``OUT`` to an ADC pin, ``GND`` to ``GND``, and ``VCC``
|
||||
to ``3.3V``
|
||||
|
||||
Formula Explanation:
|
||||
--------------------
|
||||
|
||||
To get the illuminance in lux, we first need to convert the measured voltage to the
|
||||
current flowing across the TEMT6000 sensor. This current is also equal to the current
|
||||
flowing across the 10kΩ resistor in the voltage divider circuit, which is
|
||||
``I = adc_value/10000kΩ``.
|
||||
|
||||
The `datasheet for the TEMT6000 <https://www.sparkfun.com/datasheets/Sensors/Imaging/TEMT6000.pdf>`__
|
||||
specifies a proportional correlation between current and illuminance: Every 2 µA of current
|
||||
correlates to 1 lx in the illuminance.
|
||||
|
||||
.. note::
|
||||
|
||||
The default voltage range of the ADC for the ESP8266 and ESP32 are from 0 to 1.0V.
|
||||
So you won't be able to measure any value above 200 lx using the default setup.
|
||||
|
||||
For the ESP32, you have the option of setting a :ref:`Voltage Attenuation <adc-esp32_attenuation>`
|
||||
(note that the formula doesn't need to be adjusted if you set an attenuation, as the value ``x``
|
||||
is automatically converted to volts).
|
||||
|
||||
For the ESP8266, you unfortunately need to tinker with the hardware a bit to decrease
|
||||
the voltage a bit. So one option would be to create another voltage divider on the ``SIG`` pin
|
||||
to divide the analog voltage by a constant value.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/sensor/adc`
|
||||
- `TEMT6000 datasheet <https://www.sparkfun.com/datasheets/Sensors/Imaging/TEMT6000.pdf>`__
|
||||
- :doc:`bruh`
|
||||
- :ghedit:`Edit`
|
@ -1,88 +0,0 @@
|
||||
Tuya RGBW LED controller
|
||||
========================
|
||||
|
||||
The Tuya RGBW controller is inexpensive, available on ebay, and can be OTA flashed using `tuya-convert <https://github.com/ct-Open-Source/tuya-convert>`__, after which it can be OTA flashed via the ESPHome web interface (NOTE: a port must be explicitly set if using a Home Assistant add-on for this, and you need to connect directly to that port instead of using the proxied port via Home Assistant).
|
||||
|
||||
.. figure:: images/tuya_rgbw.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
The configuration below shows an example that can be compiled to a binary firmware file that works correctly for this device, and that cycles through three different brightnesses and an off state based on the number of button presses. The device can also be controlled via Home Assistant, of course, setting specific RGBW combinations and brightness levels.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_red
|
||||
pin: GPIO14
|
||||
- platform: esp8266_pwm
|
||||
id: output_green
|
||||
pin: GPIO5
|
||||
- platform: esp8266_pwm
|
||||
id: output_blue
|
||||
pin: GPIO12
|
||||
- platform: esp8266_pwm
|
||||
id: output_white
|
||||
pin: GPIO15
|
||||
|
||||
globals:
|
||||
- id: action_state
|
||||
type: int
|
||||
restore_value: no
|
||||
initial_value: '0'
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO13
|
||||
name: "RGBW Controller Button"
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_on_off: 20ms
|
||||
on_press:
|
||||
then:
|
||||
- lambda: id(action_state) = (id(action_state) + 1) % 4;
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(action_state) == 0;'
|
||||
then:
|
||||
- light.turn_off: rgbw_lightstrip1
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(action_state) == 1;'
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: rgbw_lightstrip1
|
||||
brightness: 60%
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(action_state) == 2;'
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: rgbw_lightstrip1
|
||||
brightness: 40%
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(action_state) == 3;'
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: rgbw_lightstrip1
|
||||
brightness: 15%
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "rgbw_strip_01"
|
||||
id: rgbw_lightstrip1
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
white: output_white
|
||||
|
||||
# Ensure the light turns on by default if the physical switch is actuated.
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
30
index.rst
@ -399,8 +399,8 @@ Weight
|
||||
|
||||
|
||||
Looking for a sensor that outputs its values as an analog voltage? Have a look at the
|
||||
:doc:`ADC Sensor </components/sensor/adc>` together with a formula like in the :doc:`TEMT6000
|
||||
example </cookbook/temt6000>`.
|
||||
:doc:`ADC Sensor </components/sensor/adc>` together with a formula like in the `TEMT6000
|
||||
configuration <https://devices.esphome.io/devices/temt6000>`__.
|
||||
|
||||
|
||||
Binary Sensor Components
|
||||
@ -783,41 +783,29 @@ Cookbook
|
||||
|
||||
.. imgtable::
|
||||
|
||||
Arduino Port Extender, cookbook/arduino_port_extender, arduino_logo.svg
|
||||
Endstop Cover, cookbook/endstop-cover, window-open.svg
|
||||
PIR Sensor, cookbook/pir, pir.jpg
|
||||
Relay, cookbook/relay, relay.jpg
|
||||
BRUH Multisensor, cookbook/bruh, bruh.png
|
||||
TEMT6000, cookbook/temt6000, temt6000.jpg
|
||||
Generic PIR Sensor, cookbook/pir, pir.jpg
|
||||
Generic Relay, cookbook/relay, relay.jpg
|
||||
Garage Door, cookbook/garage-door, window-open.svg
|
||||
Non-Invasive Power Meter, cookbook/power_meter, power_meter.jpg
|
||||
Dual Relay Motor Cover, cookbook/dual-r2-cover, sonoff_dual_r2.jpg
|
||||
BME280 Environment, cookbook/bme280_environment, bme280.jpg
|
||||
Sonoff Fishpond Pump, cookbook/sonoff-fishpond-pump, cookbook-sonoff-fishpond-pump.jpg
|
||||
H801 LED Controller, cookbook/h801, h801.jpg
|
||||
Time & Temperature on OLED Display, cookbook/display_time_temp_oled, display_time_temp_oled_2.jpg
|
||||
Mirabella Genio Bulb, cookbook/mirabella-genio-bulb, cookbook-mirabella-genio-b22-rgbw.jpg
|
||||
Garage Door, cookbook/garage-door, window-open.svg
|
||||
Brilliant / Mirabella Genio Smart Plugs, cookbook/brilliant-mirabella-genio-smart-plugs, cookbook-brilliant-mirabella-genio-smart-plugs.jpg
|
||||
Etekcity Voltson (ESW01-EU) , cookbook/esw01-eu, esw01-eu.jpg
|
||||
Sonoff iFan02, cookbook/ifan02, fan.svg
|
||||
Zemismart RGBW Downlights, cookbook/zemismart-rgbw-downlights, cookbook-zemismart-rgbw-downlight.jpg
|
||||
Teckin SB50, cookbook/teckin_sb50, teckin_sb50.jpg
|
||||
Sonoff light switch options, cookbook/sonoff-light-switch, light_switch.png
|
||||
ESP32 Water Leak Detector, cookbook/leak-detector-m5stickC, leak-detector-m5stickC_main_index.jpg
|
||||
ESP32 BLE iTag Button, cookbook/ble_itag, esp32_ble_itag.jpg
|
||||
IAQ (Indoor Air Quality) Board, cookbook/iaq_board, iaq_board2.jpg
|
||||
TUYA Smart Life RGBW Controller, cookbook/tuya_rgbw, tuya_rgbw.jpg
|
||||
Arduino Port Extender, cookbook/arduino_port_extender, arduino_logo.svg
|
||||
Endstop Cover, cookbook/endstop-cover, window-open.svg
|
||||
Custom UART Text Sensor, cookbook/uart_text_sensor, language-cpp.svg
|
||||
IWOOLE Table Lamp, cookbook/iwoole_rgbw_table_lamp, iwoole_rgbw_table_lamp.png
|
||||
EPEVER Tracer, cookbook/tracer-an, tracer-an.jpg
|
||||
Ilonda Wifi Smart Fish Feeder, cookbook/ilonda-wifi-smart-fish-feeder, ilonda-wifi-smart-fish-feeder-cookbook.jpg
|
||||
AirGradient DIY Air Quality Sensor, cookbook/air_gradient_diy_air_quality_sensor, air_gradient_diy_air_quality_sensor.jpg
|
||||
Geiger Counter, cookbook/geiger-counter, radiationD-v1-1-cajoe_small.jpg
|
||||
EHMTX a matrix status/text display, cookbook/ehmtx, ehmtx.jpg
|
||||
|
||||
Do you have other awesome automations or cool setups? Please feel free to add them to the
|
||||
documentation for others to copy. See :doc:`Contributing </guides/contributing>`.
|
||||
|
||||
If you'd like to share configurations for specific devices, please contribute to our `ESPHome Devices <https://devices.esphome.io/>`__ database.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
|