Auch verfügbar in:
🇩🇪 Deutsch
ESPHome (Direct Mode)
Inhalt
Direct integration with ESPHome devices — without Home Assistant as intermediary. Multi-instance (one per device).
What the integration can do
- Live sensor values (temperature, brightness, voltage — whatever is in the YAML)
- Binary sensors (on/off)
- Text sensors
- Auto-detection of whether the device speaks v3 (modern framework, SSE stream) or v2 (classic REST)
Prerequisites
-
ESPHome device with the
web_server:component in the YAML, e.g.:web_server: port: 80 version: 3 # or 2 -
Optional: API password if
api: { password: "..." }is in the YAML
Setup in Mesh
Admin → Integrations → ESPHome → "Add":
label— e.g. "Heating ESP"baseUrl— e.g.http://esp-livingroom.localorhttp://192.168.1.50password(optional) — Basic Auth if API password is set
Using the widget
Admin → Content → Widgets → "ESPHome". Settings:
integrationIds[]— one or more devices- With multiple: one block per device, each collapsible
v3 vs v2 — what is the difference?
| Aspect | v3 (modern) | v2 (legacy) |
|---|---|---|
| Stream | SSE on /events |
REST polling |
| Framework | oi.esphome.io/v3/www.js |
older |
| Detection | HTML contains v3 marker | fallback |
| Implementation | node:http direct |
fetch() |
Important: Mesh uses
node:httpdirectly for v3 SSE (notfetch()), because Next.js Node runtime buffers SSE responses.
Troubleshooting
- "No data" →
web_server:component missing in YAML. Recompile + flash ESPHome - "Connection refused" on port 80 → port changed?
port: 8080in YAML, then add port tobaseUrl - *`.local` (mDNS) does not work** in the container — use an IP instead of hostname
- API password forgotten → re-flash ESPHome via OTA update with new YAML
API endpoints (for debugging)
| Endpoint | Purpose |
|---|---|
GET / |
HTML — v2/v3 detection |
GET /events (v3) |
SSE stream with all sensors |
GET /sensor/list (v2) |
REST listing of sensors |
GET /binary_sensor/list (v2) |
REST listing of binary sensors |
GET /text_sensor/list (v2) |
REST listing of text sensors |