element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Extreme Environments
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Extreme Environments
  • More
  • Cancel
Experimenting with Extreme Environments
Blog Extreme Environment Home Assistance Sensors #4 ESPhome Add-on with Seeed Studio XIAO ESP32C3 and Grove Sensors
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experimenting with Extreme Environments to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 29 Apr 2024 5:31 AM Date Created
  • Views 794 views
  • Likes 7 likes
  • Comments 0 comments
Related
Recommended

Extreme Environment Home Assistance Sensors #4 ESPhome Add-on with Seeed Studio XIAO ESP32C3 and Grove Sensors

fyaocn
fyaocn
29 Apr 2024

image

#4 ESPhome Add-on with Seeed Studio XIAO ESP32C3 and Grove Sensors

For Extreme Environment Home Assistance Sensors

1 Brief

Add-ons are apps that can be run with Home Assistant but provide a quick and easy way to install, configure, and run within Home Assistant. Add-ons provide additional functionality whereas integrations connect Home Assistant to other apps.

ESPHome is Add-on to control microcontrollers by simple yet powerful configuration files and control them remotely through Home Automation systems. Supporting chips are,

image

With full functions to support peripherals, including sensors. This is how this experiment integrated sensors in extreme environment.

2 ESPhome Add-on

ESPhome is open sources and backend supported with Arduino Ecosystem and ESP-IDF if ESP chips are used. 

Interestingly, ESPhome use YAML format to define pins and functions, then transform into code readable by Arduino IDE, then build and flash into the chip. It is transparent to developers if do not open text-terminals. 

 

3 Seeed Studio XIAO ESP32C3 and Grove Sensors

Seeed Studio XIAO ESP32C3 is an IoT mini development board based on the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip. ESP32-C3 is a 32-bit RISC-V CPU, which includes an FPU (Floating Point Unit) for 32-bit single-precision arithmetic with powerful computing power. It has excellent radio frequency performance, supporting IEEE 802.11 b/g/n WiFi, and Bluetooth 5 (LE) protocols.

image

Seeed Studio XIAO ESP32C3 with Expansion Board Base for XIAO can add Grove sensors easily for fast deployment.

imageimage

Pinout map

image

Grove - AHT20 I2C Industrial Grade Temperature&Humidity Sensor  comes with I2C address of 0x38H

image

imageimage

The Grove - Light sensor integrates a photo-resistor(light dependent resistor) to detect the intensity of light. The resistance of photo-resistor decreases when the intensity of light increases. A dual OpAmp chip LM358 on board produces voltage corresponding to intensity of light(i.e. based on resistance value). The output signal is analog value, the brighter the light is, the larger the value.

image

imageimage

 

4 Add ESPhome

4.1 As previous blog Extreme Environment Home Assistance Sensors #3 Home Assistant on Raspberry Pi Compute Module 4 (CM4) - element14 Community, locate the ESPhome in Add-on Store list,

image

Then tick INSTALL to install  it,

image

The START can trigger the ESPhome

image

After start , it can be stopped or uninstalled.

image

Open Web UI to configure the ESPHome

image

After installed, ESPHome can be found in Settings--Add-Ons, same as JupyterLab

image

4.2 Add New Device

Press +New Device button,

image

Continue to set Name of this ADD-on and network SSID to be connected 

image

select ESP32-C3 as hardware platform

image

create configuration with unique name

image

The New device is created 

image

Press INSTALL for first firmware installation, one terminal popup to show progress,

image

download the firmware in any of the two format after firmware is generated.

image

It is downloaded into local drive

image

5 Build and Compile

Go back ESPHome pilot page again, cpu and memory usage can be shown.

image

The WebUI show the add-on just define and installed, OFFLINE in red means the XIAO-ESP32 in not properly work and link into the HAOS 

image

EDIT the YAML file

image

the SSID and Password is not set

image

Press INSTALL and select any of the four download means, the wirelessly is not possible since it is still OFFLLINE

image

Plug the ESP32 in the Raspberry CM4 with HAOS, it can not linked for now,

image

6 Download and Flash

Now, change to third selection and plug it in computer

image

First Download Project, 

image

it turns grey until project is build and ready for download

image

Press Download Project and select format again,

image

Open ESPHOME web 

image

Connect the device, it shows progress and connected if everything goes fine,

image

INSTALL it , it is first time to use,

image

Install start with Connect, Download and verify

image

now Install,

image

success after verified

image

If download again, it can hint what is on this device,

image

if connected to WIFI, set the SSID and password

image

it works.

image

Visit device , to see scheme

image

update the message

image

Another download choice, download bin directly to ESP32C3 plugged in this computer, select local bin file

image

Install it,

image

Again Erase memory

image

terminal popup for progress

image

The system discover the new device as Smart Alarm Clock in previous blog,

image

Configure it 

imageimage

Success!

image

As mentioned before Install from WIFI is not possible at start, Now it is ready. Select install from WIFI, the progress is same, erasing,

image

Installing

image

Success, it is perfect.

image

The terminal tells more, wait,

image

There is WIFI status! 

image

7 Summary

With all the efforts, what I have got? 

It is ONLINE now. 

image

That is how Seeed Studio XIAO ESP32C3 and Grove Sensors is added as add-on in HAOS ESPHome. In general, it shall not take much time if the YAML file is correct.

Not as easy as Getting Started with ESPHome and Home Assistant — ESPHome, but easy enough for most person even with limit experience on coding.

 

Reference

[1] Concepts and terminology - Home Assistant (home-assistant.io)

[2] ESPHome — ESPHome

[3] Getting Started with Seeed Studio XIAO ESP32C3 | Seeed Studio Wiki

[4] Grove Entry-level Sensors Guide | Seeed Studio Wiki

[5] Grove - AHT20 I2C Industrial Grade Temperature&Humidity Sensor | Seeed Studio Wiki

[6] Grove - Digital Light Sensor | Seeed Studio Wiki

[7] (+) Extreme Environment Home Assistance Sensors #3 Home Assistant on Raspberry Pi Compute Module 4 (CM4) - element14 Community

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube