Skip to content

Instantly share code, notes, and snippets.

@dgalli1
Last active December 6, 2025 23:16
Show Gist options
  • Select an option

  • Save dgalli1/39a3c2fd3a4059e869a49f114a3684c8 to your computer and use it in GitHub Desktop.

Select an option

Save dgalli1/39a3c2fd3a4059e869a49f114a3684c8 to your computer and use it in GitHub Desktop.
EspHome Deepdeck Ahuyama Deepsea
esphome:
name: deepdeck-ahuyama
esp32:
board: esp32dev
framework:
type: esp-idf
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "deepdeck"
password: "SuperSecure"
api:
ota:
- platform: esphome
# Enable logging
logger:
# I2C Bus for OLED and Gesture Sensor
i2c:
sda: GPIO21
scl: GPIO22
scan: true
# 128x64 Monochrome OLED Screen
# display:
# - platform: ssd1306_i2c
# model: "SSD1306 128x64"
# address: 0x3C
# lambda: |-
# it.print(0, 0, id(font1), "DeepDeck Ahuyama");
# font:
# - file: "gfonts://Roboto"
# id: font1
# size: 14
# Gesture sensor (APDS-9960)
apds9960:
address: 0x39
update_interval: 60s
sensor:
# Rotary Encoders
- platform: rotary_encoder
name: "Right Knob"
id: right_knob
pin_a: GPIO32
pin_b: GPIO33
on_clockwise:
- homeassistant.event:
event: esphome.right_knob_turned
data:
direction: "clockwise"
on_anticlockwise:
- homeassistant.event:
event: esphome.right_knob_turned
data:
direction: "anticlockwise"
internal: true
- platform: rotary_encoder
name: "Left Knob"
id: left_knob
pin_a: GPIO25
pin_b: GPIO26
on_clockwise:
- homeassistant.event:
event: esphome.left_knob_turned
data:
direction: "clockwise"
on_anticlockwise:
- homeassistant.event:
event: esphome.left_knob_turned
data:
direction: "anticlockwise"
internal: true
# Gesture sensor
- platform: apds9960
type: PROXIMITY
name: "Proximity"
- platform: apds9960
type: RED
name: "Red"
- platform: apds9960
type: GREEN
name: "Green"
- platform: apds9960
type: BLUE
name: "Blue"
# 18 SK6812 RGB LEDs (16 keys + 2 status)
light:
# Matrix backlight (16 LEDs)
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO17
num_leds: 16
chipset: SK6812
name: "Matrix Backlight"
id: matrix_leds
effects:
- random:
- strobe:
- flicker:
- addressable_rainbow:
- addressable_scan:
- addressable_twinkle:
# Individual matrix LEDs
- platform: partition
name: "Key 1"
segments:
- id: matrix_leds
from: 0
to: 0
- platform: partition
name: "Key 2"
segments:
- id: matrix_leds
from: 1
to: 1
- platform: partition
name: "Key 3"
segments:
- id: matrix_leds
from: 2
to: 2
- platform: partition
name: "Key 4"
segments:
- id: matrix_leds
from: 3
to: 3
- platform: partition
name: "Key 5"
segments:
- id: matrix_leds
from: 4
to: 4
- platform: partition
name: "Key 6"
segments:
- id: matrix_leds
from: 5
to: 5
- platform: partition
name: "Key 7"
segments:
- id: matrix_leds
from: 6
to: 6
- platform: partition
name: "Key 8"
segments:
- id: matrix_leds
from: 7
to: 7
- platform: partition
name: "Key 9"
segments:
- id: matrix_leds
from: 8
to: 8
- platform: partition
name: "Key 10"
segments:
- id: matrix_leds
from: 9
to: 9
- platform: partition
name: "Key 11"
segments:
- id: matrix_leds
from: 10
to: 10
- platform: partition
name: "Key 12"
segments:
- id: matrix_leds
from: 11
to: 11
- platform: partition
name: "Key 13"
segments:
- id: matrix_leds
from: 12
to: 12
- platform: partition
name: "Key 14"
segments:
- id: matrix_leds
from: 13
to: 13
- platform: partition
name: "Key 15"
segments:
- id: matrix_leds
from: 14
to: 14
- platform: partition
name: "Key 16"
segments:
- id: matrix_leds
from: 15
to: 15
# Status LEDs (2 LEDs)
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO23
num_leds: 2
chipset: SK6812
name: "Status LEDs"
id: status_leds
effects:
- random:
- strobe:
- flicker:
- addressable_rainbow:
- addressable_scan:
- addressable_twinkle:
# Individual status LEDs
- platform: partition
name: "Status LED 1"
segments:
- id: status_leds
from: 0
to: 0
- platform: partition
name: "Status LED 2"
segments:
- id: status_leds
from: 1
to: 1
# 4x4 Matrix Keypad
# Rows: 32, 33, 19, 18
# Cols: 16, 4, 2, 15
binary_sensor:
- platform: gpio
name: "Right Knob Button"
pin:
number: GPIO27
mode: INPUT_PULLUP
on_press:
- homeassistant.event:
event: esphome.right_knob_button_pressed
data:
device: "deepdeck"
- platform: gpio
name: "Left Knob Button"
pin:
number: GPIO34
mode:
input: true
on_press:
- homeassistant.event:
event: esphome.left_knob_button_pressed
data:
device: "deepdeck"
# Gesture sensor
- platform: apds9960
direction: UP
name: "Gesture Up"
- platform: apds9960
direction: DOWN
name: "Gesture Down"
- platform: apds9960
direction: LEFT
name: "Gesture Left"
- platform: apds9960
direction: RIGHT
name: "Gesture Right"
# Text sensor for keypad button presses
text_sensor:
- platform: template
name: "Last Key Pressed"
id: last_key_pressed
matrix_keypad:
id: keypad
columns:
- pin: GPIO16
- pin: GPIO15
- pin: GPIO14
- pin: GPIO13
rows:
- pin: GPIO0
- pin: GPIO4
- pin: GPIO5
- pin: GPIO12
has_diodes: true
keys: "1234567890ABCDEF"
on_key:
- text_sensor.template.publish:
id: last_key_pressed
state: !lambda 'return std::string(1, x);'
- homeassistant.event:
event: esphome.keypad_button_pressed
data:
key: !lambda 'return std::string(1, x);'
device: "deepdeck"
@dgalli1
Copy link
Author

dgalli1 commented Dec 5, 2025

This is a complete config with all default sensor for the deepdeck for ESPHome.
Make sure to clear the flash storage when switching over from freertos.
Also make sure to flash the complete image inclusive the bootloader and not just the package that you can download from homeassistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment