mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-03-31 17:45:57 +02:00
Remove migrated items from Cookbook (part2) (#2820)
* Remove migrated items from Cookbook (part2) These devices are migrated to the devices site with https://github.com/esphome/esphome-devices/pull/386 * remove unused images
This commit is contained in:
parent
0998228c45
commit
8c3cd97ea1
cookbook
brilliant-mirabella-genio-smart-plugs.rst
index.rstimages
brilliant-mirabella-genio-smart-plugs-homeassistant.jpgbrilliant-mirabella-genio-smart-plugs.jpgmirabella-genio-b22-rgbw-homeassistant.jpgmirabella-genio-b22-rgbw.jpgpir-header.jpgpir-inside.jpgpir-pins.jpgpir-ui.pngrelay-full.jpgzemismart-rgbw-downlight-homeassistant.jpgzemismart-rgbw-downlight.jpg
mirabella-genio-bulb.rstpir.rstrelay.rstzemismart-rgbw-downlights.rst@ -1,550 +0,0 @@
|
||||
Brilliant / Mirabella Genio Smart Plugs
|
||||
=======================================
|
||||
|
||||
Brilliant / Mirabella Genio Smart Plugs are a Tuya-based smart plugs sold by Bunnings and Kmart respectively in Australia.
|
||||
|
||||
.. figure:: images/brilliant-mirabella-genio-smart-plugs.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Originally intended to be used with their companion apps once flashed using `tuya-convert <https://github.com/ct-Open-Source/tuya-convert>`__ ESPHome generated
|
||||
firmware can be uploaded allowing you to control the smart plugs via Home Assistant.
|
||||
|
||||
1. Create the ESPHome Firmware
|
||||
------------------------------
|
||||
|
||||
#. Refer to either :doc:`/guides/getting_started_command_line` or :doc:`/guides/getting_started_hassio` before moving onto the next step.
|
||||
#. Select a plug configuration below based on the plug/s you have and copy all of the text in the code block and paste into your
|
||||
``name_of_esphome_configuration.yaml`` file.
|
||||
#. Compile the firmware, again depending on your chosen setup refer to the guides in the first point.
|
||||
|
||||
2. Flashing
|
||||
-----------
|
||||
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
b. Raspberry Pi 3B/B+.
|
||||
|
||||
.. note::
|
||||
|
||||
As per the `tuya-convert documentation <https://github.com/ct-Open-Source/tuya-convert/blob/master/README.md#requirements>`__:
|
||||
|
||||
Any Linux with a Wifi adapter which can act as an Access Point should also work. Please note that we have tested the Raspberry Pi with clean installations
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
*********************
|
||||
|
||||
#. It's recommended to read the documentation provided by the Raspberry Pi Foundation on the best way to flash the OS to the microSD card depending on your
|
||||
platform - `Installing operating system images <https://www.raspberrypi.org/documentation/installation/installing-images/>`__.
|
||||
#. After you've flashed the microSD card browse to the "boot" partition and add a blank file called "ssh" **(without any extension)** which will enable the
|
||||
SSH server upon first boot, extended information on this step can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ssh/README.md#3-enable-ssh-on-a-headless-raspberry-pi-add-file-to-sd-card-on-another-machine>`__.
|
||||
#. Plug the microSD card into the Raspberry Pi, connect network cable and power, the Raspberry Pi will start to boot.
|
||||
|
||||
2.3 Connecting to the Pi via SSH
|
||||
********************************
|
||||
|
||||
#. Download and install `Putty <https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html>`__.
|
||||
#. Open Putty.
|
||||
#. Enter the IP of Raspberry Pi in the box that says "Host Name", leaving the port set to 22 (default for SSH). A list of recommended ways can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ip-address.md>`__, but the easiest is to download and use `Fing <https://www.fing.com/>`__
|
||||
(`Android <https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en_GB>`__ / `iOS
|
||||
<https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8>`__).
|
||||
#. In the "Saved Sessions" input box, name the Raspberry Pi connection and then press "Save".
|
||||
#. Select your new saved session from the list.
|
||||
#. Press "Open".
|
||||
|
||||
2.4 Configuring the Pi
|
||||
**********************
|
||||
|
||||
#. In the putty window login with the **pi** as the user and **raspberry** for the password.
|
||||
#. Type ``sudo apt-get update && sudo apt-get dist-upgrade -y`` and wait for the upgrades to install.
|
||||
#. Type ``sudo apt-get install git`` and wait for it to install.
|
||||
|
||||
2.5 Setup and Install tuya-convert
|
||||
**********************************
|
||||
|
||||
#. In the putty window type ``git clone https://github.com/ct-Open-Source/tuya-convert`` press enter and wait while the repository is cloned.
|
||||
#. Type ``cd tuya-convert`` and press enter.
|
||||
#. Type ``./install_prereq.sh`` press enter and wait as the script gathers all the required components needed to function.
|
||||
|
||||
2.6 Upload ESPHome Firmware using SFTP
|
||||
**************************************
|
||||
|
||||
#. Download `FileZilla <https://filezilla-project.org/download.php?type=client>`__ or `WinSCP <https://winscp.net/eng/index.php>`__ or use your preferred FTP
|
||||
client.
|
||||
#. Depending on the program you need to connect to the Pi using the IP address as the hostname and the username and password the same as you used to connect
|
||||
via SSH and ensure your connection type is set to **SFTP**
|
||||
#. Browse to ``/root/tuya-convert/files``.
|
||||
#. Upload your compiled ``firmware.bin`` file to this directory. For command line based installs you can access the file under
|
||||
``<CONFIG_DIR>/<NODE_NAME>/.pioenvs/<NODE_NAME>/firmware.bin`` alternatively Home Assistant add-on users can download the file directly from the web ui.
|
||||
|
||||
2.7 Use tuya-convert to install ESPHome Firmware
|
||||
************************************************
|
||||
|
||||
#. Type ``./start_flash.sh``
|
||||
#. Type ``yes`` to accept the warning.
|
||||
#. Connect your alternative WiFi device (non iOS / Apple based) to the ``vtrust-flash`` SSID using ``flashmeifyoucan`` as the password. This is the network
|
||||
being broadcast by the Pi from the tuya flash script.
|
||||
#. If you haven't already connect your smart plug and turn it on. It should automatically enter pairing mode, if it doesn't follow the instructions below:
|
||||
|
||||
* Brilliant `(PDF Manual) <https://www.brilliantsmart.com.au/wp-content/uploads/2019/02/03.-How-to-setup-the-Smart-plug.pdf>`__
|
||||
|
||||
* To connect the Smart WiFi Plug to your WiFi press and hold the manual control button for about 5 seconds until you hear a click. Let go of the button
|
||||
as soon as you hear the **click**. Then press button once again to activate blinking. **The red indicator light should now blink rapidly (2 times per
|
||||
second)**.
|
||||
|
||||
* Mirabella `(PDF Manual) <https://img1.wsimg.com/blobby/go/67cdd3b9-3600-4104-b097-603c05201237/downloads/1cq5h6nt7_336441.pdf>`__
|
||||
|
||||
* To do this, ensure your plug is on (the indicator light should be blue), hold the power button down for 5 seconds until you hear a click, let go of the
|
||||
power button and then press the button once to activate.
|
||||
|
||||
#. Press enter on your putty window to start the flash process and wait. If the connection is successful you should see a large amount of scrolling text, this
|
||||
is the script backing up the factory shipped firmware.
|
||||
#. Once the process is complete you can type ``curl http://10.42.42.42/flashURL?url=http://10.42.42.1/files/firmware.bin``
|
||||
#. The plug will restart and if everything is working correctly after a few seconds you should be able to press the button triggering the relay and turning the
|
||||
blue led on.
|
||||
|
||||
3. Smart Plug Configurations
|
||||
----------------------------
|
||||
|
||||
Thanks to the existing work by `@ideasman69 <https://github.com/ct-Open-Source/tuya-convert/issues/66>`__ and
|
||||
`afalzon <https://github.com/arendst/Sonoff-Tasmota/wiki/Mirabella-Genio-Smart-Plug>`__
|
||||
which these adaptions created by `@cryptelli <https://community.home-assistant.io/u/cryptelli>`__ are based on.
|
||||
|
||||
|
||||
3.1 Brilliant Smart Plug
|
||||
************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: brilliant_smart_plug
|
||||
friendly_name: Brilliant Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 14
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: red_led
|
||||
pin:
|
||||
number: GPIO12
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO5
|
||||
id: relay
|
||||
|
||||
# Turn off red LED to show blue when turned on
|
||||
on_turn_on:
|
||||
- switch.turn_off: red_led
|
||||
|
||||
# Turns on the red LED once the plug is turned off. Stock plug doesn't do this, to restore normal behavior remove the on_turn_on and on_turn_off
|
||||
# blocks.
|
||||
on_turn_off:
|
||||
- switch.turn_on: red_led
|
||||
|
||||
|
||||
3.2 Mirabella Genio Wi-Fi 1 USB Adaptor
|
||||
***************************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: mirabella_genio_smart_plug
|
||||
friendly_name: Mirabella Genio Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO13
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: red_led
|
||||
pin:
|
||||
number: GPIO4
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
# Turn on red LED
|
||||
on_turn_on:
|
||||
- switch.turn_on: red_led
|
||||
|
||||
# Turns off red LED
|
||||
on_turn_off:
|
||||
- switch.turn_off: red_led
|
||||
|
||||
3.3 Gosund SP1
|
||||
**************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: gosund_sp1_smart_plug
|
||||
friendly_name: Gosund SP1
|
||||
|
||||
esphome:
|
||||
name: gosund_sp1_smart_plug
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO3
|
||||
inverted: true
|
||||
name: "Power Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: led
|
||||
pin: GPIO1
|
||||
|
||||
- platform: gpio
|
||||
name: "Gosund SP1 Smart Plug"
|
||||
pin: GPIO14
|
||||
id: relay
|
||||
on_turn_on:
|
||||
- switch.turn_on: led
|
||||
on_turn_off:
|
||||
- switch.turn_off: led
|
||||
|
||||
sensor:
|
||||
- platform: hlw8012
|
||||
sel_pin:
|
||||
number: GPIO12
|
||||
inverted: true
|
||||
cf_pin: GPIO04
|
||||
cf1_pin: GPIO05
|
||||
current_resistor: 0.00221
|
||||
voltage_divider: 871
|
||||
current:
|
||||
name: "Gosund SP1 Smart Plug current"
|
||||
unit_of_measurement: A
|
||||
voltage:
|
||||
name: "Gosund SP1 Smart Plug Voltage"
|
||||
unit_of_measurement: V
|
||||
power:
|
||||
name: "Gosund SP1 Smart Plug Wattage"
|
||||
unit_of_measurement: W
|
||||
id: "energy_temp_Wattage"
|
||||
change_mode_every: 8
|
||||
update_interval: 10s
|
||||
|
||||
Check the following page for calibrating the measurements: :ref:`sensor-filter-calibrate_linear`.
|
||||
|
||||
3.4 Topersun WL-SC01 Smart Plug
|
||||
*******************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: topersun_smart_plug
|
||||
friendly_name: Topersun Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 14
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: green_led
|
||||
pin:
|
||||
number: GPIO4
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "friendly_name Relay"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
# Turn off green LED to show red when turned on.
|
||||
on_turn_on:
|
||||
- switch.turn_off: green_led
|
||||
|
||||
# Turns on the green LED once the plug is turned off.
|
||||
on_turn_off:
|
||||
- switch.turn_on: green_led
|
||||
|
||||
3.5 NEO Coolcam wifi smart plug
|
||||
*******************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: coolcam_plug1
|
||||
friendly_name: Coolcam Smart Plug
|
||||
# Higher value gives lower watt readout
|
||||
current_res: "0.00221"
|
||||
# Lower value gives lower voltage readout
|
||||
voltage_div: "800"
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
inverted: true
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${friendly_name} LED Red"
|
||||
pin: GPIO13
|
||||
inverted: true
|
||||
restore_mode: ALWAYS_OFF
|
||||
id: red_led
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name} Relay"
|
||||
pin: GPIO14
|
||||
restore_mode: ALWAYS_ON
|
||||
id: relay
|
||||
|
||||
on_turn_on:
|
||||
- switch.turn_on: red_led
|
||||
|
||||
on_turn_off:
|
||||
- switch.turn_off: red_led
|
||||
|
||||
sensor:
|
||||
- platform: hlw8012
|
||||
sel_pin:
|
||||
number: GPIO12
|
||||
inverted: true
|
||||
cf_pin: GPIO04
|
||||
cf1_pin: GPIO05
|
||||
current_resistor: ${current_res}
|
||||
voltage_divider: ${voltage_div}
|
||||
current:
|
||||
name: "${friendly_name} Amperage"
|
||||
unit_of_measurement: A
|
||||
voltage:
|
||||
name: "${friendly_name} Voltage"
|
||||
unit_of_measurement: V
|
||||
power:
|
||||
name: "${friendly_name} Power"
|
||||
unit_of_measurement: W
|
||||
id: power_sensor
|
||||
change_mode_every: 8
|
||||
update_interval: 10s
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${friendly_name} Total Daily Energy"
|
||||
power_id: power_sensor
|
||||
filters:
|
||||
# Multiplication factor from W to kW is 0.001
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
|
||||
|
||||
3.6 Arlec Grid Connect Smart Plug In Socket With 2.1A USB Charger
|
||||
*****************************************************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: arlec_pc389ha_001
|
||||
friendly_name: Arlec Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap: {}
|
||||
|
||||
captive_portal:
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 14
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: blue_led
|
||||
pin:
|
||||
number: GPIO4
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: red_led
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name} Power"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
on_turn_on:
|
||||
# Turn off blue LED to show blue when turned on
|
||||
- switch.turn_off: red_led
|
||||
- switch.turn_on: blue_led
|
||||
on_turn_off:
|
||||
# Turns on the blue LED once the plug is turned off
|
||||
- switch.turn_off: blue_led
|
||||
- switch.turn_on: red_led
|
||||
|
||||
|
||||
4. Adding to Home Assistant
|
||||
---------------------------
|
||||
|
||||
You can now add your smart plug to home assistant via the configurations page, look for 'ESPHome' under the Integrations option and click 'Configure'.
|
||||
|
||||
.. figure:: images/brilliant-mirabella-genio-smart-plugs-homeassistant.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/switch/index`
|
||||
- :doc:`/components/binary_sensor/index`
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/monochromatic`
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/guides/automations`
|
||||
- :ghedit:`Edit`
|
Binary file not shown.
Before ![]() (image error) Size: 7.8 KiB |
Binary file not shown.
Before ![]() (image error) Size: 12 KiB |
Binary file not shown.
Before ![]() (image error) Size: 41 KiB |
Binary file not shown.
Before ![]() (image error) Size: 63 KiB |
Binary file not shown.
Before ![]() (image error) Size: 196 KiB |
Binary file not shown.
Before ![]() (image error) Size: 318 KiB |
Binary file not shown.
Before ![]() (image error) Size: 472 KiB |
Binary file not shown.
Before ![]() (image error) Size: 2.7 KiB |
Binary file not shown.
Before ![]() (image error) Size: 135 KiB |
Binary file not shown.
Before ![]() (image error) Size: 31 KiB |
Binary file not shown.
Before ![]() (image error) Size: 14 KiB |
@ -1,309 +0,0 @@
|
||||
Mirabella Genio Bulbs
|
||||
=====================
|
||||
|
||||
The Mirabella Genio is a Tuya-based smart bulb sold by Kmart in Australia.
|
||||
|
||||
.. figure:: images/mirabella-genio-b22-rgbw.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Originally intended to be used with their 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 bulbs via Home Assistant.
|
||||
|
||||
.. note::
|
||||
|
||||
Please note that the new version of this bulb that comes in a cardboard box are using the TYLC5 module which does not work via tuya-convert.
|
||||
These bulbs are also using the SM2135 chipset and not PWM anymore.
|
||||
|
||||
1. Create the ESPHome Firmware
|
||||
------------------------------
|
||||
|
||||
#. Refer to either :doc:`/guides/getting_started_command_line` or :doc:`/guides/getting_started_hassio` before moving onto the next step.
|
||||
#. Select a bulb configuration below based on the bulb/s you have and copy all of the text in the code block and paste into your
|
||||
``name_of_esphome_configuration.yaml`` file.
|
||||
#. Compile the firmware, again depending on your chosen setup refer to the guides in the first point.
|
||||
|
||||
2. Flashing
|
||||
-----------
|
||||
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
b. Raspberry Pi 3B/B+.
|
||||
|
||||
.. note::
|
||||
|
||||
As per the `tuya-convert documentation <https://github.com/ct-Open-Source/tuya-convert/blob/master/README.md#requirements>`__:
|
||||
|
||||
Any Linux with a Wifi adapter which can act as an Access Point should also work. Please note that we have tested the Raspberry Pi with clean installations
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
*********************
|
||||
|
||||
#. It's recommended to read the documentation provided by the Raspberry Pi Foundation on the best way to flash the OS to the microSD card depending on your
|
||||
platform - `Installing operating system images <https://www.raspberrypi.org/documentation/installation/installing-images/>`__.
|
||||
#. After you've flashed the microSD card browse to the "boot" partition and add a blank file called "ssh" **(without any extension)** which will enable the
|
||||
SSH server upon first boot, extended information on this step can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ssh/README.md#3-enable-ssh-on-a-headless-raspberry-pi-add-file-to-sd-card-on-another-machine>`__.
|
||||
#. Plug the microSD card into the Raspberry Pi, connect network cable and power, the Raspberry Pi will start to boot.
|
||||
|
||||
2.3 Connecting to the Pi via SSH
|
||||
********************************
|
||||
|
||||
#. Download and install `Putty <https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html>`__.
|
||||
#. Open Putty.
|
||||
#. Enter the IP of Raspberry Pi in the box that says "Host Name", leaving the port set to 22 (default for SSH). A list of recommended ways can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ip-address.md>`__, but the easiest is to download and use `Fing <https://www.fing.com/>`__
|
||||
(`Android <https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en_GB>`__ / `iOS
|
||||
<https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8>`__).
|
||||
#. In the "Saved Sessions" input box, name the Raspberry Pi connection and then press "Save".
|
||||
#. Select your new saved session from the list.
|
||||
#. Press "Open".
|
||||
|
||||
2.4 Configuring the Pi
|
||||
**********************
|
||||
|
||||
#. In the putty window login with the **pi** as the user and **raspberry** for the password.
|
||||
#. Type ``sudo apt-get update && sudo apt-get dist-upgrade -y`` and wait for the upgrades to install.
|
||||
#. Type ``sudo apt-get install git`` and wait for it to install.
|
||||
|
||||
2.5 Setup and Install tuya-convert
|
||||
**********************************
|
||||
|
||||
#. In the putty window type ``git clone https://github.com/ct-Open-Source/tuya-convert`` press enter and wait while the repository is cloned.
|
||||
#. Type ``cd tuya-convert`` and press enter.
|
||||
#. Type ``./install_prereq.sh`` press enter and wait as the script gathers all the required components needed to function.
|
||||
|
||||
2.6 Upload ESPHome Firmware using SFTP
|
||||
**************************************
|
||||
|
||||
#. Download `FileZilla <https://filezilla-project.org/download.php?type=client>`__ or `WinSCP <https://winscp.net/eng/index.php>`__ or use your preferred FTP
|
||||
client.
|
||||
#. Depending on the program you need to connect to the Pi using the IP address as the hostname and the username and password the same as you used to connect
|
||||
via SSH and ensure your connection type is set to **SFTP**
|
||||
#. Browse to ``/root/tuya-convert/files``.
|
||||
#. Upload your compiled ``firmware.bin`` file to this directory. For command line based installs you can access the file under
|
||||
``<CONFIG_DIR>/<NODE_NAME>/.pioenvs/<NODE_NAME>/firmware.bin`` alternatively Home Assistant add-on users can download the file directly from the web ui.
|
||||
|
||||
2.7 Use tuya-convert to install ESPHome Firmware
|
||||
************************************************
|
||||
|
||||
#. Type ``./start_flash.sh``
|
||||
#. Type ``yes`` to accept the warning.
|
||||
#. Connect your alternative WiFi device (non iOS / Apple based) to the ``vtrust-flash`` SSID using ``flashmeifyoucan`` as the password. This is the network
|
||||
being broadcast by the Pi from the tuya flash script.
|
||||
#. If you haven't already install your bulb and flip the switch. It should automatically enter pairing mode represented by the bulb flashing on and off. If it
|
||||
doesn't, switch your bulb, on-off-on-off-on as per the instructions `here
|
||||
<https://img1.wsimg.com/blobby/go/67cdd3b9-3600-4104-b097-603c05201237/downloads/1cq3j1sq1_277630.pdf>`__.
|
||||
#. Press enter on your putty window to start the flash process and wait. The bulb will stop flashing followed by a large amount of scrolling text, this is the
|
||||
script backing up the factory shipped firmware.
|
||||
#. Once the process is complete you can type ``curl http://10.42.42.42/flashURL?url=http://10.42.42.1/files/firmware.bin``
|
||||
#. The bulb will restart and if everything is working correctly after a few seconds the light should be on.
|
||||
|
||||
3. Bulb Configurations
|
||||
----------------------
|
||||
|
||||
Thanks to the `existing work <https://github.com/arendst/Sonoff-tasmota/wiki/Mirabella-Genio-Bulb>`__ by
|
||||
`@so3n <https://github.com/arendst/Sonoff-tasmota/wiki/Mirabella-Genio-Bulb>`__ which these adaptions created by `@cryptelli
|
||||
<https://community.home-assistant.io/u/cryptelli>`__ and `@bircoe <https://community.home-assistant.io/u/bircoe>`__ are based on.
|
||||
|
||||
|
||||
3.1 Monochromatic Bulbs
|
||||
***********************
|
||||
|
||||
The brightness of the bulb can be controlled using the ``esp8266_pwm`` output component connected to the light component using the id configuration
|
||||
variable ``output_component1``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: mirabella_genio_cw_1
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
name: "Mirabella Genio Smart Bulb"
|
||||
id: light
|
||||
output: output_component1
|
||||
|
||||
# Ensure the light turns on by default if the physical switch is actuated.
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_component1
|
||||
# May need to use GPIO14 instead for certain globes
|
||||
pin: GPIO13
|
||||
|
||||
|
||||
3.2 Cold + Warm White Bulbs
|
||||
***************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: mirabella_genio_cwww_1
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output_warm_white
|
||||
pin: GPIO13
|
||||
- platform: esp8266_pwm
|
||||
id: output_daylight
|
||||
pin: GPIO5
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: "Mirabella Genio Smart Bulb"
|
||||
id: light
|
||||
cold_white: output_daylight
|
||||
warm_white: output_warm_white
|
||||
cold_white_color_temperature: 6500 K
|
||||
warm_white_color_temperature: 2700 K
|
||||
|
||||
# Ensure the light turns on by default if the physical switch is actuated.
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
3.3 RGBW Color Bulbs
|
||||
********************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: rgbw_e27_01
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
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_white
|
||||
pin: GPIO5
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: "rgbw_e27_01"
|
||||
id: light
|
||||
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_ON
|
||||
|
||||
3.4 CWWW Mirabella Genio Downlights
|
||||
***********************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: rgbw_e27_01
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: output1
|
||||
pin: GPIO14
|
||||
- platform: esp8266_pwm
|
||||
id: output2
|
||||
pin: GPIO12
|
||||
|
||||
light:
|
||||
- platform: cwww2
|
||||
id: LED
|
||||
name: "Downlight"
|
||||
color_temperature: output2
|
||||
brightness: output1
|
||||
cold_white_color_temperature: 6500 K
|
||||
warm_white_color_temperature: 2700 K
|
||||
|
||||
# Ensure the light turns on by default if the physical switch is actuated.
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
|
||||
4. Adding to Home Assistant
|
||||
---------------------------
|
||||
|
||||
You can now add your bulb to home assistant via the configurations page, look for 'ESPHome' under the Integrations option and click 'Configure'.
|
||||
|
||||
.. figure:: images/mirabella-genio-b22-rgbw-homeassistant.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/monochromatic`
|
||||
- :doc:`/components/light/cwww`
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/guides/automations`
|
||||
- :ghedit:`Edit`
|
@ -1,65 +0,0 @@
|
||||
Passive Infrared Sensor
|
||||
=======================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up PIR (passive infrared) motion detection sensors in ESPHome
|
||||
:image: pir.jpg
|
||||
:keywords: PIR
|
||||
|
||||
.. figure:: images/pir-header.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
Passive Infrared Sensors (or PIR sensors for short) are completely supported by
|
||||
ESPHome. These sensors measure the infrared light emitted from objects in its
|
||||
field of view, and if it detects a sudden change between different parts of the
|
||||
sensing area, the signal is pulled high.
|
||||
|
||||
.. figure:: images/pir-inside.jpg
|
||||
:align: center
|
||||
:width: 60.0%
|
||||
|
||||
Connecting the PIR sensor is also quite simple. You need to connect ``GND`` to a GND pin
|
||||
on your board and ``VCC`` to a ``5V`` or ``12V`` pin. Technically you can also connect
|
||||
``VCC`` to ``3.3V``, but the sensor measurements won't be as stable.
|
||||
|
||||
Next you need to connect the signal pin (``OUT``). Fortunately, the sensor signal has
|
||||
a voltage of ``3.3V`` max, so we can directly connect it to a free GPIO pin on the ESP board.
|
||||
Otherwise, we would need to step down the voltage in order to not damage the ESP.
|
||||
|
||||
.. figure:: images/pir-pins.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
.. warning::
|
||||
|
||||
Some PIR sensors have the GND and power supply pins swapped, please open the front
|
||||
cover to see which pin mapping your PIR sensor is using to make sure.
|
||||
|
||||
On the back side you will additionally find two knobs that you can turn to change the sensor
|
||||
sensitivity and time the signal will stay active for once motion has been detected. Turning
|
||||
these clockwise will increase sensitivity/re-trigger time.
|
||||
|
||||
To configure ESPHome for use with the PIR sensor, use a
|
||||
:doc:`GPIO Binary Sensor </components/binary_sensor/gpio>`. It can detect
|
||||
if a pin is pulled HIGH/LOW and reports those values to Home Assistant. Optionally also
|
||||
set a ``device_class`` so that Home Assistant uses a nice icon for the binary sensor.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: <PIN_PIR_SENSOR_IS_CONNECTED_TO>
|
||||
name: "PIR Sensor"
|
||||
device_class: motion
|
||||
|
||||
.. figure:: images/pir-ui.png
|
||||
:align: center
|
||||
:width: 60.0%
|
||||
|
||||
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`
|
||||
- :ghedit:`Edit`
|
@ -1,50 +0,0 @@
|
||||
Relay
|
||||
=====
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for using relays in ESPHome.
|
||||
:image: relay.jpg
|
||||
:keywords: Relay
|
||||
|
||||
.. figure:: images/relay-full.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
Relays are simple electronics components that allow you to switch a high load
|
||||
using only a single pin on your board.
|
||||
|
||||
On the inside of a relay there is a coil that's connected to the input signal.
|
||||
Every time the input signal switches on, the current flowing through the coil induces
|
||||
a magnetic field that closes a contact.
|
||||
|
||||
On the output side you have three pins: common (``COM``), normally open (``NO``) and
|
||||
normally closed (``NC``). Connect ``COM`` and one of ``NO`` and ``NC`` in series
|
||||
with your load. When the input turns on, ``NO`` is connected to ``COM`` and
|
||||
when the input turns off, ``NC`` is connected to ``COM``.
|
||||
|
||||
.. warning::
|
||||
|
||||
Relays are a very common component in electronics, so there are *many* types of them and
|
||||
I won't attempt to describe all of them (partly due to my own lack of knowledge). Please
|
||||
check with the datasheet of your relay to see its current limits, what voltage it requires
|
||||
and so on. Please also note that relays are physical components - as such, they have a limited
|
||||
number of switches that can happen before they break.
|
||||
|
||||
To use a relay with ESPHome, use a :doc:`GPIO Switch </components/switch/gpio>`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Relay"
|
||||
pin: <PIN_RELAY_IS_CONNECTED_TO>
|
||||
|
||||
For a more complete example, check :doc:`Simple Garage Door </cookbook/garage-door>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/switch/gpio`
|
||||
- :doc:`/components/output/gpio`
|
||||
- `How do relays work <https://www.explainthatstuff.com/howrelayswork.html>`__.
|
||||
- :ghedit:`Edit`
|
@ -1,234 +0,0 @@
|
||||
Zemismart LED RGBW/RGBWW Downlights
|
||||
===================================
|
||||
|
||||
The Zemismart LED RGBW Downlight is a Tuya-based downlight available from various retailers online or from `zemismart.com <https://www.zemismart.com>`__ direct.
|
||||
|
||||
.. figure:: images/zemismart-rgbw-downlight.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
Originally intended to be used with their 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 smart plugs via Home Assistant.
|
||||
|
||||
1. Create the ESPHome Firmware
|
||||
------------------------------
|
||||
|
||||
#. Refer to either :doc:`/guides/getting_started_command_line` or :doc:`/guides/getting_started_hassio` before moving onto the next step.
|
||||
#. Select a plug configuration below based on the plug/s you have and copy all of the text in the code block and paste into your
|
||||
``name_of_esphome_configuration.yaml`` file.
|
||||
#. Compile the firmware, again depending on your chosen setup refer to the guides in the first point.
|
||||
|
||||
2. Flashing
|
||||
-----------
|
||||
|
||||
2.1 Prerequisites
|
||||
*****************
|
||||
|
||||
#. Before you begin you'll need one of the following Linux machines running the latest copy of `Raspbian Stretch Lite
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`__
|
||||
|
||||
a. Raspberry Pi 2B/B+ with `USB WiFi Dongle <https://www.raspberrypi.org/products/raspberry-pi-usb-wifi-dongle/>`__.
|
||||
b. Raspberry Pi 3B/B+.
|
||||
|
||||
.. note::
|
||||
|
||||
As per the `tuya-convert documentation <https://github.com/ct-Open-Source/tuya-convert/blob/master/README.md#requirements>`__:
|
||||
|
||||
Any Linux with a Wifi adapter which can act as an Access Point should also work. Please note that we have tested the Raspberry Pi with clean installations
|
||||
only. If you use your Raspberry Pi for anything else, we recommend using another SD card with a clean installation.
|
||||
|
||||
#. A microSD card (minimum 2GB, 8GB+ recommended).
|
||||
#. Any WiFi device which can connect to the SSID generated by the Raspberry Pi and eventually the flashed Tuya device. **This cannot be an iOS / Apple device.
|
||||
Android devices will work.**
|
||||
|
||||
2.2 Installing the OS
|
||||
*********************
|
||||
|
||||
#. It's recommended to read the documentation provided by the Raspberry Pi Foundation on the best way to flash the OS to the microSD card depending on your
|
||||
platform - `Installing operating system images <https://www.raspberrypi.org/documentation/installation/installing-images/>`__.
|
||||
#. After you've flashed the microSD card browse to the "boot" partition and add a blank file called "ssh" **(without any extension)** which will enable the
|
||||
SSH server upon first boot, extended information on this step can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ssh/README.md#3-enable-ssh-on-a-headless-raspberry-pi-add-file-to-sd-card-on-another-machine>`__.
|
||||
#. Plug the microSD card into the Raspberry Pi, connect network cable and power, the Raspberry Pi will start to boot.
|
||||
|
||||
2.3 Connecting to the Pi via SSH
|
||||
********************************
|
||||
|
||||
#. Download and install `Putty <https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html>`__.
|
||||
#. Open Putty.
|
||||
#. Enter the IP of Raspberry Pi in the box that says "Host Name", leaving the port set to 22 (default for SSH). A list of recommended ways can be found `here
|
||||
<https://www.raspberrypi.org/documentation/remote-access/ip-address.md>`__, but the easiest is to download and use `Fing <https://www.fing.com/>`__
|
||||
(`Android <https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en_GB>`__ / `iOS
|
||||
<https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8>`__).
|
||||
#. In the "Saved Sessions" input box, name the Raspberry Pi connection and then press "Save".
|
||||
#. Select your new saved session from the list.
|
||||
#. Press "Open".
|
||||
|
||||
2.4 Configuring the Pi
|
||||
**********************
|
||||
|
||||
#. In the putty window login with the **pi** as the user and **raspberry** for the password.
|
||||
#. Type ``sudo apt-get update && sudo apt-get dist-upgrade -y`` and wait for the upgrades to install.
|
||||
#. Type ``sudo apt-get install git`` and wait for it to install.
|
||||
|
||||
2.5 Setup and Install tuya-convert
|
||||
**********************************
|
||||
|
||||
#. In the putty window type ``git clone https://github.com/ct-Open-Source/tuya-convert`` press enter and wait while the repository is cloned.
|
||||
#. Type ``cd tuya-convert`` and press enter.
|
||||
#. Type ``./install_prereq.sh`` press enter and wait as the script gathers all the required components needed to function.
|
||||
|
||||
2.6 Upload ESPHome Firmware using SFTP
|
||||
**************************************
|
||||
|
||||
#. Download `FileZilla <https://filezilla-project.org/download.php?type=client>`__ or `WinSCP <https://winscp.net/eng/index.php>`__ or use your preferred FTP
|
||||
client.
|
||||
#. Depending on the program you need to connect to the Pi using the IP address as the hostname and the username and password the same as you used to connect
|
||||
via SSH and ensure your connection type is set to **SFTP**
|
||||
#. Browse to ``/root/tuya-convert/files``.
|
||||
#. Upload your compiled ``firmware.bin`` file to this directory. For command line based installs you can access the file under
|
||||
``<CONFIG_DIR>/<NODE_NAME>/.pioenvs/<NODE_NAME>/firmware.bin`` alternatively Home Assistant add-on users can download the file directly from the web UI.
|
||||
|
||||
2.7 Use tuya-convert to install ESPHome Firmware
|
||||
************************************************
|
||||
|
||||
#. Type ``./start_flash.sh``
|
||||
#. Type ``yes`` to accept the warning.
|
||||
#. Connect your alternative WiFi device (non iOS / Apple based) to the ``vtrust-flash`` SSID using ``flashmeifyoucan`` as the password. This is the network
|
||||
being broadcast by the Pi from the Tuya flash script.
|
||||
#. If you haven't already plug your downlight into a power point and turn it on and follow the instructions below:
|
||||
|
||||
#. Once turned on a stable white light will be emitted.
|
||||
#. Switch off, then back on **3** times ensuring each off-on cycle is no longer 10 seconds apart and between each the light visibly turns off.
|
||||
#. The light should have entered into a fast flashing state, if this is the case continue onto **Step 5** below. *Otherwise please turn the downlight off-on
|
||||
within 3 minutes which will restore it back to a stable white light.*
|
||||
|
||||
|
||||
#. Press enter on your putty window to start the flash process and wait. If the connection is successful you should see a large amount of scrolling text, this
|
||||
is the script backing up the factory shipped firmware.
|
||||
#. Once the process is complete you can type ``curl http://10.42.42.42/flashURL?url=http://10.42.42.1/files/firmware.bin``
|
||||
#. The plug will restart and if everything is working correctly after a few seconds you should be able to press the button triggering the relay and turning the
|
||||
blue led on.
|
||||
|
||||
3. Downlight Configuration
|
||||
--------------------------
|
||||
|
||||
Thanks to `@1972rx2 <https://community.home-assistant.io/u/1972rx2>`__ for creating the below ESPHome configuration
|
||||
which this cookbook article by `@cryptelli <https://community.home-assistant.io/u/cryptelli>`__ is based on.
|
||||
|
||||
Depending on the type of your light you either need a config using my9231 driver (RGBW) or 5 PWM channels (RGBWW).
|
||||
|
||||
3.1 Zemismart LED RGBW Downlight YAML
|
||||
*************************************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: downlight01
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
my9231:
|
||||
data_pin: GPIO13
|
||||
clock_pin: GPIO15
|
||||
num_channels: 4
|
||||
num_chips: 1
|
||||
|
||||
output:
|
||||
- platform: my9231
|
||||
id: output_blue
|
||||
channel: 1
|
||||
- platform: my9231
|
||||
id: output_red
|
||||
channel: 3
|
||||
- platform: my9231
|
||||
id: output_green
|
||||
channel: 2
|
||||
- platform: my9231
|
||||
id: output_white
|
||||
channel: 0
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: Downlight01
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
white: output_white
|
||||
|
||||
3.2. Zemismart LED RGBWw Downlight YAML
|
||||
***************************************
|
||||
|
||||
Known devices: *Zemismart 2,5 zoll WiFi RGBW Led Downlight 7w*
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: 14
|
||||
id: output_blue
|
||||
- platform: esp8266_pwm
|
||||
pin: 12
|
||||
id: output_green
|
||||
- platform: esp8266_pwm
|
||||
pin: 4
|
||||
id: output_red
|
||||
- platform: esp8266_pwm
|
||||
pin: 5
|
||||
id: output_coldwhite
|
||||
- platform: esp8266_pwm
|
||||
pin: 13
|
||||
id: output_warmwhite
|
||||
|
||||
light:
|
||||
- platform: rgbww
|
||||
name: '${device_name} Light'
|
||||
default_transition_length: 0s
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
cold_white: output_coldwhite
|
||||
warm_white: output_warmwhite
|
||||
cold_white_color_temperature: 6500 K
|
||||
warm_white_color_temperature: 2700 K
|
||||
|
||||
4. Adding to Home Assistant
|
||||
---------------------------
|
||||
|
||||
You can now add your downlight to Home Assistant using the below instructions:
|
||||
|
||||
#. In the left hand sidebar, select **Configuration**.
|
||||
#. Select **Integrations**
|
||||
#. Click the **Orange** plus button *(lower right hand corner)* and look for **ESPHome** in the list of available integrations and select.
|
||||
#. Type the host of the downlight, in most cases this is simply the IP address.
|
||||
#. Leave the port set to the default of ``6053``.
|
||||
#. Click **Submit**
|
||||
|
||||
If you've gotten this far, congratulations! Below is the card you should see inside Home Assistant which allows you to control the downlight.
|
||||
|
||||
|
||||
.. figure:: images/zemismart-rgbw-downlight-homeassistant.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/rgbw`
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/my9231`
|
||||
- :ghedit:`Edit`
|
21
index.rst
21
index.rst
@ -783,22 +783,17 @@ Cookbook
|
||||
|
||||
.. imgtable::
|
||||
|
||||
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
|
||||
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
|
||||
Brilliant / Mirabella Genio Smart Plugs, cookbook/brilliant-mirabella-genio-smart-plugs, cookbook-brilliant-mirabella-genio-smart-plugs.jpg
|
||||
Zemismart RGBW Downlights, cookbook/zemismart-rgbw-downlights, cookbook-zemismart-rgbw-downlight.jpg
|
||||
Sonoff light switch options, cookbook/sonoff-light-switch, light_switch.png
|
||||
Garage Door, cookbook/garage-door, window-open.svg
|
||||
Dual Relay Motor Cover, cookbook/dual-r2-cover, sonoff_dual_r2.jpg
|
||||
ESP32 Water Leak Detector, cookbook/leak-detector-m5stickC, leak-detector-m5stickC_main_index.jpg
|
||||
Arduino Port Extender, cookbook/arduino_port_extender, arduino_logo.svg
|
||||
Endstop Cover, cookbook/endstop-cover, window-open.svg
|
||||
BME280 Environment, cookbook/bme280_environment, bme280.jpg
|
||||
Time & Temperature on OLED Display, cookbook/display_time_temp_oled, display_time_temp_oled_2.jpg
|
||||
Custom UART Text Sensor, cookbook/uart_text_sensor, language-cpp.svg
|
||||
Endstop Cover, cookbook/endstop-cover, window-open.svg
|
||||
Non-Invasive Power Meter, cookbook/power_meter, power_meter.jpg
|
||||
Sonoff Fishpond Pump, cookbook/sonoff-fishpond-pump, cookbook-sonoff-fishpond-pump.jpg
|
||||
Arduino Port Extender, cookbook/arduino_port_extender, arduino_logo.svg
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user