# Integrating Home Assistant with Adafruit IO

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/070/877/medium800/sensors_io_crop.png?1549563691)

[Home Assistant](https://www.home-assistant.io/) is an open source home automation software which tracks the state of the smart-devices in your home so you don't have to. It easily integrates with most smart-devices (Google Cast, Philips Hue, Nest, Sonos, etc) and even interfaces with smart-assistants like Alexa or Google Assistant.&nbsp;

Adafruit sells a lot of different types of sensors. Following this guide will let you quickly connect them to Home Assistant using an Adafruit Feather.

We're going to set up an Adafruit Feather ESP8266 with a BME280 sensor to create a temperature, pressure, and humidity logging node. Then we'll install, set up, and configure Home Assistant on a Raspberry Pi.

We'll configure the Feather to broadcast its sensor data to both Home Assistant and [Adafruit IO](http://io.adafruit.com) using [ESPHomeYAML](https://esphome.io/index.html).

![](https://cdn-learn.adafruit.com/assets/assets/000/070/881/medium800thumb/sensors_io_scrobble.jpg?1549570592)

While [Home Assistant](https://www.home-assistant.io/) is fantastic at&nbsp;_displaying&nbsp;_data in real-time, you might want to&nbsp;manipulate&nbsp;and log the data. We'll be using [Adafruit IO](http://io.adafruit.com) to perform real-time and long-term logging for visualization of data, and export the data from sensor feeds.

## Parts
### Assembled Adafruit Feather HUZZAH with ESP8266 With Headers

[Assembled Adafruit Feather HUZZAH with ESP8266 With Headers](https://www.adafruit.com/product/3046)
Feather is the flagship development board from Adafruit, and like its namesake, it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the **Assembled Adafruit Feather HUZZAH ESP8266**  **with...**

In Stock
[Buy Now](https://www.adafruit.com/product/3046)
[Related Guides to the Product](https://learn.adafruit.com/products/3046/guides)
![Angled shot of rectangular microcontroller with headers.](https://cdn-shop.adafruit.com/640x480/3046-07.jpg)

 **Note:** While you&nbsp;_can_ run HassOS on a Pi Zero W, we do not suggest using one with this guide. The process of flashing firmware from a Pi Zero W is difficult. Compiling and uploading the Feather's firmware from a Pi Zero W takes significantly more time than a Pi 3B+.&nbsp;

### Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM

[Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM](https://www.adafruit.com/product/3775)
The Raspberry Pi 3 Model B is the most popular Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 3 better? How about a&nbsp;_faster_ processor, 5 GHz WiFi, and updated Ethernet chip with PoE capability?...

In Stock
[Buy Now](https://www.adafruit.com/product/3775)
[Related Guides to the Product](https://learn.adafruit.com/products/3775/guides)
![Angled shot of Raspberry Pi 3 - Model B+](https://cdn-shop.adafruit.com/640x480/3775-11.jpg)

### Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor

[Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor](https://www.adafruit.com/product/2652)
Bosch has stepped up their game with their new BME280 sensor, an environmental sensor with temperature, barometric pressure&nbsp;and&nbsp;humidity! This sensor is great for all sorts of indoor environmental sensing and can even be used in both I2C and SPI!

This precision sensor from...

In Stock
[Buy Now](https://www.adafruit.com/product/2652)
[Related Guides to the Product](https://learn.adafruit.com/products/2652/guides)
![small, rectangle-shaped, BME280 temperature humidity pressure sensor breakout board.](https://cdn-shop.adafruit.com/640x480/2652-04.jpg)

## Materials

You'll need the items below for this project. If you do not have them already, grab them from the Adafruit Store:

### Part: Switching Power Supply with MicroUSB 
quantity: 1
5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable
[Switching Power Supply with MicroUSB ](https://www.adafruit.com/product/1995)

### Part: Micro USB Cable
quantity: 1
USB cable - USB A to Micro-B - 3 foot long
[Micro USB Cable](https://www.adafruit.com/product/592)

### Part: Breadboard
quantity: 1
Half-size breadboard
[Breadboard](https://www.adafruit.com/product/64)

### Part: Wire Bundle
quantity: 1
Breadboarding wire bundle
[Wire Bundle](https://www.adafruit.com/product/153)

# Integrating Home Assistant with Adafruit IO

## Feather Wiring

Make the following connections between the Feather Huzzah ESP8266 and the BME280:

- **Feather 3V** to **BME280 VIN**
- **Feather GND** to **BME280 GND**
- **Feather SCL** to **BME280 SCK**
- **Feather SDA** to **BME280 SDI**

![sensors_huzzha_pic.png](https://cdn-learn.adafruit.com/assets/assets/000/070/880/medium640/sensors_huzzha_pic.png?1549564331)

You may also want to connect a LiPo battery to the JST connector on the Feather Huzzah for wire-free logging. This one is ideal for Feathers:

### Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh

[Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh](https://www.adafruit.com/product/3898)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **400mAh** for a total of about 1.9 Wh. If you need a larger (or smaller!)...

In Stock
[Buy Now](https://www.adafruit.com/product/3898)
[Related Guides to the Product](https://learn.adafruit.com/products/3898/guides)
![Slim Lithium Ion Polymer Battery 3.7v 400mAh with JST 2-PH connector and short cable](https://cdn-shop.adafruit.com/640x480/3898-05.jpg)

# Integrating Home Assistant with Adafruit IO

## Adafruit IO Setup

If you do not already have an Adafruit IO account set up, head over to&nbsp;[io.adafruit.com](http://io.adafruit.com/)&nbsp;to link your Adafruit.com account to Adafruit IO.

Navigate to the&nbsp;[feeds page](https://io.adafruit.com/feeds)&nbsp;on Adafruit IO. Then click&nbsp; **Actions&nbsp;-\> Create New Feed** , and name this feed&nbsp; **humidity**.&nbsp;

- If you do not already know how to create a feed, head over to&nbsp;[Adafruit IO Basics: Feeds](https://learn.adafruit.com/adafruit-io-basics-feeds).

![](https://cdn-learn.adafruit.com/assets/assets/000/070/621/medium800/sensors_IO_-_Feeds.png?1549319204)

Then, **create a temperature and pressure feed** for the BME280's temperature and pressure sensors.

Also, create an additional feed named&nbsp; **_status_** _.&nbsp;_When your Feather turns on or off, it'll broadcast its connection status to this feed.

We're also going to need our Adafruit IO username and secret API key.

Navigate to your profile and click the&nbsp; **View AIO Key** &nbsp;button to retrieve them. Write them down in a safe place, we'll need them for later.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/675/medium800thumb/sensors_3d_printing_adafruit_io_username_and_password_%281%29.jpg?1549480113)

With Adafruit IO set up, we'll move on to installing HassOS

# Integrating Home Assistant with Adafruit IO

## Installing HassOS on Raspberry Pi

We'll be installing Home Assistant locally on a Raspberry Pi using [Hass.io](https://www.home-assistant.io/hassio/), an All-in-One image which turns your Pi into a home assistant hub.

The process of installing and configuring HassOS takes a while. _Luckily, you only have to do it once_.

First, download the latest Hass.io image for your device from the home assistant downloads page.

[Download the latest Hass.IO release](https://github.com/home-assistant/hassos/releases/latest)
Then, **unzip the .img.gz&nbsp;** file. You should now have a **.img&nbsp;** file.

**Burn the OS image to a fresh SD card** (Home Assistant's website suggests a **32GB SD card or larger** ).&nbsp;

- If you do not know how to install an OS onto a SD card for the Raspberry Pi, [follow this page and come back when you're done](https://learn.adafruit.com/raspberry-pi-zero-creation/install-os-on-to-sd-card).

## WiFi Configuration

If you want to connect your Pi over WiFi, you'll need to configure Hass first. HassOS uses [NetworkManager](https://developer.gnome.org/NetworkManager/stable/nm-settings.html)&nbsp;to control the host network and defaults to ethernet.&nbsp;

HassOS uses a&nbsp; **USB Drive** to load configuration files like WiFi onto the Pi. The capacity of the stick does not matter - we'll be adding one file to the drive.&nbsp;

Danger: 

Plug the USB drive into your computer and reformat it with the following settings:

- **Rename the drive** &nbsp;to **&nbsp;CONFIG**
- **Format the drive** &nbsp;as**&nbsp;MS-DOS (FAT32)**

![sensors_Disk_Utility.png](https://cdn-learn.adafruit.com/assets/assets/000/070/681/medium640/sensors_Disk_Utility.png?1549393214)

Once reformatted, **make a folder on the drive named**  **network**.&nbsp;

Then, **create a new file called** &nbsp; **my-network&nbsp;_inside_ the network folder we just created**.

Copy and paste the following into the file:

```auto
[connection]
id=hassos-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto
```

In the configuration, **change `ssid` to your network's ssid** and **change&nbsp;`psk` to the password of your network.**

_If you don't want the IP address of your Pi to change on every bootup -_&nbsp;[visit this page to generate a UUID](https://www.uuidtools.com/generate/v4)&nbsp;and **replace `uuid` in the configuration with the value from the website**.

![sensors_Random_UUID__v4__Generator___UUIDTools_com.png](https://cdn-learn.adafruit.com/assets/assets/000/087/363/medium640/sensors_Random_UUID__v4__Generator___UUIDTools_com.png?1579793227)

Save the file to the USB drive and eject the drive from your computer. Safely eject the SD card from your computer at this time, too.

## HassOS Setup
Make sure the Pi is unplugged from power.

I **nsert the SD card with HassOS into the Pi**. Then, **plug the USB drive into one of the Pi 3B+'s USB ports.**

**Plug the Pi** in to the power supply to power it on.

![sensors_IMG_2087.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/683/medium640/sensors_IMG_2087.jpg?1549394114)

Home Assistant will take from 15-20 minutes to load up on first boot. Grab a&nbsp; coffee and browse [adafruit.com](https://www.adafruit.com/) for awhile.

Once some time has passed, navigate to&nbsp;[hassio.local:8123](http://hassio.local:8123/).

&nbsp;

You'll eventually be greeted with a welcome screen. Set up a new user account (this is a local account on the Raspberry Pi) and **click Create Account**.

![sensors_ha_setup.png](https://cdn-learn.adafruit.com/assets/assets/000/070/857/medium640/sensors_ha_setup.png?1549556288)

After setup, you'll be directed to the Home Assistant login page. Remove the USB drive from the Raspberry Pi.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/861/medium800/sensors_Home_Assistant.png?1549556519)

Next, we'll configure Home Assistant to be used with the Feather.

# Integrating Home Assistant with Adafruit IO

## Configuring HassOS

HassOS requires a bit of configuration before it's ready to be used with the Feather.

From the Home Assistant sidebar, **click on&nbsp;Hass.io**.&nbsp;

![sensors_Home_Assistant_Sidebar.png](https://cdn-learn.adafruit.com/assets/assets/000/070/841/medium640/sensors_Home_Assistant_Sidebar.png?1549555125)

Home Assistant uses a&nbsp;[YAML file named&nbsp;`configuration.yaml`](https://www.home-assistant.io/docs/configuration/yaml/)&nbsp;for each component used by Home Assistant. Previously, editing this file involved setting up SSH or SAMBA sharing on the Raspberry Pi.

We're going to use an add-on which lets us edit this file right from our browser.

From the Hass.io screen, **click&nbsp;Add-on Store**. Click&nbsp; **Configurator**.

On the configurator page, click&nbsp; **Install.&nbsp;**

The installation takes a while depending on your internet speed. Once the loading circle over installs disappears, the add-on is installed.

![sensors_Home_Assistant_Configurator.png](https://cdn-learn.adafruit.com/assets/assets/000/070/842/medium640/sensors_Home_Assistant_Configurator.png?1549555193)

![sensors_Home_Assistant_Configurator_2.png](https://cdn-learn.adafruit.com/assets/assets/000/070/843/medium640/sensors_Home_Assistant_Configurator_2.png?1549555197)

Next up, we need to install ESPHomeYAML. Since we're using a community project, ESPHomeYAML, we'll want to add the ESPHome repository to Hass.io.

Under **&nbsp;Repositories -\> Add new repository by URL,&nbsp;**** add the ESPHome repository**:&nbsp;  
[https://github.com/OttoWinter/esphomeyaml](https://github.com/OttoWinter/esphomeyaml)

![sensors_add_repo.png](https://cdn-learn.adafruit.com/assets/assets/000/070/844/medium640/sensors_add_repo.png?1549555236)

After the repository has been added, **scroll down&nbsp;** the page and click on&nbsp; **esphomeyaml**.&nbsp;

From the esphomeyaml add-on page, **click Install**

![sensors_Home_Assistant_Install_YAML.png](https://cdn-learn.adafruit.com/assets/assets/000/070/845/medium640/sensors_Home_Assistant_Install_YAML.png?1549555263)

![sensors_Home_Assistant_YAML_install_2.png](https://cdn-learn.adafruit.com/assets/assets/000/070/846/medium640/sensors_Home_Assistant_YAML_install_2.png?1549555278)

Once installed, esphomeyaml should appear on the Hass.io dashboard page along with the configurator we installed earlier.&nbsp;

![sensors_Home_Assistant_addons.png](https://cdn-learn.adafruit.com/assets/assets/000/070/847/medium640/sensors_Home_Assistant_addons.png?1549555418)

## Configuring Add-ons

While the Configurator and esphomeyaml add-ons are installed, they need some configuration. We'll start with the Configurator add on.&nbsp;

From the Dashboard,&nbsp; **click the Configurator add-on**. You'll be presented with its description, some settings (such as when it updates, when it starts) and the configuration. We'll want to change the password from&nbsp;_null_&nbsp;to a value enclosed by quotes.&nbsp;

For example,&nbsp; **change&nbsp;_password_&nbsp;from** :

`"password": null,`

**to**

`"password": "feather",`

Then, **click save**.&nbsp;

![sensors_Home_Assistant_Configurator_Config.png](https://cdn-learn.adafruit.com/assets/assets/000/070/848/medium640/sensors_Home_Assistant_Configurator_Config.png?1549555458)

Next, we'll need to add our IP address to the `allowed_networks`&nbsp;section of the configuration file.&nbsp;

Under the two preconfigured IP addresses, add your computer's IP under `allowed_networks` enclosed in quotations.&nbsp;

- _Don't know your IP address?_ You can find it on [whatsmyip.org](http://www.whatsmyip.org/).

Then, **Click Save**

![sensors_Home_Assistant_IP_Configurator.png](https://cdn-learn.adafruit.com/assets/assets/000/070/849/medium640/sensors_Home_Assistant_IP_Configurator.png?1549555577)

After you've configured both the IP and the password, **click&nbsp;Start.&nbsp;** A button to&nbsp; **Open Web UI&nbsp;** will appear when the Configurator successfully starts.

Click&nbsp; **Open Web UI**.&nbsp;

From the new tab,&nbsp; **enter the username and password we specified in the Config.**

![sensors_open_web_ui.png](https://cdn-learn.adafruit.com/assets/assets/000/070/850/medium640/sensors_open_web_ui.png?1549555765)

![sensors_open_web_ui.png](https://cdn-learn.adafruit.com/assets/assets/000/070/851/medium640/sensors_open_web_ui.png?1549555772)

In the Configurator editor, make sure the file you are editing is `/config/configuration.yaml`.

Then, [add an entry in the configuration.yaml file to enable MQTT Discovery](https://www.home-assistant.io/docs/mqtt/discovery/):

```auto
# MQTT Discovery
mqtt:
  discovery: true
  discovery_prefix: homeassistant
```

and **Click Save.**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/852/medium800/sensors_configuration_yaml_-_HASS_Configurator.png?1549555961)

After saving, **navigate back to the Home assistant dashboard**.&nbsp;

From the sidebar,&nbsp; **click&nbsp;Configuration**.&nbsp;

From Configuration,&nbsp; **click General**.

![sensors_config_general.png](https://cdn-learn.adafruit.com/assets/assets/000/070/853/medium640/sensors_config_general.png?1549555960)

Since we changed the `configuration.yaml`, we'll want to validate the file to make sure nothing goes wrong when we restart Home Assistant.&nbsp;

**Click&nbsp;Check Config**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/854/medium800/sensors_check_config.png?1549555961)

If everything checks out, a message will pop up displaying&nbsp; **Configuration valid!**

![sensors_check_config_valid.png](https://cdn-learn.adafruit.com/assets/assets/000/070/855/medium640/sensors_check_config_valid.png?1549555963)

After checking the configuration, we'll want to restart the server. We don't need to SSH into the Raspberry Pi and issue a restart command - Home Assistant lets us do this from within the Configuration page.

From the Configuration page, scroll down to&nbsp; **Server Management** and **click Restart.**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/856/medium800/sensors_restart.png?1549555976)

If you refresh the page, you'll encounter a _Connection lost. Reconnecting..._ message. Since we restarted the server, it'll take a few minutes to get itself back online.

After a few minutes, **refresh the page.**

Once we're connected back to HassOS, we'll proceed to configuring the Feather with ESPHomeYAML.

# Integrating Home Assistant with Adafruit IO

## ESPHome Setup

## Flashing firmware with Raspberry Pi
![](https://cdn-learn.adafruit.com/assets/assets/000/070/888/medium800/sensors_esphome_logo.png?1549571891)

[ESPHomeYAML](https://esphome.io/index.html) is a tool which creates custom firmware for ESP8266/ESP32 boards and sensors from a [Yet-Another-Markup-Language (YAML) file](https://en.wikipedia.org/wiki/YAML). We're going to be using the official Home Assistant&nbsp;add-on for ESPHomeYAML to help generate firmware for the Feather. Then, we'll upload the firmware directly to the board.

**Note:&nbsp;** If you are using any single-board computer _slower_ than a Pi 3, such as a Pi Zero, expect to wait a _significant_ amount of time while the firmware compiles and uploads to the Feather Huzzah.&nbsp;

Plug the Feather into a USB Cable, and then into one of the Raspberry Pi 3B+'s USB ports.

Since we'll be compiling and uploading the firmware directly from the Pi to the Feather, we'll connect the two before we begin.

Plug the Feather into a Micro-USB Cable, and then into one of the Raspberry Pi 3B+'s USB ports.

![sensors_IMG_1878_copy.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/867/medium640/sensors_IMG_1878_copy.jpg?1549560924)

From the esphomeyaml add on page, **click Start**.

Once ESPHomeYAML is finished installing, a new button will appear&nbsp;_Open Web UI._

**Click Open Web UI**

![sensors_Home_Assistant_YAML_Start.png](https://cdn-learn.adafruit.com/assets/assets/000/070/743/medium640/sensors_Home_Assistant_YAML_Start.png?1549406226)

![sensors_Home_Assistant_webUI.png](https://cdn-learn.adafruit.com/assets/assets/000/070/744/medium640/sensors_Home_Assistant_webUI.png?1549406239)

From the ESPHomeYAML dashboard, **click the Plus Icon to launch the ESPHome Setup Wizard.&nbsp;**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/862/medium800/sensors_ESPHome_Dashboard_and_Adafruit_Learning_System.png?1549557885)

The ESPHomeYAML wizard will walk you through setting up a ESP-powered device using ESPHome.&nbsp;

- First, name your device. If you're hooking up a lot of smart-devices to Home Assistant - make it as descriptive as possible.
- Then, select&nbsp; **Adafruit HUZZAH ESP8266&nbsp;** as the Device Type
- **Enter the WiFi SSID and password** for your network.
  - You can also **configure a password for** performing **Over-the-Air (OTA) updates** at this step. This'll allow you to connect to the Feather Huzzah from Home Assistant without connecting a USB cable, and flash firmware to it.&nbsp;

- You're done with setup!&nbsp; **Click Submit**

![sensors_node_name.png](https://cdn-learn.adafruit.com/assets/assets/000/070/745/medium640/sensors_node_name.png?1549406669)

![sensors_device_type.png](https://cdn-learn.adafruit.com/assets/assets/000/070/746/medium640/sensors_device_type.png?1549406676)

![sensors_wifi_otaa_config.png](https://cdn-learn.adafruit.com/assets/assets/000/070/747/medium640/sensors_wifi_otaa_config.png?1549406696)

![sensors_ESPHome_Dashboard.png](https://cdn-learn.adafruit.com/assets/assets/000/070/748/medium640/sensors_ESPHome_Dashboard.png?1549406716)

After the setup wizard completes, a new node will appear on the ESPHome dashboard. We're not ready to upload the settings yet.

**Click Edit**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/864/medium800/sensors_edit_yaml.png?1549559071)

The `feather_bme280.yaml` file below is based off of the template provided in Boris Hajduk's guide [`Using adafruit.io MQTT with esphomeyaml`](https://medium.com/@Boris.Hajduk/using-adafruit-io-mqtt-with-esphomeyaml-168d188e8d5e).&nbsp;

Copy and paste the file below into the ESPHome Dashboard file editor:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/home-assistant-io/feather_bme280.yaml

Before uploading the file, we'll need to **make the following adjustments to the YAML file** under `substitutions`:

- **Change `device_name`** to reflect the name of the device you created in the ESPHome Wizard.
- **Set `io_username`** to your Adafruit IO Username
- **Set `io_key`** to your Adafruit IO Key
- **Change** `update_interval` to the frequency (in seconds) which you'd like the feather to read the sensor and send its data to Home Assistant and Adafruit IO.

We'll also need to configure the WiFi network:

- **Set `ssid`** to your network's ssid
- **Set `password`** to your network's password

After configuration of the YAML file is complete, **click save**.

After uploading, we'll need to check the YAML configuration. From the ESPHome Dashboard, **click Validate**

If everything is OK, the dialog will display&nbsp;`INFO Configuration is Valid!`

![sensors_validate.png](https://cdn-learn.adafruit.com/assets/assets/000/070/865/medium640/sensors_validate.png?1549559792)

![sensors_validate_yaml.png](https://cdn-learn.adafruit.com/assets/assets/000/070/866/medium640/sensors_validate_yaml.png?1549559817)

Finally, we'll move onto uploading the firmware to the ESP8266.&nbsp;

On the top right corner of the ESPHome Dashboard, make sure you have selected the&nbsp; **USB to UART Bridge Converter&nbsp;** and _not_ OTA (over-the-air).

![sensors_usbtouart.png](https://cdn-learn.adafruit.com/assets/assets/000/070/868/medium640/sensors_usbtouart.png?1549561408)

Warning: 

Under the settings for the Feather, **click UPLOAD**.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/889/medium800thumb/sensors_compileandupload.jpg?1549575752)

This will compile the firmware for the Feather and upload it over USB.

Since we're compiling firmware&nbsp;_from_&nbsp;the Raspberry Pi, this process will take a while to complete.

![sensors_compile_and_upload.png](https://cdn-learn.adafruit.com/assets/assets/000/070/749/medium640/sensors_compile_and_upload.png?1549575765)

If everything compiles and uploads successfully, the Feather on the ESPHomeYAML dashboard will display as&nbsp; **Online**.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/869/medium800/sensors_ESPHome_Dashboard_Online.png?1549561985)

## Flashing firmware using the Command Line

You can also flash firmware from the command line by following the instructions on the [esphomeyaml Getting Started documentation](https://esphomelib.com/esphomeyaml/guides/getting_started_command_line.html).&nbsp;

**Note:&nbsp;** To use the PlatformIO Python dependency required by esphomeyaml CLI - you'll need to install Python 2.7.9. If you don't want to mess with multiple installations of Python on your computer - you can install this version through [PyEnv](https://github.com/pyenv/pyenv).&nbsp;&nbsp;

# Integrating Home Assistant with Adafruit IO

## Usage

## Viewing data with Home Assistant&nbsp;
From the Home Assistant sidebar, **click Configuration**

Then, **click**  **Integrations****.**

![](https://cdn-learn.adafruit.com/assets/assets/000/070/870/medium800/sensors_Home_Assistant_and_Adafruit_Learning_System.png?1549562633)

&nbsp;

&nbsp;

**Scroll down** to&nbsp;Set up a new integration, find ESPHome and&nbsp; **click** &nbsp; **Configure&nbsp;**

![sensors_Home_Assistant.png](https://cdn-learn.adafruit.com/assets/assets/000/070/871/medium640/sensors_Home_Assistant.png?1549562687)

 **Set the Host to the&nbsp;`device_name`** &nbsp;you configured during the YAML configuration and&nbsp; **set the Port to 6053&nbsp;** (default for ESPHomeYAML).

Home Assistant should attempt to connect to the Feather.

![sensors_eshphome_setup.png](https://cdn-learn.adafruit.com/assets/assets/000/070/872/medium640/sensors_eshphome_setup.png?1549562889)

After connecting, the feather with BME280 will appear under&nbsp; **Configured** with three icons for the three types of data the BME280 sensor produces - humidity, pressure, and temperature.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/873/medium800/sensors_Home_Assistant_Feather_Configured.png?1549563078)

Navigating to the&nbsp; **Home&nbsp;** page should bring up the dashboard with the BME280 temperature, pressure, and humidity displayed.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/070/882/medium800/sensors_ha_ss.png?1549570824)

## Logging Sensor Data with Adafruit IO
Data from the Feather Huzzah sensor is also sent to Adafruit IO every `updated_interval` seconds.

You can view this data in real-time from the Adafruit IO monitor page:

![](https://cdn-learn.adafruit.com/assets/assets/000/070/884/medium800/sensors_live_Data.png?1549571010)

You can also create an Adafruit IO Dashboard with line graphs to visualize the data from the sensor over multiple weeks.

- For more information about working with dashboards in Adafruit IO, [visit the _Adafruit IO Basics: Dashboards&nbsp;_](https://learn.adafruit.com/adafruit-io-basics-dashboards)[guide.&nbsp;](https://learn.adafruit.com/adafruit-io-basics-dashboards)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/883/medium800thumb/sensors_io_scrobble.jpg?1549570844)

## Exporting Adafruit IO Data
![](https://cdn-learn.adafruit.com/assets/assets/000/070/886/medium800/sensors_IO_-_Feed__temperature.png?1549571407)

If you would like to download all of the stored data from a feed (the BME280's temperature data, for example), [you can do so by following this guide](https://learn.adafruit.com/adafruit-io-basics-feeds/downloading-feed-data).


## Featured Products

### Assembled Adafruit Feather HUZZAH with ESP8266 With Headers

[Assembled Adafruit Feather HUZZAH with ESP8266 With Headers](https://www.adafruit.com/product/3046)
Feather is the flagship development board from Adafruit, and like its namesake, it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the **Assembled Adafruit Feather HUZZAH ESP8266**  **with...**

In Stock
[Buy Now](https://www.adafruit.com/product/3046)
[Related Guides to the Product](https://learn.adafruit.com/products/3046/guides)
### Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM

[Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM](https://www.adafruit.com/product/3775)
The Raspberry Pi 3 Model B is the most popular Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 3 better? How about a&nbsp;_faster_ processor, 5 GHz WiFi, and updated Ethernet chip with PoE capability?...

In Stock
[Buy Now](https://www.adafruit.com/product/3775)
[Related Guides to the Product](https://learn.adafruit.com/products/3775/guides)
### Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor

[Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor](https://www.adafruit.com/product/2652)
Bosch has stepped up their game with their new BME280 sensor, an environmental sensor with temperature, barometric pressure&nbsp;and&nbsp;humidity! This sensor is great for all sorts of indoor environmental sensing and can even be used in both I2C and SPI!

This precision sensor from...

In Stock
[Buy Now](https://www.adafruit.com/product/2652)
[Related Guides to the Product](https://learn.adafruit.com/products/2652/guides)
### 5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable

[5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable](https://www.adafruit.com/product/1995)
Our all-in-one 5V 2.5 Amp + MicroUSB cable power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB...

In Stock
[Buy Now](https://www.adafruit.com/product/1995)
[Related Guides to the Product](https://learn.adafruit.com/products/1995/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Half Sized Premium Breadboard - 400 Tie Points

[Half Sized Premium Breadboard - 400 Tie Points](https://www.adafruit.com/product/64)
This is a cute, half-size breadboard with&nbsp;400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm&nbsp;x 5.5cm&nbsp;with a standard double-strip in the middle and two power rails on both sides.&nbsp;You can pull the power rails off easily to make the breadboard as...

In Stock
[Buy Now](https://www.adafruit.com/product/64)
[Related Guides to the Product](https://learn.adafruit.com/products/64/guides)
### Breadboarding wire bundle

[Breadboarding wire bundle](https://www.adafruit.com/product/153)
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent wires" that are sometimes sold with breadboards, and faster than stripping your own solid core wires. Makes...

In Stock
[Buy Now](https://www.adafruit.com/product/153)
[Related Guides to the Product](https://learn.adafruit.com/products/153/guides)
### Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh

[Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh](https://www.adafruit.com/product/3898)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **400mAh** for a total of about 1.9 Wh. If you need a larger (or smaller!)...

In Stock
[Buy Now](https://www.adafruit.com/product/3898)
[Related Guides to the Product](https://learn.adafruit.com/products/3898/guides)

## Related Guides

- [Textable Sensor with FONA and CircuitPython](https://learn.adafruit.com/textable-sensor-with-fona-and-circuitpython.md)
- [Air Quality Sensor 3D Printed Enclosure](https://learn.adafruit.com/air-quality-sensor-silo-house.md)
- [CircuitPython Libraries on Linux and the 96Boards DragonBoard 410c](https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-96boards-dragonboard-410c.md)
- [PyPortal IoT Weather Station](https://learn.adafruit.com/pyportal-iot-weather-station.md)
- [CircuitPython Libraries on MicroPython using the Raspberry Pi Pico](https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico.md)
- [IoT Air Quality Sensor with Adafruit IO](https://learn.adafruit.com/diy-air-quality-monitor.md)
- [Google Docs Sensor Logging From Your PC](https://learn.adafruit.com/gdocs-sensor-logging-from-your-pc.md)
- [Working with Multiple Same Address I2C Devices](https://learn.adafruit.com/working-with-multiple-i2c-devices.md)
- [CircuitPython Libraries on Linux and the NVIDIA Jetson Nano](https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano.md)
- [Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout](https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout.md)
- [CircuitPython Libraries on Linux and ODROID C2](https://learn.adafruit.com/circuitpython-libaries-linux-odroid-c2.md)
- [No-Code Offline Data Logger with WipperSnapper](https://learn.adafruit.com/no-code-offline-data-logging-with-wippersnapper.md)
- [Adafruit IO Home: Lights and Temperature ](https://learn.adafruit.com/adafruit-io-house-lights-and-temperature.md)
- [Feather + Raspberry Pi Weather Monitoring Network with LoRa or LoRaWAN](https://learn.adafruit.com/multi-device-lora-temperature-network.md)
- [3D Printed Case for Adafruit Feather](https://learn.adafruit.com/3d-printed-case-for-adafruit-feather.md)
