Can someone explain ESPHome like I'm 5?

I have Home Assistant installed on my Synology NAS as a VM and it runs great. I never got into Raspberry Pi’s and all that stuff as, well, when I compared the pricing for a Raspberry Pi to a mini-PC or money towards something else, that “something else” usually wins. However, ESPHome piques my interest but I’m having a hard time really understanding it. Does it connect to a Raspberry Pi (or similar type of device)? Basically, one thing that really caught my attention was when I was reading about it’s audio capabilities. Would I be able to make any speaker with a 3.5mm input a “smart speaker” or “wireless speaker”?

Any links or help would be appreciated!

Thanks,
AJ

2 Likes

Yes, sure!

ESPHome is a technology to put together smart connected devices using ESP8266 and ESP32 computers (tiny low-power computers which have Wi-FI and Bluetooth connectivity).

These computers are not full PCs like a Raspberry Pi (on which you would normally install a complete Linux system). Rather, the programming that goes into these devices is far lower level; you could even argue these devices, when programmed, have no “operating system” as we understand normally. These devices have traditionally been programmed using Arduino tech, which made them very hard to program for almost everyone alive today.

Unlike standard Arduino, ESPHome is much more like a LEGO assemble-your-device experience; you describe (via YAML) what each part hooked to the board “means” (in terms of “this device is a light, that gizmo is a thermometer, this other gizmo hooked here is a light sensor”). There is one similarity to standard Arduino programming, in that the initial programming (“flashing”) of the computer must be done via a serial adapter — however, once ESPHome has been installed to the computer, you can subsequently upgrade the computer’s software over the air.

ESPHome has native compatibility with Home Assistant, which means that sensors and switches you program on your board can by default appear as entities in Home Assistant directly. E.g. if your ESP device has an LED connected on pin 5, you can write some very simple YAML (to be programmed into the device) that makes this LED appear as a light in Home Assistant — and toggling the switch in Home Assistant would turn the LED on and off.

Finally, ESPHome — just like Arduino programming — also lets you write code to program your device as well. This is the joker card for doing things that simply wouldn’t be possible via the standard LEGO building blocks-like approach.

Yes, given the right hardware (most likely an ESP board, an amplifier, and an I2S chip, all hooked together properly) you can use ESPHome to make a “connected speaker” which can present itself to Home Assistant, or possibly even serve other protocols like Bluetooth.

I hope that was helpful.

EDIT: I wrote a longer explainer up here:

16 Likes

Arduino is a microprocessor that connects to stuff via wires and enabled you to observe sensors and control relays and so forth. ESP devices are like a networked arduino, they have wifi.

Esphome is a programming system for esp devices. Once programmed the devices autmotically communicate with Home Assistant.

1 Like

ESPHome is like a cardboard box. It is the best toy in the world and it can do anything.

2 Likes

:point_down:

ESPHome Media Players

Pick your product and install ESPHome on it to use it directly as a media player inside Home Assistant. No programming or other software required.

Esphome is usually quite handy for people without programming skills (like me) as everything is just configured in yaml, the esphome website states:

_images/logo-text.svg

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.

To get a little overview how things work definitely check the getting started guide:

1 Like

I apologize for the late response, I didn’t get notified of a response and forgot to check back in… but your explanation has finally made me understand what it does. I was so confused about if there was an operating system, and if not, how do you do anything? LOL.

That said, I don’t have any Raspberry Pi’s or similar devices (like an Orange Pi) and run HA on a VM on my NAS. Doing some internet sleuthing, I came across this interesting device (MakerFocus M5Stack Core2 ESP32 Development Kit 2nd Generation) but I’m not sure what exactly to look for to know if it’s a powerful enough device… because it looks rather weak, but since there’s no OS then perhaps this device can be a good way for me to learn more about ESP32 and connect a few things and whatnot.

Would that be a fair assessment? If not, do you have any recommendations device wise?

Thank you again for your terrific explanation!
AJ

I am not sure whether the m5 core 2 is completely compatible with esphome. I think there were some problems with the axp power management chip.

There are plenty of esp32 and esp8266 dev boards out there eg . https://www.amazon.com/HiLetgo-ESP-32S-Bluetooth-Wireless-ESP-WROOM-32/dp/B077KJNVFP/ref=sr_1_1_sspa What features are you after?

I just went cheap bag of es8266 Ali express. Cheap and cheerful. Still messing around with originals. You will make mistakes to learn

So right now actually I’m looking at controlling my Switchbot Motion Sensor via ESP32, Bluetooth, and WiFi as the sensor is too far for Bluetooth. After watching a video, it seems like I can use almost any ESP32 board so long as it has WiFi and BLE. So, I wouldn’t need any other hardware to connect it to, is that right?

That’s about right. And you can take the shortcut and flash a pre-made esphome binary directly from your browser :racing_car::dash:

Just stick to the “classic” ESP32’s for the start and avoid the newer -C, -S and -H versions (for now) as they are still ruff edges regarding some functionalities :gear:

1 Like