Merge branch 'current' into next

This commit is contained in:
Otto Winter 2019-02-23 20:13:29 +01:00
commit b21583682d
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
15 changed files with 329 additions and 59 deletions

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.10.1
PROJECT_NUMBER = 1.11.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@ -1,5 +1,5 @@
ESPHOME_CORE_PATH = ../esphome-core
ESPHOME_CORE_TAG = v1.10.1
ESPHOME_CORE_TAG = v1.11.0
.PHONY: html cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1 +1 @@
1.10.1
1.11.0

View File

@ -13,20 +13,23 @@ Changelog - Version 1.11.0
Home Assistant Binary Sensor, components/binary_sensor/homeassistant, home-assistant.svg
Light Partition, components/light/partition, color_lens.svg
TODO, intro; camera support deferred :(, but hopefully ready soon; faster release schedule
Release 1.11.0 is here, and it has been a busy few weeks :)
First of all, thank you all for the amazing support on discord, twitter, twitch, etc.
Seeing how much people can accomplish with this tool is really inspiring!
ESPHome Rename Completed
------------------------
Back in 1.10.0, I decided to rename the project from esphomelib to ESPHome. This release
Back in 1.10.0, it was decided to rename the project from esphomelib to ESPHome. This release
has seen **massive** refactors to allow this rename. Literally thousands of files had
to be changed, often with lots of manual action required. Now a rename might not seem
too exciting for the user, but consider this: Lots of ancient code got revised and cleaned up,
too exciting for you the user, but consider this: Lots of ancient code got revised and cleaned up,
the ESPHome source got moved to a `dedicated Github Organization <https://github.com/esphome>`__
and many other organizational changes were made which will enable faster feature development.
As an example, ESPHome's documentation now gets built and served by `Netlify <https://www.netlify.com/>`__,
so all documentation contributions will now get a preview of the changes on a deploy website.
so all documentation contributions will now get a preview of the changes on a preview website.
Installation Methods Changed
----------------------------
@ -40,41 +43,104 @@ Because of this rename, ESPHome's installation methods have also changed (breaki
the ``esphomeyaml`` command now is called ``esphome``.
- **docker-based installs**: The docker image has moved to ``esphome/esphome``. So now you need
to use ``docker run --rm -it esphome/esphome livingroom.yaml run``.
to use ``docker run --rm -it esphome/esphome livingroom.yaml run``. The dashboard view
now uses mDNS to show online/offline status of ESPs, so you need to add ``--net=host`` for
that to work.
All old installation methods will no longer receive updates (and potentially be removed
in the future).
Local mDNS Responder
--------------------
Up until now, many users had to set static IPs for all ESP nodes in order to be able to connect to
them. That was not a good user experience and this project is committed to providing the best
possible user experience. So now ESPHome bundles its own mDNS responder so static IPs are no
longer necessary (ref: :esphomepr:`386`)! 🎉
Faster Release Cycle
--------------------
One of the big things that needs to be changed with this project is the release cycle.
For one thing there's all contributions by you the users that potentially have to wait
before users can use it. But it also makes releasing small tweaks or fixes much more difficult.
I know I've said this before, but I want to move ESPHome to a quicker and more regular release
interval. As a start, I've set my personal due date for the next release to be in two weeks.
Going forward, I want to have a regular release interval of 3 weeks (remind me of this if I forget :)
Also, you might have seen me post a picture of an ESP32 camera integration for ESPHome. Don't worry,
I've made that a top priority for the next release, but I've hit some road blocks that would have
prevented it from working in a stable way for this release (and I needed to finally get this darn
release out).
Breaking Changes
----------------
TODO: Copy breaking changes from PR descriptions
- Template Switches no longer restore their state by default :corepr:`503`
- Removed heartbeat filter from binary sensors :corepr:`454`
- ``optimistic`` mode for template platforms has been split off into ``optimistic`` and
``assumed_state`` options :corepr:`455`
- ``run_cycles`` has been removed from deep_sleep :esphome:`353`
Other notable changes:
----------------------
TODO
- Added GPIO Switch interlocking :corepr:`482`
- Added light partition platform which allows you to split an addressable light into partitions
and combine them :corepr:`501`
- Added ``wait_until`` action :corepr:`508`
- Added template publish actions, which allow you to manually push a state to a template
platform :corepr:`453`
- Added support for SI7021 sensors (found in Sonoff TH modules) :esphomepr:`375`
- MQTT is no longer compiled into firmwares that do no use it, should save a bit of space
:corepr:`430`, :corepr:`409`
- Added ``use_address`` option to ``wifi:`` which overrides the address ESPHome connects to :corepr:`484`
- Added display pages, which allow you to have a display that periodically switches between
different pages of content :corepr:`507`
- Added two new IR codecs: IR5 and JVC :corepr:`502`, :corepr:`493`
- Added option to use alternative hardware UART interfaces for logging :corepr:`483`
- All log strings are stored in flash now, so that saves a few kb of IRAM on ESP8266s :corepr:`432`
- Fixed ESP8266s with CSE7766 rebooting often
- Fixed using MQTT and native API at the same time
- Personal information is now automatically redacted from dashboard logs :corepr:`488`
Beta Fixes
----------
- esphome: Fix custom components not registered :esphomepr:`441`
- core: Add empty nameable constructors :corepr:`509`
- core: Fix Nextion "Received unknown filler end bytes" :corepr:`510`
- core: Fix functional attachInterrupt placed in flash :corepr:`511`
- esphome: Remove duplicate scrollbar & move scrollbar :esphomepr:`443` by :ghuser:`TheZoker`
- esphome: Remove unnecessary wrapper :esphomepr:`444` by :ghuser:`TheZoker`
- core: Refactor addressable light and fix partition issue :corepr:`512`
- esphome: Fix MQTT log topic level :esphomepr:`445`
- core: Fix ESP8266 functional interrupts :corepr:`515`
- esphome: Allow i2c on non-pullup pins :esphomepr:`447`
- esphome: Allow use of arduino core v2.5.0 on ESP8266 :esphomepr:`446`
All changes
-----------
- core: Attemp to fix the addressable flicker effect :corepr:`392` by :ghuser:`RomRider`
- esphome: typing is only required for python < 3.5 :esphomepr:`341` by :ghuser:`dotlambda`
- esphome: Fix install pillow in docker image :esphomepr:`338`
- esphome: Allow IPv4 addresses for SNTP servers :esphomepr:`340`
- docs: Update esp8266_pwm.rst :docspr:`123` by :ghuser:`rabbadab`
- docs: Fix esp8266_pwm example, IDs cannot have hyphens :docspr:`123` by :ghuser:`rabbadab`
- esphome: Add pyserial to install_requires :esphomepr:`348` by :ghuser:`dotlambda`
- docs: Added explanation how to change the password :docspr:`124` by :ghuser:`WoLpH`
- docs: Update light lambda effect example :docspr:`125` by :ghuser:`jdads1`
- core: Improve handling of MQTT birth message :corepr:`410`
- core: Fix WiFi apply hostname too early :corepr:`399`
- core: Fix pulse counter :corepr:`397`
- esphome: Fix expire_after requires MQTT :esphomepr:`354`
- core: Fix pulse counter filtering for ESP8266 :corepr:`397`
- esphome: Warn if expire_after used without MQTT :esphomepr:`354`
- esphome: Use strict string mode for WiFi password :esphomepr:`351`
- docs: Add ESP8266 advanced info :docspr:`128`
- docs: Cookbook for Sonoff basic :docspr:`122` by :ghuser:`meijerwynand`
- docs: Cookbook Entry for Sonoff Basic Fish Pond Pump :docspr:`122` by :ghuser:`meijerwynand`
- docs: Add Arilux LC02 pinout :docspr:`130` by :ghuser:`pixiandreas`
- docs: Update for default update_interval :docspr:`131` by :ghuser:`balk77`
- docs: Dallas: Update for default update_interval :docspr:`131` by :ghuser:`balk77`
- core: Fix Light Color Temperature for native API :corepr:`398`
- core: Throttle filter doesn't work for quick firing sensors :corepr:`408` by :ghuser:`AlexDanault`
- core: Improve Preferences Log Output :corepr:`414`
@ -85,11 +151,11 @@ All changes
- esphome: Upgrade HassIO Ubuntu Base to 2.2.1 :esphomepr:`368`
- esphome: Fix ESP32 BLE tracker scan interval in seconds :esphomepr:`367`
- esphome: ESP8266 Better Exception Code Names :esphomepr:`358`
- esphome: Rmove DNS1,DNS2 inclusive :esphomepr:`357`
- esphome: Remove DNS1,DNS2 inclusive :esphomepr:`357`
- esphome: Remove deep sleep run_cycles :esphomepr:`353`
- esphome: Fix custom output requiring type :esphomepr:`344`
- core: Don't duplicate binary sensor events :corepr:`411`
- esphome: call platformio and esptool using subprocess if $ESPHOME_USE_SUBPROCESS is set :esphomepr:`359` by :ghuser:`dotlambda`
- esphome: Add ability to run commands using subprocess, instead of in-process :esphomepr:`359` by :ghuser:`dotlambda`
- core: Fix on_press / on_release being triggered on initial state :corepr:`425`
- core: Remove hard dependencies in library.json :corepr:`409`
- esphome: Upgrade espressif32 package to 1.6.0 :esphomepr:`355`
@ -104,7 +170,7 @@ All changes
- esphome: Generate variable for each custom component id :esphomepr:`382` by :ghuser:`yawor`
- esphome: Fix Custom Components No Name :esphomepr:`395`
- core: Split off assumed state from optimistic mode :corepr:`455`
- esphome: Remove Heartbeat Filter :esphomepr:`393`
- esphome: Remove Heartbeat Binary Sensor Filter :esphomepr:`393`
- core: Disable MQTT if not used :corepr:`430`
- esphome: Disable MQTT if not used :esphomepr:`373`
- core: Store raw remote codes in flash :corepr:`456`
@ -112,33 +178,33 @@ All changes
- core: Rewrite native API client for increased reliability :corepr:`426`
- docs: Fix Typo in BME280 Environment Cookbook :docspr:`145` by :ghuser:`hajdbo`
- docs: Updating Repo URLs in Contribution Guide :docspr:`143` by :ghuser:`badbadc0ffee`
- core: Update sony.cpp :corepr:`458` by :ghuser:`chris-jennings`
- core: Update sony.cpp to fix incorrectly formed Sony IR code (extra bit) :corepr:`458` by :ghuser:`chris-jennings`
- docs: Extra example in cookbook / flashing DOIT ESP32 :docspr:`138` by :ghuser:`DavidDeSloovere`
- docs: Adding the SI7021 to docs :docspr:`147` by :ghuser:`grea09`
- esphome: Validate neopixelbus method :esphomepr:`398`
- core: PMSx003 bugfix, close #470 :corepr:`471` by :ghuser:`hajdbo`
- core: Fix PMSx003 payload length calculation :corepr:`471` by :ghuser:`hajdbo`
- docs: Netlify :docspr:`153`
- docs: Remove duplicate "includes" line :docspr:`154` by :ghuser:`notgwj`
- core: Remove 'flash' property from MQTT Light discovery JSON. :corepr:`478` by :ghuser:`brandond`
- docs: Improve docker build instructions :docspr:`155` by :ghuser:`DavidDeSloovere`
- core: Add Homeassistant Binary Sensor :corepr:`480`
- core: GPIO Switch Interlocking :corepr:`482`
- esphome: Print error when mqtt.publish used without MQTT enabled :esphomepr:`408`
- esphome: Add Homeassistant Binary Sensor :esphomepr:`409`
- esphome: Allow pins 9&10 for PWM :esphomepr:`410`
- docs: Add Homeassistant binary sensor :docspr:`156`
- esphome: Store Raw Remote Codes in PROGMEM :esphomepr:`392`
- core: Add Homeassistant Binary Sensor :corepr:`480` (cherry-picked)
- core: GPIO Switch Interlocking :corepr:`482` (cherry-picked)
- esphome: Print error when mqtt.publish used without MQTT enabled :esphomepr:`408` (cherry-picked)
- esphome: Add Homeassistant Binary Sensor :esphomepr:`409` (cherry-picked)
- esphome: Allow pins 9&10 for PWM :esphomepr:`410` (cherry-picked)
- docs: Homeassistant binary sensor :docspr:`156`
- esphome: Store Raw Remote Codes in PROGMEM :esphomepr:`392` (cherry-picked)
- core: Better error messages for OTA :corepr:`486`
- esphome: Better error messages for OTA :esphomepr:`418`
- core: Synchronize homeassistant time periodically :corepr:`485`
- core: ESP8266 Arduino 2.5.0 Compatability :corepr:`481`
- esphome: Add Switch Interlocking :esphomepr:`411`
- esphome: Add local mDNS responder for .local :esphomepr:`386`
- core: Auto-Redact personal information from logs :corepr:`488`
- esphome: Auto-Redact personal information from logs :esphomepr:`421`
- esphome: Replace optimistic with Assumed State :esphomepr:`394`
- core: Add Template Publish Action :corepr:`453`
- esphome: Add template publish actions and switch triggers :esphomepr:`391`
- core: ESP8266 Arduino 2.5.0 Compatability :corepr:`481` (cherry-picked)
- esphome: Add Switch Interlocking :esphomepr:`411` (cherry-picked)
- esphome: Add local mDNS responder for .local :esphomepr:`386` (cherry-picked)
- core: Auto-Redact private information from logs :corepr:`488`
- esphome: Auto-Redact private information from logs in dashboard :esphomepr:`421`
- esphome: Replace optimistic with Assumed State :esphomepr:`394` (cherry-picked)
- core: Add Template Publish Action :corepr:`453` (cherry-picked)
- esphome: Add template publish actions and switch triggers :esphomepr:`391` (cherry-picked)
- core: Rework hostname (replaced by use_address) :corepr:`484`
- esphome: Add use_address :esphomepr:`417`
- core: Fixes I2C SH1106 repeats the first 8 lines of the display. :corepr:`492` by :ghuser:`n0bel`
@ -147,14 +213,14 @@ All changes
- esphome: Rework UART component for fixes :esphomepr:`419`
- esphome: Make dout the default flash mode :esphomepr:`420`
- core: Revert espressif32 package upgrade :corepr:`490`
- esphome: Revert "Upgrade espressif32 package to 1.6.0 (#355)" :esphomepr:`422`
- esphome: Revert "Upgrade espressif32 package to 1.6.0 (#355)" :esphomepr:`422`
- core: Add support for JVC remote transmitting and receiving :corepr:`493` by :ghuser:`jesserockz`
- esphome: Add support for JVC remote transmitting and receiving :esphomepr:`423` by :ghuser:`jesserockz`
- docs: Add docs for JVC remote transmitting and receiving :docspr:`160` by :ghuser:`jesserockz`
- docs: H801 LED controller (remade) :docspr:`158` by :ghuser:`erazor666`
- core: Enable use of alternate hardware UARTs for logging :corepr:`483` by :ghuser:`brandond`
- esphome: Enable use of alternate hardware UARTs for logging :esphomepr:`427` by :ghuser:`brandond`
- docs: Enable use of alternate hardware UARTs for logging :docspr:`161` by :ghuser:`brandond`
- docs: Enable use of alternate hardware UARTs for logging :docspr:`161` by :ghuser:`brandond`
- core: Rename esphomelib to esphome-core :corepr:`494`
- esphome: Rename esphomeyaml to esphome :esphomepr:`426`
- esphome: Include common components for compiles :esphomepr:`431`
@ -163,10 +229,10 @@ All changes
- core: Template switch do not restore state by default :corepr:`503`
- core: Fix ethernet initialization order :corepr:`504`
- esphome: Add RC5 IR code support :esphomepr:`432`
- core: Update esp32_ble_tracker.cpp :corepr:`505`
- core: Tweak BLE tracker settings :corepr:`505`
- esphome: Add text_sensor.template.publish action :esphomepr:`433`
- esphome: Add light partition platform :esphomepr:`434`
- core: Add hidden option to wifi networks :corepr:`506`
- core: Add 'hidden' option to wifi networks :corepr:`506`
- esphome: Add hidden option to wifi networks :esphomepr:`436`
- core: Add display pages abstraction :corepr:`507`
- esphome: Add display page abstraction :esphomepr:`435`
@ -175,6 +241,22 @@ All changes
- core: Add wait_until action :corepr:`508`
- esphome: Add wait_until action :esphomepr:`440`
- docs: Document addressable_lambda light effect :docspr:`163`
- esphome: Fix custom components not registered :esphomepr:`441` (cherry-picked)
- docs: Custom Binary Sensor: Add missing ";" and fix indentation in YAML :docspr:`164` by :ghuser:`mjoshd`
- core: Add empty nameable constructors :corepr:`509` (cherry-picked)
- core: Fix Nextion "Received unknown filler end bytes" :corepr:`510` (cherry-picked)
- core: Fix functional attachInterrupt placed in flash :corepr:`511` (cherry-picked)
- docs: Add Sonoff T1 LED pin :docspr:`165` by :ghuser:`lwis`
- esphome: Remove duplicate scrollbar & move scrollbar :esphomepr:`443` by :ghuser:`TheZoker` (cherry-picked)
- esphome: Remove unnecessary wrapper :esphomepr:`444` by :ghuser:`TheZoker` (cherry-picked)
- core: Refactor addressable light and fix partition issue :corepr:`512` (cherry-picked)
- esphome: Fix MQTT log topic level :esphomepr:`445` (cherry-picked)
- core: Fix ESP8266 functional interrupts :corepr:`515` (cherry-picked)
- esphome: Allow i2c on non-pullup pins :esphomepr:`447` (cherry-picked)
- esphome: Allow use of arduino core v2.5.0 on ESP8266 :esphomepr:`446` (cherry-picked)
- core: Fix feed_wdt :corepr:`520`
- core: Speed up waveshare Epaper :corepr:`518`
- esphome: Improve dashboard setup wizard :esphomepr:`450`
Past Changelogs
---------------

View File

@ -348,6 +348,75 @@ And then later in code:
// Draw the image my_image at position [x=0,y=0]
it.image(0, 0, id(my_image));
.. _display-pages:
Display Pages
-------------
Certain display types also allow you to show "pages". With pages you can create drawing lambdas
that you can switch between. For example with pages you can set up 3 screens, each with
different content, and switch between them on a timer.
.. code-block:: yaml
display:
- platform: ...
# ...
id: my_display
pages:
- id: page1
lambda: |-
it.print(0, 10, id(my_font), "This is page 1!");
- id: page2
lambda: |-
it.print(0, 10, id(my_font), "This is page 2!");
You can then switch between these with three different actions:
**show_next** / **show_prev**: Shows the next or previous page, wraps around at the end.
.. code-block:: yaml
on_...:
- display.page.show_next: my_display
- display.page.show_prev: my_display
# For example cycle through pages on a timer
interval:
- interval: 5s
then:
- display.page.show_next: my_display
- component.update: my_display
**display.page.show**: Show a specific page
.. code-block:: yaml
on_...:
- display.page.show: page1
# Templated
- display.page.show: !lambda |-
if (id(my_binary_sensor).state) {
return id(page1);
} else {
return id(page2);
}
.. note::
To trigger a redraw right after the page show use a :ref:`component.update <component-update_action>`
action:
.. code-block:: yaml
# For example cycle through pages on a timer
interval:
- interval: 5s
then:
- display.page.show_next: my_display
- component.update: my_display
See Also
--------

View File

@ -5,11 +5,6 @@ Nextion TFT LCD Display
:description: Instructions for setting up Nextion TFT LCD displays
:image: nextion.jpg
.. warning::
This integration is experimental as I don't have the hardware to test it (yet).
If you can verify it works (or if it doesn't), notify me on `discord <https://discord.gg/KhAMKrd>`__.
The ``nextion`` display platform allows you to use Nextion LCD displays (`datasheet <https://nextion.itead.cc/resources/datasheets/>`__,
`iTead <https://www.itead.cc/display/nextion.html>`__)
with ESPHome.

View File

@ -59,6 +59,7 @@ Configuration variables:
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. note::

View File

@ -62,6 +62,7 @@ Configuration variables:
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.

View File

@ -90,6 +90,7 @@ Configuration variables:
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``10s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.

View File

@ -6,11 +6,6 @@ Ethernet Component
:image: ethernet.png
:keywords: Ethernet, ESP32
.. warning::
This integration is experimental as I don't have the hardware to test it (yet).
If you can verify it works (or if it doesn't), notify me on `discord <https://discord.gg/KhAMKrd>`__.
This core ESPHome component sets up ethernet connections for ESP32s.
Ethernet for ESP8266 is not supported.
@ -76,6 +71,18 @@ Configuration for wESP32 board
clk_mode: GPIO0_IN
phy_addr: 0
Configuration for Olimex ESP32-POE
----------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: GPIO12
See Also
--------

View File

@ -5,11 +5,6 @@ PMSX003 Particulate Matter Sensor
:description: Instructions for setting up PMSX003 Particulate matter sensors
:image: pmsx003.png
.. warning::
This integration is experimental as I don't have the hardware to test it (yet).
If you can verify it works (or if it doesn't), notify me on `discord <https://discord.gg/KhAMKrd>`__.
The ``pmsx003`` sensor platform allows you to use your PMS5003, PMS7003, ... particulate matter
(`datasheet <http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf>`__)
sensors with ESPHome.

View File

@ -71,9 +71,9 @@ author = 'Otto Winter'
# built documents.
#
# The short X.Y version.
version = '1.10'
version = '1.11'
# The full version, including alpha/beta/rc tags.
release = '1.10.1'
release = '1.11.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -253,6 +253,66 @@ Some notes about the docs:
* Fixes/improvements for the docs themselves should go to the ``current`` branch of the
esphomedocs repository. New features should be added against the ``next`` branch.
Setting Up Development Environment
----------------------------------
For developing new features to ESPHome, you will first need to set up a development environment.
This is only possible for ``pip`` installs.
.. code-block:: bash
# Clone repos
git clone https://github.com/esphome/esphome.git
git clone https://github.com/esphome/esphome-core.git
git clone https://github.com/esphome/esphome-docs.git
# Install esphome, python 2!
cd esphome/
pip2 install -e .
pip2 install flake8==3.6.0 pylint==1.9.4 pillow
# Start a new feature branch
git checkout -b my-new-feature
cd ..
# Setup esphome-core environment
cd esphome-core/
pio init --ide vscode # See 'pio init -h' for options
git checkout -b my-new-feature
Now you can open esphome-core in your IDE of choice (mine is CLion) with the platformio
addons (see platformio docs for more info). Then develop the new feature with the
guidelines below.
Next, for the python part of the feature you can again use any IDE you want (I use PyCharm)
and develop the feature. You can create a ``config/`` folder inside the esphome repo
to store configs you're working with (automatically excluded by .gitignore).
To compile against your local esphome-core in esphome youhave to give the path
to the esphome core in ``esphome_core_version``:
.. code-block:: yaml
esphome:
esphome_core_version:
local: path/to/esphome-core
To perform style checks for your changes (which are enforced by travis-ci) you can run
.. code-block:: bash
flake8 esphome
pylint esphome
Finally, for documentation changes go to your esphome-docs folder, and install sphinx (with Python 3!)
.. code-block:: bash
pip3 install sphinx
make webserver
Or alternatively just submit a draft PR to the docs repo and wait for netlify to create
a build preview.
Contributing to ESPHome-Core
----------------------------

View File

@ -196,11 +196,70 @@ Some steps that can help with the issue:
- If you're using a hidden WiFi network, make sure to enable ``fast_connect`` mode in the WiFi
configuration (also sometimes helps with non-hidden networks)
- Give your ESP a :ref:`static IP <wifi-manual_ip>`.
- Set the ``power_save_mode`` to ``light`` in the ``wifi:`` config (only helps in some cases,
in other it can make things works). See :ref:`wifi-power_save_mode`.
- Set the ``power_save_mode`` to ``light`` in the ``wifi:`` config (only helps in some cases,
in other it can make things works). See :ref:`wifi-power_save_mode`.
- The issue seems to be happen with cheap boards more frequently. Especially the "cheap" NodeMCU
boards from eBay sometimes have quite bad antennas.
Docker Reference
----------------
Install versions:
.. code-block:: bash
# Stable Release
docker pull esphome/esphome
# Beta
docker pull esphome/esphome:beta
# Dev version
docker pull esphome/esphome:dev
Command reference:
.. code-block:: bash
# Start a new file wizard for file livingroom.yaml
docker run --rm -v "${PWD}":/config -it esphome/esphome livingroom.yaml wizard
# Compile and upload livingroom.yaml
docker run --rm -v "${PWD}":/config -it esphome/esphome livingroom.yaml run
# View logs
docker run --rm -v "${PWD}":/config -it esphome/esphome livingroom.yaml logs
# Map /dev/ttyUSB0 into container
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome ...
# Start dashboard on port 6052
docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome
And a docker compose file looks like this:
.. code-block:: yaml
version: '3'
services:
esphome:
image: esphome/esphome
volumes:
- ./:/config:rw
network_mode: host
restart: always
.. note::
ESPHome uses mDNS to show online/offline state in the dashboard view. So for that feature
to work you need to enable host networking mode
mDNS might not work if your Home Assistant server and your ESPHome nodes are on different subnets. If your router supports Avahi, you are able to get mDNS working over different subnets.
Just follow the next steps:
1. Enable Avahi on both subnets.
2. Enable UDP traffic from ESPHome node's subnet to 224.0.0.251/32 on port 5353.
Donations
---------