Skip to content

Instantly share code, notes, and snippets.

@SqyD
Last active April 21, 2024 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SqyD/d33b034c42dbc277ebb928ae45663476 to your computer and use it in GitHub Desktop.
Save SqyD/d33b034c42dbc277ebb928ae45663476 to your computer and use it in GitHub Desktop.
ESPHome for HackerHotel 2024 Badge
esphome:
name: hh24-badge
friendly_name: HH24 badge
esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
type: esp-idf
version: 5.1.2
platform_version: 6.5.0 # Need at least 6.4 for ESP32-C6
sdkconfig_options:
# Not all of these are hard requirements I'm sure.
CONFIG_ESPTOOLPY_FLASHSIZE_16MB: y
CONFIG_ESPTOOLPY_FLASHSIZE: '16MB'
CONFIG_SOC_GPIO_PORT: '1'
CONFIG_SOC_GPIO_PIN_COUNT: '31'
CONFIG_SOC_RMT_SUPPORTED: y
CONFIG_PARTITION_TABLE_OFFSET: '0x8000'
CONFIG_SOC_ADC_SUPPORTED: y
CONFIG_SOC_BT_SUPPORTED: y
flash_size: 16MB
partitions: hh24-badge/partitions.csv
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "generate_a_new_key!"
ota:
password: "changemerightaway"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Hh24-Badge Fallback Hotspot"
password: "anotherplacetochange"
captive_portal:
output:
- platform: gpio
pin: 15
id: 'relay_out'
switch:
- platform: output
name: "Hh24 Relay"
output: 'relay_out'
binary_sensor:
- platform: gpio
pin: 3
name: "HH24 Battery Charging"
device_class: battery_charging
filters:
- invert:
font:
- file: "gfonts://Roboto"
id: roboto_24
size: 24
spi:
clk_pin: 21
mosi_pin: 19
miso_pin: 20
display:
- platform: waveshare_epaper
cs_pin: 8
dc_pin: 5
busy_pin: 10
reset_pin: 16
model: 2.90inv2-r2
# full_update_every: 60
rotation: 90
lambda: |-
it.print(0, 0, id(roboto_24), "Hello Badge Team!");
light: # started working with ESPHome version 2024.4.0
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: 22
num_leds: 1
rmt_channel: 0
chipset: ws2812
name: "HH24 RGB Light"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment