Changelog - Version 1.10.0

Native API Add-On Updates Better Custom Components
Native API Add-On Updates Better Custom Components
APDS9960 MAX31855 ULN2003
APDS9960 MAX31855 ULN2003
NeoPixelBus Light ESP32 Ethernet Home Assistant Sensor
NeoPixelBus Light ESP32 Ethernet Home Assistant Sensor

Native API

This release brings with it lots of goodies, but most important is the native API. MQTT has been the only way this project communicated with Home Assistant for a while now. And MQTT is a great protocol to get started, but it always had problems:

  • Another service to install - Users would need to install an MQTT broker in order to get started.
  • MQTT Discovery - Home Assistant’s MQTT discovery has been great, but always had problems like retained messages etc.
  • Inefficient - A typical MQTT message for sending a binary sensor state is about 70 bytes long, and the MQTT library we used was quite inefficient with runtime memory allocation too.

So I decided to do something against that: ESPHome now features a native protocol (based on TCP+protocol buffers) that addresses these issues and has a component on the Home Assistant side too.

Does this mean MQTT will be removed?

No! MQTT is an awesome protocol with easy integration for many tools like Node-RED and custom MQTT clients. This native API is only for replacing communications with Home Assistant, so if anything gets removed it’s MQTT auto discovery for Home Assistant. Of course both can be used together at the same time too.

Should I switch to the native API immediately?

You definitely can, but a word of warning first: The MQTT implementation has seen tons of fixes for small quirks in how the ESP SDK works. From my own testing, the native API seems to be quite stable - but I’m sure it’ll take a bit of time to find+fix some final bugs.

How do I migrate from MQTT?

First, make sure you run at least Home Assistant 0.85.0 (currently a beta release). Then, go through the migration guide here.

Python 3 Compatibility

PlatformIO has finally implemented python 3 support after some quick changes, ESPHome is now also compatible with python 3.5+. So with this new release you can try ESPHome with Python 3 already. Just make sure to install the development version of platformio first:

pip3 install -U

I don’t particularly like python 2, and in a year’s time support for it will officially be ended. So the plan for ESPHome is to drop python 2 as soon as possible. Once platformio releases version 4.0 (with python 3 support), I will go through and check everything still works. Maybe ESPHome will support python 2 for 1 or 2 releases after that but really I want to drop support for python 2 as soon as possible.

Dashboard & Addon Updates

The dashboard and addon have seen a lot of ❤️ in this release: The dashboard has seen tons of small changes to make the user experience better and the addon has been completely re-written with the Community Addon Images as the base.

  • The dashboard now features a built-in YAML editor.
  • Configuration wizard now shows a list of boards directly, so you just have to choose them from a dropdown.
  • Addon: You can log in using your Home Assistant credentials now.
  • And many more changes (colored logs, auto-scroll, node status, update notifications, …)

Rename: esphome{lib, yaml} -> ESPHome

The name esphomelib and esphomeyaml were too technical, and this project has changed a lot since the first published release (the yaml part didn’t even exist back then). So … the project is being re-branded slightly:

  • esphomeyaml -> ESPHome
  • esphomelib -> ESPHome Core
  • esphomedocs -> ESPHome Docs

As you see, the yaml project is now getting the “fancy” name, because that’s by far the best way to use this framework. As part of this change, using the _core_ framework directly from code (without YAML) is being deprecated, the API docs have long been inaccurate now and users should really switch over to ESPHome through YAML

Of course that doesn’t mean you won’t be able to write custom code. In fact, this release also contains lots of new guides and changes to make creating custom components much easier. The goal is to have a project where users can use YAML for the boring boilerplate code but can completely customize everything with custom components.

This migration is of course huge - almost every single file in the code+docs base has esphome{lib, yaml} somewhere in it, so it will take time until the next release for this to be finished.

Breaking Changes

  • Previously, esphomelib would by default only publish every 15th sensor value in order to provide averaged values. However, that often confused users and I now decided to remove it and set the default update interval of all components to 60s instead of the previous 15s. You can get back the old behavior by setting

      - platform: ...  # enter platform here
        # other settings
        update_interval: 15s
          - sliding_window_moving_average: {}
  • The fastled effects have been renamed to addressable_ for the new Neopixelbus integration. See the validation error message for more info.

Other notable changes:

  • You can now configured multiple WiFi networks to connect to. The best one will be chosen automatically. This is along with a complete rewrite of the WiFi component which now interacts directly with the ESP SDK. (Connecting to Multiple Networks)
  • GPIO Switches have a new option restore_mode to configure how their values should be restored on boot. (GPIO Switch)
  • Added substitutions to reduce repeating across configs.
  • Validation error messages are now displayed even better. Now all errors are shown with the exact context where the error appeared. Try it, it’s so much better. Next step will be to upgrade to a better YAML reader to provide better error messages when the YAML syntax is invalid.
  • Added a bunch of guides (and helpers) for creating custom components. Also new: esphomeyaml.libraries, esphomeyaml.includes and esphomeyaml.platformio_options (esphomeyaml Core Configuration)
  • Saved a lot of flash space on ESP8266 boards. Previously, platformio would allocate about 1/4 of flash for SPIFFS, but esphomelib doesn’t use that so now you have that as extra storage. Thanks @brandond <>
  • You can now use Home Assistant to get time in ESPHome, so no more need for SNTP. See Time.

Release 1.10.1 - January 13

  • docs: Fix substitutions example & api intro text docs#117 by @thubot
  • lib: Fix while action not resetting is_running lib#378
  • lib: Fix remote transmitter ESP32 repeat wait lib#376
  • lib: Fix addressable lights lib#375
  • yaml: Fix ESP32 not decoding stacktrace on broken PC yaml#330
  • docs: Fixed missing link to BME cookbook docs#120 by @Mynasru
  • lib: Fix addressable flicker effect lib#383
  • lib: NeoPixelBus: fix handling of white color component lib#384 by @badbadc0ffee
  • lib: Fix trigger not being optional lib#381
  • docs: Add WiFi fast connect docs#121
  • yaml: Fix AsyncTCP compilation on ESP32 with Arduino breaking change yaml#334
  • yaml: Fix show logs with MQTT and dashboard yaml#332
  • lib: Add WiFi fast connect mode lib#385
  • lib: Fix API Server has deep sleep lib#386
  • yaml: Introduce wifi fast connect mode yaml#333
  • lib: Fix GPIO Switch not handling inverted lib#387
  • lib: Expose NeoPixelBus Controller lib#388
  • yaml: Pin platformio platforms yaml#335
  • lib: Fix ble tracker compile error lib#390

All changes

  • docs: CSE7766 Update Interval docs#91
  • docs: add baud_rate; typo on sensor type docs#90 by @drewp
  • docs: Fix docs for LCD display strftime docs#95
  • lib: Make CSE7766 a polling sensor lib#305
  • lib: Supply clang-format file for contributors lib#290
  • yaml: Time SNTP validate server format yaml#254
  • yaml: Fix GPIO input schema validator yaml#253
  • lib: Implement custom sensor platform lib#274
  • lib: Only compile code stuff if necessary lib#309
  • yaml: [Huge] Util Refactor, Dashboard Improvements, Auth API, Better Validation Errors, Conditions, Custom Platforms, Substitutions yaml#234
  • docs: Fix copy paste error docs#100 by @oscar-b
  • lib: Fix large JSON payloads being cut off lib#323 by @quazzie
  • docs: Add Wikipedia link to tz database zones list docs#105 by @apeeters
  • docs: Add pins for Shelly 2 docs#103 by @oscar-b
  • lib: Native Esphomelib API lib#322
  • yaml: Add native ESPHome API yaml#265
  • lib: Add support for MAX31855 sensor lib#310 by @sherbang
  • docs: Documentation for MAX31855 sensor docs#97 by @sherbang
  • lib: Fix typo in Output Switch lib#307
  • lib: Fix PCA9685 with many channels lib#304
  • docs: Fixed typo in Sonoff R2 Cover example docs#112 by @voicevon
  • lib: Dump native API Server config on boot lib#338 by @voicevon
  • lib: Split Automation headers from implementation lib#349
  • lib: Travis update lib#350
  • lib: Fix API Server logs lib#347
  • lib: WiFi Better logging for ESP8266 lib#346
  • lib: API Server Watchdog lib#345
  • lib: GPIO Switch Restore Mode lib#344
  • lib: Fix Remote Receiver Overflow for ESP8266 lib#348
  • yaml: Api fixes yaml#289
  • yaml: Fix host network yaml#280
  • yaml: Fix ESP8266 verbose logging yaml#291
  • yaml: API Server Watchdog yaml#290
  • lib: Implement Addressable Lights Base lib#243
  • yaml: Disable SPIFFS to save flash space yaml#288
  • yaml: Fix MQTT message trigger yaml#282
  • yaml: GPIO Switch Restore Mode yaml#287
  • yaml: Addressable Lights yaml#294
  • yaml: Toggle Auto-Update Check With Environment Variable yaml#292
  • yaml: Make compatible with python 3 yaml#281
  • docs: Fix copy/paste error in turn_off_action docs#113 by @wutr
  • yaml: GPIO Switch Fix restore_mode validator yaml#296 by @yottatsa
  • yaml: Fixes for Python 3 Compatability yaml#297
  • lib: Stop old template action when new one is started lib#354
  • lib: Add APDS-9960 support lib#286
  • lib: Change default update interval to 60 seconds lib#356
  • lib: ESP32 Ethernet support lib#288
  • lib: Add ULN2003 support lib#301
  • lib: Add clean discovery option to simplify transition to native API lib#357
  • yaml: Add clean MQTT discovery option for native API yaml#302
  • yaml: Add APDS9960 Support yaml#300
  • lib: Add neopixelbus component lib#352
  • yaml: Add neopixelbus component yaml#303
  • yaml: Add support for MAX31855 sensor yaml#258 by @sherbang
  • yaml: ULN2003 Support yaml#304
  • yaml: Add ESP32 Ethernet Support yaml#301
  • docs: total_daily_energy doesn’t have pin option docs#114 by @oscar-b
  • docs: Getting started HassIO - USD device discovery docs#110 by @DavidDeSloovere
  • docs: Mismatch in example and text docs#109 by @wellsi
  • docs: BME280 environment cookbook entry docs#107 by @Mynasru
  • docs: Update getting_started_command_line.rst docs#102 by @doskoi
  • docs: Updated the multi click example code block docs#92 by @cooljimy84
  • docs: Add step to setting up devices docs#101 by @magnusoverli
  • yaml: Update beta config yaml#305
  • yaml: Fix component.update action yaml#308
  • yaml: OTA don’t error when upgrading from no password to password mode yaml#309
  • yaml: use full space on small devices yaml#310 by @escoand
  • lib: Fix interval compilation error lib#364
  • yaml: Fix interval trigger yaml#313