File structure
ed1-hoas
ed1-message.sample.yaml
ed1-mqtt.sample.yaml
ed1-status.sample.yaml
secrets.yaml
secrets.sample.yaml
packages
core.yaml
hardware.yaml
display.yaml
fonts.yaml
buzzer.yaml
buttons.yaml
sensors.yaml
bluetooth.yaml
ir-receiver.yaml
led-matrix.yaml
mqtt.yaml
stepper.yaml
fonts
Modular package system
This project uses ESPHome’s package system for modularity. Each sample config uses!include to import reusable components from the packages/ directory.
Basic structure
Extending package components
Use!extend to override or add to components defined in packages:
Creating a new configuration
- Copy an existing sample (e.g.,
ed1-message.sample.yaml) - Update the
substitutionssection with your device name - Add or remove packages as needed
- Override display lambda and button behaviors for your use case
Secrets setup
-
Copy the sample file:
-
Edit
secrets.yamlwith your values: -
Generate an API key:
Package reference
The following sections describe what each package contains. These are automatically included when you use!include packages/<name>.yaml.
Core configuration (packages/core.yaml)
- name: Device hostname (lowercase, hyphens only)
- friendly_name: Display name in Home Assistant
- board: Generic ESP32 dev board
- framework: Arduino for best compatibility
Connectivity (packages/core.yaml)
- ap: Fallback access point if WiFi fails
- captive_portal: Web config when in AP mode
Hardware buses (packages/hardware.yaml)
- scan: true: Logs detected I2C devices on boot
Fonts (packages/fonts.yaml)
fonts/ directory.
TFT display (packages/display.yaml)
| Line | Content | Color |
|---|---|---|
| 1 | ”ED1 FULL” | Green |
| 2 | IP address | White |
| 3 | CPU temperature | White |
| 4 | Matrix text | Yellow |
INITR_GREENTAB: Use withrow_start: 3for 1.44” 128x128 displays (equivalent to Adafruit’s INITR_144GREENTAB)INITR_BLACKTAB: Alternative initializationINITR_18REDTAB: For 1.8” displays
LED matrix display (packages/led-matrix.yaml)
LED matrix light (packages/led-matrix.yaml)
- platform: esp32_rmt_led_strip: ESPHome native driver using ESP-IDF 5.x RMT
- rgb_order: GRB: Color order (Green-Red-Blue)
- chipset: WS2812: LED chipset type
- color_correct: Reduces brightness to 40% (power savings)
Note: We useesp32_rmt_led_stripinstead ofneopixelbusfor compatibility with the IR receiver. Both use the RMT peripheral but the native driver uses the newer ESP-IDF 5.x API.
Bluetooth proxy (packages/bluetooth.yaml)
MQTT (packages/mqtt.yaml)
Optional package for MQTT broker connectivity. Can be used alongside or instead of the native API.ed1/<device_name>/message- Subscribe to receive messagesed1/<device_name>/status- Publishesonline/offline
- Add MQTT credentials to
secrets.yaml - Include the package:
mqtt: !include packages/mqtt.yaml - Send messages via CLI:
mosquitto_pub -t ed1/ed1-message/message -m "Hello!"
- Use native API for Home Assistant integration (auto-discovery, encryption)
- Use MQTT for multi-system integration (Node-RED, scripts, other devices)
- Both can be used simultaneously
Stepper motors (packages/stepper.yaml)
Controls two 28BYJ-48 stepper motors via the MCP23009 I2C GPIO expander and ULN2004A Darlington drivers.- Uses direct I2C register writes (not ESPHome’s mcp23008 component)
- Full-step mode: 512 steps = 1 complete revolution
- Non-blocking interval-based stepping (2ms per step)
- Compatible with MicroBlocks “ED1 Stepper Motor” library
| Entity | Type | Description |
|---|---|---|
number.motor1_steps | Number | M1 steps (-4096 to +4096) |
number.motor2_steps | Number | M2 steps (-4096 to +4096) |
button.motor1_cw | Button | M1 clockwise (512 steps) |
button.motor1_ccw | Button | M1 counter-clockwise |
button.motor2_cw | Button | M2 clockwise (512 steps) |
button.motor2_ccw | Button | M2 counter-clockwise |
button.motors_stop | Button | Stop all motors, power down |
button.motor_diagnostic | Button | Log MCP23009 registers |
- 128 steps = 1/4 turn (90°)
- 256 steps = 1/2 turn (180°)
- 512 steps = 1 full turn (360°)
Buzzer (packages/buzzer.yaml)
IR receiver (packages/ir-receiver.yaml)
- dump: all: Logs all received IR codes (useful for debugging)
- on_nec/on_samsung: Protocol-specific handlers
- IR codes appear in ESPHome logs, not as Home Assistant entities
- Use to trigger automations based on remote control buttons
Touch buttons (packages/buttons.yaml)
- Default: 500
- If too sensitive: Increase threshold
- If not responding: Decrease threshold
- Enable
setup_mode: truetemporarily to see raw values
Sensors (packages/sensors.yaml)
wifi_rssi global provides a safe integer value for display code. Before the first WiFi signal reading (~10 seconds after boot), the sensor returns NaN which can cause display issues when cast to int. The global defaults to -100 dBm and updates on each reading.
Text input (packages/led-matrix.yaml)
Customization
Change display content
Modify thelambda in the display section:
Add button actions
Adjust matrix brightness
Changecolor_correct values (0-100%):
Troubleshooting
Device not detected via USB
The ED1 uses a CP2102N USB-to-UART chip. Install the driver:- Download from Silicon Labs CP210x Drivers
- Install for your OS (Windows, macOS, Linux)
- Reconnect the USB cable
- The device should appear as
/dev/ttyUSB0(Linux),/dev/cu.SLAB_USBtoUART(macOS), orCOM3(Windows)
Display shows garbage
- Check
modelsetting matches your display - Try adjusting
col_startandrow_startoffsets - Verify SPI pins are correct
Touch buttons not working
- Enable
setup_mode: trueinesp32_touch - Check logs for raw touch values
- Adjust threshold based on idle vs touched values
LED matrix wrong colors
- Change
rgb_orderfromGRBtoRGBorBRG - Some strips use different color orders
WiFi connection issues
- Check signal strength sensor
- Reduce
update_intervalon sensors to reduce traffic - Try static IP configuration
Device not discovered
- Ensure API encryption key matches
- Check Home Assistant logs for connection attempts
- Verify device is on same network subnet