Skip to content

biotinker/pocuter-esphome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

pocuter-esphome

ESPHome configuration for the Pocuter One

The Pocuter company appears to have imploded leaving the devices less useful.

I have a few of them that I wanted to make use of, and I couldn't find an existing ESPHome configuration, so I made one. Sharing it here in the hopes it helps someone else revive their hardware.

PRs welcome.

esphome:
  name: your-name-here
  friendly_name: your-name-here

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: something

ota:
  - platform: esphome
    password: something

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Pocuter Fallback Hotspot"
    password: something

captive_portal:

external_components:
  - source: github://patrick3399/esphome_components

spi:
  clk_pin: 5
  mosi_pin: 6
  miso_pin: 10

i2c:
  id: main_i2c
  sda: 8
  scl: 9

sensor:
  - platform: adc
    pin: 1
    name: "Light Sensor Brightness"
    update_interval: 5s
  - platform: adc
    pin: 2
    name: "Battery Level"
    update_interval: 5s

aw9523:
  id: aw9523_hub
  address: 0x5b
  update_interval: 0ms
  i2c_id: main_i2c

font:
  - file: "gfonts://Roboto"
    id: Roboto24
    size: 24

switch:
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 2
    name: "Display Backlight"
    # Default to on
    inverted: True
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 10
    name: "Red LED"
    inverted: True
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 11
    name: "Green LED"
    inverted: True
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 0
    name: "Blue LED"
    inverted: True

binary_sensor:
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 6
      inverted: true
      mode:
        input: true
    name: "Button 1"
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 5
      inverted: true
      mode:
        input: true
    name: "Button 2"
  - platform: gpio
    pin:
      aw9523: aw9523_hub
      number: 1
      inverted: true
      mode:
        input: true
    name: "Button 3"

display:
  - platform: ssd1331_spi
    reset_pin:
      aw9523: aw9523_hub
      number: 12
    cs_pin:
      aw9523: aw9523_hub
      number: 7
    dc_pin:
      aw9523: aw9523_hub
      number: 13
    lambda: |-
      it.print(0, 0, id(Roboto24), "Hello");
      it.print(0, 30, id(Roboto24), "World!");

# Accelerometer
# Theoretically the MXC4005XC can measure both acceleration and temperature
# I suspect the temperature reading will be wildly inaccurate and not useful
# No ESPHome integration directly exists for this component anyway and give the above it's not sufficiently useful for me to write my own
# Anyone reading this who feels ambitious, try this https://github.com/honnet/MXC4005XC
# It's just an I2C device so it shouldn't be too bad

# Microphone
# There is a microphone connected to pin 0 on the main chip, intended for use as incoming PWM for consumption by the ADC
# As far as I can tell one is intended to capture the raw waveform somehow and save that:
# https://github.com/pocuter/PocuterLib/blob/master/include/hal/esp32-c3/pwmSound/pwm_audio.h
# I couldn't immediately figure out the best way to do this in esphome, and also I don't currently have need of a microphone, so
# I'm leaving this out for now.

About

ESPHome configuration for the Pocuter One

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published